1#include "SimCore/Event/SimParticle.h"
15 proc_map[
"eBrem"] = ProcessType::eBrem;
17 proc_map[
"conv"] = ProcessType::conv;
19 proc_map[
"annihil"] = ProcessType::annihil;
21 proc_map[
"compt"] = ProcessType::compt;
23 proc_map[
"phot"] = ProcessType::phot;
25 proc_map[
"eIoni"] = ProcessType::eIoni;
27 proc_map[
"msc"] = ProcessType::msc;
29 proc_map[
"photonNuclear"] = ProcessType::photonNuclear;
31 proc_map[
"muonNuclear"] = ProcessType::muonNuclear;
33 proc_map[
"electronNuclear"] = ProcessType::electronNuclear;
35 proc_map[
"GammaToMuPair"] = ProcessType::GammaToMuPair;
37 proc_map[
"DarkBrem"] = ProcessType::eDarkBrem;
41 proc_map[
"neutronInelastic"] = ProcessType::neutronInelastic;
43 proc_map[
"neutronCapture"] = ProcessType::neutronCapture;
45 proc_map[
"kaon-Inelastic"] = ProcessType::kaonInelastic;
46 proc_map[
"kaon+Inelastic"] = ProcessType::kaonInelastic;
47 proc_map[
"kaon0LInelastic"] = ProcessType::kaonInelastic;
48 proc_map[
"kaon0SInelastic"] = ProcessType::kaonInelastic;
50 proc_map[
"pi-Inelastic"] = ProcessType::pionInelastic;
51 proc_map[
"pi+Inelastic"] = ProcessType::pionInelastic;
53 proc_map[
"protonInelastic"] = ProcessType::protonInelastic;
57 proc_map[
"Primary"] = ProcessType::Primary;
59 proc_map[
"Decay"] = ProcessType::Decay;
92std::ostream& operator<<(std::ostream& o,
const SimParticle& sp) {
93 return o <<
"SimParticle { " <<
"energy: " << sp.
energy_ <<
", "
94 <<
"pdg_id: " << sp.
pdg_id_ <<
", "
96 <<
", " <<
"vertex: ( " << sp.
vtx_x_ <<
", " << sp.
vtx_y_ <<
", "
97 << sp.
vtx_z_ <<
" ), " <<
"end_point: ( " << sp.
end_x_ <<
", "
98 << sp.
end_y_ <<
", " << sp.
end_z_ <<
" ), " <<
"momentum: ( "
99 << sp.
px_ <<
", " << sp.
py_ <<
", " << sp.
pz_ <<
" ), "
101 <<
", " << sp.
end_pz_ <<
" ), " <<
"mass: " << sp.
mass_ <<
", "
102 <<
"n_daughters: " << sp.
daughters_.size() <<
", "
103 <<
"n_parents: " << sp.
parents_.size() <<
", "
109 std::string process_name) {
110 if (process_name.find(
"biasWrapper") != std::string::npos) {
111 std::size_t pos = process_name.find_first_of(
"(") + 1;
112 process_name = process_name.substr(pos, process_name.size() - pos - 1);
118 return ProcessType::unknown;
Class representing a simulated particle.
double end_py_
The y component of the end_point momentum.
double pz_
The z component of the momentum.
ProcessType
Enum for interesting process types.
double py_
The y component of the momentum.
double vtx_x_
The x component of the vertex.
static ProcessType findProcessType(std::string processName)
Get the process type enum from a G4VProcess name.
std::vector< int > daughters_
The list of daughter particle track IDs.
int process_type_
Encoding of Geant4 process type.
double end_x_
The x component of the end point.
double energy_
The energy of this particle.
double end_pz_
The z component of the end_point momentum.
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.
double end_z_
The z component of the end point.
double mass_
The particle's mass.
std::vector< int > parents_
The list of parent particles track IDs.
double end_px_
The x component of the end_point momentum.
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.
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.