19 #include <TRootIOCtor.h>
28 using namespace genie;
29 using namespace genie::constants;
32 using std::ostringstream;
40 interaction.
Print(stream);
64 this->
Copy(interaction);
142 LOG(
"Interaction",
pDEBUG) <<
"Probe PDG code: " << pdgc;
166 <<
"Could not figure out the final state primary lepton pdg code!!";
193 assert(struck_is_nuc && (is_weak || is_em || is_dm));
197 recoil_nuc = struck_nuc;
205 assert(struck_is_2nuc_cluster && (is_weak || is_em));
210 int dQ = (isnu) ? +1 : -1;
214 recoil_nuc = struck_nuc;
218 LOG(
"Interaction",
pDEBUG) <<
"Recoil nucleon PDG = " << recoil_nuc;
255 ostringstream interaction;
259 interaction <<
"dm;";
262 interaction <<
"dmb;";
267 interaction <<
"tgt:" << tgt.
Pdg() <<
";";
270 interaction <<
"N:" << tgt.
HitNucPdg() <<
";";
274 << (tgt.
HitSeaQrk() ?
"(s)" :
"(v)") <<
";";
282 if(xcls.size()>0) interaction <<
";";
284 return interaction.str();
289 const string line(110,
'-');
292 stream << line << endl;
294 stream <<
"GENIE Interaction Summary" << endl;
295 stream << line << endl;
302 stream << line << endl;
307 this->
Copy(interaction);
338 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
double E)
343 tgt -> SetHitQrkPdg (hitqrk);
344 tgt -> SetHitSeaQrk (fromsea);
350 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int fqrk,
int probe,
double E)
355 tgt -> SetHitQrkPdg (hitqrk);
356 tgt -> SetHitSeaQrk (fromsea);
365 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
378 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
379 const TLorentzVector & p4probe)
384 tgt -> SetHitQrkPdg (hitqrk);
385 tgt -> SetHitSeaQrk (fromsea);
403 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
double E)
408 tgt -> SetHitQrkPdg (hitqrk);
409 tgt -> SetHitSeaQrk (fromsea);
415 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int fqrk,
int probe,
double E)
420 tgt -> SetHitQrkPdg (hitqrk);
421 tgt -> SetHitSeaQrk (fromsea);
430 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
443 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
444 const TLorentzVector & p4probe)
449 tgt -> SetHitQrkPdg (hitqrk);
450 tgt -> SetHitSeaQrk (fromsea);
468 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
double E)
473 tgt -> SetHitQrkPdg (hitqrk);
474 tgt -> SetHitSeaQrk (fromsea);
480 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
493 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
494 const TLorentzVector & p4probe)
499 tgt -> SetHitQrkPdg (hitqrk);
500 tgt -> SetHitSeaQrk (fromsea);
518 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
543 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
568 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
593 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
618 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
643 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
668 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
693 int tgt,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
723 int tgt,
int probe,
unsigned int prod_pdg,
const TLorentzVector & p4probe)
746 if (
pdg::IsPion( prod_pdg ) ) xcl -> SetNPions( 0,1,0 ) ;
747 else if ( prod_pdg ==
kPdgGamma ) xcl -> SetNSingleGammas(1) ;
756 int tgt,
int probe,
unsigned int prod_pdg,
const TLorentzVector & p4probe)
762 if (
pdg::IsPion( prod_pdg ) ) xcl -> SetNPions( 0,1,0 ) ;
763 else if ( prod_pdg ==
kPdgGamma ) xcl -> SetNSingleGammas(1) ;
783 int tgt,
int probe,
const TLorentzVector & p4probe)
829 int tgt,
int nuc,
int probe,
const TLorentzVector & p4probe)
854 int tgt,
int ncluster,
int probe,
const TLorentzVector & p4probe)
878 int tgt,
int probe,
const TLorentzVector & p4probe)
903 int tgt,
int ncluster,
int probe,
const TLorentzVector & p4probe)
940 int tgt,
int ncluster,
int probe,
const TLorentzVector & p4probe)
1008 int tgt,
int probe,
const TLorentzVector & p4probe)
1033 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
1059 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
double E)
1064 tgt -> SetHitQrkPdg (hitqrk);
1065 tgt -> SetHitSeaQrk (fromsea);
1071 int target,
int hitnuc,
int probe,
const TLorentzVector & p4probe)
1084 int target,
int hitnuc,
int hitqrk,
bool fromsea,
int probe,
1085 const TLorentzVector & p4probe)
1090 tgt -> SetHitQrkPdg (hitqrk);
1091 tgt -> SetHitSeaQrk (fromsea);
bool IsPhotonResonance(void) const
static Interaction * IMD(int tgt, double E=0)
bool IsWeakMix(void) const
bool HitSeaQrk(void) const
bool IsWeakCC(void) const
int FinalLeptonPdg(void) const
bool IsNeutrino(int pdgc)
void SetProbeP4(const TLorentzVector &P4)
static Interaction * DME(int tgt, int nuc, int probe, double E=0)
string ScatteringTypeAsString(void) const
static Interaction * GLR(int tgt, double E=0)
int HitNucPdg(void) const
TParticlePDG * RecoilNucleon(void) const
recoil nucleon
bool IsDarkNeutralCurrent(void) const
int RecoilNucleonPdg(void) const
recoil nucleon pdg
int HitQrkPdg(void) const
InitialState * fInitialState
Initial State info.
bool IsQuasiElastic(void) const
static Interaction * CEvNS(int tgt, int probe, double E=0)
Generated/set kinematical variables for an event.
int SwitchProtonNeutron(int pdgc)
void Copy(const XclsTag &xcls)
copy input XclsTag object
bool IsInverseBetaDecay(void) const
TParticlePDG * Probe(void) const
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)
bool IsIMDAnnihilation(void) const
void SetKine(const Kinematics &kine)
XclsTag * fExclusiveTag
Additional info for exclusive channels.
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
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.
int FSPrimLeptonPdg(void) const
final state primary lepton pdg
int ModifyNucleonCluster(int pdgc, int dQ)
Summary information for an interaction.
static Interaction * DMDI(int tgt, int nuc, int probe, double E=0)
static Interaction * RESEM(int tgt, int nuc, int probe, double E=0)
bool IsWeakNC(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool IsNuElectronElastic(void) const
void Copy(const InitialState &init_state)
const int kPdgAntiDarkMatter
string AsString(void) const
pack into a string code
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...
void Copy(const Kinematics &kine)
bool IsAntiNeutrino(int pdgc)
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
string InteractionTypeAsString(void) const
bool IsDarkMatterElastic(void) const
void Copy(const Interaction &i)
void SetDecayMode(int decay_mode)
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
XclsTag * ExclTagPtr(void) const
bool Is2NucleonCluster(int pdgc)
void SetExclTag(const XclsTag &xcls)
Kinematics * fKinematics
kinematical variables
static PDGLibrary * Instance(void)
static Interaction * ASK(int tgt, int probe, double E=0)
bool HitNucIsSet(void) const
bool HitQrkIsSet(void) const
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)
bool IsDarkMatter(void) const
void SetHitNucPdg(int pdgc)
const XclsTag & ExclTag(void) const
static Interaction * DISCC(int tgt, int nuc, int probe, double E=0)
Target * TgtPtr(void) const
static Interaction * DFRCC(int tgt, int nuc, int probe, double E=0)
int Neutrino2ChargedLepton(int pdgc)
InitialState * InitStatePtr(void) const
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
Interaction & operator=(const Interaction &i)
copy
TParticlePDG * Find(int pdgc, bool must_exist=true)
ProcessInfo * fProcInfo
Process info (scattering, weak current,...)
const Target & Tgt(void) const
static Interaction * RESCC(int tgt, int nuc, int probe, double E=0)
bool IsGlashowResonance(void) const
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)
void SetFinalQuark(int finalquark_pdgc=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)
const int kPdgDarkNeutrino
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
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)
void Copy(const ProcessInfo &proc)
KPhaseSpace * fKinePhSp
Kinematic phase space.
static Interaction * NOsc(int tgt, int annihilation_mode=-1)
static Interaction * DISNC(int tgt, int nuc, int probe, double E=0)
Initial State information.
static Interaction * HNL(int probe, double E=0, int decayed_mode=-1)