1#ifndef SIMCORE_EVENT_SIMPARTICLE_H
2#define SIMCORE_EVENT_SIMPARTICLE_H
44 neutronInelastic = 15,
214 void setVertex(
const double& vtx_x,
const double& vtx_y,
215 const double& vtx_z) {
249 const double& end_z) {
262 void setMomentum(
const double& px,
const double& py,
const double& pz) {
300 parents_.push_back(parent_track_id);
325 const double& end_pz) {
Class representing a simulated particle.
double getCharge() const
Get the charge of this particle.
double end_py_
The y component of the end_point momentum.
double pz_
The z component of the momentum.
double getMass() const
Get the mass of this particle [GeV].
ProcessType
Enum for interesting process types.
std::string getVertexVolume() const
Get the volume name in which this particle was created in.
void setPdgID(const int &pdg_id)
Set the PDG ID of this particle.
double getTime() const
Get the global time of this particle's creation [ns].
double getEnergy() const
Get the energy of this particle [MeV].
void setEndPointMomentum(const double &end_px, const double &end_py, const double &end_pz)
Set the momentum at this particle's end point.
double py_
The y component of the momentum.
void addParent(const int &parent_track_id)
Add a reference to a parent particle by its track ID.
void setProcessType(const int &process_type)
Set the creator process type of this particle.
virtual ~SimParticle()=default
Destructor.
double vtx_x_
The x component of the vertex.
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.
static ProcessType findProcessType(std::string processName)
Get the process type enum from a G4VProcess name.
std::string getInteractionMaterial() const
Get the material name in which this particle was created in.
std::vector< int > daughters_
The list of daughter particle track IDs.
int process_type_
Encoding of Geant4 process type.
void setMomentum(const double &px, const double &py, const double &pz)
Set the momentum of this particle [MeV].
double end_x_
The x component of the end point.
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.
void setCharge(const double &charge)
Set the charge of this particle.
int getPdgID() const
Get the PDG ID of this particle.
double end_pz_
The z component of the end_point momentum.
void setEnergy(const double &energy)
Set the energy of this particle [MeV].
int getGenStatus() const
Get the generator status of this particle.
void setGenStatus(const int &gen_status)
Set the generator status of this particle.
std::vector< double > getEndPoint() const
Get the end_point of this particle where it was destroyed or left the world volume [mm].
double vtx_y_
The y component of the vertex.
double charge_
The particle's charge.
double end_y_
The y component of the end point.
double px_
The x component of the momentum.
std::map< std::string, ProcessType > ProcessTypeMap
Typedef for process map.
std::vector< double > getMomentum() const
Get a vector containing the momentum of this particle [MeV].
double end_z_
The z component of the end point.
std::string interaction_material_
Volume the track was created in.
void setMass(const double &mass)
Set the mass of this particle [GeV].
void setVertex(const double &vtx_x, const double &vtx_y, const double &vtx_z)
Set the vertex of this particle [mm].
double mass_
The particle's mass.
std::vector< int > parents_
The list of parent particles track IDs.
void setEndPoint(const double &end_x, const double &end_y, const double &end_z)
Set the end point position of this particle [mm].
void setVertexVolume(const std::string &vertexVolume)
Set the name of the volume that this particle was created in.
double end_px_
The x component of the end_point momentum.
int getProcessType() const
Get the creator process type 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].
double vtx_z_
The z component of the vertex.
static ProcessTypeMap createProcessTypeMap()
int pdg_id_
The PDG ID of this particle.
int gen_status_
The generator status.
friend std::ostream & operator<<(std::ostream &o, const SimParticle &d)
Print a string representation of this object.
void addDaughter(const int &daughter_track_id)
Add a reference to a daughter particle by its track ID.
static ProcessTypeMap process_map
Map containing the process types.
void clear()
Reset an instance of this class by clearing all of its data.
double time_
The global creation time.
std::string vertex_volume_
Volume the track was created in.
void setInteractionMaterial(const std::string &interaction_material)
Set the name of the material that this particle was created in.