GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ProcessInfo.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <c.andreopoulos \at cern.ch>
7  University of Liverpool
8 
9  Changes required to implement the GENIE Boosted Dark Matter module
10  were installed by Josh Berger (Univ. of Wisconsin)
11 
12  Changes required to implement the GENIE Dark Neutrino module
13  were installed by Iker de Icaza (Univ. of Sussex)
14 */
15 //____________________________________________________________________________
16 
17 #include <sstream>
18 
20 
21 using std::ostringstream;
22 using std::endl;
23 
24 using namespace genie;
25 
27 
28 //____________________________________________________________________________
29 namespace genie {
30  ostream & operator << (ostream & stream, const ProcessInfo & proc)
31  {
32  proc.Print(stream);
33  return stream;
34  }
35 }
36 //____________________________________________________________________________
38 TObject()
39 {
40  this->Reset();
41 }
42 //____________________________________________________________________________
44  ScatteringType_t sc_type, InteractionType_t int_type) :
45 TObject(),
46 fScatteringType(sc_type),
47 fInteractionType(int_type)
48 {
49 
50 }
51 //____________________________________________________________________________
53 TObject()
54 {
55  this->Copy(proc);
56 }
57 //____________________________________________________________________________
59 {
60 
61 }
62 //____________________________________________________________________________
64 {
67 }
68 //____________________________________________________________________________
70 {
71  return (fScatteringType == kScQuasiElastic);
72 }
73 //____________________________________________________________________________
75 {
77 }
78 //____________________________________________________________________________
79 bool ProcessInfo::IsSinglePion(void) const
80 {
81  return (fScatteringType == kScSinglePion);
82 }
83 //____________________________________________________________________________
84 bool ProcessInfo::IsSingleKaon(void) const
85 {
86  return (fScatteringType == kScSingleKaon);
87 }
88 //____________________________________________________________________________
90 {
92 }
93 //____________________________________________________________________________
95 {
97 }
98 //____________________________________________________________________________
99 bool ProcessInfo::IsResonant(void) const
100 {
101  return (fScatteringType == kScResonant);
102 }
103 //____________________________________________________________________________
105 {
107 }
108 //____________________________________________________________________________
110 {
112 }
113 //____________________________________________________________________________
115 {
119 }
120 //____________________________________________________________________________
122 {
124 }
125 //____________________________________________________________________________
127 {
129 }
130 //____________________________________________________________________________
132 {
134 }
135 //____________________________________________________________________________
136 bool ProcessInfo::IsNorm(void) const
137 {
138  return (fScatteringType == kScNorm);
139 }
140 //____________________________________________________________________________
142 {
144 }
145 //____________________________________________________________________________
147 {
148  return (fInteractionType == kIntDarkNC);
149 }
150 //____________________________________________________________________________
152 {
154 }
155 //____________________________________________________________________________
157 {
159 }
160 //____________________________________________________________________________
162 {
164 }
165 //____________________________________________________________________________
167 {
169 }
170 //____________________________________________________________________________
171 bool ProcessInfo::IsAMNuGamma(void) const
172 {
173  return (fScatteringType == kScAMNuGamma);
174 }
175 //____________________________________________________________________________
176 bool ProcessInfo::IsMEC(void) const
177 {
178  return (fScatteringType == kScMEC);
179 }
180 //____________________________________________________________________________
182 {
183  return (fScatteringType == kScDiffractive);
184 }
185 
186 //____________________________________________________________________________
187 bool ProcessInfo::IsKnown (void) const
188 {
189  return (fScatteringType > kScNull);
190 }
191 
192 //____________________________________________________________________________
193 bool ProcessInfo::IsEM(void) const
194 {
195  return (fInteractionType == kIntEM);
196 }
197 //____________________________________________________________________________
198 bool ProcessInfo::IsWeak(void) const
199 {
200  return ( this->IsWeakCC() || this->IsWeakNC() || this->IsWeakMix());
201 }
202 //____________________________________________________________________________
203 bool ProcessInfo::IsWeakCC(void) const
204 {
205  return (fInteractionType == kIntWeakCC);
206 }
207 //____________________________________________________________________________
208 bool ProcessInfo::IsWeakNC(void) const
209 {
210  return (fInteractionType == kIntWeakNC);
211 }
212 //____________________________________________________________________________
214 {
215  return (fInteractionType == kIntDarkMatter);
216 }
217 //____________________________________________________________________________
218 bool ProcessInfo::IsWeakMix(void) const
219 {
220  return (fInteractionType == kIntWeakMix);
221 }
222 //____________________________________________________________________________
223 bool ProcessInfo::IsHNLDecay(void) const
224 {
225  return (fInteractionType == kIntHNL);
226 }
227 //____________________________________________________________________________
229 {
230  return fInteractionType;
231 }
232 //____________________________________________________________________________
234 {
235  return fScatteringType;
236 }
237 //____________________________________________________________________________
238 string ProcessInfo::AsString(void) const
239 {
240  ostringstream stream;
241 
242  stream << "<"
243  << this->ScatteringTypeAsString()
244  << " - "
245  << this->InteractionTypeAsString()
246  << ">";
247 
248  return stream.str();
249 }
250 //____________________________________________________________________________
252 {
253  string scattering_type = ScatteringType::AsString(fScatteringType);
254  return scattering_type;
255 }
256 //____________________________________________________________________________
258 {
259  string interaction_type = InteractionType::AsString(fInteractionType);
260  return interaction_type;
261 }
262 //____________________________________________________________________________
264 {
265  fScatteringType = sc_type;
266  fInteractionType = int_type;
267 }
268 //____________________________________________________________________________
269 bool ProcessInfo::Compare(const ProcessInfo & proc) const
270 {
271  return (
274  );
275 }
276 //____________________________________________________________________________
277 void ProcessInfo::Copy(const ProcessInfo & proc)
278 {
281 }
282 //____________________________________________________________________________
283 void ProcessInfo::Print(ostream & stream) const
284 {
285  stream << "[-] [Process-Info] " << endl
286  << " |--> Interaction : " << this->InteractionTypeAsString() << endl
287  << " |--> Scattering : " << this->ScatteringTypeAsString() << endl;
288 }
289 //____________________________________________________________________________
290 bool ProcessInfo::operator == (const ProcessInfo & proc) const
291 {
292  return this->Compare(proc);
293 }
294 //___________________________________________________________________________
296 {
297  this->Copy(proc);
298  return (*this);
299 }
300 //____________________________________________________________________________
bool IsResonant(void) const
Definition: ProcessInfo.cxx:99
ScatteringType_t fScatteringType
scattering type (QEL, RES, DIS, ...)
Definition: ProcessInfo.h:115
bool IsPhotonResonance(void) const
bool IsWeak(void) const
bool IsWeakMix(void) const
bool IsWeakCC(void) const
bool Compare(const ProcessInfo &proc) const
InteractionType_t InteractionTypeId(void) const
bool IsDarkMatterElectronElastic(void) const
string ScatteringTypeAsString(void) const
bool IsDarkNeutralCurrent(void) const
void Print(ostream &stream) const
bool IsInverseMuDecay(void) const
bool IsQuasiElastic(void) const
Definition: ProcessInfo.cxx:69
bool IsElectronScattering(void) const
bool IsInverseBetaDecay(void) const
bool IsDiffractive(void) const
bool IsCoherentProduction(void) const
bool IsIMDAnnihilation(void) const
InteractionType_t fInteractionType
interaction type (Weak CC/NC, E/M, ...)
Definition: ProcessInfo.h:116
void Set(ScatteringType_t sc_type, InteractionType_t int_type)
bool IsHNLDecay(void) const
bool IsKnown(void) const
bool IsSingleKaon(void) const
Definition: ProcessInfo.cxx:84
ProcessInfo & operator=(const ProcessInfo &proc)
bool IsWeakNC(void) const
bool IsCoherentElastic(void) const
bool IsNuElectronElastic(void) const
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
bool IsAMNuGamma(void) const
string AsString(void) const
string InteractionTypeAsString(void) const
bool IsDarkMatterElastic(void) const
Definition: ProcessInfo.cxx:74
ScatteringType_t ScatteringTypeId(void) const
static string AsString(ScatteringType_t type)
bool IsPhotonCoherent(void) const
bool IsMEC(void) const
bool IsEM(void) const
static string AsString(InteractionType_t type)
bool IsNorm(void) const
bool IsDeepInelastic(void) const
Definition: ProcessInfo.cxx:89
enum genie::EScatteringType ScatteringType_t
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
bool IsDarkMatter(void) const
bool operator==(const ProcessInfo &proc) const
ClassImp(CacheBranchFx)
bool IsSinglePion(void) const
Definition: ProcessInfo.cxx:79
bool IsGlashowResonance(void) const
bool IsDarkMatterDeepInelastic(void) const
Definition: ProcessInfo.cxx:94
enum genie::EInteractionType InteractionType_t
void Copy(const ProcessInfo &proc)