ProcessInfo.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::ProcessInfo
5 
6 \brief A class encapsulating an enumeration of interaction types (EM,
7  Weak-CC, Weak-NC) and scattering types (Elastic, Quasi Elastic,
8  Deep Inelastic, Resonant Single Pion Production, Coherent Pion
9  Production).
10 
11 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
12  University of Liverpool & STFC Rutherford Appleton Lab
13 
14  Changes required to implement the GENIE Boosted Dark Matter module
15  were installed by Josh Berger (Univ. of Wisconsin)
16 
17 \created May 04, 2004
18 
19 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
20  For the full text of the license visit http://copyright.genie-mc.org
21  or see $GENIE/LICENSE
22 */
23 //____________________________________________________________________________
24 
25 #ifndef _PROCESS_INFO_H_
26 #define _PROCESS_INFO_H_
27 
28 #include <iostream>
29 #include <string>
30 
31 #include <TObject.h>
32 
35 
36 using std::ostream;
37 using std::string;
38 
39 namespace genie {
40 
41 class ProcessInfo;
42 ostream & operator << (ostream& stream, const ProcessInfo & proc);
43 
44 class ProcessInfo : public TObject {
45 
46 public:
47  using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
48  using TObject::Copy;
49  using TObject::Compare;
50 
51  ProcessInfo();
53  ProcessInfo(const ProcessInfo & proc);
54  ~ProcessInfo();
55 
56  // Set process information
57  void Set(ScatteringType_t sc_type, InteractionType_t int_type);
58 
59  // Query for process information
60  bool IsQuasiElastic (void) const;
61  bool IsDarkMatterElastic (void) const;
62  bool IsDeepInelastic (void) const;
63  bool IsDarkMatterDeepInelastic (void) const;
64  bool IsResonant (void) const;
65  bool IsCoherent (void) const;
66  bool IsCoherentElas (void) const;
67  bool IsSingleKaon (void) const;
68  bool IsElectronScattering (void) const;
69  bool IsNuElectronElastic (void) const;
70  bool IsInverseMuDecay (void) const;
71  bool IsIMDAnnihilation (void) const;
72  bool IsInverseBetaDecay (void) const;
73  bool IsGlashowResonance (void) const;
74  bool IsAMNuGamma (void) const;
75  bool IsMEC (void) const;
76  bool IsDiffractive (void) const;
77  bool IsEM (void) const;
78  bool IsWeak (void) const;
79  bool IsWeakCC (void) const;
80  bool IsWeakNC (void) const;
81  bool IsWeakMix (void) const;
82  bool IsDarkMatter (void) const;
83 
84  // Get scattering and interaction type enumerations
87 
88  // Get scattering and interaction types as strings
89  string ScatteringTypeAsString (void) const;
90  string InteractionTypeAsString (void) const;
91 
92  // Copy, reset, compare, print itself and build string code
93  void Reset (void);
94  void Copy (const ProcessInfo & proc);
95  bool Compare (const ProcessInfo & proc) const;
96  string AsString (void) const;
97  void Print (ostream & stream) const;
98 
99  bool operator == (const ProcessInfo & proc) const;
100  ProcessInfo & operator = (const ProcessInfo & proc);
101  friend ostream & operator << (ostream& stream, const ProcessInfo & proc);
102 
103 private:
104 
105  ScatteringType_t fScatteringType; ///< scattering type (QEL, RES, DIS, ...)
106  InteractionType_t fInteractionType; ///< interaction type (Weak CC/NC, E/M, ...)
107 
108 ClassDef(ProcessInfo,1)
109 };
110 
111 } // genie namespace
112 
113 #endif // _PROCESS_INFO_H_
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
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 Compare(const std::vector< TH1 * > &hs)
void Set(ScatteringType_t sc_type, InteractionType_t int_type)
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
friend ostream & operator<<(ostream &stream, const ProcessInfo &proc)
bool IsMEC(void) const
bool IsEM(void) const
void Print(std::string prefix, std::string name, std::string suffix="")
Definition: nue_pid_effs.C:68
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
enum BeamMode string