LDMX Software
CalorimeterHit.h
Go to the documentation of this file.
1
8#ifndef RECON_EVENT_CALORIMETERHIT_H_
9#define RECON_EVENT_CALORIMETERHIT_H_
10
11// ROOT
12#include "TObject.h" //For ClassDef
13
14namespace ldmx {
15
26 public:
31
35 virtual ~CalorimeterHit() = default;
36
40 void Clear();
41
45 void Print() const;
46
51 int getID() const { return id_; }
52
57 void setID(int id) { id_ = id; }
58
65 float getAmplitude() const { return amplitude_; }
66
73 void setAmplitude(float amplitude) { amplitude_ = amplitude; }
74
80 float getEnergy() const { return energy_; }
81
87 void setEnergy(float energy) { energy_ = energy; }
88
93 float getTime() const { return time_; }
94
99 void setTime(float time) { time_ = time; }
100
105 float getXPos() const { return xpos_; }
106
111 void setXPos(float xpos) { xpos_ = xpos; }
112
117 float getYPos() const { return ypos_; }
118
123 void setYPos(float ypos) { ypos_ = ypos; }
124
129 float getZPos() const { return zpos_; }
130
135 void setZPos(float zpos) { zpos_ = zpos; }
136
141 bool isNoise() const { return isNoise_; }
142
147 void setNoise(bool yes) { isNoise_ = yes; }
148
152 bool operator<(const CalorimeterHit &rhs) const {
153 return this->getTime() < rhs.getTime();
154 }
155
156 private:
158 int id_{0};
159
161 float amplitude_{0};
162
164 float energy_{0};
165
167 float time_{0};
168
170 float xpos_{-9999.};
171
173 float ypos_{-9999.};
174
176 float zpos_{-9999.};
177
179 bool isNoise_{false};
180
185};
186} // namespace ldmx
187
188#endif /* RECON_EVENT_CALORIMETERHIT_H_ */
Represents a reconstructed hit in a calorimeter cell within the detector.
float getEnergy() const
Get the calorimetric energy of the hit, corrected for sampling factors [MeV].
float getTime() const
Get the time of the hit [ns].
void setYPos(float ypos)
Set the Y position of the hit [mm].
CalorimeterHit()
Class constructor.
float time_
The time of the hit.
float xpos_
X Position of the hit.
void setID(int id)
Set the detector ID.
int id_
The detector ID of the hit.
ClassDef(CalorimeterHit, 2)
The ROOT class definition.
float energy_
The energy of the hit corrected by a sampling fraction.
float getYPos() const
Get the Y position of the hit [mm].
void Print() const
Print out the object.
void setZPos(float zpos)
Set the Z position of the hit [mm].
void setXPos(float xpos)
Set the X position of the hit [mm].
void setTime(float time)
Set the time of the hit [ns].
void setAmplitude(float amplitude)
Set the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sam...
void setEnergy(float energy)
Set the calorimetric energy of the hit, corrected for sampling factors [MeV].
void Clear()
Clear the data in the object.
float ypos_
Y Position of the hit.
int getID() const
Get the detector ID.
float getZPos() const
Get the Z position of the hit [mm].
bool isNoise_
Is this a noise hit?
virtual ~CalorimeterHit()=default
Class destructor.
float getXPos() const
Get the X position of the hit [mm].
bool operator<(const CalorimeterHit &rhs) const
Sort by time of hit.
float getAmplitude() const
Get the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sam...
bool isNoise() const
Is this hit a noise hit?
float zpos_
Z Position of the hit.
float amplitude_
The amplitude value before sampling corrections.
void setNoise(bool yes)
Set if this hit is a noise hit.