QwGeant4
QweakSimUserTriggerScintillator_DetectorEvent.hh
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 /**
7 
8  \file QweakSimUserTriggerScintillator_DetectorEvent.hh
9  $Revision: 1.2 $
10  $Date: 2005/12/27 19:30:53 $
11  \author Klaus Hans Grimm
12 
13 */
14 //=============================================================================
15 //
16 //=============================================================================
17 //
18 // ---------------------------
19 // | Doxygen Class Information |
20 // ---------------------------
21 /**
22  \class QweakSimUserTriggerScintillator_DetectorEvent
23 
24  \ingroup root
25 
26  \brief ROOT Subtree structure for Trigger Scintillator DetectorEvent
27 
28  */
29 //=============================================================================
30 //
31 
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
33 #ifndef QweakSimUserTriggerScintillator_DetectorEvent_h
34 #define QweakSimUserTriggerScintillator_DetectorEvent_h
35 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
36 
37 // system includes
38 #include <vector>
39 
40 // root includes
41 #include "TObject.h"
42 #include "TString.h"
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
46 {
47 
48 private:
49 
50  /// \todo add DetectorID
51  Int_t TrackID; ///< ID of the track from which this hit was generated
52 
53  Float_t GlobalTimeOfHit; ///< Global time when this hit was generated
54 
55  Int_t HasBeenHit; ///< Has this detector been hit? 0 = no, 5 = yes
56  Int_t EdgeEventFlag; ///< (not used)
57  Int_t NbOfHits; ///< Number of hits in this detector
59 
60 
61  std::vector <Float_t> SecElecLocalOriginX;
62  std::vector <Float_t> SecElecLocalOriginY;
63  std::vector <Float_t> SecElecLocalOriginZ;
64 
65  std::vector <Float_t> SecElecLocalMomentumX;
66  std::vector <Float_t> SecElecLocalMomentumY;
67  std::vector <Float_t> SecElecLocalMomentumZ;
68 
69  std::vector <Float_t> SecElecLocalEnergy;
70 
71  /// \name Position of the hit in local coordinates (cm)
72  /// The local coordinates are defined in the \ref local_coordinate_system.
73  //@{
77  //@}
78 
79  /// \name Position where the hit exits the detector in local coordinates (cm)
80  /// The local coordinates are defined in the \ref local_coordinate_system.
81  //@{
85  //@}
86 
87  /// \name Position of the hit in global coordinates (cm)
88  /// The global coordinates are defined in the \ref global_coordinate_system.
89  //@{
93  //@}
94 
95  /// \name Position in global coordinates of original vertex of the track from which this hit was generated
96  /// The global coordinates are defined in the \ref global_coordinate_system.
97  //@{
101  //@}
102 
103  /// \name Direction in global coordinates of original vertex of the track from which this hit was generated
104  /// The global coordinates are defined in the \ref global_coordinate_system.
105  //@{
109  Float_t OriginVertexThetaAngle; ///< (degrees)
110  Float_t OriginVertexPhiAngle; ///< (degrees)
111  //@}
112 
113  /// \name Original vertex kinetic and total energy of the track from which this hit was generated (where the track started)
114  //@{
118  //@}
119 
120  /// \name Direction of the hit in global coordinates
121  /// The global coordinates are defined in the \ref global_coordinate_system.
122  //@{
123  Float_t GlobalThetaAngle; ///< (degrees)
124  Float_t GlobalPhiAngle; ///< (degrees, but 90 degrees rotated to keep things interesting)
125  //@}
126 
127  /// \name Particle name and type at the hit
128  //@{
129  std::vector <TString> ParticleName; ///< Name of the particle that caused this hit
130  std::vector <Int_t> ParticleType; ///< \ref Lund_type of the particle that caused this hit (until r4757 this used the \ref geant3_type of the particle)
131  //@}
132 
133  std::vector<Float_t> DepositedEnergy; //--- deposited energy in one step
134  Float_t TotalDepositedEnergy; //--- event total
135 
136 public:
137 
138  // Constructor
140  // Destructor
142 
143  void Initialize();
144 
145  //-----------------
146  void StoreTrackID(Int_t tid) { TrackID = tid; }
147  Int_t GetTrackID() const {return TrackID;}
148 
149  void StoreGlobalTimeOfHit(Float_t gtime) { GlobalTimeOfHit = gtime; }
150  Float_t GetGloablTimeOfHit() const {return GlobalTimeOfHit;}
151 
152  void StoreParticleName(TString pn) { ParticleName.push_back(pn); }
153  std::vector <TString> GetParticleName() const {return ParticleName;}
154 
155  void StoreParticleType(Int_t pt) { ParticleType.push_back(pt); }
156  std::vector <Int_t> GetParticleType() const {return ParticleType;}
157 
158  //-----------------
159  void StoreDetectorHasBeenHit(Int_t n) { HasBeenHit = n; }
160  Int_t GetDetectorHasBeenHit() const {return HasBeenHit;}
161  //-----------------
162  void StoreDetectorNbOfHits(Int_t nd) { NbOfHits = nd; }
163  Int_t GetDetectorNbOfHits() const {return NbOfHits;}
164  //-----------------
167 
170 
173  //-----------------
176 
179 
182  //---
185 
188 
191  //-----------------
194 
197 
200  //-----------------
203 
206 
209  //-----------------
210  void StoreOriginVertexThetaAngle(Float_t theta) { OriginVertexThetaAngle = theta; }
212 
213  void StoreOriginVertexPhiAngle(Float_t phi) { OriginVertexPhiAngle = phi; }
215  //-----------------
218 
221 
224 
225  void StoreGlobalThetaAngle(Float_t theta) { GlobalThetaAngle = theta; }
226  Float_t GetGlobalThetaAngle() const {return GlobalThetaAngle;}
227 
228  void StoreGlobalPhiAngle(Float_t phi) { GlobalPhiAngle = phi; }
229  Float_t GetGlobalPhiAngle() const {return GlobalPhiAngle;}
230 
231 
232  //--- deposited energy in TS in one step
233  void StoreDepositedEnergy(Float_t dpeg) {
234  DepositedEnergy.push_back(dpeg);
235  TotalDepositedEnergy += dpeg;
236  }
237  std::vector<Float_t> GetDepositedEnergy() const {return DepositedEnergy;}
238 
239  //--- total deposited energy in TS in one event
240  void StoreTotalEnergyDeposit(Float_t eng) { TotalDepositedEnergy = eng; }
241  Float_t GetTotalEnergyDeposit() const {return TotalDepositedEnergy;}
242 
243  void AddSecondaryElectronEvent(Float_t XO, Float_t YO, Float_t ZO,
244  Float_t XM, Float_t YM, Float_t ZM,
245  Float_t energy);
246 
247  void StoreEdgeEventFlag(Int_t flag) {EdgeEventFlag = flag;};
248  Int_t GetEdgeEventFlag() {return EdgeEventFlag;};
249 
250  // define a new Class known to ROOT
252 
253 }; // end class QweakSimUserTriggerScintillator_DetectorEvent
254 
255 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
256 
257 #endif
258 
259 //=======================================================================================
260 // -----------------------
261 // | CVS File Information |
262 // -----------------------
263 //
264 // $Revisions$
265 // $Log: QweakSimUserTriggerScintillator_DetectorEvent.hh,v $
266 // Revision 1.2 2005/12/27 19:30:53 grimm
267 // - Redesign of Doxygen header containing CVS info like revision and date
268 // - Added CVS revision log at the end of file
269 //
270 //
Float_t GlobalPhiAngle
(degrees, but 90 degrees rotated to keep things interesting)
Float_t GlobalTimeOfHit
Global time when this hit was generated.
Int_t TrackID
ID of the track from which this hit was generated.
std::vector< Int_t > ParticleType
Lund type of the particle that caused this hit (until r4757 this used the geant3 type of the particle...
std::vector< TString > ParticleName
Name of the particle that caused this hit.
void AddSecondaryElectronEvent(Float_t XO, Float_t YO, Float_t ZO, Float_t XM, Float_t YM, Float_t ZM, Float_t energy)
Int_t HasBeenHit
Has this detector been hit? 0 = no, 5 = yes.
ROOT Subtree structure for Trigger Scintillator DetectorEvent.