LDMX Software
|
Stores simulated calorimeter hit information. More...
#include <SimCalorimeterHit.h>
Classes | |
class | Contrib |
Information about a contribution to the hit in the associated cell. More... | |
Public Member Functions | |
SimCalorimeterHit ()=default | |
Class constructor. | |
virtual | ~SimCalorimeterHit ()=default |
Class destructor. | |
void | Clear () |
Clear the data in the object. | |
void | Print () const |
Print out the object. | |
int | getID () const |
Get the detector ID. | |
void | setID (const int id) |
Set the detector ID. | |
float | getEdep () const |
Get the energy deposition of the hit [MeV]. | |
void | setEdep (const float edep) |
Set the energy deposition of the hit [MeV]. | |
std::vector< float > | getPosition () const |
Get the XYZ position of the hit [mm]. | |
std::vector< float > | getPreStepPosition () const |
Get the XYZ pre-step position of the hit in the coordinate frame of the sensitive volume [mm]. | |
std::vector< float > | getPostStepPosition () const |
Get the XYZ post-step position of the hit in the coordinate frame of the sensitive volume [mm]. | |
void | setPosition (const float x, const float y, const float z) |
Set the XYZ position of the hit [mm]. | |
void | setPreStepPosition (const float x, const float y, const float z) |
Set the XYZ pre-step position of the hit in the coordinate frame of the sensitive volume [mm]. | |
void | setPostStepPosition (const float x, const float y, const float z) |
Set the XYZ post-step position of the hit in the coordinate frame of the sensitive volume [mm]. | |
void | setPathLength (const float length) |
Set the physical path length for the interaction [mm]. | |
float | getPathLength () const |
Get the physical path length for the interaction [mm]. | |
void | setPreStepTime (const float time) |
Set global pre-step time of the hit [ns]. | |
void | setPostStepTime (const float time) |
Set global post-step time of the hit [ns]. | |
void | setVelocity (float velocity) |
Set the velocity of the track [mm/ns]. | |
float | getTime () const |
Get the global time of the hit [ns]. | |
float | getPreStepTime () const |
Get the pre-step time of the hit [ns]. | |
float | getPostStepTime () const |
Get the post-step time of the hit [ns]. | |
float | getVelocity () const |
Get the track velocity of the hit [mm/ns]. | |
void | setTime (const float time) |
Set the time of the hit [ns]. | |
unsigned | getNumberOfContribs () const |
Get the number of hit contributions. | |
void | addContrib (int incidentID, int trackID, int pdgCode, float edep, float time) |
Add a hit contribution from a SimParticle. | |
Contrib | getContrib (int i) const |
Get a hit contribution by index. | |
int | findContribIndex (int trackID, int pdgCode) const |
Find the index of a hit contribution from a SimParticle and PDG code. | |
void | updateContrib (int i, float edep, float time) |
Update an existing hit contribution by incrementing its edep and setting the time if the new time is less than the old one. | |
bool | operator< (const SimCalorimeterHit &rhs) const |
Sort by time of hit. | |
Static Public Attributes | |
static const std::string | ECAL_COLLECTION |
name of the ecal sim collection, should match gdml | |
static const std::string | HCAL_COLLECTION |
name of the hcal sim collection, should match gdml | |
Private Attributes | |
int | id_ {0} |
Member variables used in all calorimeter types. | |
float | edep_ {0} |
The energy deposition. | |
float | x_ {0} |
The X position. | |
float | y_ {0} |
The Y position. | |
float | z_ {0} |
The Z position. | |
float | time_ {0} |
The global time of the hit. | |
std::vector< int > | trackIDContribs_ |
The list of track IDs contributing to the hit. | |
std::vector< int > | incidentIDContribs_ |
The list of incident IDs contributing to the hit. | |
std::vector< int > | pdgCodeContribs_ |
The list of PDG codes contributing to the hit. | |
std::vector< float > | edepContribs_ |
The list of energy depositions contributing to the hit. | |
std::vector< float > | timeContribs_ |
The list of times contributing to the hit. | |
unsigned | nContribs_ {0} |
The number of hit contributions. | |
float | pathLength_ {-1} |
The true path length [mm]. | |
float | preStepX_ {0} |
The X, Y, and Z positions [mm] before the interaction in the coordinate frame of the sensitive volume. | |
float | preStepY_ {0} |
float | preStepZ_ {0} |
float | preStepTime_ {0} |
The global time before the interaction [ns]. | |
float | postStepX_ {0} |
The X, Y, and Z positions [mm] after the interaction in the coordinate frame of the sensitive volume. | |
float | postStepY_ {0} |
float | postStepZ_ {0} |
float | postStepTime_ {0} |
The global time after the interaction [ns]. | |
float | velocity_ {-1} |
The track velocity [mm/ns]. | |
Stores simulated calorimeter hit information.
Definition at line 31 of file SimCalorimeterHit.h.
void ldmx::SimCalorimeterHit::addContrib | ( | int | incidentID, |
int | trackID, | ||
int | pdgCode, | ||
float | edep, | ||
float | time | ||
) |
Add a hit contribution from a SimParticle.
incidentID | the Geant4 track ID for the particle's parent incident on the Calorimeter region |
trackID | the Geant4 track ID for the particle |
pdgCode | The PDG code of the actual track. |
edep | The energy deposition of the hit [MeV]. |
time | The time of the hit [ns]. |
Referenced by simcore::TrigScintSD::ProcessHits().
int ldmx::SimCalorimeterHit::findContribIndex | ( | int | trackID, |
int | pdgCode | ||
) | const |
Find the index of a hit contribution from a SimParticle and PDG code.
trackID | the track ID of the particle causing the hit |
pdgCode | The PDG code of the contribution. |
Contrib ldmx::SimCalorimeterHit::getContrib | ( | int | i | ) | const |
Get a hit contribution by index.
i | The index of the hit contribution. |
Referenced by hcal::HcalDigiProducer::produce().
|
inline |
Get the energy deposition of the hit [MeV].
Definition at line 106 of file SimCalorimeterHit.h.
References edep_.
|
inline |
Get the detector ID.
Definition at line 94 of file SimCalorimeterHit.h.
References id_.
Referenced by ecal::EcalDigiProducer::produce(), and hcal::HcalDigiProducer::produce().
|
inline |
Get the number of hit contributions.
Definition at line 231 of file SimCalorimeterHit.h.
References nContribs_.
Referenced by dqm::SimObjects::analyze(), and hcal::HcalDigiProducer::produce().
|
inline |
Get the physical path length for the interaction [mm].
Definition at line 181 of file SimCalorimeterHit.h.
References pathLength_.
|
inline |
Get the XYZ position of the hit [mm].
Definition at line 118 of file SimCalorimeterHit.h.
Referenced by hcal::HcalDigiProducer::produce().
|
inline |
Get the XYZ post-step position of the hit in the coordinate frame of the sensitive volume [mm].
Definition at line 133 of file SimCalorimeterHit.h.
References postStepX_.
|
inline |
Get the post-step time of the hit [ns].
Definition at line 213 of file SimCalorimeterHit.h.
References postStepTime_.
|
inline |
Get the XYZ pre-step position of the hit in the coordinate frame of the sensitive volume [mm].
Definition at line 125 of file SimCalorimeterHit.h.
References preStepX_.
|
inline |
Get the pre-step time of the hit [ns].
Definition at line 208 of file SimCalorimeterHit.h.
References preStepTime_.
|
inline |
Get the global time of the hit [ns].
Definition at line 203 of file SimCalorimeterHit.h.
References time_.
Referenced by operator<().
|
inline |
Get the track velocity of the hit [mm/ns].
Definition at line 219 of file SimCalorimeterHit.h.
References velocity_.
|
inline |
Sort by time of hit.
Definition at line 272 of file SimCalorimeterHit.h.
References getTime().
|
inline |
Set the energy deposition of the hit [MeV].
edep | The energy deposition of the hit. |
Definition at line 112 of file SimCalorimeterHit.h.
References edep_.
|
inline |
Set the detector ID.
@id The detector ID.
Definition at line 100 of file SimCalorimeterHit.h.
References id_.
Referenced by simcore::TrigScintSD::ProcessHits().
|
inline |
Set the physical path length for the interaction [mm].
length | The physical path lenght |
Definition at line 176 of file SimCalorimeterHit.h.
References pathLength_.
Referenced by simcore::TrigScintSD::ProcessHits().
|
inline |
Set the XYZ position of the hit [mm].
x | The X position. |
y | The Y position. |
z | The Z position. |
Definition at line 142 of file SimCalorimeterHit.h.
Referenced by simcore::TrigScintSD::ProcessHits().
|
inline |
Set the XYZ post-step position of the hit in the coordinate frame of the sensitive volume [mm].
x | The X position. |
y | The Y position. |
z | The Z position. |
Definition at line 166 of file SimCalorimeterHit.h.
References postStepX_.
Referenced by simcore::TrigScintSD::ProcessHits().
|
inline |
Set global post-step time of the hit [ns].
time | The time before the step |
Definition at line 191 of file SimCalorimeterHit.h.
References postStepTime_.
Referenced by simcore::TrigScintSD::ProcessHits().
|
inline |
Set the XYZ pre-step position of the hit in the coordinate frame of the sensitive volume [mm].
x | The X position. |
y | The Y position. |
z | The Z position. |
Definition at line 154 of file SimCalorimeterHit.h.
References preStepX_.
Referenced by simcore::TrigScintSD::ProcessHits().
|
inline |
Set global pre-step time of the hit [ns].
time | The time before the step |
Definition at line 186 of file SimCalorimeterHit.h.
References preStepTime_.
Referenced by simcore::TrigScintSD::ProcessHits().
|
inline |
Set the time of the hit [ns].
time | The time of the hit. |
Definition at line 225 of file SimCalorimeterHit.h.
References time_.
|
inline |
Set the velocity of the track [mm/ns].
velocity | The track velocity |
Definition at line 197 of file SimCalorimeterHit.h.
References velocity_.
Referenced by simcore::TrigScintSD::ProcessHits().
void ldmx::SimCalorimeterHit::updateContrib | ( | int | i, |
float | edep, | ||
float | time | ||
) |
Update an existing hit contribution by incrementing its edep and setting the time if the new time is less than the old one.
i | The index of the contribution. |
edep | The additional energy contribution [MeV]. |
time | The time of the contribution [ns]. |
|
static |
name of the ecal sim collection, should match gdml
Definition at line 34 of file SimCalorimeterHit.h.
|
private |
|
private |
The list of energy depositions contributing to the hit.
Definition at line 328 of file SimCalorimeterHit.h.
|
static |
name of the hcal sim collection, should match gdml
Definition at line 37 of file SimCalorimeterHit.h.
|
private |
Member variables used in all calorimeter types.
The detector ID.
Definition at line 283 of file SimCalorimeterHit.h.
|
private |
The list of incident IDs contributing to the hit.
Definition at line 318 of file SimCalorimeterHit.h.
|
private |
The number of hit contributions.
Definition at line 338 of file SimCalorimeterHit.h.
Referenced by getNumberOfContribs().
|
private |
The true path length [mm].
Can in general differ from the distance between the pre and post step position.
Definition at line 349 of file SimCalorimeterHit.h.
Referenced by getPathLength(), and setPathLength().
|
private |
The list of PDG codes contributing to the hit.
Definition at line 323 of file SimCalorimeterHit.h.
|
private |
The global time after the interaction [ns].
Definition at line 372 of file SimCalorimeterHit.h.
Referenced by getPostStepTime(), and setPostStepTime().
|
private |
The X, Y, and Z positions [mm] after the interaction in the coordinate frame of the sensitive volume.
Definition at line 366 of file SimCalorimeterHit.h.
Referenced by getPostStepPosition(), and setPostStepPosition().
|
private |
Definition at line 367 of file SimCalorimeterHit.h.
|
private |
Definition at line 368 of file SimCalorimeterHit.h.
|
private |
The global time before the interaction [ns].
Definition at line 361 of file SimCalorimeterHit.h.
Referenced by getPreStepTime(), and setPreStepTime().
|
private |
The X, Y, and Z positions [mm] before the interaction in the coordinate frame of the sensitive volume.
Definition at line 355 of file SimCalorimeterHit.h.
Referenced by getPreStepPosition(), and setPreStepPosition().
|
private |
Definition at line 356 of file SimCalorimeterHit.h.
|
private |
Definition at line 357 of file SimCalorimeterHit.h.
|
private |
|
private |
The list of times contributing to the hit.
Definition at line 333 of file SimCalorimeterHit.h.
|
private |
The list of track IDs contributing to the hit.
Definition at line 313 of file SimCalorimeterHit.h.
|
private |
The track velocity [mm/ns].
Definition at line 377 of file SimCalorimeterHit.h.
Referenced by getVelocity(), and setVelocity().
|
private |
The X position.
Definition at line 293 of file SimCalorimeterHit.h.
Referenced by getPosition(), and setPosition().
|
private |
The Y position.
Definition at line 298 of file SimCalorimeterHit.h.
Referenced by getPosition(), and setPosition().
|
private |
The Z position.
Definition at line 303 of file SimCalorimeterHit.h.
Referenced by getPosition(), and setPosition().