QwGeant4
QweakSimUserTarget_DetectorEvent.hh
Go to the documentation of this file.
1 
2 // QweakSimUserTarget_DetectorEvent.hh
3 // Wouter Deconinck
4 // 2014-10-07
5 
6 /////// --------------------------------------------------------------------
7 
8 #ifndef QweakSimUserTarget_DetectorEvent_h
9 #define QweakSimUserTarget_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 class QweakSimUserTarget_DetectorEvent : public TObject
23 {
24 
25 private:
26 
28 
29  std::vector<Float_t> TrackID;
30  std::vector<TString> ParticleName;
31  std::vector<Int_t> ParticleType;
32 
33  std::vector<Float_t> GlobalTimeOfHit;
34 
35  Int_t HasBeenHit;
36  Int_t NbOfHits;
37 
38  std::vector<Float_t> HitGlobalPositionX;
39  std::vector<Float_t> HitGlobalPositionY;
40  std::vector<Float_t> HitGlobalPositionZ;
41 
42  std::vector<Float_t> HitLocalPositionX;
43  std::vector<Float_t> HitLocalPositionY;
44  std::vector<Float_t> HitLocalPositionZ;
45 
46  std::vector<Float_t> HitLocalExitPositionX;
47  std::vector<Float_t> HitLocalExitPositionY;
48  std::vector<Float_t> HitLocalExitPositionZ;
49 
50  std::vector<Float_t> OriginVertexPositionX;
51  std::vector<Float_t> OriginVertexPositionY;
52  std::vector<Float_t> OriginVertexPositionZ;
53 
54  std::vector<Float_t> LocalVertexMomentumDirectionX;
55  std::vector<Float_t> LocalVertexMomentumDirectionY;
56  std::vector<Float_t> LocalVertexMomentumDirectionZ;
57 
58  std::vector<Float_t> OriginVertexMomentumDirectionX;
59  std::vector<Float_t> OriginVertexMomentumDirectionY;
60  std::vector<Float_t> OriginVertexMomentumDirectionZ;
61 
62  std::vector<Float_t> OriginVertexThetaAngle;
63  std::vector<Float_t> OriginVertexPhiAngle;
64 
65  std::vector<Float_t> OriginVertexKineticEnergy;
66  std::vector<Float_t> OriginVertexTotalEnergy;
67 
68  std::vector<Float_t> LocalVertexKineticEnergy;
69  std::vector<Float_t> LocalVertexTotalEnergy;
70 
71  std::vector<Float_t> GlobalPhiAngle;
72  std::vector<Float_t> GlobalThetaAngle;
73 
74  //--- deposited energy in the Target in one step
75  std::vector<Float_t> DepositedEnergy;
76 
77  //--- elastic scattering cross section and kinematic variables
78  std::vector<Float_t> ElasticCrossSection;
79  std::vector<Float_t> ElasticScatteredEnergy;
80  std::vector<Float_t> ElasticMomentumTransfer;
81 
82  //--- total deposited energy in the Target in one event
84 
85 public:
86 
87  //--- Constructor
89 
90  //--- Destructor
92 
93  //--- Initialize all variables
94  void Initialize();
95 
96  //----------------- PrimaryEventNumber
97 
98  void StorePrimaryEventNumber(Int_t pen) { PrimaryEventNumber = pen; }
99  Int_t GetPrimaryEventNumber() const {return PrimaryEventNumber;}
100 
101  //----------------- TrackID
102 
103  void StoreTrackID(Float_t tid) { TrackID.push_back(tid); }
104  std::vector<Float_t> GetTrackID() const {return TrackID;}
105 
106  //----------------- ParticleName & ParticleType
107 
108  void StoreParticleName(TString pn) { ParticleName.push_back(pn); }
109  std::vector<TString> GetParticleName() const {return ParticleName;}
110 
111  void StoreParticleType(Int_t pt) { ParticleType.push_back(pt); }
112  std::vector<Int_t> GetParticleType() const {return ParticleType;}
113 
114  //----------------- GlobalTimeOfHit
115 
116  void StoreGlobalTimeOfHit(Float_t gtime) { GlobalTimeOfHit.push_back(gtime); }
117  std::vector<Float_t> GetGloablTimeOfHit() const {return GlobalTimeOfHit;}
118 
119  //----------------- HasBeenHit & EdgeEventFlag & NbOfHits
120 
121  void StoreDetectorHasBeenHit(Int_t n) { HasBeenHit = n; }
122  Int_t GetDetectorHasBeenHit() const {return HasBeenHit;}
123 
124  void StoreDetectorNbOfHits(Int_t nd) { NbOfHits = nd; }
125  Int_t GetDetectorNbOfHits() const {return NbOfHits;}
126 
127  //----------------- HitGlobalPosition
128 
129  void StoreDetectorGlobalPositionX(Float_t lx) { HitGlobalPositionX.push_back(lx); }
130  std::vector<Float_t> GetDetectorGlobalPositionX() const {return HitGlobalPositionX;}
131 
132  void StoreDetectorGlobalPositionY(Float_t ly) { HitGlobalPositionY.push_back(ly); }
133  std::vector<Float_t> GetDetectorGlobalPositionY() const {return HitGlobalPositionY;}
134 
135  void StoreDetectorGlobalPositionZ(Float_t lz) { HitGlobalPositionZ.push_back(lz); }
136  std::vector<Float_t> GetDetectorGlobalPositionZ() const {return HitGlobalPositionZ;}
137 
138  //----------------- HitLocalPosition
139 
140  void StoreDetectorLocalPositionX(Float_t lx) { HitLocalPositionX.push_back(lx); }
141  std::vector<Float_t> GetDetectorLocalPositionX() const {return HitLocalPositionX;}
142 
143  void StoreDetectorLocalPositionY(Float_t ly) { HitLocalPositionY.push_back(ly); }
144  std::vector<Float_t> GetDetectorLocalPositionY() const {return HitLocalPositionY;}
145 
146  void StoreDetectorLocalPositionZ(Float_t lz) { HitLocalPositionZ.push_back(lz); }
147  std::vector<Float_t> GetDetectorLocalPositionZ() const {return HitLocalPositionZ;}
148 
149  //----------------- HitLocalExitPosition
150 
151  void StoreDetectorLocalExitPositionX(Float_t lx) { HitLocalExitPositionX.push_back(lx); }
152  std::vector<Float_t> GetDetectorLocalExitPositionX() const {return HitLocalExitPositionX;}
153 
154  void StoreDetectorLocalExitPositionY(Float_t ly) { HitLocalExitPositionY.push_back(ly); }
155  std::vector<Float_t> GetDetectorLocalExitPositionY() const {return HitLocalExitPositionY;}
156 
157  void StoreDetectorLocalExitPositionZ(Float_t lz) { HitLocalExitPositionZ.push_back(lz); }
158  std::vector<Float_t> GetDetectorLocalExitPositionZ() const {return HitLocalExitPositionZ;}
159 
160  //----------------- OriginVertexPosition
161 
162  void StoreOriginVertexPositionX(Float_t vx) { OriginVertexPositionX.push_back(vx); }
163  std::vector<Float_t> GetOriginVertexPositionX() const {return OriginVertexPositionX;}
164 
165  void StoreOriginVertexPositionY(Float_t vy) { OriginVertexPositionY.push_back(vy); }
166  std::vector<Float_t> GetOriginVertexPositionY() const {return OriginVertexPositionY;}
167 
168  void StoreOriginVertexPositionZ(Float_t vz) { OriginVertexPositionZ.push_back(vz); }
169  std::vector<Float_t> GetOriginVertexPositionZ() const {return OriginVertexPositionZ;}
170 
171  //----------------- LocalVertexMomentumDirection
172 
175 
178 
181 
182  //----------------- OrinVertexMomentumDirection
183 
186 
189 
192 
193  //----------------- OriginVertexThetaAngle & PhiAngle
194 
195  void StoreOriginVertexThetaAngle(Float_t theta) { OriginVertexThetaAngle.push_back(theta); }
196  std::vector<Float_t> GetOriginVertexThetaAngle() const {return OriginVertexThetaAngle;}
197 
198  void StoreOriginVertexPhiAngle(Float_t phi) { OriginVertexPhiAngle.push_back(phi); }
199  std::vector<Float_t> GetOriginVertexPhiAngle() const {return OriginVertexPhiAngle;}
200 
201  //----------------- OrigiVertexKineticEnergy & TotalEnergy
202 
203  void StoreOriginVertexKineticEnergy(Float_t ekin) { OriginVertexKineticEnergy.push_back(ekin); }
204  std::vector<Float_t> GetOriginVertexKineticEnergy() const {return OriginVertexKineticEnergy;}
205 
206  void StoreOriginVertexTotalEnergy(Float_t etot) { OriginVertexTotalEnergy.push_back(etot); }
207  std::vector<Float_t> GetOriginVertexTotalEnergy() const {return OriginVertexTotalEnergy;}
208 
209  //----------------- LocalVertexKinetcEnergy & TotalEnergy
210 
211  void StoreDetectorLocalVertexKineticEnergy(Float_t ekin) { LocalVertexKineticEnergy.push_back(ekin); }
212  std::vector<Float_t> GetDetectorLocalVertexKineticEnergy() const {return LocalVertexKineticEnergy;}
213 
214  void StoreDetectorLocalVertexTotalEnergy(Float_t etot) { LocalVertexTotalEnergy.push_back(etot); }
215  std::vector<Float_t> GetDetectorLocalVertexTotalEnergy() const {return LocalVertexTotalEnergy;}
216 
217  //----------------- GlobalThetaAngle & PhiAngle
218 
219  void StoreGlobalThetaAngle(Float_t theta) { GlobalThetaAngle.push_back(theta); }
220  std::vector<Float_t> GetGlobalThetaAngle() const {return GlobalThetaAngle;}
221 
222  void StoreGlobalPhiAngle(Float_t phi) { GlobalPhiAngle.push_back(phi); }
223  std::vector<Float_t> GetGlobalPhiAngle() const {return GlobalPhiAngle;}
224 
225  //----------------- Target deposited energy
226 
227  //--- deposited energy in the Target in one step
228  void StoreDepositedEnergy(Float_t dpeg) {
229  DepositedEnergy.push_back(dpeg);
230  TotalDepositedEnergy += dpeg;
231  }
232  std::vector<Float_t> GetDepositedEnergy() const {return DepositedEnergy;}
233 
234  //--- total deposited energy in the Target in one event
235  void StoreTotalEnergyDeposit(Float_t eng) { TotalDepositedEnergy = eng; }
236  Float_t GetTotalEnergyDeposit() const {return TotalDepositedEnergy;}
237 
238  //----------------- Elastic scattering cross section and kinematic variables
239  void StoreElasticCrossSection(Float_t xs) { ElasticCrossSection.push_back(xs); }
240  std::vector<Float_t> GetElasticCrossSection() const {return ElasticCrossSection;}
241 
242  void StoreElasticScatteredEnergy(Float_t ep) { ElasticScatteredEnergy.push_back(ep); }
243  std::vector<Float_t> GetElasticScatteredEnergy() const {return ElasticScatteredEnergy;}
244 
245  void StoreElasticMomentumTransfer(Float_t q2) { ElasticMomentumTransfer.push_back(q2); }
246  std::vector<Float_t> GetElasticMomentumTransfer() const {return ElasticMomentumTransfer;}
247 
248 
249  // define a new Class known to ROOT
251 
252 }; // end class QweakSimUserTarget_DetectorEvent
253 
254 
255 /////// --------------------------------------------------------------------
256 
257 #endif
258 
259 /////// --------------------------------------------------------------------
260 
std::vector< Float_t > GetDetectorLocalExitPositionY() const
std::vector< Float_t > GetOriginVertexPositionX() const
std::vector< TString > GetParticleName() const
std::vector< Float_t > GetLocalVertexMomentumDirectionZ() const
std::vector< Float_t > GetDetectorLocalExitPositionZ() const
std::vector< Float_t > GetDetectorLocalVertexTotalEnergy() const
std::vector< Float_t > GetOriginVertexPositionY() const
std::vector< Float_t > GetGloablTimeOfHit() const
std::vector< Float_t > GetGlobalPhiAngle() const
std::vector< Float_t > GetOriginVertexThetaAngle() const
std::vector< Float_t > GetLocalVertexMomentumDirectionY() const
std::vector< Float_t > GetDepositedEnergy() const
std::vector< Float_t > GetElasticMomentumTransfer() const
std::vector< Float_t > GetOriginVertexPositionZ() const
std::vector< Float_t > GetElasticCrossSection() const
std::vector< Float_t > GetOriginVertexTotalEnergy() const
std::vector< Float_t > GetOriginVertexKineticEnergy() const
std::vector< Float_t > GetOriginVertexMomentumDirectionY() const
std::vector< Float_t > GetOriginVertexMomentumDirectionZ() const
std::vector< Float_t > GetDetectorGlobalPositionZ() const
std::vector< Float_t > GetDetectorLocalVertexKineticEnergy() const
std::vector< Float_t > GetDetectorLocalExitPositionX() const
std::vector< Float_t > GetLocalVertexMomentumDirectionX() const
std::vector< Float_t > GetGlobalThetaAngle() const
std::vector< Float_t > GetDetectorLocalPositionY() const
std::vector< Float_t > GetElasticScatteredEnergy() const
std::vector< Float_t > GetDetectorGlobalPositionX() const
std::vector< Float_t > GetDetectorLocalPositionZ() const
std::vector< Float_t > GetDetectorLocalPositionX() const
std::vector< Float_t > GetOriginVertexPhiAngle() const
std::vector< Float_t > GetOriginVertexMomentumDirectionX() const
std::vector< Float_t > GetDetectorGlobalPositionY() const