1#ifndef SIMCORE_EVENT_SIMPARTICLE_H
2#define SIMCORE_EVENT_SIMPARTICLE_H
44 neutronInelastic = 15,
205 void setVertex(
const double& x,
const double& y,
const double& z) {
228 void setEndPoint(
const double& endX,
const double& endY,
const double& endZ) {
241 void setMomentum(
const double& px,
const double& py,
const double& pz) {
304 const double& endpz) {
Class representing a simulated particle.
double getCharge() const
Get the charge of this particle.
double pz_
The z component of the momentum.
double getMass() const
Get the mass of this particle [GeV].
double endpz_
The z component of the endpoint momentum.
ProcessType
Enum for interesting process types.
std::string getVertexVolume() const
Get the volume name in which this particle was created in.
double getTime() const
Get the global time of this particle's creation [ns].
int processType_
Encoding of Geant4 process type.
double getEnergy() const
Get the energy of this particle [MeV].
void setGenStatus(const int &genStatus)
Set the generator status of this particle.
double x_
The x component of the vertex.
void setVertex(const double &x, const double &y, const double &z)
Set the vertex of this particle [mm].
double py_
The y component of the momentum.
virtual ~SimParticle()=default
Destructor.
std::vector< int > getParents() const
Get a vector containing the track IDs of the parent particles.
std::vector< double > getVertex() const
Get a vector containing the vertex of this particle in mm.
double endX_
The x component of the end point.
void setProcessType(const int &processType)
Set the creator process type of this particle.
double y_
The y component of the vertex.
std::vector< int > daughters_
The list of daughter particle track IDs.
int genStatus_
The generator status.
double endY_
The y component of the end point.
void setMomentum(const double &px, const double &py, const double &pz)
Set the momentum of this particle [MeV].
std::vector< double > getEndPointMomentum() const
Get the momentum at this particle's end point.
double energy_
The energy of this particle.
std::vector< int > getDaughters() const
Get a vector containing the track IDs of all daughter particles.
SimParticle()=default
Constructor.
std::string vertexVolume_
Volume the track was created in.
std::map< std::string, ProcessType > ProcessTypeMap
Typedef for process map.
void setCharge(const double &charge)
Set the charge of this particle.
int getPdgID() const
Get the PDG ID of this particle.
void setEnergy(const double &energy)
Set the energy of this particle [MeV].
static ProcessType findProcessType(std::string processName)
Get the process type enum from a G4VProcess name.
int getGenStatus() const
Get the generator status of this particle.
void setEndPointMomentum(const double &endpx, const double &endpy, const double &endpz)
Set the momentum at this particle's end point.
double endpx_
The x component of the endpoint momentum.
std::vector< double > getEndPoint() const
Get the endpoint of this particle where it was destroyed or left the world volume [mm].
double charge_
The particle's charge.
void addDaughter(const int &daughterTrackID)
Add a reference to a daughter particle by its track ID.
double px_
The x component of the momentum.
std::vector< double > getMomentum() const
Get a vector containing the momentum of this particle [MeV].
void Clear()
Reset an instance of this class by clearing all of its data.
void Print() const
Print a string representation of this object.
static ProcessTypeMap PROCESS_MAP
Map containing the process types.
void addParent(const int &parentTrackID)
Add a reference to a parent particle by its track ID.
double endZ_
The z component of the end point.
double z_
The z component of the vertex.
void setMass(const double &mass)
Set the mass of this particle [GeV].
double mass_
The particle's mass.
int pdgID_
The PDG ID of this particle.
std::vector< int > parents_
The list of parent particles track IDs.
void setVertexVolume(const std::string &vertexVolume)
Set the name of the volume that this particle was created in.
double endpy_
The y component of the endpoint momentum.
int getProcessType() const
Get the creator process type of this particle.
void setPdgID(const int &pdgID)
Set the PDG ID of this particle.
void setTime(const double &time)
Set the global time of this particle's creation [ns].
double getKineticEnergy() const
Get the kinetic energy of this particle [MeV].
void setEndPoint(const double &endX, const double &endY, const double &endZ)
Set the end point position of this particle [mm].
double time_
The global creation time.