ProcessInfo.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2019, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author: Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
8  University of Liverpool & STFC Rutherford Appleton Lab
9 
10  Changes required to implement the GENIE Boosted Dark Matter module
11  were installed by Josh Berger (Univ. of Wisconsin)
12 */
13 //____________________________________________________________________________
14 
15 #include <sstream>
16 
18 
19 using std::ostringstream;
20 using std::endl;
21 
22 using namespace genie;
23 
25 
26 //____________________________________________________________________________
28  ostream & operator << (ostream & stream, const ProcessInfo & proc)
29  {
30  proc.Print(stream);
31  return stream;
32  }
33 }
34 //____________________________________________________________________________
36 TObject()
37 {
38  this->Reset();
39 }
40 //____________________________________________________________________________
42  ScatteringType_t sc_type, InteractionType_t int_type) :
43 TObject(),
44 fScatteringType(sc_type),
45 fInteractionType(int_type)
46 {
47 
48 }
49 //____________________________________________________________________________
51 TObject()
52 {
53  this->Copy(proc);
54 }
55 //____________________________________________________________________________
57 {
58 
59 }
60 //____________________________________________________________________________
62 {
65 }
66 //____________________________________________________________________________
68 {
69  return (fScatteringType == kScQuasiElastic);
70 }
71 //____________________________________________________________________________
73 {
75 }
76 //____________________________________________________________________________
77 bool ProcessInfo::IsSingleKaon(void) const
78 {
79  return (fScatteringType == kScSingleKaon);
80 }
81 //____________________________________________________________________________
83 {
85 }
86 //____________________________________________________________________________
88 {
90 }
91 //____________________________________________________________________________
92 bool ProcessInfo::IsResonant(void) const
93 {
94  return (fScatteringType == kScResonant);
95 }
96 //____________________________________________________________________________
97 bool ProcessInfo::IsCoherent(void) const
98 {
99  return (fScatteringType == kScCoherent);
100 }
101 //____________________________________________________________________________
103 {
104  return (fScatteringType == kScCoherentElas);
105 }
106 //____________________________________________________________________________
108 {
112 }
113 //____________________________________________________________________________
115 {
117 }
118 //____________________________________________________________________________
120 {
122 }
123 //____________________________________________________________________________
125 {
127 }
128 //____________________________________________________________________________
130 {
132 }
133 //____________________________________________________________________________
135 {
137 }
138 //____________________________________________________________________________
139 bool ProcessInfo::IsAMNuGamma(void) const
140 {
141  return (fScatteringType == kScAMNuGamma);
142 }
143 //____________________________________________________________________________
144 bool ProcessInfo::IsMEC(void) const
145 {
146  return (fScatteringType == kScMEC);
147 }
148 //____________________________________________________________________________
150 {
151  return (fScatteringType == kScDiffractive);
152 }
153 //____________________________________________________________________________
154 bool ProcessInfo::IsEM(void) const
155 {
156  return (fInteractionType == kIntEM);
157 }
158 //____________________________________________________________________________
159 bool ProcessInfo::IsWeak(void) const
160 {
161  return ( this->IsWeakCC() || this->IsWeakNC() || this->IsWeakMix());
162 }
163 //____________________________________________________________________________
164 bool ProcessInfo::IsWeakCC(void) const
165 {
166  return (fInteractionType == kIntWeakCC);
167 }
168 //____________________________________________________________________________
169 bool ProcessInfo::IsWeakNC(void) const
170 {
171  return (fInteractionType == kIntWeakNC);
172 }
173 //____________________________________________________________________________
175 {
176  return (fInteractionType == kIntDarkMatter);
177 }
178 //____________________________________________________________________________
179 bool ProcessInfo::IsWeakMix(void) const
180 {
181  return (fInteractionType == kIntWeakMix);
182 }
183 //____________________________________________________________________________
185 {
186  return fInteractionType;
187 }
188 //____________________________________________________________________________
190 {
191  return fScatteringType;
192 }
193 //____________________________________________________________________________
194 string ProcessInfo::AsString(void) const
195 {
196  ostringstream stream;
197 
198  stream << "<"
199  << this->ScatteringTypeAsString()
200  << " - "
201  << this->InteractionTypeAsString()
202  << ">";
203 
204  return stream.str();
205 }
206 //____________________________________________________________________________
208 {
209  string scattering_type = ScatteringType::AsString(fScatteringType);
210  return scattering_type;
211 }
212 //____________________________________________________________________________
214 {
216  return interaction_type;
217 }
218 //____________________________________________________________________________
220 {
221  fScatteringType = sc_type;
222  fInteractionType = int_type;
223 }
224 //____________________________________________________________________________
225 bool ProcessInfo::Compare(const ProcessInfo & proc) const
226 {
227  return (
230  );
231 }
232 //____________________________________________________________________________
233 void ProcessInfo::Copy(const ProcessInfo & proc)
234 {
237 }
238 //____________________________________________________________________________
239 void ProcessInfo::Print(ostream & stream) const
240 {
241  stream << "[-] [Process-Info] " << endl
242  << " |--> Interaction : " << this->InteractionTypeAsString() << endl
243  << " |--> Scattering : " << this->ScatteringTypeAsString() << endl;
244 }
245 //____________________________________________________________________________
246 bool ProcessInfo::operator == (const ProcessInfo & proc) const
247 {
248  return this->Compare(proc);
249 }
250 //___________________________________________________________________________
252 {
253  this->Copy(proc);
254  return (*this);
255 }
256 //____________________________________________________________________________
257 
bool IsResonant(void) const
Definition: ProcessInfo.cxx:92
ScatteringType_t fScatteringType
scattering type (QEL, RES, DIS, ...)
Definition: ProcessInfo.h:105
bool IsWeak(void) const
bool IsWeakMix(void) const
bool IsWeakCC(void) const
bool Compare(const ProcessInfo &proc) const
InteractionType_t InteractionTypeId(void) const
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
string ScatteringTypeAsString(void) const
void Print(ostream &stream) const
bool IsInverseMuDecay(void) const
bool IsQuasiElastic(void) const
Definition: ProcessInfo.cxx:67
bool IsElectronScattering(void) const
ClassImp(ProcessInfo) namespace genie
Definition: ProcessInfo.cxx:24
bool IsInverseBetaDecay(void) const
bool IsDiffractive(void) const
bool IsIMDAnnihilation(void) const
InteractionType_t fInteractionType
interaction type (Weak CC/NC, E/M, ...)
Definition: ProcessInfo.h:106
void Set(ScatteringType_t sc_type, InteractionType_t int_type)
interaction_type
Definition: Constants.h:110
bool IsSingleKaon(void) const
Definition: ProcessInfo.cxx:77
ProcessInfo & operator=(const ProcessInfo &proc)
bool IsWeakNC(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:44
bool IsAMNuGamma(void) const
string AsString(void) const
string InteractionTypeAsString(void) const
bool IsDarkMatterElastic(void) const
Definition: ProcessInfo.cxx:72
ScatteringType_t ScatteringTypeId(void) const
static string AsString(ScatteringType_t type)
bool IsMEC(void) const
bool IsEM(void) const
static string AsString(InteractionType_t type)
bool IsDeepInelastic(void) const
Definition: ProcessInfo.cxx:82
enum genie::EScatteringType ScatteringType_t
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
bool IsDarkMatter(void) const
bool operator==(const ProcessInfo &proc) const
bool IsCoherentElas(void) const
bool IsGlashowResonance(void) const
bool IsDarkMatterDeepInelastic(void) const
Definition: ProcessInfo.cxx:87
enum genie::EInteractionType InteractionType_t
void Copy(const ProcessInfo &proc)
bool IsCoherent(void) const
Definition: ProcessInfo.cxx:97