QwGeant4
QweakSimUserCerenkov_DetectorEvent.hh
Go to the documentation of this file.
1 
2 //=============================================================================
3 //
4 // ---------------------------
5 // | Doxygen File Information |
6 // ---------------------------
7 /**
8 
9  \file QweakSimUserCerenkov_DetectorEvent.hh
10  $Revision: 1.3 $
11  $Date: 2006/01/06 20:31:24 $
12  \author Klaus Hans Grimm
13 
14 */
15 //=============================================================================
16 //
17 //=============================================================================
18 //
19 // ---------------------------
20 // | Doxygen Class Information |
21 // ---------------------------
22 /**
23  \class QweakSimUserCerenkov_DetectorEvent
24 
25  \ingroup root
26 
27  \brief ROOT Subtree structure for Cerenkov DetectorEvent
28 
29  */
30 //=============================================================================
31 //
32 //=============================================================================
33 // -----------------------
34 // | CVS File Information |
35 // -----------------------
36 //
37 // Last Update: $Author: grimm $
38 // Update Date: $Date: 2006/01/06 20:31:24 $
39 // CVS/RCS Revision: $Revision: 1.3 $
40 // Status: $State: Exp $
41 //
42 // ===================================
43 // CVS Revision Log at end of file !!
44 // ===================================
45 //
46 //=============================================================================
47 
48 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
49 #ifndef QweakSimUserCerenkov_DetectorEvent_h
50 #define QweakSimUserCerenkov_DetectorEvent_h
51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
52 
53 // system includes
54 #include <vector>
55 
56 // root includes
57 #include "TObject.h"
58 #include "TString.h"
59 
60 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
61 class QweakSimUserCerenkov_DetectorEvent : public TObject
62 {
63 
64 private:
65 
66  std::vector<Int_t> DetectorID; ///< ID of the detector in which this hit was registered
67  Int_t TrackID; ///< ID of the track from which this hit was generated
68 
69  std::vector<Float_t> GlobalTimeOfHit; ///< Global time when this hit was generated (ns)
70 
71  Int_t HasBeenHit; ///< Has this detector been hit? 0 = no, 5 = yes
72  std::vector<Int_t> EdgeEventFlag; ///< Was the distance between hit and exit position below 1.5 cm? 0 = no, 1 = yes
73  Int_t NbOfHits; ///< Number of hits in this detector
74 
75  Int_t SecondaryParticleCount; ///< Number of secondary particles
76  Int_t SecondaryElectronCount; ///< Number of secondary electrons
77  Int_t SecondaryPhotonCount; ///< Number of secondary photons
78  Int_t SecondaryPositronCount; ///< Number of secondary positrons
79 
80  Int_t OpticalPhotonCount; ///< Number of optical photons
81 
82  /// \name Position in local coordinates of original vertex of the secondary in this event
83  /// The global coordinates are defined in the \ref local_coordinate_system.
84  //@{
85  std::vector<Float_t> SecPartLocalOriginX;
86  std::vector<Float_t> SecPartLocalOriginY;
87  std::vector<Float_t> SecPartLocalOriginZ;
88  //@}
89 
90  /// \name Momentum in local coordinates of original vertex of the secondary in this event
91  /// The global coordinates are defined in the \ref local_coordinate_system.
92  //@{
93  std::vector<Float_t> SecPartLocalMomentumX;
94  std::vector<Float_t> SecPartLocalMomentumY;
95  std::vector<Float_t> SecPartLocalMomentumZ;
96  //@}
97 
98  std::vector<Float_t> SecPartLocalEnergy;
99  std::vector<Float_t> SecPartLocalType;
100 
101  std::vector<Double_t> CerenkovPhotonEnergy;
102 
103  /// \name Position of the hit in local coordinates (cm)
104  /// The local coordinates are defined in the \ref local_coordinate_system.
105  //@{
106  std::vector<Float_t> HitLocalPositionX; ///< (cm)
107  std::vector<Float_t> HitLocalPositionY; ///< (cm)
108  std::vector<Float_t> HitLocalPositionZ; ///< (cm)
109  //@}
110 
111  /// \name Position where the track exits the volume in local coordinates (cm)
112  /// The local coordinates are defined in the \ref local_coordinate_system.
113  //@{
114  std::vector<Float_t> HitLocalExitPositionX; ///< (cm)
115  std::vector<Float_t> HitLocalExitPositionY; ///< (cm)
116  std::vector<Float_t> HitLocalExitPositionZ; ///< (cm)
117  //@}
118 
119  /// \name Position of the hit in global coordinates
120  /// The global coordinates are defined in the \ref global_coordinate_system.
121  //@{
122  std::vector<Float_t> HitGlobalPositionX; ///< (cm)
123  std::vector<Float_t> HitGlobalPositionY; ///< (cm)
124  std::vector<Float_t> HitGlobalPositionZ; ///< (cm)
125  //@}
126 
127  /// \name Position in global coordinates of original vertex of the track from which this hit was generated
128  /// The global coordinates are defined in the \ref global_coordinate_system.
129  //@{
130  std::vector<Float_t> OriginVertexPositionX; ///< (cm)
131  std::vector<Float_t> OriginVertexPositionY; ///< (cm)
132  std::vector<Float_t> OriginVertexPositionZ; ///< (cm)
133  //@}
134 
135  /// \name Direction in global coordinates of original vertex of the track from which this hit was generated
136  /// The global coordinates are defined in the \ref global_coordinate_system.
137  //@{
138  std::vector<Float_t> OriginVertexMomentumDirectionX;
139  std::vector<Float_t> OriginVertexMomentumDirectionY;
140  std::vector<Float_t> OriginVertexMomentumDirectionZ;
141  std::vector<Float_t> OriginVertexThetaAngle; ///< (degrees)
142  std::vector<Float_t> OriginVertexPhiAngle; ///< (degrees)
143  //@}
144 
145  std::vector<Float_t> OriginVertexKineticEnergy;
146  std::vector<Float_t> OriginVertexTotalEnergy;
147 
148  /// \name Direction of the hit in local coordinates
149  /// The local coordinates are defined in the \ref local_coordinate_system.
150  //@{
151  std::vector<Float_t> LocalMomentumX; ///< (GeV/c)
152  std::vector<Float_t> LocalMomentumY; ///< (GeV/c)
153  std::vector<Float_t> LocalMomentumZ; ///< (GeV/c)
154  std::vector<Float_t> LocalThetaAngle; ///< (degrees)
155  std::vector<Float_t> LocalPhiAngle; ///< (degrees, but 90 degrees rotated to keep things interesting)
156  //@}
157 
158  /// \name Direction of the hit in global coordinates
159  /// The global coordinates are defined in the \ref global_coordinate_system.
160  //@{
161  std::vector<Float_t> GlobalMomentumX; ///< (GeV/c)
162  std::vector<Float_t> GlobalMomentumY; ///< (GeV/c)
163  std::vector<Float_t> GlobalMomentumZ; ///< (GeV/c)
164  std::vector<Float_t> GlobalThetaAngle; ///< (degrees)
165  std::vector<Float_t> GlobalPhiAngle; ///< (degrees, but 90 degrees rotated to keep things interesting)
166  //@}
167 
168  /// \name Particle name and type at the hit
169  //@{
170  std::vector<TString> ParticleName; ///< Name of the particle type of this hit
171  std::vector<Int_t> ParticleType; ///< \ref Lund_type of the particle type of this hit
172  std::vector<Int_t> ParticleID; ///< Id of this hit
173  std::vector<Int_t> ParentID; ///< Id of the parent of this hit
174  std::vector<TString> CreatorProcessName; ///< Process name that created this hit
175  //@}
176 
177  /// \name Polarization of the hit in local coordinates
178  /// The local coordinates are defined in the \ref local_coordinate_system.
179  //@{
180  std::vector<Float_t> PolarizationX; ///< (dimensionless, normalized)
181  std::vector<Float_t> PolarizationY; ///< (dimensionless, normalized)
182  std::vector<Float_t> PolarizationZ; ///< (dimensionless, normalized)
183  std::vector<Float_t> LongitudinalPolarization; ///< (dimensionless, normalized)
184  std::vector<Float_t> TransversePolarization; ///< (dimensionless, normalized)
185  std::vector<Float_t> TransversePolarizationX; ///< (dimensionless, normalized)
186  std::vector<Float_t> TransversePolarizationY; ///< (dimensionless, normalized)
187  std::vector<Float_t> TransversePolarizationZ; ///< (dimensionless, normalized)
188  std::vector<Float_t> TransversePolarizationPhiAngle; ///< (degrees)
189 
190  //@}
191 
192  /// \name Total and kinetic energy of the track at the hit
193  //@{
194  std::vector<Float_t> TotalEnergy; ///< (MeV)
195  std::vector<Float_t> KineticEnergy; ///< (MeV)
196  //@}
197 
198 public:
199 
200  // Constructor
202  // Destructor
204 
205  void Initialize();
206 
207  //-----------------
208  void StoreDetectorID(Int_t did) { DetectorID.push_back(did); }
209  std::vector<Int_t> GetDetectorID() const {return DetectorID;}
210  //-----------------
211 
212  void StoreTrackID(Int_t tid) { TrackID = tid; }
213  Int_t GetTrackID() const {return TrackID;}
214 
215  void StoreParticleName(TString pn) { ParticleName.push_back(pn); }
216  std::vector<TString> GetParticleName() const {return ParticleName;}
217 
218  void StoreParticleType(Int_t pt) { ParticleType.push_back(pt); }
219  std::vector<Int_t> GetParticleType() const {return ParticleType;}
220 
221  void StoreParentID(Int_t Pid) { ParentID.push_back(Pid); }
222  std::vector<Int_t> GetParentID() const {return ParentID;}
223 
224  void StoreCreatorProcessName(TString name) { CreatorProcessName.push_back(name); }
225  std::vector<TString> GetCreatorProcessName() const {return CreatorProcessName;}
226 
227  void StoreParticleID(Int_t pid) { ParticleID.push_back(pid); }
228  std::vector<Int_t> GetParticleID() const {return ParticleID;}
229 
230  void StoreGlobalTimeOfHit(Float_t gtime) { GlobalTimeOfHit.push_back(gtime); }
231  std::vector<Float_t> GetGloablTimeOfHit() const {return GlobalTimeOfHit;}
232 
233  void StoreTotalEnergy(Float_t te) { TotalEnergy.push_back(te); }
234  std::vector<Float_t> GetTotalEnergy() const {return TotalEnergy;}
235 
236  void StoreKineticEnergy(Float_t ke) { KineticEnergy.push_back(ke); }
237  std::vector<Float_t> GetKineticEnergy() const {return KineticEnergy;}
238 
239  //-----------------
240 
241  void StorePolarizationX(Float_t px) { PolarizationX.push_back(px); }
242  std::vector<Float_t> GetPolarizationX() const {return PolarizationX;}
243 
244  void StorePolarizationY(Float_t py) { PolarizationY.push_back(py); }
245  std::vector<Float_t> GetPolarizationY() const {return PolarizationY;}
246 
247  void StorePolarizationZ(Float_t pz) { PolarizationZ.push_back(pz); }
248  std::vector<Float_t> GetPolarizationZ() const {return PolarizationZ;}
249 
250  void StoreLongitudinalPolarization(Float_t pl) { LongitudinalPolarization.push_back(pl); }
251  std::vector<Float_t> GetLongitudinalPolarization() const {return LongitudinalPolarization;}
252 
253  void StoreTransversePolarization(Float_t pt) { TransversePolarization.push_back(pt); }
254  std::vector<Float_t> GetTransversePolarization() const {return TransversePolarization;}
255 
256  void StoreTransversePolarizationX(Float_t pt) { TransversePolarizationX.push_back(pt); }
257  std::vector<Float_t> GetTransversePolarizationX() const {return TransversePolarizationX;}
258 
259  void StoreTransversePolarizationY(Float_t pt) { TransversePolarizationY.push_back(pt); }
260  std::vector<Float_t> GetTransversePolarizationY() const {return TransversePolarizationY;}
261 
262  void StoreTransversePolarizationZ(Float_t pt) { TransversePolarizationZ.push_back(pt); }
263  std::vector<Float_t> GetTransversePolarizationZ() const {return TransversePolarizationZ;}
264 
267 
268  //-----------------
269 
270  void StoreDetectorHasBeenHit(Int_t n) { HasBeenHit = n; }
271  Int_t GetDetectorHasBeenHit() const {return HasBeenHit;}
272  //-----------------
273  void StoreDetectorNbOfHits(Int_t nd) { NbOfHits = nd; }
274  Int_t GetDetectorNbOfHits() const {return NbOfHits;}
275  //-----------------
276  void StoreDetectorLocalPositionX(Float_t lx) { HitLocalPositionX.push_back(lx); }
277  std::vector<Float_t> GetDetectorLocalPositionX() const {return HitLocalPositionX;}
278 
279  void StoreDetectorLocalPositionY(Float_t ly) { HitLocalPositionY.push_back(ly); }
280  std::vector<Float_t> GetDetectorLocalPositionY() const {return HitLocalPositionY;}
281 
282  void StoreDetectorLocalPositionZ(Float_t lz) { HitLocalPositionZ.push_back(lz); }
283  std::vector<Float_t> GetDetectorLocalPositionZ() const {return HitLocalPositionZ;}
284  //-----------------
285  void StoreDetectorLocalExitPositionX(Float_t lx) { HitLocalExitPositionX.push_back(lx); }
286  std::vector<Float_t> GetDetectorLocalExitPositionX() const {return HitLocalExitPositionX;}
287 
288  void StoreDetectorLocalExitPositionY(Float_t ly) { HitLocalExitPositionY.push_back(ly); }
289  std::vector<Float_t> GetDetectorLocalExitPositionY() const {return HitLocalExitPositionY;}
290 
291  void StoreDetectorLocalExitPositionZ(Float_t lz) { HitLocalExitPositionZ.push_back(lz); }
292  std::vector<Float_t> GetDetectorLocalExitPositionZ() const {return HitLocalExitPositionZ;}
293  //---
294  void StoreDetectorGlobalPositionX(Float_t lx) { HitGlobalPositionX.push_back(lx); }
295  std::vector<Float_t> GetDetectorGlobalPositionX() const {return HitGlobalPositionX;}
296 
297  void StoreDetectorGlobalPositionY(Float_t ly) { HitGlobalPositionY.push_back(ly); }
298  std::vector<Float_t> GetDetectorGlobalPositionY() const {return HitGlobalPositionY;}
299 
300  void StoreDetectorGlobalPositionZ(Float_t lz) { HitGlobalPositionZ.push_back(lz); }
301  std::vector<Float_t> GetDetectorGlobalPositionZ() const {return HitGlobalPositionZ;}
302  //-----------------
303  void StoreOriginVertexPositionX(Float_t vx) { OriginVertexPositionX.push_back(vx); }
304  std::vector<Float_t> GetOriginVertexPositionX() const {return OriginVertexPositionX;}
305 
306  void StoreOriginVertexPositionY(Float_t vy) { OriginVertexPositionY.push_back(vy); }
307  std::vector<Float_t> GetOriginVertexPositionY() const {return OriginVertexPositionY;}
308 
309  void StoreOriginVertexPositionZ(Float_t vz) { OriginVertexPositionZ.push_back(vz); }
310  std::vector<Float_t> GetOriginVertexPositionZ() const {return OriginVertexPositionZ;}
311  //-----------------
314 
317 
320  //-----------------
321  void StoreOriginVertexThetaAngle(Float_t theta) { OriginVertexThetaAngle.push_back(theta); }
322  std::vector<Float_t> GetOriginVertexThetaAngle() const {return OriginVertexThetaAngle;}
323 
324  void StoreOriginVertexPhiAngle(Float_t phi) { OriginVertexPhiAngle.push_back(phi); }
325  std::vector<Float_t> GetOriginVertexPhiAngle() const {return OriginVertexPhiAngle;}
326  //-----------------
327  void StoreOriginVertexKineticEnergy(Float_t ekin) { OriginVertexKineticEnergy.push_back(ekin); }
328  std::vector<Float_t> GetOriginVertexKineticEnergy() const {return OriginVertexKineticEnergy;}
329 
330  void StoreOriginVertexTotalEnergy(Float_t etot) { OriginVertexTotalEnergy.push_back(etot); }
331  std::vector<Float_t> GetOriginVertexTotalEnergy() const {return OriginVertexTotalEnergy;}
332 
333  //----------------
334 
335  void StoreLocalMomentumX(Float_t px) { LocalMomentumX.push_back(px); }
336  std::vector<Float_t> GetLocalMomentumX() const {return LocalMomentumX;}
337 
338  void StoreLocalMomentumY(Float_t py) { LocalMomentumY.push_back(py); }
339  std::vector<Float_t> GetLocalMomentumY() const {return LocalMomentumY;}
340 
341  void StoreLocalMomentumZ(Float_t pz) { LocalMomentumZ.push_back(pz); }
342  std::vector<Float_t> GetLocalMomentumZ() const {return LocalMomentumZ;}
343 
344  void StoreLocalThetaAngle(Float_t theta) { LocalThetaAngle.push_back(theta); }
345  std::vector<Float_t> GetLocalThetaAngle() const {return LocalThetaAngle;}
346 
347  void StoreLocalPhiAngle(Float_t phi) { LocalPhiAngle.push_back(phi); }
348  std::vector<Float_t> GetLocalPhiAngle() const {return LocalPhiAngle;}
349 
350  //----------------
351 
352  void StoreGlobalMomentumX(Float_t px) { GlobalMomentumX.push_back(px); }
353  std::vector<Float_t> GetGlobalMomentumX() const {return GlobalMomentumX;}
354 
355  void StoreGlobalMomentumY(Float_t py) { GlobalMomentumY.push_back(py); }
356  std::vector<Float_t> GetGlobalMomentumY() const {return GlobalMomentumY;}
357 
358  void StoreGlobalMomentumZ(Float_t pz) { GlobalMomentumZ.push_back(pz); }
359  std::vector<Float_t> GetGlobalMomentumZ() const {return GlobalMomentumZ;}
360 
361  void StoreGlobalThetaAngle(Float_t theta) { GlobalThetaAngle.push_back(theta); }
362  std::vector<Float_t> GetGlobalThetaAngle() const {return GlobalThetaAngle;}
363 
364  void StoreGlobalPhiAngle(Float_t phi) { GlobalPhiAngle.push_back(phi); }
365  std::vector<Float_t> GetGlobalPhiAngle() const {return GlobalPhiAngle;}
366 
367  //----------------
368 
369  void AddSecondaryParticleEvent(Float_t XO, Float_t YO, Float_t ZO,
370  Float_t XM, Float_t YM, Float_t ZM,
371  Float_t energy, Int_t type);
372 
373  void StoreEdgeEventFlag(Int_t flag) {EdgeEventFlag.push_back(flag);};
374  std::vector<Int_t> GetEdgeEventFlag() {return EdgeEventFlag;};
375 
377 
378  void StoreCerenkovPhotonEnergy(Double_t eng) {CerenkovPhotonEnergy.push_back(eng);};
379 
380  // define a new Class known to ROOT
382 
383 }; // end class QweakSimUserCerenkov_DetectorEvent
384 
385 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
386 
387 #endif
388 
389 //=======================================================================================
390 // -----------------------
391 // | CVS File Information |
392 // -----------------------
393 //
394 // $Revisions$
395 // $Log: QweakSimUserCerenkov_DetectorEvent.hh,v $
396 // Revision 1.3 2006/01/06 20:31:24 grimm
397 // Added KineticEnergy, TotalEnergy, ParticleType, and ParticleName into the root tree
398 //
399 // Revision 1.2 2005/12/27 19:28:31 grimm
400 // - Redesign of Doxygen header containing CVS info like revision and date
401 // - Added CVS revision log at the end of file
402 //
403 //
404 
std::vector< Float_t > GetDetectorLocalPositionY() const
std::vector< Int_t > DetectorID
ID of the detector in which this hit was registered.
Int_t NbOfHits
Number of hits in this detector.
std::vector< Int_t > ParentID
Id of the parent of this hit.
std::vector< TString > ParticleName
Name of the particle type of this hit.
Int_t SecondaryParticleCount
Number of secondary particles.
std::vector< Float_t > GetDetectorGlobalPositionX() const
std::vector< Float_t > GetDetectorLocalExitPositionZ() const
std::vector< Float_t > PolarizationZ
(dimensionless, normalized)
std::vector< Float_t > LocalPhiAngle
(degrees, but 90 degrees rotated to keep things interesting)
std::vector< Float_t > OriginVertexPhiAngle
(degrees)
std::vector< Float_t > GetOriginVertexPositionZ() const
std::vector< Float_t > GetDetectorLocalPositionX() const
std::vector< Float_t > GetOriginVertexKineticEnergy() const
std::vector< Float_t > GetDetectorGlobalPositionY() const
std::vector< Float_t > GetOriginVertexMomentumDirectionY() const
std::vector< Float_t > GetDetectorLocalExitPositionY() const
std::vector< Float_t > GlobalTimeOfHit
Global time when this hit was generated (ns)
std::vector< Float_t > GetTransversePolarizationY() const
Int_t HasBeenHit
Has this detector been hit? 0 = no, 5 = yes.
std::vector< Float_t > TransversePolarization
(dimensionless, normalized)
std::vector< Float_t > GetOriginVertexMomentumDirectionX() const
std::vector< Int_t > EdgeEventFlag
Was the distance between hit and exit position below 1.5 cm? 0 = no, 1 = yes.
std::vector< Float_t > GetLongitudinalPolarization() const
std::vector< Float_t > OriginVertexThetaAngle
(degrees)
std::vector< Int_t > ParticleID
Id of this hit.
std::vector< Int_t > ParticleType
Lund type of the particle type of this hit
std::vector< Float_t > PolarizationY
(dimensionless, normalized)
Int_t TrackID
ID of the track from which this hit was generated.
std::vector< Float_t > GetTransversePolarization() const
std::vector< Float_t > PolarizationX
(dimensionless, normalized)
std::vector< TString > CreatorProcessName
Process name that created this hit.
std::vector< Float_t > GetOriginVertexMomentumDirectionZ() const
Int_t OpticalPhotonCount
Number of optical photons.
std::vector< Float_t > TransversePolarizationY
(dimensionless, normalized)
Int_t SecondaryElectronCount
Number of secondary electrons.
std::vector< Float_t > GetDetectorLocalExitPositionX() const
std::vector< Float_t > GetOriginVertexPositionY() const
ROOT Subtree structure for Cerenkov DetectorEvent.
std::vector< Float_t > GetDetectorGlobalPositionZ() const
std::vector< Float_t > GetDetectorLocalPositionZ() const
std::vector< Float_t > TransversePolarizationPhiAngle
(degrees)
Int_t SecondaryPhotonCount
Number of secondary photons.
Int_t SecondaryPositronCount
Number of secondary positrons.
std::vector< Float_t > GetTransversePolarizationZ() const
std::vector< Float_t > GetOriginVertexPhiAngle() const
std::vector< Float_t > GetOriginVertexTotalEnergy() const
std::vector< Float_t > GetOriginVertexPositionX() const
std::vector< Float_t > GlobalPhiAngle
(degrees, but 90 degrees rotated to keep things interesting)
std::vector< Float_t > LongitudinalPolarization
(dimensionless, normalized)
std::vector< Float_t > GetTransversePolarizationX() const
std::vector< Float_t > GetOriginVertexThetaAngle() const
std::vector< Float_t > TransversePolarizationX
(dimensionless, normalized)
void AddSecondaryParticleEvent(Float_t XO, Float_t YO, Float_t ZO, Float_t XM, Float_t YM, Float_t ZM, Float_t energy, Int_t type)
std::vector< Float_t > TransversePolarizationZ
(dimensionless, normalized)
std::vector< Float_t > GetTransversePolarizationPhiAngle() const