64 #include "Conventions/GBuild.h" 85 using std::ostringstream;
87 using namespace genie;
121 LOG(
"HNIntranuke2014",
pINFO) <<
"No nuclear target found - INTRANUKE exits";
162 TVector3 vtx(999999.,999999.,999999.);
167 double x=999999.,
y=999999., epsilon = 0.001;
169 double rp2 = TMath::Power(x,2.) + TMath::Power(
y,2.);
170 while(rp2 > R2-epsilon) {
173 y -= ((
y>0) ? epsilon : -epsilon);
174 rp2 = TMath::Power(x,2.) + TMath::Power(
y,2.);
176 vtx.SetXYZ(x,
y, -1.*TMath::Sqrt(TMath::Max(0.,R2-rp2)) + epsilon);
182 vtx.RotateUz(direction);
185 <<
"Generated vtx @ R = " << vtx.Mag() <<
" fm / " 188 TObjArrayIter piter(evrec);
281 <<
"Propagating hadrons within nucleus found in position = " << inucl;
285 <<
"No nucleus found in position = " << inucl;
295 <<
"Nucleus (A,Z) = (" <<
fRemnA <<
", " <<
fRemnZ <<
")";
297 const TLorentzVector & p4nucl = *(nucl->
P4());
301 TObjArrayIter piter(evrec);
313 <<
" >> Stepping a " << p->
Name()
314 <<
" with kinetic E = " << p->
KinE() <<
" GeV";
327 <<
"... Current version can't rescatter a " << sp->
Name();
336 bool has_interacted =
false;
345 if(has_interacted)
break;
348 if(has_interacted &&
fRemnA>0) {
351 <<
"Particle has interacted at location: " 354 }
else if(has_interacted &&
fRemnA<=0) {
357 <<
"*** Nothing left to interact with, escaping.";
364 <<
"*** Hadron escaped the nucleus! Done with it.";
378 TLorentzVector v4(0.,0.,0.,0.);
401 double d = -1.*L * TMath::Log(rnd->
RndFsi().Rndm());
404 <<
"Mean free path = " << L <<
" fm / " 405 <<
"Generated path length = " << d <<
" fm";
void GenerateVertex(GHepRecord *ev) const
void SetFirstMother(int m)
virtual GHepParticle * Particle(int position) const
TRandom3 & RndFsi(void) const
rnd number generator used by intranuclear cascade monte carlos
#include "Numerical/GSFunc.h"
double fNR
param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear bounda...
static RandomGen * Instance()
Access instance.
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the 'Visito...
const int kPdgHadronicBlob
virtual int RemnantNucleusPosition(void) const
string Vec3AsString(const TVector3 *vec)
double fR0
effective nuclear size param
int fRemnZ
remnant nucleus Z
bool IsInNucleus(const GHepParticle *p) const
void TransportHadrons(GHepRecord *ev) const
A singleton holding random number generator classes. All random number generation in GENIE should tak...
void StepParticle(GHepParticle *p, double step, double nuclear_radius=-1.)
Step particle.
GHepStatus_t Status(void) const
double GenerateStep(GHepRecord *ev, GHepParticle *p) const
virtual void ProcessEventRecord(GHepRecord *event_rec) const
double fTrackingRadius
tracking radius for the nucleus in the current event
virtual GHepParticle * Probe(void) const
int FirstMother(void) const
string Name(void) const
Name that corresponds to the PDG code.
int fRemnA
remnant nucleus A
double fDelRPion
factor by which Pion Compton wavelength gets multiplied to become nuclear size enhancement ...
void SetPosition(const TLorentzVector &v4)
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
double MeanFreePath(int pdgc, const TLorentzVector &x4, const TLorentzVector &p4, double A, double Z, double nRpi=0.5, double nRnuc=1.0)
Mean free path (pions, nucleons)
virtual void SimulateHadronicFinalState(GHepRecord *ev, GHepParticle *p) const =0
virtual void Configure(const Registry &config)
Configure the algorithm.
GEvGenMode_t EventGenerationMode(void) const
virtual GHepParticle * TargetNucleus(void) const
bool CanRescatter(const GHepParticle *p) const
Misc GENIE control constants.
bool NeedsRescattering(const GHepParticle *p) const
double KinE(bool mass_from_pdg=false) const
Get kinetic energy.
TLorentzVector * X4(void) const
void SetStatus(GHepStatus_t s)
A registry. Provides the container for algorithm configuration parameters.
bool IsPseudoParticle(int pdgc)
GEvGenMode_t fGMode
event generation mode (lepton+A, hadron+A, ...)
void SetTrackingRadius(const GHepParticle *p) const
virtual void LoadConfig(void)=0
virtual void AddParticle(const GHepParticle &p)
void Configure(const Registry &config)
Configure the algorithm.
double fDelRNucleon
factor by which Nucleon Compton wavelength gets multiplied to become nuclear size enhancement ...
TLorentzVector * P4(void) 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.
double fHadStep
step size for intranuclear hadron transport
TLorentzVector fRemnP4
P4 of remnant system.
virtual int TargetNucleusPosition(void) const
Root of GENIE utility namespaces.