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 <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 April 25, 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 _INTERACTION_H_
26 #define _INTERACTION_H_
27 
28 #include <ostream>
29 #include <string>
30 
31 #include <TObject.h>
32 
39 
40 using std::ostream;
41 using std::string;
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 probe, const TLorentzVector & p4probe);
107  static Interaction * DISCC (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
108  static Interaction * DISNC (int tgt, int nuc, int probe, double E=0);
109  static Interaction * DISNC (int tgt, int nuc, int qrk, bool sea, int probe, double E=0);
110  static Interaction * DISNC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
111  static Interaction * DISNC (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
112  static Interaction * DISEM (int tgt, int nuc, int probe, double E=0);
113  static Interaction * DISEM (int tgt, int nuc, int qrk, bool sea, int probe, double E=0);
114  static Interaction * DISEM (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
115  static Interaction * DISEM (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
116  static Interaction * QELCC (int tgt, int nuc, int probe, double E=0);
117  static Interaction * QELCC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
118  static Interaction * QELNC (int tgt, int nuc, int probe, double E=0);
119  static Interaction * QELNC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
120  static Interaction * QELEM (int tgt, int nuc, int probe, double E=0);
121  static Interaction * QELEM (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
122  static Interaction * IBD (int tgt, int nuc, int probe, double E=0);
123  static Interaction * IBD (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
124  static Interaction * RESCC (int tgt, int nuc, int probe, double E=0);
125  static Interaction * RESCC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
126  static Interaction * RESNC (int tgt, int nuc, int probe, double E=0);
127  static Interaction * RESNC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
128  static Interaction * RESEM (int tgt, int nuc, int probe, double E=0);
129  static Interaction * RESEM (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
130  static Interaction * DFRCC (int tgt, int nuc, int probe, double E=0);
131  static Interaction * DFRCC (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
132  static Interaction * COHCC (int tgt, int probe, double E=0);
133  static Interaction * COHCC (int tgt, int probe, const TLorentzVector & p4probe);
134  static Interaction * COHNC (int tgt, int probe, double E=0);
135  static Interaction * COHNC (int tgt, int probe, const TLorentzVector & p4probe);
136  static Interaction * COHEl (int tgt, int probe, double E=0);
137  static Interaction * COHEl (int tgt, int probe, const TLorentzVector & p4probe);
138  static Interaction * IMD (int tgt, double E=0);
139  static Interaction * IMD (int tgt, const TLorentzVector & p4probe);
140  static Interaction * AMNuGamma (int tgt, int nuc, int probe, double E=0);
141  static Interaction * AMNuGamma (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
142  static Interaction * MECCC (int tgt, int nuccluster, int probe, double E=0);
143  static Interaction * MECCC (int tgt, int nuccluster, int probe, const TLorentzVector & p4probe);
144  static Interaction * MECCC (int tgt, int probe, double E=0);
145  static Interaction * MECCC (int tgt, int probe, const TLorentzVector & p4probe);
146  static Interaction * MECNC (int tgt, int nuccluster, int probe, double E=0);
147  static Interaction * MECNC (int tgt, int nuccluster, int probe, const TLorentzVector & p4probe);
148  static Interaction * MECEM (int tgt, int nuccluster, int probe, double E=0);
149  static Interaction * MECEM (int tgt, int nuccluster, int probe, const TLorentzVector & p4probe);
150  static Interaction * GLR (int tgt, double E=0);
151  static Interaction * GLR (int tgt, const TLorentzVector & p4probe);
152  static Interaction * NDecay (int tgt, int decay_mode=-1, int decayed_nucleon = 0);
153  static Interaction * NOsc (int tgt, int annihilation_mode=-1);
154  static Interaction * ASK (int tgt, int probe, double E=0);
155  static Interaction * ASK (int tgt, int probe, const TLorentzVector & p4probe);
156  static Interaction * DME (int tgt, int nuc, int probe, double E=0);
157  static Interaction * DME (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
158  static Interaction * DMDI (int tgt, int nuc, int probe, double E=0);
159  static Interaction * DMDI (int tgt, int nuc, int qrk, bool sea, int probe, double E=0);
160  static Interaction * DMDI (int tgt, int nuc, int probe, const TLorentzVector & p4probe);
161  static Interaction * DMDI (int tgt, int nuc, int qrk, bool sea, int probe, const TLorentzVector & p4probe);
162 
163 private:
164 
165  // Methods for Interaction initialization and clean up
166  void Init (void);
167  void CleanUp (void);
168 
169  // Utility method for "named ctor"
170  static Interaction * Create(int tgt, int probe, ScatteringType_t st, InteractionType_t it);
171 
172  // Private data members
173  InitialState * fInitialState; ///< Initial State info
174  ProcessInfo * fProcInfo; ///< Process info (scattering, weak current,...)
175  Kinematics * fKinematics; ///< kinematical variables
176  XclsTag * fExclusiveTag; ///< Additional info for exclusive channels
177  KPhaseSpace * fKinePhSp; ///< Kinematic phase space
178 
179 ClassDef(Interaction,2)
180 };
181 
182 } // genie namespace
183 
184 #endif // _INTERACTION_H_
static Interaction * COHNC(int tgt, int probe, double E=0)
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
static Interaction * IMD(int tgt, double E=0)
set< int >::iterator it
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
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
int RecoilNucleonPdg(void) const
recoil nucleon pdg
InitialState * fInitialState
Initial State info.
Definition: Interaction.h:173
Generated/set kinematical variables for an event.
Definition: Kinematics.h:40
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)
XclsTag * fExclusiveTag
Additional info for exclusive channels.
Definition: Interaction.h:176
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, double E=0)
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:37
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
Float_t E
Definition: plot.C:20
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:44
const Kinematics & Kine(void) const
Definition: Interaction.h:71
Kinematical phase space.
Definition: KPhaseSpace.h:34
void CleanUp(void)
Definition: Interaction.cxx:96
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
void Print(std::string prefix, std::string name, std::string suffix="")
Definition: nue_pid_effs.C:68
XclsTag * ExclTagPtr(void) const
Definition: Interaction.h:77
void SetExclTag(const XclsTag &xcls)
Kinematics * fKinematics
kinematical variables
Definition: Interaction.h:175
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:174
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 * COHEl(int tgt, int probe, 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:177
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:49
const UInt_t kIAssumeFreeElectron
Definition: Interaction.h:50
enum BeamMode string