19#include <TRootIOCtor.h>
32using 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)") <<
";";
277 interaction <<
"proc:" <<
fProcInfo->InteractionTypeAsString()
278 <<
"," <<
fProcInfo->ScatteringTypeAsString() <<
";";
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);
ClassImp(Interaction) namespace genie
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
Initial State information.
void SetProbeP4(const TLorentzVector &P4)
Target * TgtPtr(void) const
Summary information for an interaction.
string AsString(void) const
void Copy(const Interaction &i)
TParticlePDG * RecoilNucleon(void) const
recoil nucleon
const XclsTag & ExclTag(void) const
static Interaction * MECCC(int tgt, int nuccluster, int probe, double E=0)
static Interaction * MECNC(int tgt, int nuccluster, int probe, double E=0)
static Interaction * DISEM(int tgt, int nuc, int probe, double E=0)
static Interaction * DMDI(int tgt, int nuc, int probe, double E=0)
void SetInitState(const InitialState &init)
ProcessInfo * fProcInfo
Process info (scattering, weak current,...)
InitialState * InitStatePtr(void) const
static Interaction * DISNC(int tgt, int nuc, int probe, double E=0)
static Interaction * ASK(int tgt, int probe, double E=0)
static Interaction * Create(int tgt, int probe, ScatteringType_t st, InteractionType_t it)
static Interaction * DME(int tgt, int nuc, int probe, double E=0)
void SetProcInfo(const ProcessInfo &proc)
static Interaction * NOsc(int tgt, int annihilation_mode=-1)
int RecoilNucleonPdg(void) const
recoil nucleon pdg
int FSPrimLeptonPdg(void) const
final state primary lepton pdg
static Interaction * RESCC(int tgt, int nuc, int probe, double E=0)
XclsTag * fExclusiveTag
Additional info for exclusive channels.
static Interaction * MECEM(int tgt, int nuccluster, int probe, double E=0)
static Interaction * CEvNS(int tgt, int probe, double E=0)
void SetKine(const Kinematics &kine)
static Interaction * QELCC(int tgt, int nuc, int probe, double E=0)
Interaction & operator=(const Interaction &i)
copy
XclsTag * ExclTagPtr(void) const
Kinematics * fKinematics
kinematical variables
KPhaseSpace * fKinePhSp
Kinematic phase space.
static Interaction * QELEM(int tgt, int nuc, int probe, double E=0)
static Interaction * RESNC(int tgt, int nuc, int probe, double E=0)
static Interaction * DISCC(int tgt, int nuc, int probe, double E=0)
static Interaction * COHNC(int tgt, int probe, unsigned int prod_pdg, double E=0)
static Interaction * IMD(int tgt, double E=0)
static Interaction * NDecay(int tgt, int decay_mode=-1, int decayed_nucleon=0)
const ProcessInfo & ProcInfo(void) const
static Interaction * DFRCC(int tgt, int nuc, int probe, double E=0)
static Interaction * QELNC(int tgt, int nuc, int probe, double E=0)
static Interaction * IBD(int tgt, int nuc, int probe, double E=0)
static Interaction * AMNuGamma(int tgt, int nuc, int probe, double E=0)
static Interaction * RESEM(int tgt, int nuc, int probe, double E=0)
static Interaction * HNL(int probe, double E=0, int decayed_mode=-1)
InitialState * fInitialState
Initial State info.
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
void SetExclTag(const XclsTag &xcls)
void Print(ostream &stream) const
const InitialState & InitState(void) const
static Interaction * GLR(int tgt, double E=0)
static Interaction * COHCC(int tgt, int probe, unsigned int prod_pdg, double E=0)
Generated/set kinematical variables for an event.
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
bool IsPhotonResonance(void) const
bool IsWeakNC(void) const
bool IsNuElectronElastic(void) const
bool IsWeakMix(void) const
bool IsWeakCC(void) const
bool IsDarkMatter(void) const
bool IsIMDAnnihilation(void) const
bool IsGlashowResonance(void) const
bool IsDarkNeutralCurrent(void) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
int HitNucPdg(void) const
void SetHitNucPdg(int pdgc)
int HitQrkPdg(void) const
bool HitSeaQrk(void) const
bool HitQrkIsSet(void) const
bool HitNucIsSet(void) const
Contains minimal information for tagging exclusive processes.
void SetFinalQuark(int finalquark_pdgc=0)
void SetDecayMode(int decay_mode)
int FinalLeptonPdg(void) const
bool Is2NucleonCluster(int pdgc)
bool IsNeutrino(int pdgc)
int SwitchProtonNeutron(int pdgc)
int Neutrino2ChargedLepton(int pdgc)
bool IsAntiNeutrino(int pdgc)
int ModifyNucleonCluster(int pdgc, int dQ)
THE MAIN GENIE PROJECT NAMESPACE
const int kPdgDarkNeutrino
enum genie::EInteractionType InteractionType_t
enum genie::EScatteringType ScatteringType_t
@ kScDarkMatterDeepInelastic
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
const int kPdgAntiDarkMatter