1#include "SimCore/Event/SimParticle.h"
15 procMap[
"eBrem"] = ProcessType::eBrem;
17 procMap[
"conv"] = ProcessType::conv;
19 procMap[
"annihil"] = ProcessType::annihil;
21 procMap[
"compt"] = ProcessType::compt;
23 procMap[
"phot"] = ProcessType::phot;
25 procMap[
"eIoni"] = ProcessType::eIoni;
27 procMap[
"msc"] = ProcessType::msc;
29 procMap[
"photonNuclear"] = ProcessType::photonNuclear;
31 procMap[
"muonNuclear"] = ProcessType::muonNuclear;
33 procMap[
"electronNuclear"] = ProcessType::electronNuclear;
35 procMap[
"GammaToMuPair"] = ProcessType::GammaToMuPair;
37 procMap[
"DarkBrem"] = ProcessType::eDarkBrem;
41 procMap[
"neutronInelastic"] = ProcessType::neutronInelastic;
43 procMap[
"neutronCapture"] = ProcessType::neutronCapture;
45 procMap[
"kaon-Inelastic"] = ProcessType::kaonInelastic;
46 procMap[
"kaon+Inelastic"] = ProcessType::kaonInelastic;
47 procMap[
"kaon0LInelastic"] = ProcessType::kaonInelastic;
48 procMap[
"kaon0SInelastic"] = ProcessType::kaonInelastic;
50 procMap[
"pi-Inelastic"] = ProcessType::pionInelastic;
51 procMap[
"pi+Inelastic"] = ProcessType::pionInelastic;
53 procMap[
"protonInelastic"] = ProcessType::protonInelastic;
57 procMap[
"Primary"] = ProcessType::Primary;
59 procMap[
"Decay"] = ProcessType::Decay;
64 SimParticle::createProcessTypeMap();
93 std::cout <<
"SimParticle { "
94 <<
"energy: " <<
energy_ <<
", "
95 <<
"PDG ID: " <<
pdgID_ <<
", "
97 <<
"time: " <<
time_ <<
", "
98 <<
"vertex: ( " <<
x_ <<
", " <<
y_ <<
", " <<
z_ <<
" ), "
101 <<
"momentum: ( " <<
px_ <<
", " <<
py_ <<
", " <<
pz_ <<
" ), "
102 <<
"endPointMomentum: ( " <<
endpx_ <<
", " <<
endpy_ <<
", "
104 <<
"mass: " <<
mass_ <<
", "
105 <<
"nDaughters: " <<
daughters_.size() <<
", "
106 <<
"nParents: " <<
parents_.size() <<
", "
112 std::string processName) {
113 if (processName.find(
"biasWrapper") != std::string::npos) {
114 std::size_t pos = processName.find_first_of(
"(") + 1;
115 processName = processName.substr(pos, processName.size() - pos - 1);
121 return ProcessType::unknown;
Class representing a simulated particle.
double pz_
The z component of the momentum.
double endpz_
The z component of the endpoint momentum.
ProcessType
Enum for interesting process types.
int processType_
Encoding of Geant4 process type.
double x_
The x component of the vertex.
double py_
The y component of the momentum.
double endX_
The x component of the end point.
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.
double energy_
The energy of this particle.
std::string vertexVolume_
Volume the track was created in.
std::map< std::string, ProcessType > ProcessTypeMap
Typedef for process map.
static ProcessType findProcessType(std::string processName)
Get the process type enum from a G4VProcess name.
double endpx_
The x component of the endpoint momentum.
double charge_
The particle's charge.
double px_
The x component of the momentum.
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.
double endZ_
The z component of the end point.
double z_
The z component of the vertex.
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.
double endpy_
The y component of the endpoint momentum.
double time_
The global creation time.