LDMX Software
HcalHit.h
Go to the documentation of this file.
1
8#ifndef HCAL_EVENT_HCALHIT_H_
9#define HCAL_EVENT_HCALHIT_H_
10
11// LDMX
13
14namespace ldmx {
15
25 public:
29 HcalHit() = default;
30
34 virtual ~HcalHit() = default;
35
39 void Clear();
40
44 void Print() const;
45
51 float getPE() const { return pe_; }
52
59 float getMinPE() const { return minpe_; }
60
65 int getSection() const { return section_; }
66
71 int getLayer() const { return layer_; }
72
77 int getStrip() const { return strip_; }
78
83 int getEnd() const { return end_; }
84
89 int getIsADC() const { return isADC_; }
90
95 int getToaPos() const { return toaPos_; }
96
101 int getToaNeg() const { return toaNeg_; }
102
107 int getAmplitudePos() const { return amplitudePos_; }
108
113 int getAmplitudeNeg() const { return amplitudeNeg_; }
114
119 double getPosition() const { return position_; }
120
125 bool isOrientationX() const { return orientation_ == 0; }
126
131 bool isOrientationY() const { return orientation_ == 1; }
132
137 bool isOrientationZ() const { return orientation_ == 2; }
138
144 double getTimeDiff() const { return timeDiff_; }
145
146 // Now the setters
147
153 void setPE(float pe) { pe_ = pe; }
154
160 void setMinPE(float minpe) { minpe_ = minpe; }
161
166 void setSection(int section) { section_ = section; }
167
172 void setLayer(int layer) { layer_ = layer; }
173
178 void setStrip(int strip) { strip_ = strip; }
179
184 void setEnd(int end) { end_ = end; }
185
190 void setIsADC(int isADC) { isADC_ = isADC; }
191
196 void setTimeDiff(double timeDiff) { timeDiff_ = timeDiff; }
197
202 void setToaPos(double toaPos) { toaPos_ = toaPos; }
203
208 void setToaNeg(double toaNeg) { toaNeg_ = toaNeg; }
209
214 void setAmplitudePos(double amplitudePos) { amplitudePos_ = amplitudePos; }
215
220 void setAmplitudeNeg(double amplitudeNeg) { amplitudeNeg_ = amplitudeNeg; }
221
225 void setPositionUnchanged(double position, int orientation) {
226 position_ = position;
227 orientation_ = orientation;
228 }
229
234 void setOrientation(int orientation) { orientation_ = orientation; }
235
236 private:
238 float pe_{0.0};
239
242 float minpe_{-99.0};
243
245 int section_{-99};
246 int layer_{-99};
247 int strip_{-99};
248 int end_{-99};
249
251 int isADC_{-99};
252
253 double timeDiff_{-9999.};
254 double position_{-9999.};
255 int orientation_{-9999};
256
257 double toaPos_{-9999.};
258 double toaNeg_{-9999.};
259 double amplitudePos_{-9999.};
260 double amplitudeNeg_{-9999.};
261
266};
267} // namespace ldmx
268
269#endif /* HCAL_EVENT_HCALHIT_H_ */
Class that represents a reconstructed hit in a calorimeter cell within the detector.
Represents a reconstructed hit in a calorimeter cell within the detector.
Stores reconstructed hit information from the HCAL.
Definition HcalHit.h:24
int getEnd() const
Get end for this hit.
Definition HcalHit.h:83
int section_
section, layer, strip and end
Definition HcalHit.h:245
double getTimeDiff() const
Get the time difference between the two ends Note: only applies for double ended readout.
Definition HcalHit.h:144
bool isOrientationY() const
Get if bar is oriented in Y.
Definition HcalHit.h:131
int getLayer() const
Get the layer for this hit.
Definition HcalHit.h:71
void setSection(int section)
Set the section for this hit.
Definition HcalHit.h:166
HcalHit()=default
Class constructor.
void Clear()
Clear the data in the object.
Definition HcalHit.cxx:9
bool isOrientationZ() const
Get if bar is oriented in Z.
Definition HcalHit.h:137
void setEnd(int end)
Set the end (0 neg, 1 pos side).
Definition HcalHit.h:184
float getMinPE() const
Get the minimum number of photoelectrons estimated for this hit if two sided readout.
Definition HcalHit.h:59
int getToaNeg() const
Get the toa of the negative end.
Definition HcalHit.h:101
int getStrip() const
Get the strip for this hit.
Definition HcalHit.h:77
double getPosition() const
Get the position of the hit.
Definition HcalHit.h:119
virtual ~HcalHit()=default
Class destructor.
void setPositionUnchanged(double position, int orientation)
Set original position.
Definition HcalHit.h:225
void setToaNeg(double toaNeg)
Set toa of the negative end.
Definition HcalHit.h:208
int isADC_
isADC
Definition HcalHit.h:251
bool isOrientationX() const
Get if bar is oriented in X.
Definition HcalHit.h:125
int getIsADC() const
Get if hit was reconstructed using ADC.
Definition HcalHit.h:89
float minpe_
The minimum number of PE estimated for this hit, different from pe_ when you have two ended readout.
Definition HcalHit.h:242
void setIsADC(int isADC)
Set if the hit is reconstructed using ADC.
Definition HcalHit.h:190
void setTimeDiff(double timeDiff)
Set time difference (uncorrected)
Definition HcalHit.h:196
void setMinPE(float minpe)
Set the minimum number of photoelectrons estimated for this hit.
Definition HcalHit.h:160
void setOrientation(int orientation)
Set if the bar is orientied in X / Y / Z meanig 0 / 1 / 2, respectively.
Definition HcalHit.h:234
ClassDef(HcalHit, 5)
The ROOT class definition.
void setToaPos(double toaPos)
Set toa of the positive end.
Definition HcalHit.h:202
void setAmplitudeNeg(double amplitudeNeg)
Set amplitude of the negative end.
Definition HcalHit.h:220
void setStrip(int strip)
Set the strip for this hit.
Definition HcalHit.h:178
int getToaPos() const
Get the toa of the positive end.
Definition HcalHit.h:95
float pe_
The number of PE estimated for this hit.
Definition HcalHit.h:238
int getAmplitudeNeg() const
Get the amplitude of the negative end.
Definition HcalHit.h:113
float getPE() const
Get the number of photoelectrons estimated for this hit.
Definition HcalHit.h:51
void Print() const
Print out the object.
Definition HcalHit.cxx:15
int getSection() const
Get the section for this hit.
Definition HcalHit.h:65
void setAmplitudePos(double amplitudePos)
Set amplitude of the positive end.
Definition HcalHit.h:214
void setLayer(int layer)
Set the layer for this hit.
Definition HcalHit.h:172
void setPE(float pe)
Set the number of photoelectrons estimated for this hit.
Definition HcalHit.h:153
int getAmplitudePos() const
Get the amplitude of the positive end.
Definition HcalHit.h:107