AuxDetHit.h
Go to the documentation of this file.
1 /*
2  * File: AuxDetHit.h
3  * Author: wenzel
4  *
5  * Created on October 22, 2018, 2:35 PM
6  */
7 
8 #ifndef AUXDETHIT_H
9 #define AUXDETHIT_H
10 
11 #include <vector>
12 
13 namespace sim {
14 
15  class AuxDetHit {
16  private:
17  unsigned int ID; ///< Geant4 copy ID
18  unsigned int trackID; ///< Geant4 supplied track ID
19  float energyDeposited; ///< total energy deposited for this track ID and time
20  float entryX; ///< Entry position X of particle
21  float entryY; ///< Entry position Y of particle
22  float entryZ; ///< Entry position Z of particle
23  float entryT; ///< Entry time of particle
24  float exitX; ///< Exit position X of particle
25  float exitY; ///< Exit position Y of particle
26  float exitZ; ///< Exit position Z of particle
27  float exitT; ///< Exit time of particle
28  float exitMomentumX; ///< Exit X-Momentum of particle
29  float exitMomentumY; ///< Exit Y-Momentum of particle
30  float exitMomentumZ; ///< Exit Z-Momentum of particle
31 
32  public:
33  // Default constructor
34  AuxDetHit() {}
35  bool operator<(const AuxDetHit& other) const;
36  bool operator==(const AuxDetHit& other) const;
37  // Hide the following from Root
38 
39  AuxDetHit(unsigned int ID,
40  unsigned int trackID,
41  float energyDeposited,
42  float entryX,
43  float entryY,
44  float entryZ,
45  float entryT,
46  float exitX,
47  float exitY,
48  float exitZ,
49  float exitT,
50  float exitMomentumX,
51  float exitMomentumY,
52  float exitMomentumZ) :
53  ID(ID),
54  trackID(trackID),
55  energyDeposited(energyDeposited),
56  entryX(entryX),
57  entryY(entryY),
58  entryZ(entryZ),
59  entryT(entryT),
60  exitX(exitX),
61  exitY(exitY),
62  exitZ(exitZ),
63  exitT(exitT),
64  exitMomentumX(exitMomentumX),
65  exitMomentumY(exitMomentumY),
66  exitMomentumZ(exitMomentumZ) {
67  }
68 
69  void SetExitMomentumZ(float exitMomentumZ) {
70  this->exitMomentumZ = exitMomentumZ;
71  }
72 
73  float GetExitMomentumZ() const {
74  return exitMomentumZ;
75  }
76 
77  void SetExitMomentumY(float exitMomentumY) {
78  this->exitMomentumY = exitMomentumY;
79  }
80 
81  float GetExitMomentumY() const {
82  return exitMomentumY;
83  }
84 
85  void SetExitMomentumX(float exitMomentumX) {
86  this->exitMomentumX = exitMomentumX;
87  }
88 
89  float GetExitMomentumX() const {
90  return exitMomentumX;
91  }
92 
93  void SetExitT(float exitT) {
94  this->exitT = exitT;
95  }
96 
97  float GetExitT() const {
98  return exitT;
99  }
100 
101  void SetExitZ(float exitZ) {
102  this->exitZ = exitZ;
103  }
104 
105  float GetExitZ() const {
106  return exitZ;
107  }
108 
109  void SetExitY(float exitY) {
110  this->exitY = exitY;
111  }
112 
113  float GetExitY() const {
114  return exitY;
115  }
116 
117  void SetExitX(float exitX) {
118  this->exitX = exitX;
119  }
120 
121  float GetExitX() const {
122  return exitX;
123  }
124 
125  void SetEntryT(float entryT) {
126  this->entryT = entryT;
127  }
128 
129  float GetEntryT() const {
130  return entryT;
131  }
132 
133  void SetEntryZ(float entryZ) {
134  this->entryZ = entryZ;
135  }
136 
137  float GetEntryZ() const {
138  return entryZ;
139  }
140 
141  void SetEntryY(float entryY) {
142  this->entryY = entryY;
143  }
144 
145  float GetEntryY() const {
146  return entryY;
147  }
148 
149  void SetEntryX(float entryX) {
150  this->entryX = entryX;
151  }
152 
153  float GetEntryX() const {
154  return entryX;
155  }
156 
157  void SetEnergyDeposited(float energyDeposited) {
158  this->energyDeposited = energyDeposited;
159  }
160 
161  float GetEnergyDeposited() const {
162  return energyDeposited;
163  }
164 
165  void SetTrackID(unsigned int trackID) {
166  this->trackID = trackID;
167  }
168 
169  unsigned int GetTrackID() const {
170  return trackID;
171  }
172 
173  void SetID(unsigned int ID) {
174  this->ID = ID;
175  }
176 
177  unsigned int GetID() const {
178  return ID;
179  }
180 
181  };
182 
183  typedef std::vector<AuxDetHit> AuxDetHitCollection;
184  inline bool sim::AuxDetHit::operator<(const AuxDetHit& other) const { return trackID < other.trackID;}
185  inline bool sim::AuxDetHit::operator==(const AuxDetHit& other) const { return other.trackID == trackID;}
186 } // namespace sim
187 #endif /* AUXDETHIT_H */
unsigned int GetTrackID() const
Definition: AuxDetHit.h:169
void SetEntryT(float entryT)
Definition: AuxDetHit.h:125
void SetEntryX(float entryX)
Definition: AuxDetHit.h:149
float GetExitX() const
Definition: AuxDetHit.h:121
float entryY
Entry position Y of particle.
Definition: AuxDetHit.h:21
float exitMomentumX
Exit X-Momentum of particle.
Definition: AuxDetHit.h:28
void SetExitY(float exitY)
Definition: AuxDetHit.h:109
float exitY
Exit position Y of particle.
Definition: AuxDetHit.h:25
float GetExitMomentumY() const
Definition: AuxDetHit.h:81
void SetID(unsigned int ID)
Definition: AuxDetHit.h:173
bool operator==(const AuxDetHit &other) const
Definition: AuxDetHit.h:185
float exitZ
Exit position Z of particle.
Definition: AuxDetHit.h:26
float entryT
Entry time of particle.
Definition: AuxDetHit.h:23
unsigned int trackID
Geant4 supplied track ID.
Definition: AuxDetHit.h:18
void SetExitMomentumX(float exitMomentumX)
Definition: AuxDetHit.h:85
float exitT
Exit time of particle.
Definition: AuxDetHit.h:27
float entryZ
Entry position Z of particle.
Definition: AuxDetHit.h:22
float GetEntryX() const
Definition: AuxDetHit.h:153
void SetExitMomentumZ(float exitMomentumZ)
Definition: AuxDetHit.h:69
float GetExitT() const
Definition: AuxDetHit.h:97
float entryX
Entry position X of particle.
Definition: AuxDetHit.h:20
float exitX
Exit position X of particle.
Definition: AuxDetHit.h:24
float GetEntryT() const
Definition: AuxDetHit.h:129
float GetEnergyDeposited() const
Definition: AuxDetHit.h:161
void SetEntryY(float entryY)
Definition: AuxDetHit.h:141
void SetEnergyDeposited(float energyDeposited)
Definition: AuxDetHit.h:157
bool operator<(const AuxDetHit &other) const
Definition: AuxDetHit.h:184
Code to link reconstructed objects back to the MC truth information.
float energyDeposited
total energy deposited for this track ID and time
Definition: AuxDetHit.h:19
void SetExitT(float exitT)
Definition: AuxDetHit.h:93
std::vector< AuxDetHit > AuxDetHitCollection
Definition: AuxDetHit.h:183
unsigned int GetID() const
Definition: AuxDetHit.h:177
float exitMomentumZ
Exit Z-Momentum of particle.
Definition: AuxDetHit.h:30
void SetExitMomentumY(float exitMomentumY)
Definition: AuxDetHit.h:77
float GetExitY() const
Definition: AuxDetHit.h:113
void SetTrackID(unsigned int trackID)
Definition: AuxDetHit.h:165
void SetExitX(float exitX)
Definition: AuxDetHit.h:117
void SetEntryZ(float entryZ)
Definition: AuxDetHit.h:133
float exitMomentumY
Exit Y-Momentum of particle.
Definition: AuxDetHit.h:29
float GetExitMomentumX() const
Definition: AuxDetHit.h:89
float GetEntryZ() const
Definition: AuxDetHit.h:137
float GetExitZ() const
Definition: AuxDetHit.h:105
void SetExitZ(float exitZ)
Definition: AuxDetHit.h:101
unsigned int ID
Geant4 copy ID.
Definition: AuxDetHit.h:17
float GetExitMomentumZ() const
Definition: AuxDetHit.h:73
float GetEntryY() const
Definition: AuxDetHit.h:145
AuxDetHit(unsigned int ID, unsigned int trackID, float energyDeposited, float entryX, float entryY, float entryZ, float entryT, float exitX, float exitY, float exitZ, float exitT, float exitMomentumX, float exitMomentumY, float exitMomentumZ)
Definition: AuxDetHit.h:39