|
LDMX Software
|
Class representing a simulated particle. More...
#include <SimParticle.h>
Public Types | |
| enum | ProcessType { unknown = 0 , annihil = 1 , compt = 2 , conv = 3 , electronNuclear = 4 , eBrem = 5 , eIoni = 6 , msc = 7 , phot = 8 , photonNuclear = 9 , GammaToMuPair = 10 , eDarkBrem = 11 , Decay = 12 , Primary = 13 , muonNuclear = 14 , neutronInelastic = 15 , neutronCapture = 16 , kaonInelastic = 17 , pionInelastic = 18 , protonInelastic = 19 } |
| Enum for interesting process types. More... | |
| typedef std::map< std::string, ProcessType > | ProcessTypeMap |
| Typedef for process map. | |
Public Member Functions | |
| SimParticle ()=default | |
| Constructor. | |
| virtual | ~SimParticle ()=default |
| Destructor. | |
| void | clear () |
| Reset an instance of this class by clearing all of its data. | |
| double | getEnergy () const |
| Get the energy of this particle [MeV]. | |
| double | getKineticEnergy () const |
| Get the kinetic energy of this particle [MeV]. | |
| int | getPdgID () const |
| Get the PDG ID of this particle. | |
| int | getGenStatus () const |
| Get the generator status of this particle. | |
| double | getTime () const |
| Get the global time of this particle's creation [ns]. | |
| std::vector< double > | getVertex () const |
| Get a vector containing the vertex of this particle in mm. | |
| std::string | getVertexVolume () const |
| Get the volume name in which this particle was created in. | |
| std::string | getInteractionMaterial () const |
| Get the material name in which this particle was created in. | |
| std::vector< double > | getEndPoint () const |
| Get the end_point of this particle where it was destroyed or left the world volume [mm]. | |
| std::vector< double > | getMomentum () const |
| Get a vector containing the momentum of this particle [MeV]. | |
| double | getMass () const |
| Get the mass of this particle [GeV]. | |
| double | getCharge () const |
| Get the charge of this particle. | |
| std::vector< int > | getDaughters () const |
| Get a vector containing the track IDs of all daughter particles. | |
| std::vector< int > | getParents () const |
| Get a vector containing the track IDs of the parent particles. | |
| void | setEnergy (const double &energy) |
| Set the energy of this particle [MeV]. | |
| void | setPdgID (const int &pdg_id) |
| Set the PDG ID of this particle. | |
| void | setGenStatus (const int &gen_status) |
| Set the generator status of this particle. | |
| void | setTime (const double &time) |
| Set the global time of this particle's creation [ns]. | |
| void | setVertex (const double &vtx_x, const double &vtx_y, const double &vtx_z) |
| Set the vertex of this particle [mm]. | |
| void | setVertexVolume (const std::string &vertexVolume) |
| Set the name of the volume that this particle was created in. | |
| void | setInteractionMaterial (const std::string &interaction_material) |
| Set the name of the material that this particle was created in. | |
| void | setEndPoint (const double &end_x, const double &end_y, const double &end_z) |
| Set the end point position of this particle [mm]. | |
| void | setMomentum (const double &px, const double &py, const double &pz) |
| Set the momentum of this particle [MeV]. | |
| void | setMass (const double &mass) |
| Set the mass of this particle [GeV]. | |
| void | setCharge (const double &charge) |
| Set the charge of this particle. | |
| void | addDaughter (const int &daughter_track_id) |
| Add a reference to a daughter particle by its track ID. | |
| void | addParent (const int &parent_track_id) |
| Add a reference to a parent particle by its track ID. | |
| int | getProcessType () const |
| Get the creator process type of this particle. | |
| void | setProcessType (const int &process_type) |
| Set the creator process type of this particle. | |
| void | setEndPointMomentum (const double &end_px, const double &end_py, const double &end_pz) |
| Set the momentum at this particle's end point. | |
| std::vector< double > | getEndPointMomentum () const |
| Get the momentum at this particle's end point. | |
Static Public Member Functions | |
| static ProcessType | findProcessType (std::string processName) |
| Get the process type enum from a G4VProcess name. | |
Private Member Functions | |
| ClassDef (SimParticle, 8) | |
Static Private Member Functions | |
| static ProcessTypeMap | createProcessTypeMap () |
Private Attributes | |
| double | energy_ {0} |
| The energy of this particle. | |
| int | pdg_id_ {0} |
| The PDG ID of this particle. | |
| int | gen_status_ {-1} |
| The generator status. | |
| double | time_ {0} |
| The global creation time. | |
| double | vtx_x_ {0} |
| The x component of the vertex. | |
| double | vtx_y_ {0} |
| The y component of the vertex. | |
| double | vtx_z_ {0} |
| The z component of the vertex. | |
| double | end_x_ {0} |
| The x component of the end point. | |
| double | end_y_ {0} |
| The y component of the end point. | |
| double | end_z_ {0} |
| The z component of the end point. | |
| double | px_ {0} |
| The x component of the momentum. | |
| double | py_ {0} |
| The y component of the momentum. | |
| double | pz_ {0} |
| The z component of the momentum. | |
| double | end_px_ {0} |
| The x component of the end_point momentum. | |
| double | end_py_ {0} |
| The y component of the end_point momentum. | |
| double | end_pz_ {0} |
| The z component of the end_point momentum. | |
| double | mass_ {0} |
| The particle's mass. | |
| double | charge_ {0} |
| The particle's charge. | |
| std::vector< int > | daughters_ |
| The list of daughter particle track IDs. | |
| std::vector< int > | parents_ |
| The list of parent particles track IDs. | |
| int | process_type_ {-1} |
| Encoding of Geant4 process type. | |
| std::string | vertex_volume_ {""} |
| Volume the track was created in. | |
| std::string | interaction_material_ {""} |
| Volume the track was created in. | |
Static Private Attributes | |
| static ProcessTypeMap | process_map |
| Map containing the process types. | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, const SimParticle &d) |
| Print a string representation of this object. | |
Class representing a simulated particle.
The particles are created from the tracks produced by simulation.
Definition at line 23 of file SimParticle.h.
| std::map<std::string, ProcessType> ldmx::SimParticle::ProcessTypeMap |
Typedef for process map.
Definition at line 53 of file SimParticle.h.
Enum for interesting process types.
Definition at line 28 of file SimParticle.h.
|
inline |
Add a reference to a daughter particle by its track ID.
This adds the track ID of the daughter particle to the vector of daughter particle IDs.
| [in] | daughter_track_id | The daughter particle track ID. |
Definition at line 290 of file SimParticle.h.
References daughters_.
|
inline |
Add a reference to a parent particle by its track ID.
| [in] | parent_track_id | The track ID of the parent particle. |
Definition at line 299 of file SimParticle.h.
References parents_.
| void ldmx::SimParticle::clear | ( | ) |
Reset an instance of this class by clearing all of its data.
Definition at line 66 of file SimParticle.cxx.
References charge_, daughters_, end_px_, end_py_, end_pz_, end_x_, end_y_, end_z_, energy_, gen_status_, mass_, parents_, pdg_id_, process_type_, px_, py_, pz_, time_, vertex_volume_, vtx_x_, vtx_y_, and vtx_z_.
|
staticprivate |
Electromagnetic interactions e Z --> e Z gamma
gamma --> e+ e-
e+ e- --> gamma gamma
gamma e --> gamma e
gamma Z --> e- Z
Electron ionization
Multiple scattering
gamma Z --> Z + X
mu Z --> Z + X
e Z --> e Z + X
gamma --> mu+ mu-
e- Z --> e- Z A'
n + Z -> X
n + Z -> Z*
K + Z -> X
pi + Z -> X
p + Z -> X
Other Primary particle
Definition at line 11 of file SimParticle.cxx.
|
static |
Get the process type enum from a G4VProcess name.
Definition at line 108 of file SimParticle.cxx.
References process_map.
Referenced by simcore::TrackMap::save().
|
inline |
Get the charge of this particle.
Definition at line 162 of file SimParticle.h.
References charge_.
Referenced by tracking::reco::TruthSeedProcessor::createTruthTrack(), and tracking::reco::TruthSeedProcessor::createTruthTrack().
|
inline |
Get a vector containing the track IDs of all daughter particles.
Definition at line 170 of file SimParticle.h.
References daughters_.
Referenced by dqm::SampleValidation::analyze(), analysis::doesParticleHavePNDaughters(), dqm::PhotoNuclearDQM::findDaughters(), and analysis::getPNGamma().
|
inline |
Get the end_point of this particle where it was destroyed or left the world volume [mm].
Definition at line 139 of file SimParticle.h.
References end_x_, end_y_, and end_z_.
Referenced by dqm::SampleValidation::analyze().
|
inline |
|
inline |
Get the energy of this particle [MeV].
Definition at line 72 of file SimParticle.h.
References energy_.
Referenced by dqm::SampleValidation::analyze(), dqm::PhotoNuclearDQM::classifyCompactEvent(), and dqm::PhotoNuclearDQM::findSubleadingKinematics().
|
inline |
Get the generator status of this particle.
A non-zero status indicates that this particle originates from an external generator (e.g. LHE).
Definition at line 94 of file SimParticle.h.
References gen_status_.
|
inline |
Get the material name in which this particle was created in.
The material names are set in the GDML detector description.
Definition at line 131 of file SimParticle.h.
References interaction_material_.
|
inline |
|
inline |
Get the mass of this particle [GeV].
Definition at line 155 of file SimParticle.h.
References mass_.
|
inline |
Get a vector containing the momentum of this particle [MeV].
The momentum of this particle is set at the time of its creation.
Definition at line 148 of file SimParticle.h.
Referenced by dqm::SampleValidation::analyze(), tracking::reco::TruthSeedProcessor::createTruthTrack(), and dqm::DarkBremInteraction::produce().
|
inline |
Get a vector containing the track IDs of the parent particles.
Definition at line 177 of file SimParticle.h.
References parents_.
Referenced by dqm::SampleValidation::analyze().
|
inline |
Get the PDG ID of this particle.
Definition at line 85 of file SimParticle.h.
References pdg_id_.
Referenced by dqm::SampleValidation::analyze(), and tracking::reco::TruthSeedProcessor::createTruthTrack().
|
inline |
Get the creator process type of this particle.
Definition at line 308 of file SimParticle.h.
References process_type_.
|
inline |
Get the global time of this particle's creation [ns].
Definition at line 101 of file SimParticle.h.
References time_.
|
inline |
Get a vector containing the vertex of this particle in mm.
In this case, the vertex refers to the position where the particle is first created in the simulation. For a particle with generator status equal to 1, this will equal the position from which this particle is fired from.
Definition at line 113 of file SimParticle.h.
References vtx_x_, vtx_y_, and vtx_z_.
Referenced by dqm::SampleValidation::analyze(), tracking::reco::TruthSeedProcessor::createTruthTrack(), and dqm::PhotoNuclearDQM::findRecoilProperties().
|
inline |
Get the volume name in which this particle was created in.
The volumes names are set in the GDML detector description.
Definition at line 122 of file SimParticle.h.
References vertex_volume_.
|
inline |
Set the charge of this particle.
| [in] | charge | The charge of this particle. |
Definition at line 280 of file SimParticle.h.
References charge_.
|
inline |
Set the end point position of this particle [mm].
| [in] | end_x | The x position of the end point. |
| [in] | end_y | The y position of the end point. |
| [in] | end_z | The z position of the end point. |
Definition at line 248 of file SimParticle.h.
|
inline |
Set the momentum at this particle's end point.
| [in] | end_px | The x component of the momentum. |
| [in] | end_py | The y component of the momentum. |
| [in] | end_pz | The z component of the momentum. |
Definition at line 324 of file SimParticle.h.
|
inline |
Set the energy of this particle [MeV].
| [in] | energy | the energy of this particle. |
Definition at line 184 of file SimParticle.h.
References energy_.
|
inline |
Set the generator status of this particle.
| [in] | gen_status | the generator status of the hit. |
Definition at line 198 of file SimParticle.h.
References gen_status_.
Referenced by simcore::TrackMap::save().
|
inline |
Set the name of the material that this particle was created in.
| [in] | interaction_material | volume name that this particle was created in. |
Definition at line 237 of file SimParticle.h.
References interaction_material_.
|
inline |
Set the mass of this particle [GeV].
| [in] | mass | The mass of this particle. |
Definition at line 273 of file SimParticle.h.
References mass_.
|
inline |
|
inline |
Set the PDG ID of this particle.
| [in] | pdg_id | the PDG ID of the hit. |
Definition at line 191 of file SimParticle.h.
References pdg_id_.
|
inline |
Set the creator process type of this particle.
| [in] | process_type | the creator process type of this particle. |
Definition at line 315 of file SimParticle.h.
References process_type_.
|
inline |
Set the global time of this particle's creation [ns].
| [in] | time | The global time of this particle's creation. |
Definition at line 205 of file SimParticle.h.
References time_.
|
inline |
|
inline |
Set the name of the volume that this particle was created in.
| [in] | vertexVolume | volume name that this particle was created in. |
Definition at line 227 of file SimParticle.h.
References vertex_volume_.
|
friend |
Print a string representation of this object.
Definition at line 92 of file SimParticle.cxx.
|
private |
The particle's charge.
Definition at line 403 of file SimParticle.h.
Referenced by clear(), getCharge(), and setCharge().
|
private |
The list of daughter particle track IDs.
Definition at line 406 of file SimParticle.h.
Referenced by addDaughter(), clear(), and getDaughters().
|
private |
The x component of the end_point momentum.
Definition at line 391 of file SimParticle.h.
Referenced by clear(), getEndPointMomentum(), and setEndPointMomentum().
|
private |
The y component of the end_point momentum.
Definition at line 394 of file SimParticle.h.
Referenced by clear(), getEndPointMomentum(), and setEndPointMomentum().
|
private |
The z component of the end_point momentum.
Definition at line 397 of file SimParticle.h.
Referenced by clear(), getEndPointMomentum(), and setEndPointMomentum().
|
private |
The x component of the end point.
Definition at line 373 of file SimParticle.h.
Referenced by clear(), getEndPoint(), and setEndPoint().
|
private |
The y component of the end point.
Definition at line 376 of file SimParticle.h.
Referenced by clear(), getEndPoint(), and setEndPoint().
|
private |
The z component of the end point.
Definition at line 379 of file SimParticle.h.
Referenced by clear(), getEndPoint(), and setEndPoint().
|
private |
The energy of this particle.
Definition at line 352 of file SimParticle.h.
Referenced by clear(), getEnergy(), getKineticEnergy(), and setEnergy().
|
private |
The generator status.
Definition at line 358 of file SimParticle.h.
Referenced by clear(), getGenStatus(), and setGenStatus().
|
private |
Volume the track was created in.
Definition at line 418 of file SimParticle.h.
Referenced by getInteractionMaterial(), and setInteractionMaterial().
|
private |
The particle's mass.
Definition at line 400 of file SimParticle.h.
Referenced by clear(), getKineticEnergy(), getMass(), and setMass().
|
private |
The list of parent particles track IDs.
Definition at line 409 of file SimParticle.h.
Referenced by addParent(), clear(), and getParents().
|
private |
The PDG ID of this particle.
Definition at line 355 of file SimParticle.h.
Referenced by clear(), getPdgID(), and setPdgID().
|
staticprivate |
Map containing the process types.
Definition at line 421 of file SimParticle.h.
Referenced by findProcessType().
|
private |
Encoding of Geant4 process type.
Definition at line 412 of file SimParticle.h.
Referenced by clear(), getProcessType(), and setProcessType().
|
private |
The x component of the momentum.
Definition at line 382 of file SimParticle.h.
Referenced by clear(), getMomentum(), and setMomentum().
|
private |
The y component of the momentum.
Definition at line 385 of file SimParticle.h.
Referenced by clear(), getMomentum(), and setMomentum().
|
private |
The z component of the momentum.
Definition at line 388 of file SimParticle.h.
Referenced by clear(), getMomentum(), and setMomentum().
|
private |
|
private |
Volume the track was created in.
Definition at line 415 of file SimParticle.h.
Referenced by clear(), getVertexVolume(), and setVertexVolume().
|
private |
The x component of the vertex.
Definition at line 364 of file SimParticle.h.
Referenced by clear(), getVertex(), and setVertex().
|
private |
The y component of the vertex.
Definition at line 367 of file SimParticle.h.
Referenced by clear(), getVertex(), and setVertex().
|
private |
The z component of the vertex.
Definition at line 370 of file SimParticle.h.
Referenced by clear(), getVertex(), and setVertex().