QwGeant4
QweakSimUserLumi_DetectorEvent.hh
Go to the documentation of this file.
1 
2 // QweakSimUserLumi_DetectorEvent.hh
3 
4 /////// --------------------------------------------------------------------
5 
6 #ifndef QweakSimUserLumi_DetectorEvent_h
7 #define QweakSimUserLumi_DetectorEvent_h
8 
9 /////// --------------------------------------------------------------------
10 
11 //--- system includes
12 #include <vector>
13 
14 //--- root includes
15 #include "TObject.h"
16 #include "TString.h"
17 
18 
19 /////// --------------------------------------------------------------------
20 
21 class QweakSimUserLumi_DetectorEvent : public TObject
22 {
23 
24 private:
25 
26  //TTree *DataTree;
27  //TBranch *secondaryElectronBranch;
28 
29  //std::vector<Float_t> DetectorID;
30 
32 
33  std::vector<Float_t> TrackID;
34 
35  std::vector<TString> ParticleName;
36  std::vector<Int_t> ParticleType;
37 
38  std::vector<Float_t> GlobalTimeOfHit;
39 
40  Int_t HasBeenHit;
41  std::vector<Int_t> EdgeEventFlag;
42  Int_t NbOfHits;
43 
45 
46  std::vector<Float_t> HitGlobalPositionX;
47  std::vector<Float_t> HitGlobalPositionY;
48  std::vector<Float_t> HitGlobalPositionZ;
49 
50  std::vector<Float_t> HitLocalPositionX;
51  std::vector<Float_t> HitLocalPositionY;
52  std::vector<Float_t> HitLocalPositionZ;
53 
54  std::vector<Float_t> HitLocalExitPositionX;
55  std::vector<Float_t> HitLocalExitPositionY;
56  std::vector<Float_t> HitLocalExitPositionZ;
57 
58  std::vector<Float_t> OriginVertexPositionX;
59  std::vector<Float_t> OriginVertexPositionY;
60  std::vector<Float_t> OriginVertexPositionZ;
61 
62  std::vector<Float_t> LocalVertexMomentumDirectionX;
63  std::vector<Float_t> LocalVertexMomentumDirectionY;
64  std::vector<Float_t> LocalVertexMomentumDirectionZ;
65 
66  std::vector<Float_t> OriginVertexMomentumDirectionX;
67  std::vector<Float_t> OriginVertexMomentumDirectionY;
68  std::vector<Float_t> OriginVertexMomentumDirectionZ;
69 
70  std::vector<Float_t> OriginVertexThetaAngle;
71  std::vector<Float_t> OriginVertexPhiAngle;
72 
73  std::vector<Float_t> OriginVertexKineticEnergy;
74  std::vector<Float_t> OriginVertexTotalEnergy;
75 
76  std::vector<Float_t> LocalVertexKineticEnergy;
77  std::vector<Float_t> LocalVertexTotalEnergy;
78 
79  //Float_t PrimaryQ2;
80  //Float_t CrossSection;
81  //Float_t CrossSectionWeight;
82 
83  std::vector<Float_t> GlobalPhiAngle;
84  std::vector<Float_t> GlobalThetaAngle;
85 
86  //--- deposited energy in the Lumi in one step
87  std::vector<Float_t> DepositedEnergy;
89  std::vector<Float_t> Rate;
90 
91 
92 public:
93 
94  //--- Constructor
96 
97  //--- Destructor
99 
100  //void SetTree(TTree *data);
101  void Initialize();
102 
103  //----------------- PrimaryEventNumber
104 
105  void StorePrimaryEventNumber(Int_t pen) { PrimaryEventNumber = pen; }
107 
108  //----------------- TrackID
109 
110  void StoreTrackID(Float_t tid) { TrackID.push_back(tid); }
111  std::vector<Float_t> GetTrackID() const {return TrackID;}
112 
113  //----------------- ParticleName & ParticleType
114 
115  void StoreParticleName(TString pn) { ParticleName.push_back(pn); }
116  std::vector<TString> GetParticleName() const {return ParticleName;}
117 
118  void StoreParticleType(Int_t pt) { ParticleType.push_back(pt); }
119  std::vector<Int_t> GetParticleType() const {return ParticleType;}
120 
121  //----------------- GlobalTimeOfHit
122 
123  void StoreGlobalTimeOfHit(Float_t gtime) { GlobalTimeOfHit.push_back(gtime); }
124  std::vector<Float_t> GetGloablTimeOfHit() const {return GlobalTimeOfHit;}
125 
126  //----------------- HasBeenHit & EdgeEventFlag & NbOfHits
127 
128  void StoreDetectorHasBeenHit(Int_t n) { HasBeenHit = n; }
129  Int_t GetDetectorHasBeenHit() const {return HasBeenHit;}
130 
131  void StoreEdgeEventFlag(Int_t flag) { EdgeEventFlag.push_back(flag); }
132  std::vector<Int_t> GetEdgeEventFlag() const {return EdgeEventFlag;}
133 
134  void StoreDetectorNbOfHits(Int_t nd) { NbOfHits = nd; }
135  Int_t GetDetectorNbOfHits() const {return NbOfHits;}
136 
137  //----------------- HitGlobalPosition
138 
139  void StoreDetectorGlobalPositionX(Float_t lx) { HitGlobalPositionX.push_back(lx); }
140  std::vector<Float_t> GetDetectorGlobalPositionX() const {return HitGlobalPositionX;}
141 
142  void StoreDetectorGlobalPositionY(Float_t ly) { HitGlobalPositionY.push_back(ly); }
143  std::vector<Float_t> GetDetectorGlobalPositionY() const {return HitGlobalPositionY;}
144 
145  void StoreDetectorGlobalPositionZ(Float_t lz) { HitGlobalPositionZ.push_back(lz); }
146  std::vector<Float_t> GetDetectorGlobalPositionZ() const {return HitGlobalPositionZ;}
147 
148  //----------------- HitLocalPosition
149 
150  void StoreDetectorLocalPositionX(Float_t lx) { HitLocalPositionX.push_back(lx); }
151  std::vector<Float_t> GetDetectorLocalPositionX() const {return HitLocalPositionX;}
152 
153  void StoreDetectorLocalPositionY(Float_t ly) { HitLocalPositionY.push_back(ly); }
154  std::vector<Float_t> GetDetectorLocalPositionY() const {return HitLocalPositionY;}
155 
156  void StoreDetectorLocalPositionZ(Float_t lz) { HitLocalPositionZ.push_back(lz); }
157  std::vector<Float_t> GetDetectorLocalPositionZ() const {return HitLocalPositionZ;}
158 
159  //----------------- HitLocalExitPosition
160 
161  void StoreDetectorLocalExitPositionX(Float_t lx) { HitLocalExitPositionX.push_back(lx); }
162  std::vector<Float_t> GetDetectorLocalExitPositionX() const {return HitLocalExitPositionX;}
163 
164  void StoreDetectorLocalExitPositionY(Float_t ly) { HitLocalExitPositionY.push_back(ly); }
165  std::vector<Float_t> GetDetectorLocalExitPositionY() const {return HitLocalExitPositionY;}
166 
167  void StoreDetectorLocalExitPositionZ(Float_t lz) { HitLocalExitPositionZ.push_back(lz); }
168  std::vector<Float_t> GetDetectorLocalExitPositionZ() const {return HitLocalExitPositionZ;}
169 
170  //----------------- OriginVertexPosition
171 
172  void StoreOriginVertexPositionX(Float_t vx) { OriginVertexPositionX.push_back(vx); }
173  std::vector<Float_t> GetOriginVertexPositionX() const {return OriginVertexPositionX;}
174 
175  void StoreOriginVertexPositionY(Float_t vy) { OriginVertexPositionY.push_back(vy); }
176  std::vector<Float_t> GetOriginVertexPositionY() const {return OriginVertexPositionY;}
177 
178  void StoreOriginVertexPositionZ(Float_t vz) { OriginVertexPositionZ.push_back(vz); }
179  std::vector<Float_t> GetOriginVertexPositionZ() const {return OriginVertexPositionZ;}
180 
181  //----------------- LocalVertexMomentumDirection
182 
185 
188 
191 
192  //----------------- OrinVertexMomentumDirection
193 
196 
199 
202 
203  //----------------- OriginVertexThetaAngle & PhiAngle
204 
205  void StoreOriginVertexThetaAngle(Float_t theta) { OriginVertexThetaAngle.push_back(theta); }
206  std::vector<Float_t> GetOriginVertexThetaAngle() const {return OriginVertexThetaAngle;}
207 
208  void StoreOriginVertexPhiAngle(Float_t phi) { OriginVertexPhiAngle.push_back(phi); }
209  std::vector<Float_t> GetOriginVertexPhiAngle() const {return OriginVertexPhiAngle;}
210 
211  //----------------- OrigiVertexKineticEnergy & TotalEnergy
212 
213  void StoreOriginVertexKineticEnergy(Float_t ekin) { OriginVertexKineticEnergy.push_back(ekin); }
214  std::vector<Float_t> GetOriginVertexKineticEnergy() const {return OriginVertexKineticEnergy;}
215 
216  void StoreOriginVertexTotalEnergy(Float_t etot) { OriginVertexTotalEnergy.push_back(etot); }
217  std::vector<Float_t> GetOriginVertexTotalEnergy() const {return OriginVertexTotalEnergy;}
218 
219  //----------------- LocalVertexKinetcEnergy & TotalEnergy
220 
221  void StoreDetectorLocalVertexKineticEnergy(Float_t ekin) { LocalVertexKineticEnergy.push_back(ekin); }
222  std::vector<Float_t> GetDetectorLocalVertexKineticEnergy() const {return LocalVertexKineticEnergy;}
223 
224  void StoreDetectorLocalVertexTotalEnergy(Float_t etot) { LocalVertexTotalEnergy.push_back(etot); }
225  std::vector<Float_t> GetDetectorLocalVertexTotalEnergy() const {return LocalVertexTotalEnergy;}
226 
227  //----------------
228 
229  /*
230  void StorePrimaryQ2(Float_t pq2) { PrimaryQ2 = pq2; }
231  Float_t GetPrimaryQ2() const {return PrimaryQ2; }
232 
233  void StoreCrossSection(Float_t cs) {CrossSection = cs;}
234  Float_t GetCrossSection() const {return CrossSection; }
235 
236  void StoreCrossSectionWeight(Float_t csw) {CrossSectionWeight = csw;}
237  Float_t GetCrossSectionWeight() const {return CrossSectionWeight; }
238  */
239 
240  //----------------- GlobalThetaAngle & PhiAngle
241 
242  void StoreGlobalThetaAngle(Float_t theta) { GlobalThetaAngle.push_back(theta); }
243  std::vector<Float_t> GetGlobalThetaAngle() const {return GlobalThetaAngle;}
244 
245  void StoreGlobalPhiAngle(Float_t phi) { GlobalPhiAngle.push_back(phi); }
246  std::vector<Float_t> GetGlobalPhiAngle() const {return GlobalPhiAngle;}
247 
248  //----------------- Lumi deposited energy
249 
250  //--- deposited energy in the lumi in one step
251  void StoreDepositedEnergy(Float_t dpeg) {
252  DepositedEnergy.push_back(dpeg);
253  TotalDepositedEnergy += dpeg;
254  }
255 
256  std::vector<Float_t> GetDepositedEnergy() const {return DepositedEnergy;}
257  Float_t GetTotalEnergyDeposit() const {return TotalDepositedEnergy;}
258 
259  void StoreRate(Float_t rate) { Rate.push_back(rate); }
260  std::vector<Float_t> GetRate(void) { return Rate; }
261 
262 
263  // define a new Class known to ROOT
265 
266 }; // end class QweakSimUserLumi_DetectorEvent
267 
268 
269 /////// --------------------------------------------------------------------
270 
271 #endif
272 
273 /////// --------------------------------------------------------------------
274 
std::vector< Float_t > GetDepositedEnergy() const
std::vector< Float_t > GetLocalVertexMomentumDirectionX() const
std::vector< Float_t > GetLocalVertexMomentumDirectionZ() const
std::vector< Float_t > GetGlobalThetaAngle() const
std::vector< Float_t > GetGloablTimeOfHit() const
std::vector< Float_t > GetOriginVertexMomentumDirectionY() const
std::vector< Float_t > GetDetectorLocalVertexKineticEnergy() const
std::vector< Float_t > GetOriginVertexPositionZ() const
std::vector< Float_t > GetDetectorLocalExitPositionY() const
std::vector< Float_t > GetTrackID() const
std::vector< Float_t > GetOriginVertexKineticEnergy() const
std::vector< Float_t > GetOriginVertexMomentumDirectionZ() const
std::vector< Float_t > GetDetectorLocalPositionY() const
std::vector< Float_t > GetOriginVertexThetaAngle() const
std::vector< Float_t > GetDetectorGlobalPositionY() const
std::vector< Float_t > GetOriginVertexPositionX() const
std::vector< Int_t > GetParticleType() const
std::vector< Float_t > GetDetectorLocalExitPositionZ() const
std::vector< Float_t > GetDetectorLocalExitPositionX() const
std::vector< Int_t > GetEdgeEventFlag() const
std::vector< TString > GetParticleName() const
std::vector< Float_t > GetOriginVertexMomentumDirectionX() const
std::vector< Float_t > GetDetectorGlobalPositionX() const
std::vector< Float_t > GetDetectorLocalPositionZ() const
std::vector< Float_t > GetDetectorLocalVertexTotalEnergy() const
std::vector< Float_t > GetOriginVertexPositionY() const
std::vector< Float_t > GetGlobalPhiAngle() const
std::vector< Float_t > GetLocalVertexMomentumDirectionY() const
std::vector< Float_t > GetOriginVertexPhiAngle() const
std::vector< Float_t > GetDetectorGlobalPositionZ() const
std::vector< Float_t > GetDetectorLocalPositionX() const
std::vector< Float_t > GetOriginVertexTotalEnergy() const