7#ifndef SIMCORE_EVENT_SIMCALORIMETERHIT_H_
8#define SIMCORE_EVENT_SIMCALORIMETERHIT_H_
14#include "SimCore/Event/SimParticle.h"
126 return {
preStepX_, preStepY_, preStepZ_};
242 void addContrib(
int incidentID,
int trackID,
int pdgCode,
float edep,
Stores simulated calorimeter hit information.
float edep_
The energy deposition.
virtual ~SimCalorimeterHit()=default
Class destructor.
void setPreStepTime(const float time)
Set global pre-step time of the hit [ns].
float getVelocity() const
Get the track velocity of the hit [mm/ns].
float getPathLength() const
Get the physical path length for the interaction [mm].
void Clear()
Clear the data in the object.
void setPathLength(const float length)
Set the physical path length for the interaction [mm].
std::vector< float > getPostStepPosition() const
Get the XYZ post-step position of the hit in the coordinate frame of the sensitive volume [mm].
std::vector< int > incidentIDContribs_
The list of incident IDs contributing to the hit.
float getPostStepTime() const
Get the post-step time of the hit [ns].
float preStepX_
The X, Y, and Z positions [mm] before the interaction in the coordinate frame of the sensitive volume...
float velocity_
The track velocity [mm/ns].
int findContribIndex(int trackID, int pdgCode) const
Find the index of a hit contribution from a SimParticle and PDG code.
unsigned getNumberOfContribs() const
Get the number of hit contributions.
float time_
The global time of the hit.
float preStepTime_
The global time before the interaction [ns].
float getTime() const
Get the global time of the hit [ns].
void setEdep(const float edep)
Set the energy deposition of the hit [MeV].
void setPosition(const float x, const float y, const float z)
Set the XYZ position of the hit [mm].
SimCalorimeterHit()=default
Class constructor.
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.
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].
static const std::string HCAL_COLLECTION
name of the hcal sim collection, should match gdml
void setID(const int id)
Set the detector ID.
float pathLength_
The true path length [mm].
std::vector< int > trackIDContribs_
The list of track IDs contributing to the hit.
std::vector< float > getPosition() const
Get the XYZ position of the hit [mm].
int getID() const
Get the detector ID.
void setPostStepTime(const float time)
Set global post-step time of the hit [ns].
bool operator<(const SimCalorimeterHit &rhs) const
Sort by time of hit.
void setTime(const float time)
Set the time of the hit [ns].
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 > getPreStepPosition() const
Get the XYZ pre-step position of the hit in the coordinate frame of the sensitive volume [mm].
float getEdep() const
Get the energy deposition of the hit [MeV].
float postStepX_
The X, Y, and Z positions [mm] after the interaction in the coordinate frame of the sensitive volume.
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 ...
float postStepTime_
The global time after the interaction [ns].
int id_
Member variables used in all calorimeter types.
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 Print() const
Print out the object.
void setVelocity(float velocity)
Set the velocity of the track [mm/ns].
float getPreStepTime() const
Get the pre-step time of the hit [ns].
Information about a contribution to the hit in the associated cell.
int trackID
track ID of this contributor
int pdgCode
PDG ID of this contributor.
float time
Time this contributor made the hit (global Geant4 time)
int incidentID
trackID of incident particle that is an ancestor of the contributor
float edep
Energy depostied by this contributor.