32 #include <TLorentzVector.h> 34 #include <TParticlePDG.h> 61 using namespace genie;
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 RgKey nuclearrecoilkey =
"SecondNucleonEmitter" ;
const KPhaseSpace & PhaseSpace(void) const
static constexpr double rad
virtual GHepParticle * Particle(int position) const
void Configure(const Registry &config)
double RemovalEnergy(void) const
THE MAIN GENIE PROJECT NAMESPACE
double E(void) const
Get energy.
virtual Interaction * Summary(void) const
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the 'Visito...
int FirstDaughter(void) const
double Threshold(void) const
Energy threshold.
bool IsNucleus(void) const
void ProcessEventRecord(GHepRecord *event_rec) const
void KickHitNucleon(GHepRecord *evrec) const
give hit nucleon a momentum
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
double Mass(Resonance_t res)
resonance mass (GeV)
void SetMomentum(const TLorentzVector &p4)
double Mass(void) const
Mass that corresponds to the PDG code.
double Pz(void) const
Get Pz.
const TVector3 & Momentum3(void) const
FermiMoverInteractionType_t GetFermiMoverInteractionType(void) const
double Px(void) const
Get Px.
const SecondNucleonEmissionI * fSecondEmitter
Summary information for an interaction.
int LastDaughter(void) const
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
virtual void Configure(const Registry &config)
const NuclearModelI * fNuclModel
nuclear model
virtual GHepParticle * TargetNucleus(void) const
enum genie::EFermiMoverInteractionType FermiMoverInteractionType_t
void SetRemovalEnergy(double Erm)
void SwitchOnFastForward(void)
TLorentzVector * HitNucP4Ptr(void) const
Interface to drive the a second nucleon emission from a nucleus Specfic impelmentations will have dif...
static PDGLibrary * Instance(void)
void SetReason(string reason)
virtual TBits * EventFlags(void) const
const TLorentzVector * X4(void) const
A registry. Provides the container for algorithm configuration parameters.
virtual GHepParticle * HitNucleon(void) const
int IonPdgCode(int A, int Z)
bool IsAboveThreshold(void) const
Checks whether the interaction is above the energy threshold.
virtual bool GenerateNucleon(const Target &) const =0
virtual void AddParticle(const GHepParticle &p)
const InitialState & InitState(void) const
TParticlePDG * Find(int pdgc, bool must_exist=true)
void AddTargetNucleusRemnant(GHepRecord *evrec) const
add a recoiled nucleus remnant
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const Target & Tgt(void) const
bool fKeepNuclOnMassShell
keep hit bound nucleon on the mass shell?
double ProbeE(RefFrame_t rf) const
GENIE's GHEP MC event record.
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
STDHEP-like event record entry that can fit a particle or a nucleus.
virtual int TargetNucleusPosition(void) const
cet::coded_exception< error, detail::translate > exception
Initial State information.
double Py(void) const
Get Py.
const Algorithm * SubAlg(const RgKey ®istry_key) const