GENIEGenerator
Loading...
Searching...
No Matches
genie::Intranuke Class Referenceabstract

The INTRANUKE intranuclear hadron transport MC. Is a concrete implementation of the EventRecordVisitorI interface. More...

#include <Intranuke.h>

Inheritance diagram for genie::Intranuke:
[legend]
Collaboration diagram for genie::Intranuke:
[legend]

Public Member Functions

 Intranuke ()
 Intranuke (string name)
 Intranuke (string name, string config)
 ~Intranuke ()
virtual void ProcessEventRecord (GHepRecord *event_rec) const
void Configure (const Registry &config)
void Configure (string param_set)
Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Protected Member Functions

virtual void LoadConfig (void)=0
void TransportHadrons (GHepRecord *ev) const
void GenerateVertex (GHepRecord *ev) const
bool NeedsRescattering (const GHepParticle *p) const
bool CanRescatter (const GHepParticle *p) const
bool IsInNucleus (const GHepParticle *p) const
void SetTrackingRadius (const GHepParticle *p) const
double GenerateStep (GHepRecord *ev, GHepParticle *p) const
virtual void SimulateHadronicFinalState (GHepRecord *ev, GHepParticle *p) const =0
virtual bool HandleCompoundNucleus (GHepRecord *ev, GHepParticle *p, int mom) const =0
Protected Member Functions inherited from genie::EventRecordVisitorI
 EventRecordVisitorI ()
 EventRecordVisitorI (string name)
 EventRecordVisitorI (string name, string config)
Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.

Protected Attributes

double fTrackingRadius
 tracking radius for the nucleus in the current event
TGenPhaseSpace fGenPhaseSpace
 a phase space generator
INukeHadroDatafHadroData
 a collection of h+N,h+A data & calculations
AlgFactoryfAlgf
 algorithm factory instance
const NuclearModelIfNuclmodel
 nuclear model used to generate fermi momentum
int fRemnA
 remnant nucleus A
int fRemnZ
 remnant nucleus Z
TLorentzVector fRemnP4
 P4 of remnant system.
GEvGenMode_t fGMode
 event generation mode (lepton+A, hadron+A, ...)
double fR0
 effective nuclear size param
double fNR
 param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear boundary"
double fNucRmvE
 binding energy to subtract from cascade nucleons
double fDelRPion
 factor by which Pion Compton wavelength gets multiplied to become nuclear size enhancement
double fDelRNucleon
 factor by which Nucleon Compton wavelength gets multiplied to become nuclear size enhancement
double fHadStep
 step size for intranuclear hadron transport
double fNucAbsFac
 absorption xsec correction factor (hN Mode)
double fNucCEXFac
 charge exchange xsec correction factor (hN Mode)
double fEPreEq
 threshold for pre-equilibrium reaction
double fFermiFac
 testing parameter to modify fermi momentum
double fFermiMomentum
 whether or not particle collision is pauli blocked
bool fDoFermi
 whether or not to do fermi mom.
bool fDoMassDiff
 whether or not to do mass diff. mode
bool fDoCompoundNucleus
 whether or not to do compound nucleus considerations
double fChPionMFPScale
 tweaking factors for tuning
double fNeutralPionMFPScale
double fPionFracCExScale
double fPionFracElasScale
double fPionFracInelScale
double fPionFracAbsScale
double fPionFracPiProdScale
double fNucleonMFPScale
double fNucleonFracCExScale
double fNucleonFracElasScale
double fNucleonFracInelScale
double fNucleonFracAbsScale
double fNucleonFracPiProdScale
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Friends

class IntranukeTester

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)

Detailed Description

The INTRANUKE intranuclear hadron transport MC. Is a concrete implementation of the EventRecordVisitorI interface.

References:\n R.Merenyi et al., Phys.Rev.D45 (1992)
R.D.Ransome, Nucl.Phys.B 139 (2005)

Current INTRANUKE development is led by S.Dytman and H.Gallagher. The original INTRANUKE cascade MC was developed (in fortran) for the NeuGEN MC by R.Edgecock, G.F.Pearce, W.A.Mann, R.Merenyi and others.

Author
Steve Dytman dytma.nosp@m.n+@p.nosp@m.itt.e.nosp@m.du, Pittsburgh University Aaron Meyer asm58.nosp@m.@pit.nosp@m.t.edu, Pittsburgh University Alex Bell, Pittsburgh University Hugh Gallagher galla.nosp@m.g@mi.nosp@m.nos.p.nosp@m.hy.t.nosp@m.ufts..nosp@m.edu, Tufts University Costas Andreopoulos <c.andreopoulos \at cern.ch> STFC, Rutherford Lab
Created:\n September 20, 2005
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org
References:\n R.Merenyi et al., Phys.Rev.D45 (1992)
R.D.Ransome, Nucl.Phys.B 139 (2005)

Current INTRANUKE development is led by S.Dytman and H.Gallagher. The original INTRANUKE cascade MC was developed (in fortran) for the NeuGEN MC by R.Edgecock, G.F.Pearce, W.A.Mann, R.Merenyi and others.

Author
Steve Dytman dytma.nosp@m.n+@p.nosp@m.itt.e.nosp@m.du, Pittsburgh University Aaron Meyer asm58.nosp@m.@pit.nosp@m.t.edu, Pittsburgh University Alex Bell, Pittsburgh University Hugh Gallagher galla.nosp@m.g@mi.nosp@m.nos.p.nosp@m.hy.t.nosp@m.ufts..nosp@m.edu, Tufts University Costas Andreopoulos <c.andreopoulos \at cern.ch> STFC, Rutherford Lab
Created:\n September 20, 2005
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org
Created:\n on september,2025 by Mohamed Ismail <msi10@pitt.edu>
no changes from the 2018 class version, major changes made in INukeHadroData2025 for new hA pion splines Add data, use hN for high pion KE, use INCL for low energy. Use splines for channel and total reac xs to improve accuracy. Also, smooth results to avoid discontinuities.
References:\n R.Merenyi et al., Phys.Rev.D45 (1992)
R.D.Ransome, Nucl.Phys.B 139 (2005)

Current INTRANUKE development is led by S.Dytman and H.Gallagher. The original INTRANUKE cascade MC was developed (in fortran) for the NeuGEN MC by R.Edgecock, G.F.Pearce, W.A.Mann, R.Merenyi and others. Vast changes since then at Univ. of Pittsburgh and elsewhere

Author
Steve Dytman dytma.nosp@m.n+@p.nosp@m.itt.e.nosp@m.du, Pittsburgh University Aaron Meyer asm58.nosp@m.@pit.nosp@m.t.edu, Pittsburgh University Mohamed Ismail msi10.nosp@m.@PIT.nosp@m.T.EDU , Pittsburgh University Hugh Gallagher galla.nosp@m.g@mi.nosp@m.nos.p.nosp@m.hy.t.nosp@m.ufts..nosp@m.edu, Tufts University Costas Andreopoulos <c.andreopoulos \at cern.ch> STFC, Rutherford Lab
Created:\n September 20, 2025
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org

Sepr 2025: MI, SD: copied from Intranuke2018.h with no modifications except labels

Definition at line 54 of file Intranuke.h.

Constructor & Destructor Documentation

◆ Intranuke() [1/3]

◆ Intranuke() [2/3]

Intranuke::Intranuke ( string name)

Definition at line 97 of file Intranuke.cxx.

97 :
99{
100
101}

References genie::EventRecordVisitorI::EventRecordVisitorI().

◆ Intranuke() [3/3]

Intranuke::Intranuke ( string name,
string config )

Definition at line 103 of file Intranuke.cxx.

103 :
104EventRecordVisitorI(name, config)
105{
106
107}

References genie::EventRecordVisitorI::EventRecordVisitorI().

◆ ~Intranuke()

Intranuke::~Intranuke ( )

Definition at line 109 of file Intranuke.cxx.

110{
111
112}

Member Function Documentation

◆ CanRescatter()

bool Intranuke::CanRescatter ( const GHepParticle * p) const
protected

Definition at line 231 of file Intranuke.cxx.

232{
233// checks whether a particle that needs to be rescattered, can in fact be
234// rescattered by this cascade MC
235
236 assert(p);
237 return ( p->Pdg() == kPdgPiP ||
238 p->Pdg() == kPdgPiM ||
239 p->Pdg() == kPdgPi0 ||
240 p->Pdg() == kPdgProton ||
241 p->Pdg() == kPdgNeutron ||
242 // p->Pdg() == kPdgGamma ||
243 p->Pdg() == kPdgKP //||
244 // p->Pdg() == kPdgKM
245 );
246}
int Pdg(void) const
const int kPdgPiM
Definition PDGCodes.h:159
const int kPdgProton
Definition PDGCodes.h:81
const int kPdgPi0
Definition PDGCodes.h:160
const int kPdgKP
Definition PDGCodes.h:172
const int kPdgNeutron
Definition PDGCodes.h:83
const int kPdgPiP
Definition PDGCodes.h:158

References genie::kPdgKP, genie::kPdgNeutron, genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, genie::kPdgProton, and genie::GHepParticle::Pdg().

Referenced by TransportHadrons().

◆ Configure() [1/2]

void Intranuke::Configure ( const Registry & config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented from genie::Algorithm.

Definition at line 425 of file Intranuke.cxx.

426{
427 Algorithm::Configure(config);
428 this->LoadConfig();
429}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62
virtual void LoadConfig(void)=0

References genie::Algorithm::Configure(), and LoadConfig().

◆ Configure() [2/2]

void Intranuke::Configure ( string config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented from genie::Algorithm.

Definition at line 431 of file Intranuke.cxx.

432{
433 Algorithm::Configure(param_set);
434 this->LoadConfig();
435}

References genie::Algorithm::Configure(), and LoadConfig().

◆ GenerateStep()

double Intranuke::GenerateStep ( GHepRecord * ev,
GHepParticle * p ) const
protected

Definition at line 393 of file Intranuke.cxx.

394{
395// Generate a step (in fermis) for particle p in the input event.
396// Computes the mean free path L and generate an 'interaction' distance d
397// from an exp(-d/L) distribution
398
399 RandomGen * rnd = RandomGen::Instance();
400
401 int pdgc = p->Pdg();
402
403 double scale = 1.;
404 if (pdgc==kPdgPiP || pdgc==kPdgPiM) {
405 scale = fChPionMFPScale;
406 }
407 if (pdgc==kPdgPi0) {
408 scale = fNeutralPionMFPScale;
409 }
410 else if (pdgc==kPdgProton || pdgc==kPdgNeutron) {
411 scale = fNucleonMFPScale;
412 }
413
414 double L = utils::intranuke::MeanFreePath(pdgc, *p->X4(), *p->P4(), fRemnA,
416 L *= scale;
417 double d = -1.*L * TMath::Log(rnd->RndFsi().Rndm());
418
419 LOG("Intranuke", pDEBUG)
420 << "Mean free path = " << L << " fm / "
421 << "Generated path length = " << d << " fm";
422 return d;
423}
#define pDEBUG
Definition Messenger.h:63
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
const TLorentzVector * P4(void) const
const TLorentzVector * X4(void) const
int fRemnZ
remnant nucleus Z
Definition Intranuke.h:97
double fChPionMFPScale
tweaking factors for tuning
Definition Intranuke.h:117
int fRemnA
remnant nucleus A
Definition Intranuke.h:96
double fDelRPion
factor by which Pion Compton wavelength gets multiplied to become nuclear size enhancement
Definition Intranuke.h:105
double fNucleonMFPScale
Definition Intranuke.h:124
double fNeutralPionMFPScale
Definition Intranuke.h:118
double fDelRNucleon
factor by which Nucleon Compton wavelength gets multiplied to become nuclear size enhancement
Definition Intranuke.h:106
static RandomGen * Instance()
Access instance.
Definition RandomGen.cxx:74
TRandom3 & RndFsi(void) const
rnd number generator used by intranuclear cascade monte carlos
Definition RandomGen.h:59
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)

References fChPionMFPScale, fDelRNucleon, fDelRPion, fNeutralPionMFPScale, fNucleonMFPScale, fRemnA, fRemnZ, genie::RandomGen::Instance(), genie::kPdgNeutron, genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, genie::kPdgProton, LOG, genie::utils::intranuke::MeanFreePath(), genie::GHepParticle::P4(), pDEBUG, genie::GHepParticle::Pdg(), genie::RandomGen::RndFsi(), and genie::GHepParticle::X4().

Referenced by TransportHadrons().

◆ GenerateVertex()

void Intranuke::GenerateVertex ( GHepRecord * ev) const
protected

Definition at line 151 of file Intranuke.cxx.

152{
153// Sets a vertex in the nucleus periphery
154// Called onlt in hadron/photon-nucleus interactions.
155
156 GHepParticle * nucltgt = evrec->TargetNucleus();
157 assert(nucltgt);
158
159 RandomGen * rnd = RandomGen::Instance();
160 TVector3 vtx(999999.,999999.,999999.);
161
162 // *** For h+A events (test mode):
163 // Assume a hadron beam with uniform intensity across an area,
164 // so we need to choose events uniformly within that area.
165 double x=999999., y=999999., epsilon = 0.001;
166 double R2 = TMath::Power(fTrackingRadius,2.);
167 double rp2 = TMath::Power(x,2.) + TMath::Power(y,2.);
168 while(rp2 > R2-epsilon) {
169 x = (fTrackingRadius-epsilon) * rnd->RndFsi().Rndm();
170 y = -fTrackingRadius + 2*fTrackingRadius * rnd->RndFsi().Rndm();
171 y -= ((y>0) ? epsilon : -epsilon);
172 rp2 = TMath::Power(x,2.) + TMath::Power(y,2.);
173 }
174 vtx.SetXYZ(x,y, -1.*TMath::Sqrt(TMath::Max(0.,R2-rp2)) + epsilon);
175
176 // get the actual unit vector along the incoming hadron direction
177 TVector3 direction = evrec->Probe()->P4()->Vect().Unit();
178
179 // rotate the vtx position
180 vtx.RotateUz(direction);
181
182 LOG("Intranuke", pNOTICE)
183 << "Generated vtx @ R = " << vtx.Mag() << " fm / "
184 << print::Vec3AsString(&vtx);
185
186 TObjArrayIter piter(evrec);
187 GHepParticle * p = 0;
188 while( (p = (GHepParticle *) piter.Next()) )
189 {
190 if(pdg::IsPseudoParticle(p->Pdg())) continue;
191 if(pdg::IsIon (p->Pdg())) continue;
192
193 p->SetPosition(vtx.x(), vtx.y(), vtx.z(), 0.);
194 }
195}
#define pNOTICE
Definition Messenger.h:61
void SetPosition(const TLorentzVector &v4)
double fTrackingRadius
tracking radius for the nucleus in the current event
Definition Intranuke.h:91
const double epsilon
bool IsIon(int pdgc)
Definition PDGUtils.cxx:42
bool IsPseudoParticle(int pdgc)
Definition PDGUtils.cxx:27
string Vec3AsString(const TVector3 *vec)

References epsilon, fTrackingRadius, genie::RandomGen::Instance(), genie::pdg::IsIon(), genie::pdg::IsPseudoParticle(), LOG, genie::GHepParticle::P4(), genie::GHepParticle::Pdg(), pNOTICE, genie::GHepRecord::Probe(), genie::RandomGen::RndFsi(), genie::GHepParticle::SetPosition(), genie::GHepRecord::TargetNucleus(), and genie::utils::print::Vec3AsString().

Referenced by ProcessEventRecord().

◆ HandleCompoundNucleus()

virtual bool genie::Intranuke::HandleCompoundNucleus ( GHepRecord * ev,
GHepParticle * p,
int mom ) const
protectedpure virtual

Implemented in genie::HAIntranuke.

Referenced by TransportHadrons().

◆ IsInNucleus()

bool Intranuke::IsInNucleus ( const GHepParticle * p) const
protected

Definition at line 248 of file Intranuke.cxx.

249{
250// check whether the input particle is still within the nucleus
251//
252 return (p->X4()->Vect().Mag() < fTrackingRadius + fHadStep);
253}
double fHadStep
step size for intranuclear hadron transport
Definition Intranuke.h:107

References fHadStep, fTrackingRadius, and genie::GHepParticle::X4().

Referenced by TransportHadrons().

◆ LoadConfig()

virtual void genie::Intranuke::LoadConfig ( void )
protectedpure virtual

Implemented in genie::HAIntranuke.

Referenced by Configure(), and Configure().

◆ NeedsRescattering()

bool Intranuke::NeedsRescattering ( const GHepParticle * p) const
protected

Definition at line 212 of file Intranuke.cxx.

213{
214// checks whether the particle should be rescattered
215
216 assert(p);
217
220 // hadron/photon-nucleus scattering propagate the incoming particle
221 return (
223 && !pdg::IsIon(p->Pdg()));
224 }
225 else {
226 // attempt to rescatter anything marked as 'hadron in the nucleus'
227 return (p->Status() == kIStHadronInTheNucleus);
228 }
229}
GHepStatus_t Status(void) const
GEvGenMode_t fGMode
event generation mode (lepton+A, hadron+A, ...)
Definition Intranuke.h:99
@ kIStHadronInTheNucleus
Definition GHepStatus.h:37
@ kIStInitialState
Definition GHepStatus.h:29
@ kGMdHadronNucleus
Definition GMode.h:27
@ kGMdPhotonNucleus
Definition GMode.h:28

References fGMode, genie::pdg::IsIon(), genie::kGMdHadronNucleus, genie::kGMdPhotonNucleus, genie::kIStHadronInTheNucleus, genie::kIStInitialState, genie::GHepParticle::Pdg(), and genie::GHepParticle::Status().

Referenced by TransportHadrons().

◆ ProcessEventRecord()

void Intranuke::ProcessEventRecord ( GHepRecord * event_rec) const
virtual

Implements genie::EventRecordVisitorI.

Reimplemented in genie::HAIntranuke.

Definition at line 114 of file Intranuke.cxx.

115{
116 // Do not continue if there is no nuclear target
117 GHepParticle * nucltgt = evrec->TargetNucleus();
118 if (!nucltgt) {
119 LOG("HNIntranuke", pINFO) << "No nuclear target found - INTRANUKE exits";
120 return;
121 }
122
123 // Decide tracking radius for the current nucleus (few * R0 * A^1/3)
124 this->SetTrackingRadius(nucltgt);
125
126 // Understand what the event generation mode is (hadron/photon-nucleus,
127 // lepton-nucleus, nucleon decay) from the input event.
128 // The determined mode has an effect on INTRANUKE behaviour (how to lookup
129 // the residual nucleus, whether to set an intranuclear vtx etc) but it
130 // does not affect the INTRANUKE physics.
131 fGMode = evrec->EventGenerationMode();
132
133 // For lepton-nucleus scattering and for nucleon decay intranuclear vtx
134 // position (in the target nucleus coord system) is set elsewhere.
135 // This method only takes effect in hadron/photon-nucleus interactions.
136 // In this special mode, an interaction vertex is set at the periphery
137 // of the target nucleus.
140 {
141 this->GenerateVertex(evrec);
142 }
143
144 // Now transport all hadrons outside the tracking radius.
145 // Stepping part is common for both HA and HN.
146 // Once it has been estabished that an interaction takes place then
147 // HA and HN specific code takes over in order to simulate the final state.
148 this->TransportHadrons(evrec);
149}
#define pINFO
Definition Messenger.h:62
void GenerateVertex(GHepRecord *ev) const
void SetTrackingRadius(const GHepParticle *p) const
void TransportHadrons(GHepRecord *ev) const

References genie::GHepRecord::EventGenerationMode(), fGMode, GenerateVertex(), genie::kGMdHadronNucleus, genie::kGMdPhotonNucleus, LOG, pINFO, SetTrackingRadius(), genie::GHepRecord::TargetNucleus(), and TransportHadrons().

Referenced by genie::HAIntranuke::ProcessEventRecord().

◆ SetTrackingRadius()

void Intranuke::SetTrackingRadius ( const GHepParticle * p) const
protected

Definition at line 197 of file Intranuke.cxx.

198{
199 assert(p && pdg::IsIon(p->Pdg()));
200 double A = p->A();
201 fTrackingRadius = fR0 * TMath::Power(A, 1./3.);
202
203 // multiply that by some input factor so that hadrons are tracked
204 // beyond the nuclear 'boundary' since the nuclear density distribution
205 // is not zero there
207
208 LOG("Intranuke", pNOTICE)
209 << "Setting tracking radius to R = " << fTrackingRadius;
210}
int A(void) const
double fR0
effective nuclear size param
Definition Intranuke.h:102
double fNR
param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear bounda...
Definition Intranuke.h:103

References genie::GHepParticle::A(), fNR, fR0, fTrackingRadius, genie::pdg::IsIon(), LOG, genie::GHepParticle::Pdg(), and pNOTICE.

Referenced by ProcessEventRecord().

◆ SimulateHadronicFinalState()

virtual void genie::Intranuke::SimulateHadronicFinalState ( GHepRecord * ev,
GHepParticle * p ) const
protectedpure virtual

Implemented in genie::HAIntranuke.

Referenced by TransportHadrons().

◆ TransportHadrons()

void Intranuke::TransportHadrons ( GHepRecord * ev) const
protected

Definition at line 255 of file Intranuke.cxx.

256{
257// transport all hadrons outside the nucleus
258
259 int inucl = -1;
260 fRemnA = -1;
261 fRemnZ = -1;
262
263 // Get 'nuclear environment' at the beginning of hadron transport
264 // and keep track of the remnant nucleus A,Z
265
268 {
269 inucl = evrec->TargetNucleusPosition();
270 }
271 else
272 if(fGMode == kGMdLeptonNucleus ||
276 {
277 inucl = evrec->RemnantNucleusPosition();
278 }
279
280 LOG("Intranuke", pNOTICE)
281 << "Propagating hadrons within nucleus found in position = " << inucl;
282 GHepParticle * nucl = evrec->Particle(inucl);
283 if(!nucl) {
284 LOG("Intranuke", pERROR)
285 << "No nucleus found in position = " << inucl;
286 LOG("Intranuke", pERROR)
287 << *evrec;
288 return;
289 }
290
291 fRemnA = nucl->A();
292 fRemnZ = nucl->Z();
293
294 LOG("Intranuke", pNOTICE)
295 << "Nucleus (A,Z) = (" << fRemnA << ", " << fRemnZ << ")";
296
297 const TLorentzVector & p4nucl = *(nucl->P4());
298 fRemnP4 = p4nucl;
299
300 // Loop over GHEP and run intranuclear rescattering on handled particles
301 TObjArrayIter piter(evrec);
302 GHepParticle * p = 0;
303 int icurr = -1;
304
305 while( (p = (GHepParticle *) piter.Next()) )
306 {
307 icurr++;
308
309 // Check whether the particle needs rescattering, otherwise skip it
310 if( ! this->NeedsRescattering(p) ) continue;
311
312 if(this->HandleCompoundNucleus(evrec,p,icurr)) continue;
313
314 LOG("Intranuke", pNOTICE)
315 << " >> Stepping a " << p->Name()
316 << " with kinetic E = " << p->KinE() << " GeV";
317
318 // Rescatter a clone, not the original particle
319 GHepParticle * sp = new GHepParticle(*p);
320
321 // Set clone's mom to be the hadron that was cloned
322 sp->SetFirstMother(icurr);
323
324 // Check whether the particle can be rescattered
325 if(!this->CanRescatter(sp)) {
326
327 // if I can't rescatter it, I will just take it out of the nucleus
328 LOG("Intranuke", pNOTICE)
329 << "... Current version can't rescatter a " << sp->Name();
330 sp->SetFirstMother(icurr);
332 evrec->AddParticle(*sp);
333 delete sp;
334 continue; // <-- skip to next GHEP entry
335 }
336
337 // Start stepping particle out of the nucleus
338 bool has_interacted = false;
339 while ( this-> IsInNucleus(sp) )
340 {
341 // advance the hadron by a step
343
344 // check whether it interacts
345 double d = this->GenerateStep(evrec,sp);
346 has_interacted = (d<fHadStep);
347 if(has_interacted) break;
348 }//stepping
349
350 if(has_interacted && fRemnA>0) {
351 // the particle interacts - simulate the hadronic interaction
352 LOG("Intranuke", pNOTICE)
353 << "Particle has interacted at location: "
354 << sp->X4()->Vect().Mag() << " / nucl rad= " << fTrackingRadius;
355 this->SimulateHadronicFinalState(evrec,sp);
356 } else if(has_interacted && fRemnA<=0) {
357 // nothing left to interact with!
358 LOG("Intranuke", pNOTICE)
359 << "*** Nothing left to interact with, escaping.";
361 evrec->AddParticle(*sp);
362 evrec->Particle(sp->FirstMother())->SetRescatterCode(1);
363 } else {
364 // the exits the nucleus without interacting - Done with it!
365 LOG("Intranuke", pNOTICE)
366 << "*** Hadron escaped the nucleus! Done with it.";
368 evrec->AddParticle(*sp);
369 evrec->Particle(sp->FirstMother())->SetRescatterCode(1);
370 }
371 delete sp;
372
373 // Current snapshot
374 //LOG("Intranuke", pINFO) << "Current event record snapshot: " << *evrec;
375
376 }// GHEP entries
377
378 // Add remnant nucleus - that 'hadronic blob' has all the remaining hadronic
379 // 4p not put explicitly into the simulated particles
380 TLorentzVector v4(0.,0.,0.,0.);
381 GHepParticle remnant_nucleus(
383 evrec->AddParticle(remnant_nucleus);
384 // Mark the initial remnant nucleus as an intermediate state
385 // Don't do that in the hadron/photon-nucleus scatterig mode since the initial
386 // remnant nucleus and the target nucleus coincide.
389 evrec->Particle(inucl)->SetStatus(kIStIntermediateState);
390 }
391}
#define pERROR
Definition Messenger.h:59
string Name(void) const
Name that corresponds to the PDG code.
int FirstMother(void) const
void SetFirstMother(int m)
void SetStatus(GHepStatus_t s)
int Z(void) const
double KinE(bool mass_from_pdg=false) const
Get kinetic energy.
virtual bool HandleCompoundNucleus(GHepRecord *ev, GHepParticle *p, int mom) const =0
virtual void SimulateHadronicFinalState(GHepRecord *ev, GHepParticle *p) const =0
TLorentzVector fRemnP4
P4 of remnant system.
Definition Intranuke.h:98
bool IsInNucleus(const GHepParticle *p) const
bool NeedsRescattering(const GHepParticle *p) const
double GenerateStep(GHepRecord *ev, GHepParticle *p) const
bool CanRescatter(const GHepParticle *p) const
void StepParticle(GHepParticle *p, double step, double nuclear_radius=-1.)
Step particle.
@ kIStIntermediateState
Definition GHepStatus.h:31
@ kIStFinalStateNuclearRemnant
Definition GHepStatus.h:38
@ kIStStableFinalState
Definition GHepStatus.h:30
@ kGMdNucleonDecay
Definition GMode.h:30
@ kGMdDarkMatterNucleus
Definition GMode.h:29
@ kGMdLeptonNucleus
Definition GMode.h:26
@ kGMdNeutronOsc
Definition GMode.h:31
const int kPdgHadronicBlob
Definition PDGCodes.h:211

References genie::GHepParticle::A(), genie::GHepRecord::AddParticle(), CanRescatter(), fGMode, fHadStep, genie::GHepParticle::FirstMother(), fRemnA, fRemnP4, fRemnZ, fTrackingRadius, GenerateStep(), HandleCompoundNucleus(), IsInNucleus(), genie::kGMdDarkMatterNucleus, genie::kGMdHadronNucleus, genie::kGMdLeptonNucleus, genie::kGMdNeutronOsc, genie::kGMdNucleonDecay, genie::kGMdPhotonNucleus, genie::GHepParticle::KinE(), genie::kIStFinalStateNuclearRemnant, genie::kIStIntermediateState, genie::kIStStableFinalState, genie::kPdgHadronicBlob, LOG, genie::GHepParticle::Name(), NeedsRescattering(), genie::GHepParticle::P4(), genie::GHepRecord::Particle(), pERROR, pNOTICE, genie::GHepRecord::RemnantNucleusPosition(), genie::GHepParticle::SetFirstMother(), genie::GHepParticle::SetRescatterCode(), genie::GHepParticle::SetStatus(), SimulateHadronicFinalState(), genie::utils::intranuke::StepParticle(), genie::GHepRecord::TargetNucleusPosition(), genie::GHepParticle::X4(), and genie::GHepParticle::Z().

Referenced by ProcessEventRecord().

◆ IntranukeTester

friend class IntranukeTester
friend

Definition at line 56 of file Intranuke.h.

References IntranukeTester.

Referenced by IntranukeTester.

Member Data Documentation

◆ fAlgf

AlgFactory* genie::Intranuke::fAlgf
protected

algorithm factory instance

Definition at line 94 of file Intranuke.h.

◆ fChPionMFPScale

double genie::Intranuke::fChPionMFPScale
protected

tweaking factors for tuning

Definition at line 117 of file Intranuke.h.

Referenced by GenerateStep(), and genie::HAIntranuke::LoadConfig().

◆ fDelRNucleon

double genie::Intranuke::fDelRNucleon
protected

factor by which Nucleon Compton wavelength gets multiplied to become nuclear size enhancement

Definition at line 106 of file Intranuke.h.

Referenced by GenerateStep(), and genie::HAIntranuke::LoadConfig().

◆ fDelRPion

double genie::Intranuke::fDelRPion
protected

factor by which Pion Compton wavelength gets multiplied to become nuclear size enhancement

Definition at line 105 of file Intranuke.h.

Referenced by GenerateStep(), and genie::HAIntranuke::LoadConfig().

◆ fDoCompoundNucleus

bool genie::Intranuke::fDoCompoundNucleus
protected

whether or not to do compound nucleus considerations

Definition at line 115 of file Intranuke.h.

Referenced by genie::HAIntranuke::LoadConfig().

◆ fDoFermi

bool genie::Intranuke::fDoFermi
protected

whether or not to do fermi mom.

Definition at line 113 of file Intranuke.h.

Referenced by genie::HAIntranuke::Inelastic(), genie::HAIntranuke::InelasticHA(), and genie::HAIntranuke::LoadConfig().

◆ fDoMassDiff

bool genie::Intranuke::fDoMassDiff
protected

whether or not to do mass diff. mode

Definition at line 114 of file Intranuke.h.

◆ fEPreEq

double genie::Intranuke::fEPreEq
protected

threshold for pre-equilibrium reaction

Definition at line 110 of file Intranuke.h.

Referenced by genie::HAIntranuke::LoadConfig().

◆ fFermiFac

double genie::Intranuke::fFermiFac
protected

testing parameter to modify fermi momentum

Definition at line 111 of file Intranuke.h.

Referenced by genie::HAIntranuke::Inelastic(), genie::HAIntranuke::InelasticHA(), and genie::HAIntranuke::LoadConfig().

◆ fFermiMomentum

double genie::Intranuke::fFermiMomentum
protected

whether or not particle collision is pauli blocked

Definition at line 112 of file Intranuke.h.

Referenced by genie::HAIntranuke::Inelastic(), and genie::HAIntranuke::LoadConfig().

◆ fGenPhaseSpace

TGenPhaseSpace genie::Intranuke::fGenPhaseSpace
mutableprotected

a phase space generator

Definition at line 92 of file Intranuke.h.

◆ fGMode

GEvGenMode_t genie::Intranuke::fGMode
mutableprotected

event generation mode (lepton+A, hadron+A, ...)

Definition at line 99 of file Intranuke.h.

Referenced by NeedsRescattering(), ProcessEventRecord(), and TransportHadrons().

◆ fHadroData

INukeHadroData* genie::Intranuke::fHadroData
protected

a collection of h+N,h+A data & calculations

Definition at line 93 of file Intranuke.h.

Referenced by genie::HAIntranuke::HadronFateHA(), genie::HAIntranuke::Inelastic(), genie::HAIntranuke::InelasticHA(), and genie::HAIntranuke::LoadConfig().

◆ fHadStep

double genie::Intranuke::fHadStep
protected

step size for intranuclear hadron transport

Definition at line 107 of file Intranuke.h.

Referenced by IsInNucleus(), genie::HAIntranuke::LoadConfig(), and TransportHadrons().

◆ fNeutralPionMFPScale

double genie::Intranuke::fNeutralPionMFPScale
protected

Definition at line 118 of file Intranuke.h.

Referenced by GenerateStep(), and genie::HAIntranuke::LoadConfig().

◆ fNR

double genie::Intranuke::fNR
protected

param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear boundary"

Definition at line 103 of file Intranuke.h.

Referenced by genie::HAIntranuke::LoadConfig(), and SetTrackingRadius().

◆ fNucAbsFac

double genie::Intranuke::fNucAbsFac
protected

absorption xsec correction factor (hN Mode)

Definition at line 108 of file Intranuke.h.

Referenced by genie::HAIntranuke::LoadConfig().

◆ fNucCEXFac

double genie::Intranuke::fNucCEXFac
protected

charge exchange xsec correction factor (hN Mode)

Definition at line 109 of file Intranuke.h.

Referenced by genie::HAIntranuke::LoadConfig().

◆ fNucleonFracAbsScale

double genie::Intranuke::fNucleonFracAbsScale
protected

◆ fNucleonFracCExScale

double genie::Intranuke::fNucleonFracCExScale
protected

◆ fNucleonFracElasScale

double genie::Intranuke::fNucleonFracElasScale
protected

◆ fNucleonFracInelScale

double genie::Intranuke::fNucleonFracInelScale
protected

◆ fNucleonFracPiProdScale

double genie::Intranuke::fNucleonFracPiProdScale
protected

◆ fNucleonMFPScale

double genie::Intranuke::fNucleonMFPScale
protected

Definition at line 124 of file Intranuke.h.

Referenced by GenerateStep(), and genie::HAIntranuke::LoadConfig().

◆ fNuclmodel

const NuclearModelI* genie::Intranuke::fNuclmodel
protected

nuclear model used to generate fermi momentum

Definition at line 95 of file Intranuke.h.

Referenced by genie::HAIntranuke::Inelastic(), genie::HAIntranuke::InelasticHA(), and genie::HAIntranuke::LoadConfig().

◆ fNucRmvE

double genie::Intranuke::fNucRmvE
protected

binding energy to subtract from cascade nucleons

Definition at line 104 of file Intranuke.h.

Referenced by genie::HAIntranuke::Inelastic(), and genie::HAIntranuke::LoadConfig().

◆ fPionFracAbsScale

double genie::Intranuke::fPionFracAbsScale
protected

◆ fPionFracCExScale

double genie::Intranuke::fPionFracCExScale
protected

◆ fPionFracElasScale

double genie::Intranuke::fPionFracElasScale
protected

◆ fPionFracInelScale

double genie::Intranuke::fPionFracInelScale
protected

◆ fPionFracPiProdScale

double genie::Intranuke::fPionFracPiProdScale
protected

◆ fR0

double genie::Intranuke::fR0
protected

effective nuclear size param

Definition at line 102 of file Intranuke.h.

Referenced by genie::HAIntranuke::LoadConfig(), and SetTrackingRadius().

◆ fRemnA

int genie::Intranuke::fRemnA
mutableprotected

◆ fRemnP4

TLorentzVector genie::Intranuke::fRemnP4
mutableprotected

◆ fRemnZ

int genie::Intranuke::fRemnZ
mutableprotected

◆ fTrackingRadius

double genie::Intranuke::fTrackingRadius
mutableprotected

tracking radius for the nucleus in the current event

Definition at line 91 of file Intranuke.h.

Referenced by GenerateVertex(), IsInNucleus(), SetTrackingRadius(), and TransportHadrons().


The documentation for this class was generated from the following files: