LDMX Software
SimTrackerHit.cxx
2
3ClassImp(ldmx::SimTrackerHit);
4
5namespace ldmx {
6
8
9std::ostream& operator<<(std::ostream& o, const SimTrackerHit& hit) {
10 return o << "SimTrackerHit { " << "id: " << hit.id_ << ", "
11 << "layerID: " << hit.layer_id_ << ", "
12 << "moduleID: " << hit.module_id_ << ", " << "position: ( " << hit.x_
13 << ", " << hit.y_ << ", " << hit.z_ << " ), "
14 << "edep: " << hit.edep_ << ", " << "time: " << hit.time_ << ", "
15 << "momentum: ( " << hit.px_ << ", " << hit.py_ << ", " << hit.pz_
16 << " )" << " }";
17}
18
20 id_ = 0;
21 layer_id_ = 0;
22 module_id_ = 0;
23 edep_ = 0;
24 time_ = 0;
25 px_ = 0;
26 py_ = 0;
27 pz_ = 0;
28 x_ = 0;
29 y_ = 0;
30 z_ = 0;
31 energy_ = 0;
32 path_length_ = 0;
33 track_id_ = -1;
34 pdg_id_ = 0;
35}
36
37void SimTrackerHit::setPosition(const float x_, const float y_,
38 const float z_) {
39 this->x_ = x_;
40 this->y_ = y_;
41 this->z_ = z_;
42}
43
44void SimTrackerHit::setMomentum(const float px, const float py,
45 const float pz) {
46 this->px_ = px;
47 this->py_ = py;
48 this->pz_ = pz;
49}
50} // 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 time_
The global time of the hit.
void setPosition(const float x_, const float y_, const float z_)
Set the position of the hit [mm].
float px_
The X momentum.
float edep_
The energy deposited on the hit.
float x_
The X position.
void clear()
Reset the SimTrackerHit object.
int pdg_id_
The Sim PDG ID.
float y_
The Y position.
virtual ~SimTrackerHit()
Class destructor.
float py_
The Y momentum.
int module_id_
The module ID.
int id_
The detector ID.
float energy_
The total energy.
int track_id_
The Sim Track 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].
int layer_id_
The layer ID.
float path_length_
The path length of the hit.