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 friend std::ostream &operator<<(std::ostream &o, const HcalHit &d);
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 is_adc_; }
90
95 int getToaPos() const { return toa_pos_; }
96
101 int getToaNeg() const { return toa_neg_; }
102
107 int getAmplitudePos() const { return amplitude_pos_; }
108
113 int getAmplitudeNeg() const { return amplitude_neg_; }
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 time_diff_; }
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) { is_adc_ = isADC; }
191
196 void setTimeDiff(double timeDiff) { time_diff_ = timeDiff; }
197
202 void setToaPos(double toaPos) { toa_pos_ = toaPos; }
203
208 void setToaNeg(double toaNeg) { toa_neg_ = toaNeg; }
209
214 void setAmplitudePos(double amplitudePos) { amplitude_pos_ = amplitudePos; }
215
220 void setAmplitudeNeg(double amplitudeNeg) { amplitude_neg_ = 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 is_adc_{-99};
252
253 double time_diff_{-9999.};
254 double position_{-9999.};
255 int orientation_{-9999};
256
257 double toa_pos_{-9999.};
258 double toa_neg_{-9999.};
259 double amplitude_pos_{-9999.};
260 double amplitude_neg_{-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.
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
ClassDef(HcalHit, 6)
The ROOT class definition.
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
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
int is_adc_
isADC
Definition HcalHit.h:251
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 clear()
Clear the data in the object.
Definition HcalHit.cxx:9
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
friend std::ostream & operator<<(std::ostream &o, const HcalHit &d)
Print out the object.
Definition HcalHit.cxx:15
void setOrientation(int orientation)
Set if the bar is orientied in X / Y / Z meanig 0 / 1 / 2, respectively.
Definition HcalHit.h:234
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
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