8#ifndef SIMCORE_EVENT_SIMCALORIMETERHIT_H_
9#define SIMCORE_EVENT_SIMCALORIMETERHIT_H_
15#include "SimCore/Event/SimParticle.h"
246 void addContrib(
int incidentID,
int trackID,
int pdgCode,
float edep,
247 float time,
int originID = -1);
389 float pre_step_y_{0};
390 float pre_step_z_{0};
400 float post_step_y_{0};
401 float post_step_z_{0};
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< float > time_contribs_
The list of times contributing to the hit.
float getPostStepTime() const
Get the post-step time of the hit [ns].
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.
float pre_step_time_
The global time before the interaction [ns].
std::vector< float > getEdeps() const
Get the list of energy depositions contributing to the hit.
unsigned getNumberOfContribs() const
Get the number of hit contributions.
float time_
The global time of the hit.
float getTime() const
Get the global time of the hit [ns].
void setEdep(const float edep)
Set the energy deposition of the hit [MeV].
friend std::ostream & operator<<(std::ostream &o, const SimCalorimeterHit &d)
Print out the object.
void setPosition(const float x, const float y, const float z)
Set the XYZ position of the hit [mm].
std::vector< int > getPdgIds() const
Get the list of PDG codes contributing to the hit.
std::vector< float > edep_contribs_
The list of energy depositions contributing to the hit.
std::vector< int > track_id_contribs_
The list of track IDs contributing to the hit.
SimCalorimeterHit()=default
Class constructor.
float pre_step_x_
The X, Y, and Z positions [mm] before the interaction in the coordinate frame of the sensitive volume...
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.
std::vector< int > getIncidentIds() const
Get the list of incident IDs contributing to the hit.
std::vector< float > getPosition() const
Get the XYZ position of the hit [mm].
std::vector< int > incident_id_contribs_
The list of incident IDs contributing to the hit.
float path_length_
The true path length [mm].
Contrib getContrib(int i) const
Get a hit contribution by index_.
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 addContrib(int incidentID, int trackID, int pdgCode, float edep, float time, int originID=-1)
Add a hit contribution from a SimParticle.
void setTime(const float time)
Set the time of the hit [ns].
std::vector< int > pdg_code_contribs_
The list of PDG codes 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].
unsigned n_contribs_
The number of hit contributions.
float getEdep() const
Get the energy deposition of the hit [MeV].
std::vector< int > origin_contribs_
The list of origin IDs 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 ...
std::vector< float > getTimes() const
Get the list of times contributing to the hit.
float post_step_x_
The X, Y, and Z positions [mm] after the interaction in the coordinate frame of the sensitive volume.
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].
std::vector< int > getTrackIds() const
Get the list of track IDs contributing to the hit.
float post_step_time_
The global time after the interaction [ns].
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.
float time_
Time this contributor made the hit (global Geant4 time)
float edep_
Energy depostied by this contributor.
int track_id_
track ID of this contributor
int incident_id_
trackID of incident particle that is an ancestor of the contributor
int origin_id_
Saves ID of electron incident particle came from.
int pdg_code_
PDG ID of this contributor.