30 std::cout <<
"SimCalorimeterHit { "
31 <<
"id: " <<
id_ <<
", edep: " <<
edep_
34 <<
x_ <<
", " <<
y_ <<
", " <<
z_
35 <<
" ), num contribs: " <<
nContribs_ <<
" }" << std::endl;
39 float edep,
float time) {
63 int contribIndex = -1;
64 for (
int iContrib = 0; iContrib <
nContribs_; iContrib++) {
66 if (contrib.trackID == trackID && contrib.pdgCode == pdgCode) {
67 contribIndex = iContrib;
Class which stores simulated calorimeter hit information.
Stores simulated calorimeter hit information.
float edep_
The energy deposition.
void Clear()
Clear the data in the object.
std::vector< int > incidentIDContribs_
The list of incident IDs contributing to the hit.
int findContribIndex(int trackID, int pdgCode) const
Find the index of a hit contribution from a SimParticle and PDG code.
float time_
The global time of the hit.
Contrib getContrib(int i) const
Get a hit contribution by index.
unsigned nContribs_
The number of hit contributions.
void addContrib(int incidentID, int trackID, int pdgCode, float edep, float time)
Add a hit contribution from a SimParticle.
std::vector< float > timeContribs_
The list of times contributing to the hit.
static const std::string HCAL_COLLECTION
name of the hcal sim collection, should match gdml
std::vector< int > trackIDContribs_
The list of track 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.
static const std::string ECAL_COLLECTION
name of the ecal sim collection, should match gdml
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 ...
int id_
Member variables used in all calorimeter types.
void Print() const
Print out the object.
int incidentID
trackID of incident particle that is an ancestor of the contributor