17 #ifdef HAS_GENIE // does not happen in LArSoft 18 #include "GENIE/HadronTransport/INukeHadroFates.h" 22 #include "TDatabasePDG.h" 23 #include "TParticlePDG.h" 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";
67 case simb::kQE:
return "quasi-elastic scattering";
69 case simb::kDIS:
return "deep inelastic scattering";
77 case simb::kMEC:
return "meson exchange current";
82 case simb::kCCQE:
return "charged current quasi-elastic scattering";
83 case simb::kNCQE:
return "neutral current quasi-elastic scattering";
105 return "resonant charged current antineutrino neutron rho-";
110 return "resonant charged current antineutrino Sigma- kaon0";
119 return "resonant charged current antineutrino neutron pi+ pi-";
121 return "resonant charged current antineutrino neutron pi0 pi0";
123 case simb::kCCDIS:
return "charged current deep inelastic scattering";
124 case simb::kNCDIS:
return "neutral current deep inelastic scattering";
127 case simb::kCCQEHyperon:
return "charged current quasi-elastic scattering with hyperon";
128 case simb::kNCCOH:
return "neutral current coherent scattering";
129 case simb::kCCCOH:
return "charged current coherent scattering";
141 case -1:
return "undefined";
142 case 0:
return "initial state";
143 case 1:
return "stable final state";
144 case 2:
return "intermediate";
145 case 3:
return "decayed";
146 case 11:
return "nucleon target";
147 case 12:
return "pre-fragmentation hadronic state";
148 case 13:
return "pre-decay resonant state";
149 case 14:
return "hadron in nucleus";
150 case 15:
return "final state nuclear remnant";
151 case 16:
return "nucleon cluster target";
152 default:
return "unknown";
160 TParticlePDG
const* PDGinfo = TDatabasePDG::Instance()->GetParticle(pigid);
161 return PDGinfo ? PDGinfo->GetTitle() : (
"PDG ID " +
std::to_string(pigid));
175 return "unknown category "s +
std::to_string(static_cast<int>(cat)) +
" (code: "s +
185 #ifdef _INTRANUKE_FATES_H_ // from GENIE 187 return genie::INukeHadroFates::AsString(static_cast<genie::INukeFateHA_t>(code));
189 #else // !_INTRANUKE_FATES_H_: 203 case 0 :
return "** Undefined HA-mode fate **"s;
break;
204 case 1 :
return "HA-mode / no interaction"s;
break;
205 case 2 :
return "HA-mode / cex"s;
break;
206 case 3 :
return "HA-mode / elas"s;
break;
207 case 4 :
return "HA-mode / inelas"s;
break;
208 case 5 :
return "HA-mode / abs"s;
break;
209 case 6 :
return "HA-mode / knock-out"s;
break;
210 case 7 :
return "HA-mode / compound"s;
break;
211 case 8 :
return "HA-mode / pi-production"s;
break;
212 case 9 :
return "HA-mode / pi-prod incl pi+"s;
break;
213 case 10 :
return "HA-mode / pi-prod incl pi-"s;
break;
214 case 11 :
return "HA-mode / pi-prod incl pi0"s;
break;
215 case 12 :
return "HA-mode / dcex"s;
break;
219 #endif // ?_INTRANUKE_FATES_H_ neutral current quasi-elastic
RescatterCategory
Possible sources of rescattering code (which is generator-dependent).
resonant charged current, nubar p -> nubar n pi+
resonant neutral current, nu p -> nu p pi0
charged current deep inelastic scatter
std::string TruthInteractionTypeName(int type)
resonant charged current, nubar p -> l+ p pi-
static const int s_uninitialized
neutrino electron elastic scatter
resonant charged current, nubar p -> l+ n pi0
enum simb::_ev_origin Origin_t
event origin types
offset to account for adding in Nuance codes to this enum
std::string TruthCCNCname(int ccnc)
std::string RescatteringName(int code, RescatterCategory cat=RescatterCategory::LArSoftDefault)
The name of the specified rescattering code.
charged current quasi-elastic
resonant charged current, nubar p -> nubar p pi0
resonant charged current, nu n -> l- p pi0
std::string TruthReactionMode(int mode)
Returns the "mode" of the reaction (a lesser version of interaction type).
resonant neutral current, nu n -> nu n pi0
resonant charged current, nu n -> l- n pi+
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
single particles thrown at the detector
resonant charged current, nubar n -> nubar p pi-
std::string ParticleName(int pigid)
Returns a string with the name of particle the specified with PDG ID.
charged current deep inelastic scatter
resonant charged current, nu p -> l- p pi+
n.b.: this group is similar but not quite, entirely unlike GENIE ScatteringType convention ...
std::string TruthOriginName(simb::Origin_t origin)
Returns a string representing the specified process origin.
charged current coherent pion
resonant neutral current, nu n -> nu p pi-
std::string GENIE_INukeFateHA_RescatteringName(int code)
Description of a rescattering code from GENIE INukeFateHA_t.
Utility functions to print MC truth information.
resonant charged current, nubar n -> l+ n pi-
resonant charged current, nubar n -> nubar n pi0
std::string ParticleStatusName(int code)
Describes the status of a particle (simb::MCParticle::StatusCode()).
resonant neutral current, nu p -> nu p pi+
constexpr Point origin()
Returns a origin position with a point of the specified type.