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

#include <Intranuke2025.h>

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

Public Member Functions

 Intranuke2025 ()
 Intranuke2025 (string name)
 Intranuke2025 (string name, string config)
 ~Intranuke2025 ()
virtual void ProcessEventRecord (GHepRecord *event_rec) const
virtual void Configure (const Registry &config)
virtual void Configure (string param_set)
virtual string GetINukeMode () const
virtual string GetGenINukeMode () const
void SetRemnA (int A)
void SetRemnZ (int Z)
double GetRemnA () const
double GetRemnZ () const
double GetR0 () const
double GetNR () const
double GetDelRPion () const
double GetDelRNucleon () const
double GetNucRmvE () const
double GetHadStep () const
bool GetUseOset () const
bool GetAltOset () const
bool GetXsecNNCorr () const
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 int 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
INukeHadroData2025fHadroData2025
 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
bool fUseOset
 Oset model for low energy pion in hN.
bool fAltOset
 NuWro's table-based implementation (not recommended)
bool fXsecNNCorr
 use nuclear medium correction for NN cross section
double fChPionMFPScale
 tweaking factors for tuning
double fNeutralPionMFPScale
double fPionFracCExScale
double fPionFracInelScale
double fChPionFracAbsScale
double fNeutralPionFracAbsScale
double fPionFracPiProdScale
double fNucleonMFPScale
double fNucleonFracCExScale
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

Definition at line 56 of file Intranuke2025.h.

Constructor & Destructor Documentation

◆ Intranuke2025() [1/3]

◆ Intranuke2025() [2/3]

Intranuke2025::Intranuke2025 ( string name)

Definition at line 65 of file Intranuke2025.cxx.

65 :
67{
68
69}

References genie::EventRecordVisitorI::EventRecordVisitorI().

◆ Intranuke2025() [3/3]

Intranuke2025::Intranuke2025 ( string name,
string config )

Definition at line 71 of file Intranuke2025.cxx.

71 :
72EventRecordVisitorI(name, config)
73{
74
75}

References genie::EventRecordVisitorI::EventRecordVisitorI().

◆ ~Intranuke2025()

Intranuke2025::~Intranuke2025 ( )

Definition at line 77 of file Intranuke2025.cxx.

78{
79
80}

Member Function Documentation

◆ CanRescatter()

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

Definition at line 200 of file Intranuke2025.cxx.

201{
202// checks whether a particle that needs to be rescattered, can in fact be
203// rescattered by this cascade MC
204
205 assert(p);
206 return ( p->Pdg() == kPdgPiP ||
207 p->Pdg() == kPdgPiM ||
208 p->Pdg() == kPdgPi0 ||
209 p->Pdg() == kPdgProton ||
210 p->Pdg() == kPdgNeutron ||
211 // p->Pdg() == kPdgGamma ||
212 p->Pdg() == kPdgKP //||
213 // p->Pdg() == kPdgKM
214 );
215}
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 Intranuke2025::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 396 of file Intranuke2025.cxx.

397{
398 Algorithm::Configure(config);
399 this->LoadConfig();
400}
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 Intranuke2025::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 402 of file Intranuke2025.cxx.

403{
404 Algorithm::Configure(param_set);
405 this->LoadConfig();
406}

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

◆ GenerateStep()

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

Definition at line 357 of file Intranuke2025.cxx.

358{
359// Generate a step (in fermis) for particle p in the input event.
360// Computes the mean free path L and generate an 'interaction' distance d
361// from an exp(-d/L) distribution
362
363 int pdgc = p->Pdg();
364
365 double scale = 1.;
366 if (pdgc==kPdgPiP || pdgc==kPdgPiM) {
367 scale = fChPionMFPScale;
368 }
369 if (pdgc==kPdgPi0) {
370 scale = fNeutralPionMFPScale;
371 }
372 else if (pdgc==kPdgProton || pdgc==kPdgNeutron) {
373 scale = fNucleonMFPScale;
374 }
375
376 RandomGen * rnd = RandomGen::Instance();
377
378 string fINukeMode = this->GetINukeMode();
379 string fINukeModeGen = this->GetGenINukeMode();
380
381 double L = utils::intranuke2025::MeanFreePath(p->Pdg(), *p->X4(), *p->P4(), fRemnA,
383
384 LOG("Intranuke2025", pDEBUG) << "mode= " << fINukeModeGen;
385 L *= scale;
386
387 double d = -1.*L * TMath::Log(rnd->RndFsi().Rndm());
388
389 /* LOG("Intranuke2025", pDEBUG)
390 << "mode= " << fINukeMode << "; Mean free path = " << L << " fm / "
391 << "Generated path length = " << d << " fm";
392 */
393 return d;
394}
#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
double fChPionMFPScale
tweaking factors for tuning
double fDelRPion
factor by which Pion Compton wavelength gets multiplied to become nuclear size enhancement
virtual string GetINukeMode() const
int fRemnA
remnant nucleus A
virtual string GetGenINukeMode() const
int fRemnZ
remnant nucleus Z
bool fUseOset
Oset model for low energy pion in hN.
bool fAltOset
NuWro's table-based implementation (not recommended)
bool fXsecNNCorr
use nuclear medium correction for NN cross section
double fDelRNucleon
factor by which Nucleon Compton wavelength gets multiplied to become nuclear size enhancement
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, const bool useOset=false, const bool altOset=false, const bool xsecNNCorr=false, string INukeMode="XX2025")
Mean free path (pions, nucleons)

References fAltOset, fChPionMFPScale, fDelRNucleon, fDelRPion, fNeutralPionMFPScale, fNucleonMFPScale, fRemnA, fRemnZ, fUseOset, fXsecNNCorr, GetGenINukeMode(), GetINukeMode(), genie::RandomGen::Instance(), genie::kPdgNeutron, genie::kPdgPi0, genie::kPdgPiM, genie::kPdgPiP, genie::kPdgProton, LOG, genie::utils::intranuke2025::MeanFreePath(), pDEBUG, and genie::RandomGen::RndFsi().

Referenced by TransportHadrons().

◆ GenerateVertex()

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

Definition at line 120 of file Intranuke2025.cxx.

121{
122// Sets a vertex in the nucleus periphery
123// Called onlt in hadron/photon-nucleus interactions.
124
125 GHepParticle * nucltgt = evrec->TargetNucleus();
126 assert(nucltgt);
127
128 RandomGen * rnd = RandomGen::Instance();
129 TVector3 vtx(999999.,999999.,999999.);
130
131 // *** For h+A events (test mode):
132 // Assume a hadron beam with uniform intensity across an area,
133 // so we need to choose events uniformly within that area.
134 double x=999999., y=999999., epsilon = 0.001;
135 double R2 = TMath::Power(fTrackingRadius,2.);
136 double rp2 = TMath::Power(x,2.) + TMath::Power(y,2.);
137 while(rp2 > R2-epsilon) {
138 x = (fTrackingRadius-epsilon) * rnd->RndFsi().Rndm();
139 y = -fTrackingRadius + 2*fTrackingRadius * rnd->RndFsi().Rndm();
140 y -= ((y>0) ? epsilon : -epsilon);
141 rp2 = TMath::Power(x,2.) + TMath::Power(y,2.);
142 }
143 vtx.SetXYZ(x,y, -1.*TMath::Sqrt(TMath::Max(0.,R2-rp2)) + epsilon);
144
145 // get the actual unit vector along the incoming hadron direction
146 TVector3 direction = evrec->Probe()->P4()->Vect().Unit();
147
148 // rotate the vtx position
149 vtx.RotateUz(direction);
150
151 LOG("Intranuke2025", pNOTICE)
152 << "Generated vtx @ R = " << vtx.Mag() << " fm / "
153 << print::Vec3AsString(&vtx);
154
155 TObjArrayIter piter(evrec);
156 GHepParticle * p = 0;
157 while( (p = (GHepParticle *) piter.Next()) )
158 {
159 if(pdg::IsPseudoParticle(p->Pdg())) continue;
160 if(pdg::IsIon (p->Pdg())) continue;
161
162 p->SetPosition(vtx.x(), vtx.y(), vtx.z(), 0.);
163 }
164}
#define pNOTICE
Definition Messenger.h:61
void SetPosition(const TLorentzVector &v4)
double fTrackingRadius
tracking radius for the nucleus in the current event
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().

◆ GetAltOset()

bool genie::Intranuke2025::GetAltOset ( ) const
inline

Definition at line 94 of file Intranuke2025.h.

94{ return fAltOset; }

References fAltOset.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetDelRNucleon()

double genie::Intranuke2025::GetDelRNucleon ( ) const
inline

Definition at line 88 of file Intranuke2025.h.

88{ return fDelRNucleon; }

References fDelRNucleon.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetDelRPion()

double genie::Intranuke2025::GetDelRPion ( ) const
inline

Definition at line 87 of file Intranuke2025.h.

87{ return fDelRPion; }

References fDelRPion.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetGenINukeMode()

virtual string genie::Intranuke2025::GetGenINukeMode ( ) const
inlinevirtual

Reimplemented in genie::HAIntranuke2025, and genie::HNIntranuke2025.

Definition at line 75 of file Intranuke2025.h.

75{return "XX";};

Referenced by GenerateStep().

◆ GetHadStep()

double genie::Intranuke2025::GetHadStep ( ) const
inline

Definition at line 91 of file Intranuke2025.h.

91{ return fHadStep; }
double fHadStep
step size for intranuclear hadron transport

References fHadStep.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetINukeMode()

virtual string genie::Intranuke2025::GetINukeMode ( ) const
inlinevirtual

Reimplemented in genie::HAIntranuke2025, and genie::HNIntranuke2025.

Definition at line 74 of file Intranuke2025.h.

74{return "XX2025";};

Referenced by GenerateStep(), and genie::utils::intranuke2025::ProbSurvival().

◆ GetNR()

double genie::Intranuke2025::GetNR ( ) const
inline

Definition at line 85 of file Intranuke2025.h.

85{ return fNR; }
double fNR
param multiplying the nuclear radius, determining how far to track hadrons beyond the "nuclear bounda...

References fNR.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetNucRmvE()

double genie::Intranuke2025::GetNucRmvE ( ) const
inline

Definition at line 90 of file Intranuke2025.h.

90{ return fNucRmvE; }
double fNucRmvE
binding energy to subtract from cascade nucleons

References fNucRmvE.

◆ GetR0()

double genie::Intranuke2025::GetR0 ( ) const
inline

Definition at line 84 of file Intranuke2025.h.

84{ return fR0; }
double fR0
effective nuclear size param

References fR0.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetRemnA()

double genie::Intranuke2025::GetRemnA ( ) const
inline

Definition at line 81 of file Intranuke2025.h.

81{ return fRemnA; }

References fRemnA.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetRemnZ()

double genie::Intranuke2025::GetRemnZ ( ) const
inline

Definition at line 82 of file Intranuke2025.h.

82{ return fRemnZ; }

References fRemnZ.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetUseOset()

bool genie::Intranuke2025::GetUseOset ( ) const
inline

Definition at line 93 of file Intranuke2025.h.

93{ return fUseOset; }

References fUseOset.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ GetXsecNNCorr()

bool genie::Intranuke2025::GetXsecNNCorr ( ) const
inline

Definition at line 95 of file Intranuke2025.h.

95{ return fXsecNNCorr; }

References fXsecNNCorr.

Referenced by genie::utils::intranuke2025::ProbSurvival().

◆ HandleCompoundNucleus()

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

◆ IsInNucleus()

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

Definition at line 217 of file Intranuke2025.cxx.

218{
219// check whether the input particle is still within the nucleus
220//
221 return (p->X4()->Vect().Mag() < fTrackingRadius + fHadStep);
222}

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

Referenced by genie::HNIntranuke2025::HandleCompoundNucleus(), and TransportHadrons().

◆ LoadConfig()

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

Implemented in genie::HAIntranuke2025, and genie::HNIntranuke2025.

Referenced by Configure(), and Configure().

◆ NeedsRescattering()

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

Definition at line 181 of file Intranuke2025.cxx.

182{
183// checks whether the particle should be rescattered
184
185 assert(p);
186
189 // hadron/photon-nucleus scattering propagate the incoming particle
190 return (
192 && !pdg::IsIon(p->Pdg()));
193 }
194 else {
195 // attempt to rescatter anything marked as 'hadron in the nucleus'
196 return (p->Status() == kIStHadronInTheNucleus);
197 }
198}
GHepStatus_t Status(void) const
GEvGenMode_t fGMode
event generation mode (lepton+A, hadron+A, ...)
@ 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 Intranuke2025::ProcessEventRecord ( GHepRecord * event_rec) const
virtual

Implements genie::EventRecordVisitorI.

Reimplemented in genie::HAIntranuke2025, and genie::HNIntranuke2025.

Definition at line 82 of file Intranuke2025.cxx.

83{
84 // Do not continue if there is no nuclear target
85 GHepParticle * nucltgt = evrec->TargetNucleus();
86 if (!nucltgt) {
87 LOG("Intranuke2025", pINFO) << "No nuclear target found - INTRANUKE exits";
88 return;
89 }
90
91 // Decide tracking radius for the current nucleus (few * R0 * A^1/3)
92 this->SetTrackingRadius(nucltgt);
93
94 // Understand what the event generation mode is (hadron/photon-nucleus,
95 // lepton-nucleus, nucleon decay) from the input event.
96 // The determined mode has an effect on INTRANUKE behaviour (how to lookup
97 // the residual nucleus, whether to set an intranuclear vtx etc) but it
98 // does not affect the INTRANUKE physics.
99 fGMode = evrec->EventGenerationMode();
100
101 // For lepton-nucleus scattering and for nucleon decay intranuclear vtx
102 // position (in the target nucleus coord system) is set elsewhere.
103 // This method only takes effect in hadron/photon-nucleus interactions.
104 // In this special mode, an interaction vertex is set at the periphery
105 // of the target nucleus.
106// This is the only exception to the general case of setting vertex according to nuclear density presently anticipated.
109 {
110 this->GenerateVertex(evrec);
111 }
112
113 // Now transport all hadrons outside the tracking radius.
114 // Stepping part is common for both HA and HN.
115 // Once it has been estabished that an interaction takes place then
116 // HA and HN specific code takes over in order to simulate the final state.
117 this->TransportHadrons(evrec);
118}
#define pINFO
Definition Messenger.h:62
void GenerateVertex(GHepRecord *ev) const
void TransportHadrons(GHepRecord *ev) const
void SetTrackingRadius(const GHepParticle *p) const

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

Referenced by genie::HAIntranuke2025::ProcessEventRecord(), and genie::HNIntranuke2025::ProcessEventRecord().

◆ SetRemnA()

void genie::Intranuke2025::SetRemnA ( int A)
inline

Definition at line 78 of file Intranuke2025.h.

78{ fRemnA = A; }

References fRemnA.

◆ SetRemnZ()

void genie::Intranuke2025::SetRemnZ ( int Z)
inline

Definition at line 79 of file Intranuke2025.h.

79{ fRemnZ = Z; }

References fRemnZ.

◆ SetTrackingRadius()

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

Definition at line 166 of file Intranuke2025.cxx.

167{
168 assert(p && pdg::IsIon(p->Pdg()));
169 double A = p->A();
170 fTrackingRadius = fR0 * TMath::Power(A, 1./3.);
171
172 // multiply that by some input factor so that hadrons are tracked
173 // beyond the nuclear 'boundary' since the nuclear density distribution
174 // is not zero there
176
177 LOG("Intranuke2025", pNOTICE)
178 << "Setting tracking radius to R = " << fTrackingRadius;
179}
int A(void) const

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

Referenced by ProcessEventRecord().

◆ SimulateHadronicFinalState()

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

◆ TransportHadrons()

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

Definition at line 224 of file Intranuke2025.cxx.

225{
226// transport all hadrons outside the nucleus
227
228 int inucl = -1;
229 fRemnA = -1;
230 fRemnZ = -1;
231
232 // Get 'nuclear environment' at the beginning of hadron transport
233 // and keep track of the remnant nucleus A,Z
234
237 {
238 inucl = evrec->TargetNucleusPosition();
239 }
240 else if(fGMode == kGMdLeptonNucleus ||
243 inucl = evrec->RemnantNucleusPosition();
244 }
245
246 LOG("Intranuke2025", pNOTICE)
247 << "Propagating hadrons within nucleus found in position = " << inucl;
248 GHepParticle * nucl = evrec->Particle(inucl);
249 if(!nucl) {
250 LOG("Intranuke2025", pERROR)
251 << "No nucleus found in position = " << inucl;
252 LOG("Intranuke2025", pERROR)
253 << *evrec;
254 return;
255 }
256
257 fRemnA = nucl->A();
258 fRemnZ = nucl->Z();
259
260 LOG("Intranuke2025", pNOTICE)
261 << "Nucleus (A,Z) = (" << fRemnA << ", " << fRemnZ << ")";
262
263 const TLorentzVector & p4nucl = *(nucl->P4());
264 fRemnP4 = p4nucl;
265
266 // Loop over GHEP and run intranuclear rescattering on handled particles
267 TObjArrayIter piter(evrec);
268 GHepParticle * p = 0;
269 int icurr = -1;
270
271 while( (p = (GHepParticle *) piter.Next()) )
272 {
273 icurr++;
274
275 // Check whether the particle needs rescattering, otherwise skip it
276 if( ! this->NeedsRescattering(p) ) continue;
277
278 LOG("Intranuke2025", pNOTICE)
279 << " >> Stepping a " << p->Name()
280 << " with kinetic E = " << p->KinE() << " GeV";
281
282 // Rescatter a clone, not the original particle
283 GHepParticle * sp = new GHepParticle(*p);
284
285 // Set clone's mom to be the hadron that was cloned
286 sp->SetFirstMother(icurr);
287
288 // Check whether the particle can be rescattered
289 if(!this->CanRescatter(sp)) {
290
291 // if I can't rescatter it, I will just take it out of the nucleus
292 LOG("Intranuke2025", pNOTICE)
293 << "... Current version can't rescatter a " << sp->Name();
294 sp->SetFirstMother(icurr);
296 evrec->AddParticle(*sp);
297 delete sp;
298 continue; // <-- skip to next GHEP entry
299 }
300
301 // Start stepping particle out of the nucleus
302 bool has_interacted = false;
303 while ( this-> IsInNucleus(sp) )
304 {
305 // advance the hadron by a step
307
308 // check whether it interacts
309 double d = this->GenerateStep(evrec,sp);
310 has_interacted = (d<fHadStep);
311 if(has_interacted) break;
312 }//stepping
313
314 if(has_interacted && fRemnA>0) {
315 // the particle interacts - simulate the hadronic interaction
316 LOG("Intranuke2025", pNOTICE)
317 << "Particle has interacted at location: "
318 << sp->X4()->Vect().Mag() << " / nucl rad= " << fTrackingRadius;
319 this->SimulateHadronicFinalState(evrec,sp);
320 } else if(has_interacted && fRemnA<=0) {
321 // nothing left to interact with!
322 LOG("Intranuke2025", pNOTICE)
323 << "*** Nothing left to interact with, escaping.";
325 evrec->AddParticle(*sp);
326 evrec->Particle(sp->FirstMother())->SetRescatterCode(1);
327 } else {
328 // the exits the nucleus without interacting - Done with it!
329 LOG("Intranuke2025", pNOTICE)
330 << "*** Hadron escaped the nucleus! Done with it.";
332 evrec->AddParticle(*sp);
333 evrec->Particle(sp->FirstMother())->SetRescatterCode(1);
334 }
335 delete sp;
336
337 // Current snapshot
338 //LOG("Intranuke2025", pINFO) << "Current event record snapshot: " << *evrec;
339
340 }// GHEP entries
341
342 // Add remnant nucleus - that 'hadronic blob' has all the remaining hadronic
343 // 4p not put explicitly into the simulated particles
344 TLorentzVector v4(0.,0.,0.,0.);
345 GHepParticle remnant_nucleus(
347 evrec->AddParticle(remnant_nucleus);
348 // Mark the initial remnant nucleus as an intermediate state
349 // Don't do that in the hadron/photon-nucleus scatterig mode since the initial
350 // remnant nucleus and the target nucleus coincide.
353 evrec->Particle(inucl)->SetStatus(kIStIntermediateState);
354 }
355}
#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.
bool NeedsRescattering(const GHepParticle *p) const
double GenerateStep(GHepRecord *ev, GHepParticle *p) const
virtual void SimulateHadronicFinalState(GHepRecord *ev, GHepParticle *p) const =0
bool CanRescatter(const GHepParticle *p) const
TLorentzVector fRemnP4
P4 of remnant system.
bool IsInNucleus(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
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(), IsInNucleus(), genie::kGMdDarkMatterNucleus, genie::kGMdHadronNucleus, genie::kGMdLeptonNucleus, 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::intranuke2025::StepParticle(), genie::GHepRecord::TargetNucleusPosition(), genie::GHepParticle::X4(), and genie::GHepParticle::Z().

Referenced by ProcessEventRecord().

◆ IntranukeTester

friend class IntranukeTester
friend

Definition at line 58 of file Intranuke2025.h.

References IntranukeTester.

Referenced by IntranukeTester.

Member Data Documentation

◆ fAlgf

AlgFactory* genie::Intranuke2025::fAlgf
protected

algorithm factory instance

Definition at line 119 of file Intranuke2025.h.

◆ fAltOset

bool genie::Intranuke2025::fAltOset
protected

NuWro's table-based implementation (not recommended)

Definition at line 142 of file Intranuke2025.h.

Referenced by GenerateStep(), GetAltOset(), genie::HAIntranuke2025::LoadConfig(), and genie::HNIntranuke2025::LoadConfig().

◆ fChPionFracAbsScale

double genie::Intranuke2025::fChPionFracAbsScale
protected

◆ fChPionMFPScale

double genie::Intranuke2025::fChPionMFPScale
protected

tweaking factors for tuning

Definition at line 145 of file Intranuke2025.h.

Referenced by GenerateStep(), genie::HAIntranuke2025::LoadConfig(), and genie::HNIntranuke2025::LoadConfig().

◆ fDelRNucleon

double genie::Intranuke2025::fDelRNucleon
protected

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

Definition at line 131 of file Intranuke2025.h.

Referenced by GenerateStep(), GetDelRNucleon(), genie::HAIntranuke2025::LoadConfig(), and genie::HNIntranuke2025::LoadConfig().

◆ fDelRPion

double genie::Intranuke2025::fDelRPion
protected

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

Definition at line 130 of file Intranuke2025.h.

Referenced by GenerateStep(), GetDelRPion(), genie::HAIntranuke2025::LoadConfig(), and genie::HNIntranuke2025::LoadConfig().

◆ fDoCompoundNucleus

bool genie::Intranuke2025::fDoCompoundNucleus
protected

◆ fDoFermi

◆ fDoMassDiff

bool genie::Intranuke2025::fDoMassDiff
protected

whether or not to do mass diff. mode

Definition at line 139 of file Intranuke2025.h.

◆ fEPreEq

double genie::Intranuke2025::fEPreEq
protected

threshold for pre-equilibrium reaction

Definition at line 135 of file Intranuke2025.h.

Referenced by genie::HNIntranuke2025::HandleCompoundNucleus(), genie::HAIntranuke2025::LoadConfig(), and genie::HNIntranuke2025::LoadConfig().

◆ fFermiFac

◆ fFermiMomentum

double genie::Intranuke2025::fFermiMomentum
protected

◆ fGenPhaseSpace

TGenPhaseSpace genie::Intranuke2025::fGenPhaseSpace
mutableprotected

a phase space generator

Definition at line 117 of file Intranuke2025.h.

◆ fGMode

GEvGenMode_t genie::Intranuke2025::fGMode
mutableprotected

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

Definition at line 124 of file Intranuke2025.h.

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

◆ fHadroData2025

◆ fHadStep

double genie::Intranuke2025::fHadStep
protected

step size for intranuclear hadron transport

Definition at line 132 of file Intranuke2025.h.

Referenced by GetHadStep(), IsInNucleus(), genie::HAIntranuke2025::LoadConfig(), genie::HNIntranuke2025::LoadConfig(), and TransportHadrons().

◆ fNeutralPionFracAbsScale

double genie::Intranuke2025::fNeutralPionFracAbsScale
protected

◆ fNeutralPionMFPScale

double genie::Intranuke2025::fNeutralPionMFPScale
protected

◆ fNR

double genie::Intranuke2025::fNR
protected

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

Definition at line 128 of file Intranuke2025.h.

Referenced by GetNR(), genie::HAIntranuke2025::LoadConfig(), genie::HNIntranuke2025::LoadConfig(), and SetTrackingRadius().

◆ fNucAbsFac

double genie::Intranuke2025::fNucAbsFac
protected

◆ fNucCEXFac

double genie::Intranuke2025::fNucCEXFac
protected

◆ fNucleonFracAbsScale

double genie::Intranuke2025::fNucleonFracAbsScale
protected

◆ fNucleonFracCExScale

double genie::Intranuke2025::fNucleonFracCExScale
protected

◆ fNucleonFracInelScale

double genie::Intranuke2025::fNucleonFracInelScale
protected

◆ fNucleonFracPiProdScale

double genie::Intranuke2025::fNucleonFracPiProdScale
protected

◆ fNucleonMFPScale

double genie::Intranuke2025::fNucleonMFPScale
protected

◆ fNuclmodel

◆ fNucRmvE

◆ fPionFracCExScale

double genie::Intranuke2025::fPionFracCExScale
protected

◆ fPionFracInelScale

double genie::Intranuke2025::fPionFracInelScale
protected

◆ fPionFracPiProdScale

double genie::Intranuke2025::fPionFracPiProdScale
protected

◆ fR0

double genie::Intranuke2025::fR0
protected

effective nuclear size param

Definition at line 127 of file Intranuke2025.h.

Referenced by GetR0(), genie::HAIntranuke2025::LoadConfig(), genie::HNIntranuke2025::LoadConfig(), and SetTrackingRadius().

◆ fRemnA

◆ fRemnP4

◆ fRemnZ

◆ fTrackingRadius

double genie::Intranuke2025::fTrackingRadius
mutableprotected

tracking radius for the nucleus in the current event

Definition at line 116 of file Intranuke2025.h.

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

◆ fUseOset

bool genie::Intranuke2025::fUseOset
protected

◆ fXsecNNCorr

bool genie::Intranuke2025::fXsecNNCorr
protected

use nuclear medium correction for NN cross section

Definition at line 143 of file Intranuke2025.h.

Referenced by GenerateStep(), GetXsecNNCorr(), genie::HAIntranuke2025::LoadConfig(), and genie::HNIntranuke2025::LoadConfig().


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