QwGeant4
QweakSimUserHDC_WirePlaneEvent.hh
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 /**
7 
8  \file QweakSimUserHDC_WirePlaneEvent.hh
9 
10  $Date: Fri Jul 3 10:16:54 CDT 2009$
11 
12  \author Klaus Hans Grimm
13  \author Jie Pan
14 
15 */
16 //=============================================================================
17 //
18 //=============================================================================
19 //
20 // ---------------------------
21 // | Doxygen Class Information |
22 // ---------------------------
23 /**
24  \class QweakSimUserHDC_WirePlaneEvent
25 
26  \ingroup root
27 
28  \brief ROOT Subtree structure for HDC WirePlaneEvent
29 
30  */
31 //=============================================================================
32 
33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
34 #ifndef QweakSimUserHDC_WirePlaneEvent_h
35 #define QweakSimUserHDC_WirePlaneEvent_h
36 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
37 
38 // system includes
39 #include <vector>
40 
41 // root includes
42 #include "TObject.h"
43 #include "TString.h"
44 
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
46 class QweakSimUserHDC_WirePlaneEvent : public TObject
47 {
48 
49 private:
50 
51  std::vector <Int_t> PackageID; ///< Package number
52  std::vector <Int_t> TrackID; ///< ID of the track from which this hit was generated
53  std::vector <Float_t> GlobalTimeOfHit; ///< Global time when this hit was generated
54 
55  Int_t NbOfHits; ///< Number of hits in this plane
56  Int_t PlaneHasBeenHit; ///< Has this plane been hit? 0 = no, 5 = yes
57 
58  /// \name Position of the hit in local coordinates
59  /// The local coordinates are defined in the \ref local_coordinate_system.
60  //@{
61  std::vector <Float_t> PlaneLocalPositionX;
62  std::vector <Float_t> PlaneLocalPositionY;
63  std::vector <Float_t> PlaneLocalPositionZ;
64  ///@}
65 
66  /// \name Position of the hit in global coordinates
67  /// The global coordinates are defined in the \ref global_coordinate_system.
68  //@{
69  std::vector <Float_t> PlaneGlobalPositionX;
70  std::vector <Float_t> PlaneGlobalPositionY;
71  std::vector <Float_t> PlaneGlobalPositionZ;
72  //@}
73 
74  /// \name Momentum of the hit in local coordinates
75  /// The local coordinates are defined in the \ref local_coordinate_system.
76  //@{
77  std::vector <Float_t> PlaneLocalMomentumX;
78  std::vector <Float_t> PlaneLocalMomentumY;
79  std::vector <Float_t> PlaneLocalMomentumZ;
80  //@}
81 
82  /// \name Momentum of the hit in global coordinates
83  /// The global coordinates are defined in the \ref global_coordinate_system.
84  //@{
85  std::vector <Float_t> PlaneGlobalMomentumX;
86  std::vector <Float_t> PlaneGlobalMomentumY;
87  std::vector <Float_t> PlaneGlobalMomentumZ;
88  std::vector <Float_t> GlobalPhiAngle;
89  std::vector <Float_t> GlobalThetaAngle;
90  //@}
91 
92  /// \name Position in global coordinates of original vertex of the track from which this hit was generated
93  /// The global coordinates are defined in the \ref global_coordinate_system.
94  //@{
95  std::vector <Float_t> OriginVertexPositionX;
96  std::vector <Float_t> OriginVertexPositionY;
97  std::vector <Float_t> OriginVertexPositionZ;
98  //@}
99 
100  /// \name Direction in global coordinates of original vertex of the track from which this hit was generated
101  /// The global coordinates are defined in the \ref global_coordinate_system.
102  //@{
103  std::vector <Float_t> OriginVertexMomentumDirectionX;
104  std::vector <Float_t> OriginVertexMomentumDirectionY;
105  std::vector <Float_t> OriginVertexMomentumDirectionZ;
106  std::vector <Float_t> OriginVertexThetaAngle; ///< (degrees)
107  std::vector <Float_t> OriginVertexPhiAngle; ///< (degrees)
108  //@}
109 
110  /// \name Particle name and type at the hit
111  //@{
112  std::vector <TString> ParticleName; ///< Name of the particle that caused this hit
113  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)
114  //@}
115 
116  /// \name Total and kinetic energy at the original vertex of the track from which this hit was generated
117  //@{
118  std::vector <Float_t> OriginVertexTotalEnergy; ///< (MeV)
119  std::vector <Float_t> OriginVertexKineticEnergy; ///< (MeV)
120  //@}
121 
122  /// \name Total and kinetic energy of the track at the hit
123  //@{
124  std::vector <Float_t> TotalEnergy; ///< (MeV)
125  std::vector <Float_t> KineticEnergy; ///< (MeV)
126  //@}
127 
128 public:
129 
130  // Constructor
132  // Destructor
134 
135  void Initialize();
136  void Clear(const Option_t* = 0);
137 
138  void StoreNbOfHits(Int_t noh) { NbOfHits = noh; }
139  Int_t GetNbOfHits() const {return NbOfHits;}
140 
141  void StorePackageID(Int_t pid) { PackageID.push_back(pid); }
142  std::vector <Int_t> GetPackageID() const {return PackageID;}
143 
144  void StoreTrackID(Int_t tid) { TrackID.push_back(tid); }
145  std::vector <Int_t> GetTrackID() const {return TrackID;}
146 
147  void StoreGlobalTimeOfHit(Float_t gtime) { GlobalTimeOfHit.push_back(gtime); }
148  std::vector <Float_t> GetGloablTimeOfHit() const {return GlobalTimeOfHit;}
149 
150  //-----------------
151  // Setter/Getter for X,U,V wire planes
152 
153  void StorePlaneHasBeenHit(Int_t nx) { PlaneHasBeenHit = nx; }
154  Int_t GetPlaneHasBeenHit() const {return PlaneHasBeenHit;}
155 
156  //-----------------
157  void StorePlaneLocalPositionX(Float_t lx) { PlaneLocalPositionX.push_back(lx); }
158  std::vector <Float_t> GetPlaneLocalPositionX() const {return PlaneLocalPositionX;}
159 
160  void StorePlaneLocalPositionY(Float_t ly) { PlaneLocalPositionY.push_back(ly); }
161  std::vector <Float_t> GetPlaneLocalPositionY() const {return PlaneLocalPositionY;}
162 
163  void StorePlaneLocalPositionZ(Float_t lz) { PlaneLocalPositionZ.push_back(lz); }
164  std::vector <Float_t> GetPlaneLocalPositionZ() const {return PlaneLocalPositionZ;}
165  //---
166  void StorePlaneGlobalPositionX(Float_t gx) { PlaneGlobalPositionX.push_back(gx); }
167  std::vector <Float_t> GetPlaneGlobalPositionX() const {return PlaneGlobalPositionX;}
168 
169  void StorePlaneGlobalPositionY(Float_t gy) { PlaneGlobalPositionY.push_back(gy); }
170  std::vector <Float_t> GetPlaneGlobalPositionY() const {return PlaneGlobalPositionY;}
171 
172  void StorePlaneGlobalPositionZ(Float_t gz) { PlaneGlobalPositionZ.push_back(gz); }
173  std::vector <Float_t> GetPlaneGlobalPositionZ() const {return PlaneGlobalPositionZ;}
174  //-----------------
175  void StorePlaneLocalMomentumX(Float_t lpx) { PlaneLocalMomentumX.push_back(lpx); }
176  std::vector <Float_t> GetPlaneLocalMomentumX() const {return PlaneLocalMomentumX;}
177 
178  void StorePlaneLocalMomentumY(Float_t lpy) { PlaneLocalMomentumY.push_back(lpy); }
179  std::vector <Float_t> GetPlaneLocalMomentumY() const {return PlaneLocalMomentumY;}
180 
181  void StorePlaneLocalMomentumZ(Float_t lpz) { PlaneLocalMomentumZ.push_back(lpz); }
182  std::vector <Float_t> GetPlaneLocalMomentumZ() const {return PlaneLocalMomentumZ;}
183  //---
184  void StorePlaneGlobalMomentumX(Float_t gpx) { PlaneGlobalMomentumX.push_back(gpx); }
185  std::vector <Float_t> GetPlaneGlobalMomentumX() const {return PlaneGlobalMomentumX;}
186 
187  void StorePlaneGlobalMomentumY(Float_t gpy) { PlaneGlobalMomentumY.push_back(gpy); }
188  std::vector <Float_t> GetPlaneGlobalMomentumY() const {return PlaneGlobalMomentumY;}
189 
190  void StorePlaneGlobalMomentumZ(Float_t gpz) { PlaneGlobalMomentumZ.push_back(gpz); }
191  std::vector <Float_t> GetPlaneGlobalMomentumZ() const {return PlaneGlobalMomentumZ;}
192  //-----------------
193  void StoreOriginVertexPositionX(Float_t vx) { OriginVertexPositionX.push_back(vx); }
194  std::vector <Float_t> GetOriginVertexPositionX() const {return OriginVertexPositionX;}
195 
196  void StoreOriginVertexPositionY(Float_t vy) { OriginVertexPositionY.push_back(vy); }
197  std::vector <Float_t> GetOriginVertexPositionY() const {return OriginVertexPositionY;}
198 
199  void StoreOriginVertexPositionZ(Float_t vz) { OriginVertexPositionZ.push_back(vz); }
200  std::vector <Float_t> GetOriginVertexPositionZ() const {return OriginVertexPositionZ;}
201  //-----------------
204 
207 
210  //-----------------
211  void StoreOriginVertexThetaAngle(Float_t theta) { OriginVertexThetaAngle.push_back(theta); }
212  std::vector <Float_t> GetOriginVertexThetaAngle() const {return OriginVertexThetaAngle;}
213 
214  void StoreOriginVertexPhiAngle(Float_t phi) { OriginVertexPhiAngle.push_back(phi); }
215  std::vector <Float_t> GetOriginVertexPhiAngle() const {return OriginVertexPhiAngle;}
216  //-----------------
217  void StoreOriginVertexKineticEnergy(Float_t ekin) { OriginVertexKineticEnergy.push_back(ekin); }
218  std::vector <Float_t> GetOriginVertexKineticEnergy() const {return OriginVertexKineticEnergy;}
219 
220  void StoreOriginVertexTotalEnergy(Float_t etot) { OriginVertexTotalEnergy.push_back(etot); }
221  std::vector <Float_t> GetOriginVertexTotalEnergy() const {return OriginVertexTotalEnergy;}
222  //-----------------
223  void StoreGlobalThetaAngle(Float_t theta) { GlobalThetaAngle.push_back(theta); }
224  std::vector <Float_t> GetGlobalThetaAngle() const {return GlobalThetaAngle;}
225 
226  void StoreGlobalPhiAngle(Float_t phi) { GlobalPhiAngle.push_back(phi); }
227  std::vector <Float_t> GetGlobalPhiAngle() const {return GlobalPhiAngle;}
228  //-----------------
229  void StoreTotalEnergy(Float_t te) { TotalEnergy.push_back(te); }
230  std::vector <Float_t> GetTotalEnergy() const {return TotalEnergy;}
231 
232  void StoreKineticEnergy(Float_t ke) { KineticEnergy.push_back(ke); }
233  std::vector <Float_t> GetKineticEnergy() const {return KineticEnergy;}
234 
235  void StoreParticleName(TString pn) { ParticleName.push_back(pn); }
236  std::vector <TString> GetParticleName() const {return ParticleName;}
237 
238  void StoreParticleType(Int_t pt) { ParticleType.push_back(pt); }
239  std::vector <Int_t> GetParticleType() const {return ParticleType;}
240 
241 
242  // define a new Class known to ROOT
244 
245 }; // end class QweakSimUserHDC_WirePlaneEvent
246 
247 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
248 
249 #endif
250 
std::vector< Float_t > GetOriginVertexPositionY() const
std::vector< Float_t > OriginVertexThetaAngle
(degrees)
std::vector< Float_t > GetPlaneLocalPositionX() const
std::vector< Float_t > GetOriginVertexKineticEnergy() const
Int_t NbOfHits
Number of hits in this plane.
std::vector< Int_t > GetPackageID() const
std::vector< Float_t > OriginVertexTotalEnergy
(MeV)
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< Float_t > GetOriginVertexPositionX() const
std::vector< Float_t > GetPlaneGlobalPositionZ() const
std::vector< Float_t > GetPlaneLocalPositionZ() const
std::vector< TString > GetParticleName() const
std::vector< Float_t > GetGlobalThetaAngle() const
ROOT Subtree structure for HDC WirePlaneEvent.
std::vector< Float_t > GetGlobalPhiAngle() const
std::vector< Float_t > GetPlaneGlobalMomentumZ() const
std::vector< Float_t > OriginVertexKineticEnergy
(MeV)
std::vector< Float_t > GetOriginVertexMomentumDirectionX() const
std::vector< Float_t > GetGloablTimeOfHit() const
std::vector< TString > ParticleName
Name of the particle that caused this hit.
std::vector< Float_t > GetPlaneGlobalPositionY() const
std::vector< Float_t > GetOriginVertexMomentumDirectionZ() const
std::vector< Float_t > GetPlaneGlobalPositionX() const
std::vector< Float_t > GetOriginVertexMomentumDirectionY() const
std::vector< Float_t > GetPlaneLocalMomentumX() const
std::vector< Float_t > OriginVertexPhiAngle
(degrees)
std::vector< Float_t > GlobalTimeOfHit
Global time when this hit was generated.
std::vector< Int_t > TrackID
ID of the track from which this hit was generated.
std::vector< Int_t > PackageID
Package number.
std::vector< Float_t > GetPlaneGlobalMomentumY() const
Int_t PlaneHasBeenHit
Has this plane been hit? 0 = no, 5 = yes.
std::vector< Float_t > GetKineticEnergy() const
std::vector< Float_t > GetOriginVertexTotalEnergy() const
std::vector< Float_t > GetTotalEnergy() const
std::vector< Float_t > GetPlaneLocalMomentumZ() const
std::vector< Int_t > GetParticleType() const
std::vector< Float_t > GetOriginVertexPhiAngle() const
std::vector< Float_t > GetOriginVertexPositionZ() const
std::vector< Float_t > GetPlaneGlobalMomentumX() const
std::vector< Float_t > GetPlaneLocalMomentumY() const
std::vector< Float_t > GetPlaneLocalPositionY() const
std::vector< Float_t > GetOriginVertexThetaAngle() const