19 #include <TLorentzVector.h>
33 using namespace genie;
59 <<
"No nuclear target. Skipping....";
72 TObjArrayIter piter(event);
86 if (!in_nucleus)
return;
89 <<
" >> Stepping a " << p->
Name()
90 <<
" with kinetic E = " << p->
KinE() <<
" GeV";
99 bool has_interacted =
false;
100 bool has_decayed =
false;
103 const TLorentzVector & p4 = *(sp->
P4());
104 const TLorentzVector & x4 = *(sp->
X4());
106 bool is_in = (x4.Vect().Mag() < nucl_radius + step_sz);
114 double ddec = -1. * Ldec * TMath::Log(rnd->
RndFsi().Rndm());
115 has_decayed = (ddec < step_sz);
116 if(has_decayed)
break;
120 double dint = -1. * Lint * TMath::Log(rnd->
RndFsi().Rndm());
121 has_interacted = (dint < step_sz);
122 if(has_interacted)
break;
134 <<
"Particle has interacted at location: "
135 << sp->
X4()->Vect().Mag() <<
" / nucl radius = " << nucl_radius;
145 event->AddParticle(*sp);
150 <<
"*** Hadron escaped the nucleus! Done with it.";
152 event->AddParticle(*sp);
const int kPdgP33m1232_DeltaPP
void SetFirstMother(int m)
TRandom3 & RndFsi(void) const
rnd number generator used by intranuclear cascade monte carlos
static RandomGen * Instance()
Access instance.
const TLorentzVector * P4(void) const
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the 'Visito...
double MeanFreePath_Delta(int pdgc, const TLorentzVector &x4, const TLorentzVector &p4, double A)
Mean free path (Delta++ test)
A singleton holding random number generator classes. All random number generation in GENIE should tak...
GHepStatus_t Status(void) const
double Radius(int A, double Ro=constants::kNucRo)
string Name(void) const
Name that corresponds to the PDG code.
double fR0
effective nuclear size param
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static constexpr double A
void Configure(const Registry &config)
virtual void Configure(const Registry &config)
double fNR
param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear bounda...
double KinE(bool mass_from_pdg=false) const
Get kinetic energy.
void StepParticle(GHepParticle *p, double step, double nuclear_radius=-1.)
Step particle.
const TLorentzVector * X4(void) const
void SetStatus(GHepStatus_t s)
A registry. Provides the container for algorithm configuration parameters.
void ProcessEventRecord(GHepRecord *event_rec) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
GENIE's GHEP MC event record.
double fHadStep
step size for intranuclear hadron transport
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.
enum genie::EGHepStatus GHepStatus_t