Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
JGENIETypes.hh
Go to the documentation of this file.
1#ifndef __JAANET__JGENIETYPES__
2#define __JAANET__JGENIETYPES__
3
4#include "JLang/JException.hh"
5
7
9
10
11/**
12 * \file
13 *
14 * Definition of GENIE neutrino interaction types.
15 * \author bjjung
16 */
17namespace JAANET {}
18namespace JPP { using namespace JAANET; }
19
20namespace JAANET {
21
23
26
27
28 /**
29 * Enumeration of GENIE interaction types.
30 */
32 INTERACTION_TYPES_START = -1, //!< Start of interaction types
33 UNDEFINED, //!< Unknown interaction type
34 ELECTROMAGNETIC, //!< Electromagnetic interaction
35 WEAK_CHARGED_CURRENT, //!< Weak charged current interaction
36 WEAK_NEUTRAL_CURRENT, //!< Weak neutral current interaction
37 WEAK_MIX, //!< CC + NC + interference
38 DARK_MATTER, //!< Dark matter interaction
39 NUCLEON_DECAY, //!< Nucleon decay
40 NEUTRON_OSCILLATION, //!< Neutron oscillation
41 NEUTRAL_HEAVY_LEPTON, //!< Heavy neutral lepton
42 DARK_NEUTRAL_CURRENT, //!< Dark neutral current
43 INTERACTION_TYPES_END //!< End of interaction types
44 };
45
46
47 /**
48 * Enumeration of GENIE scattering types.
49 */
51 UNKNOWN = -100, //!< Unknown scattering type
52 NEUTRINO_SCATTERING_TYPES_START = -1, //!< Start of standard scattering types
53 UNDEFINED = 0, //!< Undefined scattering type
54 QUASI_ELASTIC, //!< Quasi-elastic scattering
55 SINGLE_KAON, //!< Single kaon scattering
56 DEEP_INELASTIC, //!< Deep Inelastic Scattering
57 RESONANT, //!< Resonant scattering
58 COHERENT_PRODUCTION, //!< Coherent production
59 DIFFRACTIVE, //!< Diffractive scattering
60 ELECTRON_NEUTRINO_ELASTIC, //!< Electron-neutrino elastic scattering
61 INVERSE_MUON_DECAY, //!< Inverse muon decay
62 ANOMALY_MEDIATED_NEUTRINO_GAMMA, //!< Anomaly mediated neutrino-gamma scattering
63 MESON_EXCHANGE_CURRENT, //!< Meson exchange current
64 COHERENT_ELASTIC, //!< Coherent elastic scattering
65 INVERSE_BETA_DECAY, //!< Inverse beta-decay
66 GLASHOW_RESONANCE, //!< Glashow-resonance
67 INVERSE_MUON_DECAY_ANNIHILATION, //!< Inverse muon decay annihilation
68 NEUTRINO_SCATTERING_TYPES_END, //!< End of standard scattering types
69 DARK_MATTER_SCATTERING_TYPES_START = 100, //!< Start of dark matter scattering types
70 DARK_MATTER_ELASTIC, //!< Dark matter elastic scattering
71 DARK_MATTER_DEEP_INELASTIC, //!< Dark matter deep inelastic scattering
72 DARK_MATTER_ELECTRON, //!< Dark matter electron scattering
73 DARK_MATTER_SCATTERING_TYPES_END //!< End of dark matter scattering types
74 };
75
76
77 /**
78 * PDG codes for GENIE special particles.
79 */
80 enum class JGENIEPDGCodes_t {
81 HADRONIC_SYSTEM = 2000000001, //!< DIS hadronic system before hadronization
82 HADRONIC_BLOB = 2000000002, //!< Unmodelled fraction of the hadronic system
83 BINDINO = 2000000101, //!< Binding energy subtracted from f/s nucleons
84 COULOBTRON = 2000000102, //!< Coulomb energy subtracted from f/s leptons
85 CLUSTER_NN = 2000000200, //!< A nn cluster within a nucleus
86 CLUSTER_NP = 2000000201, //!< A np cluster within a nucleus
87 CLUSTER_PP = 2000000202, //!< A pp cluster within a nucleus
88 COMPOSITE_NUCLEON_CLUSTER = 2000000300, //!< Nucleon cluster before phase decay
89 DARK_MATTER = 2000010000, //!< Dark matter particle for GENIE Boosted Dark Matter mode
90 ANTI_DARK_MATTER = -2000010000, //!< Dark matter particle for GENIE Boosted Dark Matter mode
91 DARK_MATTER_MEDIATOR = 2000010001, //!< Mediator particle for GENIE Boosted Dark Matter mode
92 NEUTRAL_HEAVY_LEPTON = 2000020000, //!< Neutral Heavy Lepton PDG code
93 DARK_NEUTRINO = 2000030000, //!< Dark matter particle for GENIE Dark Neutrino mode
94 ANTI_DARK_NEUTRINO = -2000030000, //!< Dark matter particle for GENIE Dark Neutrino mode
95 DARK_NEUTRINO_MEDIATOR = 2000030001 //!< Mediator particle for GENIE Dark Neutrino mode
96 };
97
98
99 /**
100 * Auxiliary function to convert interaction types.
101 *
102 * \param intType GENIE interaction type
103 * \return GENIE interaction type
104 */
106 {
109 return static_cast<JGENIEInteractionType_t>(intType);
110 } else {
112 }
113 }
114
115
116 /**
117 * Auxiliary function to convert scattering types.
118 *
119 * \param scatType GENIE scattering type
120 * \return GENIE scattering type
121 */
122 inline JGENIEScatteringType_t getScatteringType(const int scatType)
123 {
128 (scatType == (int) JGENIEScatteringType_t::UNKNOWN)) {
129 return static_cast<JGENIEScatteringType_t>(scatType);
130 } else {
132 }
133 }
134
135
136 /**
137 * Get target nucleon mass.
138 *
139 * \param type target nucleon PDG code
140 * \return target nucleon mass [GeV]
141 */
142 inline double get_target_nucleon_mass(const int type)
143 {
144 switch (type) {
145
147 return MASS_PROTON;
148
150 return MASS_NEUTRON;
151
153 return MASS_PROTON * 2;
154
156 return MASS_NEUTRON * 2;
157
159 return MASS_NEUTRON + MASS_PROTON;
160
161 default:
162 THROW(JValueOutOfRange, "get_target_nucleon_mass(): Unknown PDG code " << type);
163 }
164 }
165}
166
167#endif
Exceptions.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition of particle types.
Physics constants.
Exception for accessing a value in a collection that is outside of its range.
Extensions to Evt data format.
JGENIEScatteringType_t getScatteringType(const int scatType)
Auxiliary function to convert scattering types.
JGENIEPDGCodes_t
PDG codes for GENIE special particles.
@ DARK_MATTER_MEDIATOR
Mediator particle for GENIE Boosted Dark Matter mode.
@ CLUSTER_NP
A np cluster within a nucleus.
@ CLUSTER_PP
A pp cluster within a nucleus.
@ DARK_NEUTRINO_MEDIATOR
Mediator particle for GENIE Dark Neutrino mode.
@ BINDINO
Binding energy subtracted from f/s nucleons.
@ COULOBTRON
Coulomb energy subtracted from f/s leptons.
@ ANTI_DARK_NEUTRINO
Dark matter particle for GENIE Dark Neutrino mode.
@ CLUSTER_NN
A nn cluster within a nucleus.
@ DARK_NEUTRINO
Dark matter particle for GENIE Dark Neutrino mode.
@ COMPOSITE_NUCLEON_CLUSTER
Nucleon cluster before phase decay.
@ ANTI_DARK_MATTER
Dark matter particle for GENIE Boosted Dark Matter mode.
@ HADRONIC_BLOB
Unmodelled fraction of the hadronic system.
@ HADRONIC_SYSTEM
DIS hadronic system before hadronization.
double get_target_nucleon_mass(const Evt &evt)
Get target nucleon mass.
JGENIEInteractionType_t
Enumeration of GENIE interaction types.
@ UNDEFINED
Unknown interaction type.
@ ELECTROMAGNETIC
Electromagnetic interaction.
@ DARK_NEUTRAL_CURRENT
Dark neutral current.
@ DARK_MATTER
Dark matter interaction.
@ INTERACTION_TYPES_END
End of interaction types.
@ NEUTRAL_HEAVY_LEPTON
Heavy neutral lepton.
@ NEUTRON_OSCILLATION
Neutron oscillation.
@ WEAK_MIX
CC + NC + interference.
@ WEAK_NEUTRAL_CURRENT
Weak neutral current interaction.
@ WEAK_CHARGED_CURRENT
Weak charged current interaction.
@ INTERACTION_TYPES_START
Start of interaction types.
JGENIEInteractionType_t getInteractionType(const int intType)
Auxiliary function to convert interaction types.
JGENIEScatteringType_t
Enumeration of GENIE scattering types.
@ UNDEFINED
Undefined scattering type.
@ DARK_MATTER_SCATTERING_TYPES_END
End of dark matter scattering types.
@ SINGLE_KAON
Single kaon scattering.
@ DARK_MATTER_ELASTIC
Dark matter elastic scattering.
@ INVERSE_BETA_DECAY
Inverse beta-decay.
@ ELECTRON_NEUTRINO_ELASTIC
Electron-neutrino elastic scattering.
@ DIFFRACTIVE
Diffractive scattering.
@ QUASI_ELASTIC
Quasi-elastic scattering.
@ GLASHOW_RESONANCE
Glashow-resonance.
@ NEUTRINO_SCATTERING_TYPES_END
End of standard scattering types.
@ INVERSE_MUON_DECAY_ANNIHILATION
Inverse muon decay annihilation.
@ RESONANT
Resonant scattering.
@ UNKNOWN
Unknown scattering type.
@ DARK_MATTER_DEEP_INELASTIC
Dark matter deep inelastic scattering.
@ MESON_EXCHANGE_CURRENT
Meson exchange current.
@ DARK_MATTER_ELECTRON
Dark matter electron scattering.
@ DEEP_INELASTIC
Deep Inelastic Scattering.
@ ANOMALY_MEDIATED_NEUTRINO_GAMMA
Anomaly mediated neutrino-gamma scattering.
@ COHERENT_PRODUCTION
Coherent production.
@ INVERSE_MUON_DECAY
Inverse muon decay.
@ DARK_MATTER_SCATTERING_TYPES_START
Start of dark matter scattering types.
@ NEUTRINO_SCATTERING_TYPES_START
Start of standard scattering types.
@ COHERENT_ELASTIC
Coherent elastic scattering.
static const double MASS_NEUTRON
neutron mass [GeV]
static const double MASS_PROTON
proton mass [GeV]
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).