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