Interaction.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::Interaction
5 
6 \brief Summary information for an interaction.
7 
8  It is a container of an InitialState, a ProcessInfo, an XclsTag
9  and a Kinematics object.
10 
11 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
12  University of Liverpool & STFC Rutherford Appleton Laboratory
13 
14  Changes required to implement the GENIE Boosted Dark Matter module
15  were installed by Josh Berger (Univ. of Wisconsin)
16 
17 \created April 25, 2004
18 
19 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
20  For the full text of the license visit http://copyright.genie-mc.org
21 */
22 //____________________________________________________________________________
23 
24 #ifndef _INTERACTION_H_
25 #define _INTERACTION_H_
26 
27 #include <ostream>
28 #include <string>
29 
30 #include <TObject.h>
31 
38 
39 using std::ostream;
40 using std::string;
41 using std::pair;
42 
43 class TRootIOCtor;
44 
45 namespace genie {
46 
47 const UInt_t kISkipProcessChk = 1<<17; ///< if set, skip process validity checks
48 const UInt_t kISkipKinematicChk = 1<<16; ///< if set, skip kinematic validity checks
49 const UInt_t kIAssumeFreeNucleon = 1<<15; ///<
50 const UInt_t kIAssumeFreeElectron = 1<<15; ///<
51 const UInt_t kINoNuclearCorrection = 1<<14; ///< if set, inhibit nuclear corrections
52 
53 class Interaction;
54 ostream & operator << (ostream & stream, const Interaction & i);
55 
56 class Interaction : public TObject {
57 
58 public:
59  using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
60  using TObject::Copy; //
61 
62  Interaction();
63  Interaction(const InitialState & init, const ProcessInfo & proc);
64  Interaction(const Interaction & i);
65  Interaction(TRootIOCtor*);
66  ~Interaction();
67 
68  // Methods accessing aggregate/owned objects holding interaction information
69  const InitialState & InitState (void) const { return *fInitialState; }
70  const ProcessInfo & ProcInfo (void) const { return *fProcInfo; }
71  const Kinematics & Kine (void) const { return *fKinematics; }
72  const XclsTag & ExclTag (void) const { return *fExclusiveTag; }
73  const KPhaseSpace & PhaseSpace (void) const { return *fKinePhSp; }
74  InitialState * InitStatePtr (void) const { return fInitialState; }
75  ProcessInfo * ProcInfoPtr (void) const { return fProcInfo; }
76  Kinematics * KinePtr (void) const { return fKinematics; }
77  XclsTag * ExclTagPtr (void) const { return fExclusiveTag; }
78  KPhaseSpace * PhaseSpacePtr (void) const { return fKinePhSp; }
79 
80  // Methods to set interaction's properties
81  void SetInitState (const InitialState & init);
82  void SetProcInfo (const ProcessInfo & proc);
83  void SetKine (const Kinematics & kine);
84  void SetExclTag (const XclsTag & xcls);
85 
86  // Get the final state primary lepton and recoil nucleon (if) uniquely
87  // determined for the specified interaction
88  int FSPrimLeptonPdg (void) const; ///< final state primary lepton pdg
89  int RecoilNucleonPdg (void) const; ///< recoil nucleon pdg
90  TParticlePDG * FSPrimLepton (void) const; ///< final state primary lepton
91  TParticlePDG * RecoilNucleon (void) const; ///< recoil nucleon
92 
93  // Copy, reset, print itself and build string code
94  void Reset (void);
95  void Copy (const Interaction & i);
96  string AsString (void) const;
97  void Print (ostream & stream) const;
98 
99  // Overloaded operators
100  Interaction & operator = (const Interaction & i); ///< copy
101  friend ostream & operator << (ostream & stream, const Interaction & i); ///< print
102 
103  // Use the "Named Constructor" C++ idiom for fast creation of typical interactions
104  static Interaction * DISCC (int tgt, int nuc, int probe, double E=0);
105  static Interaction * DISCC (int tgt, int nuc, int qrk, bool sea, int probe, double E=0);
106  static Interaction * DISCC (int tgt, int nuc, int qrk, bool sea, int fqrk, int probe, double E=0);
107  static Interaction * DISCC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
108  static Interaction * DISCC (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
109  static Interaction * DISNC (int tgt, int nuc, int probe, double E=0);
110  static Interaction * DISNC (int tgt, int nuc, int qrk, bool sea, int probe, double E=0);
111  static Interaction * DISNC (int tgt, int nuc, int qrk, bool sea, int fqrk, int probe, double E=0);
112  static Interaction * DISNC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
113  static Interaction * DISNC (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
114  static Interaction * DISEM (int tgt, int nuc, int probe, double E=0);
115  static Interaction * DISEM (int tgt, int nuc, int qrk, bool sea, int probe, double E=0);
116  static Interaction * DISEM (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
117  static Interaction * DISEM (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
118  static Interaction * QELCC (int tgt, int nuc, int probe, double E=0);
119  static Interaction * QELCC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
120  static Interaction * QELNC (int tgt, int nuc, int probe, double E=0);
121  static Interaction * QELNC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
122  static Interaction * QELEM (int tgt, int nuc, int probe, double E=0);
123  static Interaction * QELEM (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
124  static Interaction * IBD (int tgt, int nuc, int probe, double E=0);
125  static Interaction * IBD (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
126  static Interaction * RESCC (int tgt, int nuc, int probe, double E=0);
127  static Interaction * RESCC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
128  static Interaction * RESNC (int tgt, int nuc, int probe, double E=0);
129  static Interaction * RESNC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
130  static Interaction * RESEM (int tgt, int nuc, int probe, double E=0);
131  static Interaction * RESEM (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
132  static Interaction * DFRCC (int tgt, int nuc, int probe, double E=0);
133  static Interaction * DFRCC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
134  static Interaction * COHCC (int tgt, int probe, unsigned int prod_pdg, double E=0);
135  static Interaction * COHCC (int tgt, int probe, unsigned int prod_pdg,
136  const TLorentzVector & p4probe);
137  static Interaction * COHNC (int tgt, int probe, unsigned int prod_pdg, double E=0);
138  static Interaction * COHNC (int tgt, int probe, unsigned int prod_pdg,
139  const TLorentzVector & p4probe);
140  static Interaction * CEvNS (int tgt, int probe, double E=0);
141  static Interaction * CEvNS (int tgt, int probe, const TLorentzVector & p4probe);
142  static Interaction * IMD (int tgt, double E=0);
143  static Interaction * IMD (int tgt, const TLorentzVector & p4probe);
144  static Interaction * AMNuGamma (int tgt, int nuc, int probe, double E=0);
145  static Interaction * AMNuGamma (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
146  static Interaction * MECCC (int tgt, int nuccluster, int probe, double E=0);
147  static Interaction * MECCC (int tgt, int nuccluster, int probe, const TLorentzVector & p4probe);
148  static Interaction * MECCC (int tgt, int probe, double E=0);
149  static Interaction * MECCC (int tgt, int probe, const TLorentzVector & p4probe);
150  static Interaction * MECNC (int tgt, int nuccluster, int probe, double E=0);
151  static Interaction * MECNC (int tgt, int nuccluster, int probe, const TLorentzVector & p4probe);
152  static Interaction * MECEM (int tgt, int nuccluster, int probe, double E=0);
153  static Interaction * MECEM (int tgt, int probe, double E=0);
154  static Interaction * MECEM (int tgt, int nuccluster, int probe, const TLorentzVector & p4probe);
155  static Interaction * GLR (int tgt, double E=0);
156  static Interaction * GLR (int tgt, const TLorentzVector & p4probe);
157  static Interaction * NDecay (int tgt, int decay_mode=-1, int decayed_nucleon = 0);
158  static Interaction * NOsc (int tgt, int annihilation_mode=-1);
159  static Interaction * NHL (double E=0, int decayed_mode=-1);
160  static Interaction * ASK (int tgt, int probe, double E=0);
161  static Interaction * ASK (int tgt, int probe, const TLorentzVector & p4probe);
162  static Interaction * DME (int tgt, int nuc, int probe, double E=0);
163  static Interaction * DME (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
164  static Interaction * DMDI (int tgt, int nuc, int probe, double E=0);
165  static Interaction * DMDI (int tgt, int nuc, int qrk, bool sea, int probe, double E=0);
166  static Interaction * DMDI (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
167  static Interaction * DMDI (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
168 
169 private:
170 
171  // Methods for Interaction initialization and clean up
172  void Init (void);
173  void CleanUp (void);
174 
175  // Utility method for "named ctor"
176  static Interaction * Create(int tgt, int probe, ScatteringType_t st, InteractionType_t it);
177 
178  // Private data members
179  InitialState * fInitialState; ///< Initial State info
180  ProcessInfo * fProcInfo; ///< Process info (scattering, weak current,...)
181  Kinematics * fKinematics; ///< kinematical variables
182  XclsTag * fExclusiveTag; ///< Additional info for exclusive channels
183  KPhaseSpace * fKinePhSp; ///< Kinematic phase space
184 
186 };
187 
188 } // genie namespace
189 
190 #endif // _INTERACTION_H_
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
static Interaction * IMD(int tgt, double E=0)
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
static Interaction * DME(int tgt, int nuc, int probe, double E=0)
ProcessInfo * ProcInfoPtr(void) const
Definition: Interaction.h:75
static Interaction * GLR(int tgt, double E=0)
Kinematics * KinePtr(void) const
Definition: Interaction.h:76
TParticlePDG * RecoilNucleon(void) const
recoil nucleon
std::string string
Definition: nybbler.cc:12
int RecoilNucleonPdg(void) const
recoil nucleon pdg
InitialState * fInitialState
Initial State info.
Definition: Interaction.h:179
static Interaction * CEvNS(int tgt, int probe, double E=0)
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
static Interaction * IBD(int tgt, int nuc, int probe, double E=0)
static Interaction * NDecay(int tgt, int decay_mode=-1, int decayed_nucleon=0)
void SetKine(const Kinematics &kine)
init
Definition: train.py:42
XclsTag * fExclusiveTag
Additional info for exclusive channels.
Definition: Interaction.h:182
static Interaction * QELCC(int tgt, int nuc, int probe, double E=0)
static Interaction * MECNC(int tgt, int nuccluster, int probe, double E=0)
string AsString(void) const
friend ostream & operator<<(ostream &stream, const Interaction &i)
print
static Interaction * RESNC(int tgt, int nuc, int probe, double E=0)
static Interaction * COHCC(int tgt, int probe, unsigned int prod_pdg, double E=0)
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:39
int FSPrimLeptonPdg(void) const
final state primary lepton pdg
KPhaseSpace * PhaseSpacePtr(void) const
Definition: Interaction.h:78
Summary information for an interaction.
Definition: Interaction.h:56
static Interaction * DMDI(int tgt, int nuc, int probe, double E=0)
static Interaction * RESEM(int tgt, int nuc, int probe, double E=0)
const UInt_t kINoNuclearCorrection
if set, inhibit nuclear corrections
Definition: Interaction.h:51
static Interaction * MECEM(int tgt, int nuccluster, int probe, double E=0)
static Interaction * QELNC(int tgt, int nuc, int probe, double E=0)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
const Kinematics & Kine(void) const
Definition: Interaction.h:71
Kinematical phase space.
Definition: KPhaseSpace.h:33
void CleanUp(void)
Definition: Interaction.cxx:98
void Copy(const Interaction &i)
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
XclsTag * ExclTagPtr(void) const
Definition: Interaction.h:77
void SetExclTag(const XclsTag &xcls)
Kinematics * fKinematics
kinematical variables
Definition: Interaction.h:181
static Interaction * ASK(int tgt, int probe, double E=0)
void Print(ostream &stream) const
static Interaction * QELEM(int tgt, int nuc, int probe, double E=0)
enum genie::EScatteringType ScatteringType_t
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
const UInt_t kIAssumeFreeNucleon
Definition: Interaction.h:49
const XclsTag & ExclTag(void) const
Definition: Interaction.h:72
static Interaction * DISCC(int tgt, int nuc, int probe, double E=0)
static Interaction * DFRCC(int tgt, int nuc, int probe, double E=0)
InitialState * InitStatePtr(void) const
Definition: Interaction.h:74
const InitialState & InitState(void) const
Definition: Interaction.h:69
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
Interaction & operator=(const Interaction &i)
copy
ProcessInfo * fProcInfo
Process info (scattering, weak current,...)
Definition: Interaction.h:180
static Interaction * NHL(double E=0, int decayed_mode=-1)
static Interaction * RESCC(int tgt, int nuc, int probe, double E=0)
static Interaction * MECCC(int tgt, int nuccluster, int probe, double E=0)
static Interaction * COHNC(int tgt, int probe, unsigned int prod_pdg, double E=0)
static Interaction * DISEM(int tgt, int nuc, int probe, double E=0)
static Interaction * Create(int tgt, int probe, ScatteringType_t st, InteractionType_t it)
enum genie::EInteractionType InteractionType_t
void SetInitState(const InitialState &init)
static Interaction * AMNuGamma(int tgt, int nuc, int probe, double E=0)
void SetProcInfo(const ProcessInfo &proc)
KPhaseSpace * fKinePhSp
Kinematic phase space.
Definition: Interaction.h:183
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition: Interaction.h:47
static Interaction * NOsc(int tgt, int annihilation_mode=-1)
static Interaction * DISNC(int tgt, int nuc, int probe, double E=0)
Initial State information.
Definition: InitialState.h:48
const UInt_t kIAssumeFreeElectron
Definition: Interaction.h:50