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. | |
void | Print () const |
Print a string representation of this object. | |
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::vector< double > | getEndPoint () const |
Get the endpoint 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 &pdgID) |
Set the PDG ID of this particle. | |
void | setGenStatus (const int &genStatus) |
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 &x, const double &y, const double &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 | setEndPoint (const double &endX, const double &endY, const double &endZ) |
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 &daughterTrackID) |
Add a reference to a daughter particle by its track ID. | |
void | addParent (const int &parentTrackID) |
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 &processType) |
Set the creator process type of this particle. | |
void | setEndPointMomentum (const double &endpx, const double &endpy, const double &endpz) |
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, 7) | |
Static Private Member Functions | |
static ProcessTypeMap | createProcessTypeMap () |
Private Attributes | |
double | energy_ {0} |
The energy of this particle. | |
int | pdgID_ {0} |
The PDG ID of this particle. | |
int | genStatus_ {-1} |
The generator status. | |
double | time_ {0} |
The global creation time. | |
double | x_ {0} |
The x component of the vertex. | |
double | y_ {0} |
The y component of the vertex. | |
double | z_ {0} |
The z component of the vertex. | |
double | endX_ {0} |
The x component of the end point. | |
double | endY_ {0} |
The y component of the end point. | |
double | endZ_ {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 | endpx_ {0} |
The x component of the endpoint momentum. | |
double | endpy_ {0} |
The y component of the endpoint momentum. | |
double | endpz_ {0} |
The z component of the endpoint 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 | processType_ {-1} |
Encoding of Geant4 process type. | |
std::string | vertexVolume_ {""} |
Volume the track was created in. | |
Static Private Attributes | |
static ProcessTypeMap | PROCESS_MAP |
Map containing the process types. | |
Class representing a simulated particle.
The particles are created from the tracks produced by simulation.
Definition at line 23 of file SimParticle.h.
typedef 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] | daughterTrackID | The daughter particle track ID. |
Definition at line 269 of file SimParticle.h.
References daughters_.
|
inline |
Add a reference to a parent particle by its track ID.
[in] | parentTrackID | The track ID of the parent particle. |
Definition at line 278 of file SimParticle.h.
References parents_.
|
static |
Get the process type enum from a G4VProcess name.
Referenced by simcore::TrackMap::save().
|
inline |
Get the charge of this particle.
Definition at line 153 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 161 of file SimParticle.h.
References daughters_.
Referenced by dqm::SampleValidation::analyze(), Analysis::doesParticleHavePNDaughters(), dqm::PhotoNuclearDQM::findDaughters(), and Analysis::getPNGamma().
|
inline |
Get the endpoint of this particle where it was destroyed or left the world volume [mm].
Definition at line 130 of file SimParticle.h.
References endX_, endY_, and endZ_.
Referenced by dqm::SampleValidation::analyze().
|
inline |
Get the momentum at this particle's end point.
Definition at line 315 of file SimParticle.h.
|
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 genStatus_.
|
inline |
Get the kinetic energy of this particle [MeV].
Definition at line 79 of file SimParticle.h.
|
inline |
Get the mass of this particle [GeV].
Definition at line 146 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 139 of file SimParticle.h.
Referenced by dqm::SimObjects::analyze(), and tracking::reco::TruthSeedProcessor::createTruthTrack().
|
inline |
Get a vector containing the track IDs of the parent particles.
Definition at line 168 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 pdgID_.
Referenced by dqm::SampleValidation::analyze(), and tracking::reco::TruthSeedProcessor::createTruthTrack().
|
inline |
Get the creator process type of this particle.
Definition at line 287 of file SimParticle.h.
References processType_.
|
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.
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 vertexVolume_.
|
inline |
Set the charge of this particle.
[in] | charge | The charge of this particle. |
Definition at line 259 of file SimParticle.h.
References charge_.
|
inline |
Set the end point position of this particle [mm].
[in] | endX | The x position of the end point. |
[in] | endY | The y position of the end point. |
[in] | endZ | The z position of the end point. |
Definition at line 228 of file SimParticle.h.
|
inline |
Set the momentum at this particle's end point.
[in] | endpx | The x component of the momentum. |
[in] | endpy | The y component of the momentum. |
[in] | endpz | The z component of the momentum. |
Definition at line 303 of file SimParticle.h.
|
inline |
Set the energy of this particle [MeV].
[in] | energy | the energy of this particle. |
Definition at line 175 of file SimParticle.h.
References energy_.
|
inline |
Set the generator status of this particle.
[in] | genStatus | the generator status of the hit. |
Definition at line 189 of file SimParticle.h.
References genStatus_.
Referenced by simcore::TrackMap::save().
|
inline |
Set the mass of this particle [GeV].
[in] | mass | The mass of this particle. |
Definition at line 252 of file SimParticle.h.
References mass_.
|
inline |
|
inline |
Set the PDG ID of this particle.
[in] | pdgID | the PDG ID of the hit. |
Definition at line 182 of file SimParticle.h.
References pdgID_.
|
inline |
Set the creator process type of this particle.
[in] | processType | the creator process type of this particle. |
Definition at line 294 of file SimParticle.h.
References processType_.
|
inline |
Set the global time of this particle's creation [ns].
[in] | time | The global time of this particle's creation. |
Definition at line 196 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 217 of file SimParticle.h.
References vertexVolume_.
|
private |
The particle's charge.
Definition at line 382 of file SimParticle.h.
Referenced by getCharge(), and setCharge().
|
private |
The list of daughter particle track IDs.
Definition at line 385 of file SimParticle.h.
Referenced by addDaughter(), and getDaughters().
|
private |
The x component of the endpoint momentum.
Definition at line 370 of file SimParticle.h.
Referenced by getEndPointMomentum(), and setEndPointMomentum().
|
private |
The y component of the endpoint momentum.
Definition at line 373 of file SimParticle.h.
Referenced by getEndPointMomentum(), and setEndPointMomentum().
|
private |
The z component of the endpoint momentum.
Definition at line 376 of file SimParticle.h.
Referenced by getEndPointMomentum(), and setEndPointMomentum().
|
private |
The x component of the end point.
Definition at line 352 of file SimParticle.h.
Referenced by getEndPoint(), and setEndPoint().
|
private |
The y component of the end point.
Definition at line 355 of file SimParticle.h.
Referenced by getEndPoint(), and setEndPoint().
|
private |
The z component of the end point.
Definition at line 358 of file SimParticle.h.
Referenced by getEndPoint(), and setEndPoint().
|
private |
The energy of this particle.
Definition at line 331 of file SimParticle.h.
Referenced by getEnergy(), getKineticEnergy(), and setEnergy().
|
private |
The generator status.
Definition at line 337 of file SimParticle.h.
Referenced by getGenStatus(), and setGenStatus().
|
private |
The particle's mass.
Definition at line 379 of file SimParticle.h.
Referenced by getKineticEnergy(), getMass(), and setMass().
|
private |
The list of parent particles track IDs.
Definition at line 388 of file SimParticle.h.
Referenced by addParent(), and getParents().
|
private |
The PDG ID of this particle.
Definition at line 334 of file SimParticle.h.
Referenced by getPdgID(), and setPdgID().
|
staticprivate |
Map containing the process types.
Definition at line 397 of file SimParticle.h.
|
private |
Encoding of Geant4 process type.
Definition at line 391 of file SimParticle.h.
Referenced by getProcessType(), and setProcessType().
|
private |
The x component of the momentum.
Definition at line 361 of file SimParticle.h.
Referenced by getMomentum(), and setMomentum().
|
private |
The y component of the momentum.
Definition at line 364 of file SimParticle.h.
Referenced by getMomentum(), and setMomentum().
|
private |
The z component of the momentum.
Definition at line 367 of file SimParticle.h.
Referenced by getMomentum(), and setMomentum().
|
private |
|
private |
Volume the track was created in.
Definition at line 394 of file SimParticle.h.
Referenced by getVertexVolume(), and setVertexVolume().
|
private |
The x component of the vertex.
Definition at line 343 of file SimParticle.h.
Referenced by getVertex(), and setVertex().
|
private |
The y component of the vertex.
Definition at line 346 of file SimParticle.h.
Referenced by getVertex(), and setVertex().
|
private |
The z component of the vertex.
Definition at line 349 of file SimParticle.h.
Referenced by getVertex(), and setVertex().