GENIEGenerator
Loading...
Searching...
No Matches
ProcessInfo.cxx
Go to the documentation of this file.
1//____________________________________________________________________________
2/*
3 Copyright (c) 2003-2025, 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
21using std::ostringstream;
22using std::endl;
23
24using namespace genie;
25
27
28//____________________________________________________________________________
29namespace genie {
30 ostream & operator << (ostream & stream, const ProcessInfo & proc)
31 {
32 proc.Print(stream);
33 return stream;
34 }
35}
36//____________________________________________________________________________
38TObject()
39{
40 this->Reset();
41}
42//____________________________________________________________________________
44 ScatteringType_t sc_type, InteractionType_t int_type) :
45TObject(),
46fScatteringType(sc_type),
47fInteractionType(int_type)
48{
49
50}
51//____________________________________________________________________________
53TObject()
54{
55 this->Copy(proc);
56}
57//____________________________________________________________________________
62//____________________________________________________________________________
68//____________________________________________________________________________
70{
72}
73//____________________________________________________________________________
78//____________________________________________________________________________
80{
82}
83//____________________________________________________________________________
85{
87}
88//____________________________________________________________________________
90{
92}
93//____________________________________________________________________________
98//____________________________________________________________________________
100{
101 return (fScatteringType == kScResonant);
102}
103//____________________________________________________________________________
108//____________________________________________________________________________
110{
112}
113//____________________________________________________________________________
120//____________________________________________________________________________
125//____________________________________________________________________________
127{
129}
130//____________________________________________________________________________
132{
134}
135//____________________________________________________________________________
136bool ProcessInfo::IsNorm(void) const
137{
138 return (fScatteringType == kScNorm);
139}
140//____________________________________________________________________________
145//____________________________________________________________________________
147{
148 return (fInteractionType == kIntDarkNC);
149}
150//____________________________________________________________________________
152{
154}
155//____________________________________________________________________________
157{
159}
160//____________________________________________________________________________
162{
164}
165//____________________________________________________________________________
167{
169}
170//____________________________________________________________________________
172{
173 return (fScatteringType == kScAMNuGamma);
174}
175//____________________________________________________________________________
176bool ProcessInfo::IsMEC(void) const
177{
178 return (fScatteringType == kScMEC);
179}
180//____________________________________________________________________________
182{
184}
185
186//____________________________________________________________________________
187bool ProcessInfo::IsKnown (void) const
188{
189 return (fScatteringType > kScNull);
190}
191
192//____________________________________________________________________________
193bool ProcessInfo::IsEM(void) const
194{
195 return (fInteractionType == kIntEM);
196}
197//____________________________________________________________________________
198bool ProcessInfo::IsWeak(void) const
199{
200 return ( this->IsWeakCC() || this->IsWeakNC() || this->IsWeakMix());
201}
202//____________________________________________________________________________
203bool ProcessInfo::IsWeakCC(void) const
204{
205 return (fInteractionType == kIntWeakCC);
206}
207//____________________________________________________________________________
208bool ProcessInfo::IsWeakNC(void) const
209{
210 return (fInteractionType == kIntWeakNC);
211}
212//____________________________________________________________________________
214{
216}
217//____________________________________________________________________________
219{
220 return (fInteractionType == kIntWeakMix);
221}
222//____________________________________________________________________________
224{
225 return (fInteractionType == kIntHNL);
226}
227//____________________________________________________________________________
232//____________________________________________________________________________
237//____________________________________________________________________________
238string 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//____________________________________________________________________________
269bool ProcessInfo::Compare(const ProcessInfo & proc) const
270{
271 return (
274 );
275}
276//____________________________________________________________________________
282//____________________________________________________________________________
283void ProcessInfo::Print(ostream & stream) const
284{
285 stream << "[-] [Process-Info] " << endl
286 << " |--> Interaction : " << this->InteractionTypeAsString() << endl
287 << " |--> Scattering : " << this->ScatteringTypeAsString() << endl;
288}
289//____________________________________________________________________________
291{
292 return this->Compare(proc);
293}
294//___________________________________________________________________________
296{
297 this->Copy(proc);
298 return (*this);
299}
300//____________________________________________________________________________
ClassImp(ProcessInfo) namespace genie
static string AsString(InteractionType_t type)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition ProcessInfo.h:46
void Set(ScatteringType_t sc_type, InteractionType_t int_type)
bool IsPhotonResonance(void) const
bool IsElectronScattering(void) const
ScatteringType_t fScatteringType
scattering type (QEL, RES, DIS, ...)
bool IsAMNuGamma(void) const
bool IsWeakNC(void) const
string AsString(void) const
InteractionType_t InteractionTypeId(void) const
bool IsNuElectronElastic(void) const
bool IsDiffractive(void) const
bool operator==(const ProcessInfo &proc) const
bool IsNorm(void) const
bool IsDeepInelastic(void) const
bool IsInverseMuDecay(void) const
bool IsCoherentElastic(void) const
bool IsDarkMatterElastic(void) const
bool IsPhotonCoherent(void) const
bool IsHNLDecay(void) const
void Print(ostream &stream) const
ProcessInfo & operator=(const ProcessInfo &proc)
bool IsWeakMix(void) const
bool IsWeakCC(void) const
string ScatteringTypeAsString(void) const
void Copy(const ProcessInfo &proc)
bool IsCoherentProduction(void) const
bool Compare(const ProcessInfo &proc) const
bool IsQuasiElastic(void) const
ScatteringType_t ScatteringTypeId(void) const
bool IsDarkMatter(void) const
bool IsDarkMatterElectronElastic(void) const
bool IsIMDAnnihilation(void) const
bool IsEM(void) const
bool IsGlashowResonance(void) const
bool IsKnown(void) const
bool IsMEC(void) const
string InteractionTypeAsString(void) const
bool IsSinglePion(void) const
bool IsWeak(void) const
InteractionType_t fInteractionType
interaction type (Weak CC/NC, E/M, ...)
bool IsResonant(void) const
bool IsInverseBetaDecay(void) const
bool IsDarkMatterDeepInelastic(void) const
bool IsDarkNeutralCurrent(void) const
bool IsSingleKaon(void) const
static string AsString(ScatteringType_t type)
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
enum genie::EInteractionType InteractionType_t
enum genie::EScatteringType ScatteringType_t
@ kScPhotonResonance
@ kScCoherentProduction
@ kScIMDAnnihilation
@ kScInverseMuDecay
@ kScNuElectronElastic
@ kScDarkMatterDeepInelastic
@ kScQuasiElastic
@ kScInverseBetaDecay
@ kScDarkMatterElastic
@ kScDeepInelastic
@ kScDarkMatterElectron
@ kScCoherentElastic
@ kScSinglePion
@ kScGlashowResonance
@ kScDiffractive
@ kScSingleKaon
@ kScPhotonCoherent
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)