32#include <TLorentzVector.h>
34#include <TParticlePDG.h>
103 InitialState * init_state = interaction -> InitStatePtr();
104 Target * tgt = init_state -> TgtPtr();
113 if(p4->Px()>0 || p4->Py()>0 || p4->Pz()>0)
return;
123 double rad = nucleon->
X4()->Vect().Mag();
130 <<
"Generated nucleon momentum: ("
131 << p3.Px() <<
", " << p3.Py() <<
", " << p3.Pz() <<
"), "
132 <<
"|p| = " << p3.Mag();
134 <<
"Generated nucleon removal energy: w = " << w;
136 double pF2 = p3.Mag2();
149 EN = nucleon->
Mass() - w - pF2 / (2 * (nucleus->
Mass() - nucleon->
Mass()));
157 EN = deuteron->Mass() - 2 * w - TMath::Sqrt(pF2 + other_nucleon->Mass() * other_nucleon->Mass());
163 int nucleon_pdgc = nucleon->
Pdg();
165 int Z = (is_p) ? nucleus->
Z()-1 : nucleus->
Z();
166 int A = nucleus->
A() - 1;
168 TParticlePDG * fnucleus = 0;
173 <<
"No particle with [A = " << A <<
", Z = " << Z
174 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
179 double Mf = fnucleus -> Mass();
180 double Mi = nucleus -> Mass();
182 EN = Mi - TMath::Sqrt(pF2 + Mf*Mf);
184 double MN = nucleon->
Mass();
185 double MN2 = TMath::Power(MN,2);
186 EN = TMath::Sqrt(MN2+pF2);
193 p4->SetPx( p3.Px() );
194 p4->SetPy( p3.Py() );
195 p4->SetPz( p3.Pz() );
207 <<
"Event below threshold after generating Fermi momentum";
212 <<
"Ev (@ nucleon rest frame) = " << Ev <<
", Ethr = " << Ethr;
216 exception.
SetReason(
"E < Ethr after generating nucleon Fermi momentum");
228 LOG(
"FermiMover",
pINFO) <<
"Adding final state nucleus";
236 int A = nucleus->
A();
237 int Z = nucleus->
Z();
242 for(
int id = fd;
id <= ld;
id++) {
247 int pdgc = particle->
Pdg();
252 if (is_p || is_n) A--;
254 Px += particle->
Px();
255 Py += particle->
Py();
256 Pz += particle->
Pz();
261 TParticlePDG * remn = 0;
266 <<
"No particle with [A = " << A <<
", Z = " << Z
267 <<
", pdgc = " << ipdgc <<
"] in PDGLibrary!";
271 double Mi = nucleus->
Mass();
279 <<
"Adding nucleus [A = " << A <<
", Z = " << Z
280 <<
", pdgc = " << ipdgc <<
"]";
284 ipdgc,
kIStStableFinalState, imom,-1,-1,-1, Px,Py,Pz,E, 0,0,0,0);
301 RgKey nuclkey =
"NuclearModel";
308 bool mom_dep_energy_removal_def =
false;
309 this->
GetParamDef(
"LFG-MomentumDependentErmv", mom_dep_energy_removal_def,
false ) ;
315 RgKey nuclearrecoilkey =
"SecondNucleonEmitter" ;
#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.
virtual void Configure(const Registry &config)
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const Algorithm * SubAlg(const RgKey ®istry_key) const
void ProcessEventRecord(GHepRecord *event_rec) const
const NuclearModelI * fNuclModel
nuclear model
void Configure(const Registry &config)
void KickHitNucleon(GHepRecord *evrec) const
give hit nucleon a momentum
bool fKeepNuclOnMassShell
keep hit bound nucleon on the mass shell?
bool fMomDepErmv
use momentum dependent calculation of Ermv
const SecondNucleonEmissionI * fSecondEmitter
void AddTargetNucleusRemnant(GHepRecord *evrec) const
add a recoiled nucleus remnant
STDHEP-like event record entry that can fit a particle or a nucleus.
void SetMomentum(const TLorentzVector &p4)
void SetRemovalEnergy(double Erm)
double Mass(void) const
Mass that corresponds to the PDG code.
const TLorentzVector * X4(void) const
int LastDaughter(void) const
double Px(void) const
Get Px.
double E(void) const
Get energy.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
int FirstDaughter(void) const
GENIE's GHEP MC event record.
virtual GHepParticle * TargetNucleus(void) const
virtual Interaction * Summary(void) const
virtual TBits * EventFlags(void) const
virtual void AddParticle(const GHepParticle &p)
virtual int TargetNucleusPosition(void) const
virtual GHepParticle * Particle(int position) const
virtual GHepParticle * HitNucleon(void) const
Initial State information.
const Target & Tgt(void) const
double ProbeE(RefFrame_t rf) const
Summary information for an interaction.
const KPhaseSpace & PhaseSpace(void) const
const InitialState & InitState(void) const
double Threshold(void) const
Energy threshold.
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
A registry. Provides the container for algorithm configuration parameters.
Interface to drive the a second nucleon emission from a nucleus Specfic impelmentations will have dif...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
TLorentzVector * HitNucP4Ptr(void) const
bool IsNucleus(void) const
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
void SwitchOnFastForward(void)
void SetReason(string reason)
int IonPdgCode(int A, int Z)
THE MAIN GENIE PROJECT NAMESPACE
enum genie::EFermiMoverInteractionType FermiMoverInteractionType_t
@ kFermiMoveEffectiveSF2p2h_noeject
@ kFermiMoveEffectiveSF2p2h_eject
@ kFermiMoveEffectiveSF1p1h