66 #include "Framework/Conventions/GBuild.h"
88 using std::ostringstream;
90 using namespace genie;
91 using namespace genie::utils;
92 using namespace genie::constants;
93 using namespace genie::controls;
124 LOG(
"HNIntranuke2018",
pINFO) <<
"No nuclear target found - INTRANUKE exits";
165 TVector3 vtx(999999.,999999.,999999.);
170 double x=999999., y=999999.,
epsilon = 0.001;
172 double rp2 = TMath::Power(x,2.) + TMath::Power(y,2.);
177 rp2 = TMath::Power(x,2.) + TMath::Power(y,2.);
179 vtx.SetXYZ(x,y, -1.*TMath::Sqrt(TMath::Max(0.,R2-rp2)) +
epsilon);
182 TVector3 direction = evrec->
Probe()->
P4()->Vect().Unit();
185 vtx.RotateUz(direction);
188 <<
"Generated vtx @ R = " << vtx.Mag() <<
" fm / "
191 TObjArrayIter piter(evrec);
283 <<
"Propagating hadrons within nucleus found in position = " << inucl;
287 <<
"No nucleus found in position = " << inucl;
297 <<
"Nucleus (A,Z) = (" <<
fRemnA <<
", " <<
fRemnZ <<
")";
299 const TLorentzVector & p4nucl = *(nucl->
P4());
303 TObjArrayIter piter(evrec);
315 <<
" >> Stepping a " << p->
Name()
316 <<
" with kinetic E = " << p->
KinE() <<
" GeV";
329 <<
"... Current version can't rescatter a " << sp->
Name();
338 bool has_interacted =
false;
347 if(has_interacted)
break;
350 if(has_interacted &&
fRemnA>0) {
353 <<
"Particle has interacted at location: "
356 }
else if(has_interacted &&
fRemnA<=0) {
359 <<
"*** Nothing left to interact with, escaping.";
366 <<
"*** Hadron escaped the nucleus! Done with it.";
380 TLorentzVector v4(0.,0.,0.,0.);
403 scale = fChPionMFPScale;
406 scale = fNeutralPionMFPScale;
409 scale = fNucleonMFPScale;
414 string fINukeMode = this->GetINukeMode();
415 string fINukeModeGen = this->GetGenINukeMode();
418 fRemnZ, fDelRPion, fDelRNucleon, fUseOset, fAltOset, fXsecNNCorr, fINukeMode);
420 LOG(
"Intranuke2018",
pDEBUG) <<
"mode= " << fINukeModeGen;
423 double d = -1.*L * TMath::Log(rnd->
RndFsi().Rndm());
void SetFirstMother(int m)
virtual GHepParticle * Particle(int position) const
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...
const int kPdgHadronicBlob
virtual int RemnantNucleusPosition(void) const
double fNR
param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear bounda...
void StepParticle(GHepParticle *p, double step, double nuclear_radius=-1.)
Step particle.
virtual void Configure(const Registry &config)
int fRemnA
remnant nucleus A
bool IsInNucleus(const GHepParticle *p) const
bool CanRescatter(const GHepParticle *p) const
A singleton holding random number generator classes. All random number generation in GENIE should tak...
GHepStatus_t Status(void) const
GEvGenMode_t fGMode
event generation mode (lepton+A, hadron+A, ...)
virtual GHepParticle * Probe(void) const
int FirstMother(void) const
string Name(void) const
Name that corresponds to the PDG code.
void SetPosition(const TLorentzVector &v4)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static constexpr double A
virtual void Configure(const Registry &config)
GEvGenMode_t EventGenerationMode(void) const
bool NeedsRescattering(const GHepParticle *p) const
virtual GHepParticle * TargetNucleus(void) const
void SetTrackingRadius(const GHepParticle *p) const
virtual void LoadConfig(void)=0
double MeanFreePath(int pdgc, const TLorentzVector &x4, const TLorentzVector &p4, double A, double Z, double nRpi=0.5, double nRnuc=1.0, const bool useOset=false, const bool altOset=false, const bool xsecNNCorr=false, string INukeMode="XX2018")
Mean free path (pions, nucleons)
void GenerateVertex(GHepRecord *ev) const
double fR0
effective nuclear size param
double GenerateStep(GHepRecord *ev, GHepParticle *p) const
virtual void ProcessEventRecord(GHepRecord *event_rec) const
double KinE(bool mass_from_pdg=false) const
Get kinetic energy.
virtual void SimulateHadronicFinalState(GHepRecord *ev, GHepParticle *p) const =0
const TLorentzVector * X4(void) const
void SetStatus(GHepStatus_t s)
A registry. Provides the container for algorithm configuration parameters.
bool IsPseudoParticle(int pdgc)
double fHadStep
step size for intranuclear hadron transport
virtual void AddParticle(const GHepParticle &p)
void TransportHadrons(GHepRecord *ev) const
double fTrackingRadius
tracking radius for the nucleus in the current event
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.
string Vec3AsString(const TVector3 *vec)
virtual int TargetNucleusPosition(void) const
int fRemnZ
remnant nucleus Z
TLorentzVector fRemnP4
P4 of remnant system.