LDMX Software
SimTrackerHit.cxx
2
3ClassImp(ldmx::SimTrackerHit);
4
5namespace ldmx {
6
8
9void SimTrackerHit::Print() const {
10 std::cout << "SimTrackerHit { "
11 << "id: " << id_ << ", "
12 << "layerID: " << layerID_ << ", "
13 << "moduleID: " << moduleID_ << ", "
14 << "position: ( " << x_ << ", " << y_ << ", " << z_ << " ), "
15 << "edep: " << edep_ << ", "
16 << "time: " << time_ << ", "
17 << "momentum: ( " << px_ << ", " << py_ << ", " << pz_ << " )"
18 << " }" << std::endl;
19}
20
22 id_ = 0;
23 layerID_ = 0;
24 moduleID_ = 0;
25 edep_ = 0;
26 time_ = 0;
27 px_ = 0;
28 py_ = 0;
29 pz_ = 0;
30 x_ = 0;
31 y_ = 0;
32 z_ = 0;
33 energy_ = 0;
34 pathLength_ = 0;
35 trackID_ = -1;
36 pdgID_ = 0;
37}
38
39void SimTrackerHit::setPosition(const float x, const float y, const float z) {
40 this->x_ = x;
41 this->y_ = y;
42 this->z_ = z;
43}
44
45void SimTrackerHit::setMomentum(const float px, const float py,
46 const float pz) {
47 this->px_ = px;
48 this->py_ = py;
49 this->pz_ = pz;
50}
51} // namespace ldmx
Class which encapsulates information from a hit in a simulated tracking detector.
Represents a simulated tracker hit in the simulation.
float z_
The Z position.
float pz_
The Z momentum.
float pathLength_
The path length of the hit.
int trackID_
The Sim Track ID.
float time_
The global time of the hit.
float px_
The X momentum.
float edep_
The energy deposited on the hit.
int layerID_
The layer ID.
float x_
The X position.
void Clear()
Reset the SimTrackerHit object.
void setPosition(const float x, const float y, const float z)
Set the position of the hit [mm].
float y_
The Y position.
int pdgID_
The Sim PDG ID.
virtual ~SimTrackerHit()
Class destructor.
float py_
The Y momentum.
void Print() const
Print a description of this object.
int id_
The detector ID.
float energy_
The total energy.
int moduleID_
The module ID.
void setMomentum(const float px, const float py, const float pz)
Set the momentum of the particle at the position at which the hit took place [GeV].