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