LDMX Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ldmx::SimTrackerHit Class Reference

Represents a simulated tracker hit in the simulation. More...

#include <SimTrackerHit.h>

Public Member Functions

 SimTrackerHit ()=default
 Class constructor.
 
virtual ~SimTrackerHit ()
 Class destructor.
 
void Print () const
 Print a description of this object.
 
void Clear ()
 Reset the SimTrackerHit object.
 
int getID () const
 Get the detector ID of the hit.
 
int getLayerID () const
 Get the geometric layer ID of the hit.
 
int getModuleID () const
 Get the module ID associated with a hit.
 
std::vector< float > getPosition () const
 Get the XYZ position of the hit [mm].
 
float getEdep () const
 Get the energy deposited on the hit [MeV].
 
float getEnergy () const
 Get the energy.
 
float getTime () const
 Get the global time of the hit [ns].
 
float getPathLength () const
 Get the path length between the start and end points of the hit [mm].
 
std::vector< double > getMomentum () const
 Get the XYZ momentum of the particle at the position at which the hit took place [MeV].
 
int getTrackID () const
 Get the Sim particle track ID of the hit.
 
int getPdgID () const
 Get the Sim particle track ID of the hit.
 
void setID (const long id)
 Set the detector ID of the hit.
 
void setLayerID (const int layerID)
 Set the geometric layer ID of the hit.
 
void setModuleID (const int moduleID)
 Set the module ID associated with a hit.
 
void setPosition (const float x, const float y, const float z)
 Set the position of the hit [mm].
 
void setEdep (const float edep)
 Set the energy deposited on the hit [MeV].
 
void setEnergy (const float energy)
 Set the energy of the hit.
 
void setTime (const float time)
 Set the global time of the hit [ns].
 
void setPathLength (const float pathLength)
 Set the path length of the hit [mm].
 
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].
 
void setTrackID (const int simTrackID)
 Set the Sim particle track ID of the hit.
 
void setPdgID (const int simPdgID)
 Set the Sim particle track ID of the hit.
 
bool operator< (const ldmx::SimTrackerHit &rhs) const
 Sort by time of hit.
 

Private Member Functions

 ClassDef (SimTrackerHit, 3)
 The ROOT class definition.
 

Private Attributes

int id_ {0}
 The detector ID.
 
int layerID_ {0}
 The layer ID.
 
int moduleID_ {0}
 The module ID.
 
float edep_ {0}
 The energy deposited on the hit.
 
float time_ {0}
 The global time of the hit.
 
float px_ {0}
 The X momentum.
 
float py_ {0}
 The Y momentum.
 
float pz_ {0}
 The Z momentum.
 
float energy_ {0}
 The total energy.
 
float x_ {0}
 The X position.
 
float y_ {0}
 The Y position.
 
float z_ {0}
 The Z position.
 
float pathLength_ {0}
 The path length of the hit.
 
int trackID_ {0}
 The Sim Track ID.
 
int pdgID_ {0}
 The Sim PDG ID.
 

Detailed Description

Represents a simulated tracker hit in the simulation.

Definition at line 24 of file SimTrackerHit.h.

Constructor & Destructor Documentation

◆ ~SimTrackerHit()

ldmx::SimTrackerHit::~SimTrackerHit ( )
virtual

Class destructor.

Definition at line 7 of file SimTrackerHit.cxx.

7{ Clear(); }
void Clear()
Reset the SimTrackerHit object.

References Clear().

Member Function Documentation

◆ Clear()

void ldmx::SimTrackerHit::Clear ( )

Reset the SimTrackerHit object.

Definition at line 21 of file SimTrackerHit.cxx.

21 {
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}
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.
float y_
The Y position.
int pdgID_
The Sim PDG ID.
float py_
The Y momentum.
int id_
The detector ID.
float energy_
The total energy.
int moduleID_
The module ID.

References edep_, energy_, id_, layerID_, moduleID_, pathLength_, pdgID_, px_, py_, pz_, time_, trackID_, x_, y_, and z_.

Referenced by ~SimTrackerHit().

◆ getEdep()

float ldmx::SimTrackerHit::getEdep ( ) const
inline

Get the energy deposited on the hit [MeV].

Returns
The energy deposited on the hit.

Definition at line 75 of file SimTrackerHit.h.

75{ return edep_; };

References edep_.

◆ getEnergy()

float ldmx::SimTrackerHit::getEnergy ( ) const
inline

Get the energy.

Returns
The energy of the hit.

Definition at line 81 of file SimTrackerHit.h.

81{ return energy_; };

References energy_.

◆ getID()

int ldmx::SimTrackerHit::getID ( ) const
inline

Get the detector ID of the hit.

Returns
The detector ID of the hit.

Definition at line 50 of file SimTrackerHit.h.

50{ return id_; };

References id_.

◆ getLayerID()

int ldmx::SimTrackerHit::getLayerID ( ) const
inline

Get the geometric layer ID of the hit.

Returns
The layer ID of the hit.

Definition at line 56 of file SimTrackerHit.h.

56{ return layerID_; };

References layerID_.

Referenced by eventdisplay::DetectorGeometry::getBoundingBox().

◆ getModuleID()

int ldmx::SimTrackerHit::getModuleID ( ) const
inline

Get the module ID associated with a hit.

This is used to uniquely identify a sensor within a layer.

Returns
The module ID associated with a hit.

Definition at line 63 of file SimTrackerHit.h.

63{ return moduleID_; };

References moduleID_.

Referenced by eventdisplay::DetectorGeometry::getBoundingBox().

◆ getMomentum()

std::vector< double > ldmx::SimTrackerHit::getMomentum ( ) const
inline

Get the XYZ momentum of the particle at the position at which the hit took place [MeV].

Returns
The momentum of the particle.

Definition at line 101 of file SimTrackerHit.h.

101{ return {px_, py_, pz_}; };

References px_, py_, and pz_.

Referenced by tracking::reco::TruthSeedProcessor::createTruthTrack(), recon::ParticleFlow::produce(), tracking::reco::TruthSeedProcessor::produce(), tracking::reco::TruthSeedProcessor::scoringPlaneHitFilter(), and eventdisplay::Objects::SetSimThresh().

◆ getPathLength()

float ldmx::SimTrackerHit::getPathLength ( ) const
inline

Get the path length between the start and end points of the hit [mm].

Returns
The path length of the hit.

Definition at line 94 of file SimTrackerHit.h.

94{ return pathLength_; };

References pathLength_.

◆ getPdgID()

int ldmx::SimTrackerHit::getPdgID ( ) const
inline

Get the Sim particle track ID of the hit.

Returns
The Sim particle track ID of the hit.

Definition at line 113 of file SimTrackerHit.h.

113{ return pdgID_; };

References pdgID_.

Referenced by tracking::reco::TruthSeedProcessor::createTruthTrack(), and tracking::reco::TruthSeedProcessor::scoringPlaneHitFilter().

◆ getPosition()

std::vector< float > ldmx::SimTrackerHit::getPosition ( ) const
inline

◆ getTime()

float ldmx::SimTrackerHit::getTime ( ) const
inline

Get the global time of the hit [ns].

Returns
The global time of the hit.

Definition at line 87 of file SimTrackerHit.h.

87{ return time_; };

References time_.

Referenced by operator<().

◆ getTrackID()

int ldmx::SimTrackerHit::getTrackID ( ) const
inline

Get the Sim particle track ID of the hit.

Returns
The Sim particle track ID of the hit.

Definition at line 107 of file SimTrackerHit.h.

107{ return trackID_; };

References trackID_.

Referenced by tracking::reco::TruthSeedProcessor::createTruthTrack(), tracking::reco::TruthSeedProcessor::produce(), and tracking::reco::TruthSeedProcessor::scoringPlaneHitFilter().

◆ operator<()

bool ldmx::SimTrackerHit::operator< ( const ldmx::SimTrackerHit rhs) const
inline

Sort by time of hit.

Definition at line 192 of file SimTrackerHit.h.

192 {
193 return this->getTime() < rhs.getTime();
194 }
float getTime() const
Get the global time of the hit [ns].

References getTime().

◆ Print()

void ldmx::SimTrackerHit::Print ( ) const

Print a description of this object.

Definition at line 9 of file SimTrackerHit.cxx.

9 {
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}

References edep_, id_, layerID_, moduleID_, px_, py_, pz_, time_, x_, y_, and z_.

Referenced by recon::OverlayProducer::produce().

◆ setEdep()

void ldmx::SimTrackerHit::setEdep ( const float  edep)
inline

Set the energy deposited on the hit [MeV].

Parameters
edepThe energy deposited on the hit.

Definition at line 146 of file SimTrackerHit.h.

146{ this->edep_ = edep; };

References edep_.

◆ setEnergy()

void ldmx::SimTrackerHit::setEnergy ( const float  energy)
inline

Set the energy of the hit.

Parameters
eThe energy of the hit.

Definition at line 152 of file SimTrackerHit.h.

152{ energy_ = energy; };

References energy_.

◆ setID()

void ldmx::SimTrackerHit::setID ( const long  id)
inline

Set the detector ID of the hit.

Parameters
idThe detector ID of the hit.

Definition at line 119 of file SimTrackerHit.h.

119{ this->id_ = id; };

References id_.

◆ setLayerID()

void ldmx::SimTrackerHit::setLayerID ( const int  layerID)
inline

Set the geometric layer ID of the hit.

Parameters
layerIDThe layer ID of the hit.

Definition at line 125 of file SimTrackerHit.h.

125{ this->layerID_ = layerID; };

References layerID_.

◆ setModuleID()

void ldmx::SimTrackerHit::setModuleID ( const int  moduleID)
inline

Set the module ID associated with a hit.

This is used to uniquely identify a sensor within a layer.

Returns
moduleID The module ID associated with a hit.

Definition at line 132 of file SimTrackerHit.h.

132{ this->moduleID_ = moduleID; };

References moduleID_.

◆ setMomentum()

void ldmx::SimTrackerHit::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].

Parameters
pxThe X momentum.
pyThe Y momentum.
pzThe Z momentum.

Definition at line 45 of file SimTrackerHit.cxx.

46 {
47 this->px_ = px;
48 this->py_ = py;
49 this->pz_ = pz;
50}

References px_, py_, and pz_.

◆ setPathLength()

void ldmx::SimTrackerHit::setPathLength ( const float  pathLength)
inline

Set the path length of the hit [mm].

Parameters
pathLengthThe path length of the hit.

Definition at line 164 of file SimTrackerHit.h.

164 {
165 this->pathLength_ = pathLength;
166 };

References pathLength_.

◆ setPdgID()

void ldmx::SimTrackerHit::setPdgID ( const int  simPdgID)
inline

Set the Sim particle track ID of the hit.

Returns
The Sim particle track ID of the hit.

Definition at line 187 of file SimTrackerHit.h.

187{ this->pdgID_ = simPdgID; };

References pdgID_.

◆ setPosition()

void ldmx::SimTrackerHit::setPosition ( const float  x,
const float  y,
const float  z 
)

Set the position of the hit [mm].

Parameters
xThe X position.
yThe Y position.
zThe Z position.

Definition at line 39 of file SimTrackerHit.cxx.

39 {
40 this->x_ = x;
41 this->y_ = y;
42 this->z_ = z;
43}

References x_, y_, and z_.

◆ setTime()

void ldmx::SimTrackerHit::setTime ( const float  time)
inline

Set the global time of the hit [ns].

Parameters
timeThe global time of the hit.

Definition at line 158 of file SimTrackerHit.h.

158{ this->time_ = time; };

References time_.

◆ setTrackID()

void ldmx::SimTrackerHit::setTrackID ( const int  simTrackID)
inline

Set the Sim particle track ID of the hit.

Returns
The Sim particle track ID of the hit.

Definition at line 181 of file SimTrackerHit.h.

181{ this->trackID_ = simTrackID; };

References trackID_.

Referenced by simcore::ScoringPlaneSD::ProcessHits(), and simcore::TrackerSD::ProcessHits().

Member Data Documentation

◆ edep_

float ldmx::SimTrackerHit::edep_ {0}
private

The energy deposited on the hit.

Definition at line 213 of file SimTrackerHit.h.

213{0};

Referenced by Clear(), getEdep(), Print(), and setEdep().

◆ energy_

float ldmx::SimTrackerHit::energy_ {0}
private

The total energy.

Definition at line 238 of file SimTrackerHit.h.

238{0};

Referenced by Clear(), getEnergy(), and setEnergy().

◆ id_

int ldmx::SimTrackerHit::id_ {0}
private

The detector ID.

Definition at line 200 of file SimTrackerHit.h.

200{0};

Referenced by Clear(), getID(), Print(), and setID().

◆ layerID_

int ldmx::SimTrackerHit::layerID_ {0}
private

The layer ID.

Definition at line 205 of file SimTrackerHit.h.

205{0};

Referenced by Clear(), getLayerID(), Print(), and setLayerID().

◆ moduleID_

int ldmx::SimTrackerHit::moduleID_ {0}
private

The module ID.

Definition at line 208 of file SimTrackerHit.h.

208{0};

Referenced by Clear(), getModuleID(), Print(), and setModuleID().

◆ pathLength_

float ldmx::SimTrackerHit::pathLength_ {0}
private

The path length of the hit.

Definition at line 258 of file SimTrackerHit.h.

258{0};

Referenced by Clear(), getPathLength(), and setPathLength().

◆ pdgID_

int ldmx::SimTrackerHit::pdgID_ {0}
private

The Sim PDG ID.

Definition at line 268 of file SimTrackerHit.h.

268{0};

Referenced by Clear(), getPdgID(), and setPdgID().

◆ px_

float ldmx::SimTrackerHit::px_ {0}
private

The X momentum.

Definition at line 223 of file SimTrackerHit.h.

223{0};

Referenced by Clear(), getMomentum(), Print(), and setMomentum().

◆ py_

float ldmx::SimTrackerHit::py_ {0}
private

The Y momentum.

Definition at line 228 of file SimTrackerHit.h.

228{0};

Referenced by Clear(), getMomentum(), Print(), and setMomentum().

◆ pz_

float ldmx::SimTrackerHit::pz_ {0}
private

The Z momentum.

Definition at line 233 of file SimTrackerHit.h.

233{0};

Referenced by Clear(), getMomentum(), Print(), and setMomentum().

◆ time_

float ldmx::SimTrackerHit::time_ {0}
private

The global time of the hit.

Definition at line 218 of file SimTrackerHit.h.

218{0};

Referenced by Clear(), getTime(), Print(), and setTime().

◆ trackID_

int ldmx::SimTrackerHit::trackID_ {0}
private

The Sim Track ID.

Definition at line 263 of file SimTrackerHit.h.

263{0};

Referenced by Clear(), getTrackID(), and setTrackID().

◆ x_

float ldmx::SimTrackerHit::x_ {0}
private

The X position.

Definition at line 243 of file SimTrackerHit.h.

243{0};

Referenced by Clear(), getPosition(), Print(), and setPosition().

◆ y_

float ldmx::SimTrackerHit::y_ {0}
private

The Y position.

Definition at line 248 of file SimTrackerHit.h.

248{0};

Referenced by Clear(), getPosition(), Print(), and setPosition().

◆ z_

float ldmx::SimTrackerHit::z_ {0}
private

The Z position.

Definition at line 253 of file SimTrackerHit.h.

253{0};

Referenced by Clear(), getPosition(), Print(), and setPosition().


The documentation for this class was generated from the following files: