CEvent/StationSimData.h
Go to the documentation of this file.
1 #ifndef _cevt_StationSimData_h_
2 #define _cevt_StationSimData_h_
3 
4 #include <vector>
5 #include <map>
6 #include <string>
7 #include <boost/iterator/indirect_iterator.hpp>
8 #include <utl/ShadowPtr_fwd.h>
9 #include <utl/TimeStamp.h>
10 
11 
12 static const char CvsId_cevt_StationSimData[] =
13  "$Id$";
14 
15 
16 namespace utl {
17  class Particle;
18 }
19 
20 namespace cevt {
21 
22  // class StationGPSData;
23  // class StationTriggerData;
24 
35 
36  private:
38  typedef std::vector<ParticlePtr> InternalParticleVector;
39  typedef InternalParticleVector::iterator InternalParticleIterator;
40  typedef InternalParticleVector::const_iterator InternalConstParticleIterator;
41 
42  public:
43  typedef boost::indirect_iterator<InternalParticleIterator,
45  typedef boost::indirect_iterator<InternalConstParticleIterator,
47 
50  ConstParticleIterator ParticlesBegin() const { return fParticles.begin(); }
51 
54  ConstParticleIterator ParticlesEnd() const { return fParticles.end(); }
55 
57  void AddParticle(const utl::Particle& particle);
58 
60  void ClearParticleList();
61 
63 
67 
71 
74 
77 
78 
79 
80 
82  unsigned int GetNumberOfMuons() const { return fNumberOfMuons; }
83  unsigned int GetNumberOfElectrons() const { return fNumberOfElectrons; }
86 
88  void SetNumberOfMuons(const unsigned int number) {fNumberOfMuons = number;}
89  void SetNumberOfElectrons(const unsigned int number) {fNumberOfElectrons = number;}
90  void SetNumberOfElectronsFromMuons(const unsigned int number) {fNumberOfElectronsFromMuons = number;}
91  void SetNumberOfElectronsFromPhotons(const unsigned int number) {fNumberOfElectronsFromPhotons = number;}
92 
93  // CBT
94 
95  // typedef std::vector<utl::TimeStamp> TriggerTimeVector;
96  // typedef TriggerTimeVector::iterator TriggerTimeIterator;
97  // typedef TriggerTimeVector::const_iterator ConstTriggerTimeIterator;
98 
99  // /// Beginning of simulated local trigger times list
100  // TriggerTimeIterator TriggerTimesBegin() { return fTriggerTimes.begin(); }
101  // ConstTriggerTimeIterator TriggerTimesBegin() const { return fTriggerTimes.begin(); }
102 
103  // /// End of simulated local trigger times list
104  // TriggerTimeIterator TriggerTimesEnd() { return fTriggerTimes.end(); }
105  // ConstTriggerTimeIterator TriggerTimesEnd() const { return fTriggerTimes.end(); }
106 
107  // /// Check whether there is trigger data at the given time
108  // bool HasTriggerData(const utl::TimeStamp& lsTime) const;
109 
110  // /// Check whether there is a GPS data at the given time
111  // bool HasGPSData(const utl::TimeStamp& lsTime) const;
112 
113  // /// Get simulated GPSData
114  // StationGPSData& GetGPSData(const utl::TimeStamp& lsTime);
115  // const StationGPSData& GetGPSData(const utl::TimeStamp& lsTime) const;
116 
117  // /// Creates the trigger data at the given time and also the GPS data to guarantee they are both created
118  // void MakeTriggerAndGPSData(const utl::TimeStamp& lsTime);
119 
120  // /// Get simulated TriggerData
121  // StationTriggerData& GetTriggerData(const utl::TimeStamp& lsTime);
122  // const StationTriggerData& GetTriggerData(const utl::TimeStamp& lsTime) const;
123 
124 
125  // End CBT
126 
127  private:
128  StationSimData();
129  ~StationSimData();
130 
131  // CBT
132  // typedef std::pair<utl::ShadowPtr<StationTriggerData>,
133  // utl::ShadowPtr<StationGPSData> > TriggerGPSPair;
134  // typedef std::map<utl::TimeStamp, TriggerGPSPair> TriggerGPSMap;
135  // typedef TriggerGPSMap::iterator TriggerGPSMapIterator;
136  // typedef TriggerGPSMap::const_iterator ConstTriggerGPSMapIterator;
137  // TriggerTimeVector fTriggerTimes;
138  // TriggerGPSMap fTriggerAndGPSData;
139  // end CBT
140 
141  InternalParticleVector fParticles; // Particles entering the RPC
142  InternalParticleVector fInjectedParticles; // Particles injected in the RPC virtual cylinder by the CachedShowerRegenerator
143 
144  unsigned int fNumberOfMuons;
145  unsigned int fNumberOfElectrons;
148 
149  friend class Station;
151 
152  };
153 
154 }
155 
156 
157 #endif
158 
159 // Configure (x)emacs for this file ...
160 // Local Variables:
161 // mode: c++
162 // compile-command: "make -C .. -k"
163 // End:
pointer with built-in initialization, deletion, deep copying
Definition: ShadowPtr.h:163
void AddInjectedParticle(const utl::Particle &particle)
Add a simulated particle to the station.
InternalParticleVector fParticles
boost::indirect_iterator< InternalParticleIterator, utl::Particle & > ParticleIterator
void AddParticle(const utl::Particle &particle)
Add a simulated particle to the station.
Station Level Simulated Data
unsigned int GetNumberOfElectrons() const
ParticleIterator InjectedParticlesEnd()
End of simulated particles entering the station.
Describes a particle for Simulation.
Definition: Particle.h:26
unsigned int fNumberOfElectronsFromMuons
ConstParticleIterator ParticlesEnd() const
unsigned int fNumberOfElectronsFromPhotons
InternalParticleVector fInjectedParticles
unsigned int GetNumberOfElectronsFromMuons() const
void SetNumberOfMuons(const unsigned int number)
Set the number of muons that entered the station.
ParticleIterator InjectedParticlesBegin()
Now the list of particles injected in the RPC virtual cylinder.
void SetNumberOfElectrons(const unsigned int number)
unsigned int GetNumberOfMuons() const
Get the number of the different ionizing particle types that entered the station. ...
boost::indirect_iterator< InternalConstParticleIterator, const utl::Particle & > ConstParticleIterator
utl::ShadowPtr< utl::Particle, utl::NoDereferenceCheck > ParticlePtr
void ClearParticleList()
Clear the station&#39;s particle list.
class to hold data at Station level
void SetNumberOfElectronsFromMuons(const unsigned int number)
ParticleIterator ParticlesBegin()
Beginning of simulated particles entering the station.
void ClearInjectedParticleList()
Clear the station&#39;s particle list.
struct particle_info particle[80]
std::vector< ParticlePtr > InternalParticleVector
static const char CvsId_cevt_StationSimData[]
InternalParticleVector::iterator InternalParticleIterator
ConstParticleIterator ParticlesBegin() const
unsigned int GetNumberOfElectronsFromPhotons() const
ConstParticleIterator InjectedParticlesBegin() const
void SetNumberOfElectronsFromPhotons(const unsigned int number)
ParticleIterator ParticlesEnd()
End of simulated particles entering the station.
ConstParticleIterator InjectedParticlesEnd() const
InternalParticleVector::const_iterator InternalConstParticleIterator

, generated on Tue Sep 26 2023.