14 #include "nusimdata/SimulationBase/MCParticle.h"
17 #ifdef HAS_GENIE // does not happen in LArSoft
18 # include "GENIE/HadronTransport/INukeHadroFates.h"
22 #include "TDatabasePDG.h"
23 #include "TParticlePDG.h"
29 case simb::kUnknown :
return "unknown origin";
30 case simb::kBeamNeutrino :
return "neutrinos from beam";
32 case simb::kSuperNovaNeutrino:
return "supernova neutrinos";
33 case simb::kSingleParticle :
return "single particle";
34 default:
return "unsupported (" +
std::to_string((
int)origin) +
")";
42 case simb::kCC:
return "charged weak current";
43 case simb::kNC:
return "neutral weak current";
53 case 0:
return "quasi-elastic";
54 case 1:
return "resonant";
55 case 2:
return "deep inelastic";
56 case 3:
return "coherent";
57 default:
return "unknown mode";
66 case simb::kUnknownInteraction :
return "unknown interaction";
67 case simb::kQE :
return "quasi-elastic scattering";
68 case simb::kRes :
return "resonant scattering";
69 case simb::kDIS :
return "deep inelastic scattering";
70 case simb::kCoh :
return "coherent scattering";
77 case simb::kMEC :
return "meson exchange current";
79 case simb::kEM :
return "electromagnetic";
82 case simb::kCCQE :
return "charged current quasi-elastic scattering";
83 case simb::kNCQE :
return "neutral current quasi-elastic scattering";
119 case simb::kCCDIS :
return "charged current deep inelastic scattering";
120 case simb::kNCDIS :
return "neutral current deep inelastic scattering";
123 case simb::kCCQEHyperon :
return "charged current quasi-elastic scattering with hyperon";
124 case simb::kNCCOH :
return "neutral current coherent scattering";
125 case simb::kCCCOH :
return "charged current coherent scattering";
137 case -1:
return "undefined";
138 case 0:
return "initial state";
139 case 1:
return "stable final state";
140 case 2:
return "intermediate";
141 case 3:
return "decayed";
142 case 11:
return "nucleon target";
143 case 12:
return "pre-fragmentation hadronic state";
144 case 13:
return "pre-decay resonant state";
145 case 14:
return "hadron in nucleus";
146 case 15:
return "final state nuclear remnant";
147 case 16:
return "nucleon cluster target";
148 default:
return "unknown";
156 TParticlePDG
const* PDGinfo = TDatabasePDG::Instance()->GetParticle(pigid);
157 return PDGinfo? PDGinfo->GetTitle(): (
"PDG ID " +
std::to_string(pigid));
165 using namespace std::string_literals;
167 if (code == simb::MCParticle::s_uninitialized)
return "(unset)"s;
170 case RescatterCategory::GENIE_INukeFateHA:
183 #ifdef _INTRANUKE_FATES_H_ // from GENIE
186 genie::INukeHadroFates::AsString(static_cast<genie::INukeFateHA_t>(code));
188 #else // !_INTRANUKE_FATES_H_:
190 using namespace std::string_literals;
202 case 0 :
return "** Undefined HA-mode fate **"s;
break;
203 case 1 :
return "HA-mode / no interaction"s;
break;
204 case 2 :
return "HA-mode / cex"s;
break;
205 case 3 :
return "HA-mode / elas"s;
break;
206 case 4 :
return "HA-mode / inelas"s;
break;
207 case 5 :
return "HA-mode / abs"s;
break;
208 case 6 :
return "HA-mode / knock-out"s;
break;
209 case 7 :
return "HA-mode / compound"s;
break;
210 case 8 :
return "HA-mode / pi-production"s ;
break;
211 case 9 :
return "HA-mode / pi-prod incl pi+"s;
break;
212 case 10 :
return "HA-mode / pi-prod incl pi-"s;
break;
213 case 11 :
return "HA-mode / pi-prod incl pi0"s;
break;
214 case 12 :
return "HA-mode / dcex"s;
break;
219 #endif // ?_INTRANUKE_FATES_H_
RescatterCategory
Possible sources of rescattering code (which is generator-dependent).
resonant neutral current, nu p -> nu p pi0
resonant charged current, nubar p -> nubar p pi0
offset to account for adding in Nuance codes to this enum
std::string TruthInteractionTypeName(int type)
resonant charged current, nubar n -> nubar p pi-
resonant charged current, nu n -> l- n pi+
resonant charged current, nubar p -> l+ p pi-
resonant neutral current, nu n -> nu p pi-
std::string TruthCCNCname(int ccnc)
std::string RescatteringName(int code, RescatterCategory cat=RescatterCategory::LArSoftDefault)
The name of the specified rescattering code.
charged current deep inelastic scatter
resonant neutral current, nu n -> nu n pi0
neutrino electron elastic scatter
resonant charged current, nubar p -> nubar n pi+
charged current coherent pion
resonant neutral current, nu p -> nu p pi+
resonant charged current, nu n -> l- p pi0
resonant charged current, nubar n -> l+ n pi-
Charged-current interactions.
std::string TruthReactionMode(int mode)
Returns the "mode" of the reaction (a lesser version of interaction type).
std::string ParticleName(int pigid)
Returns a string with the name of particle the specified with PDG ID.
std::string TruthOriginName(simb::Origin_t origin)
Returns a string representing the specified process origin.
std::string GENIE_INukeFateHA_RescatteringName(int code)
Description of a rescattering code from GENIE INukeFateHA_t.
std::string to_string(WindowPattern const &pattern)
then echo File list $list not found else cat $list while read file do echo $file sed s
Utility functions to print MC truth information.
Neutral-current interactions.
resonant charged current, nubar p -> l+ n pi0
resonant charged current, nubar n -> nubar n pi0
neutral current quasi-elastic
charged current quasi-elastic
std::string ParticleStatusName(int code)
Describes the status of a particle (simb::MCParticle::StatusCode()).
resonant charged current, nu p -> l- p pi+
constexpr Point origin()
Returns a origin position with a point of the specified type.
charged current deep inelastic scatter