Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4RPGNucleonInelastic Class Reference

#include <G4RPGNucleonInelastic.hh>

+ Inheritance diagram for G4RPGNucleonInelastic:

Public Member Functions

 G4RPGNucleonInelastic (const G4String &modelName="RPGNucleonInelastic")
 
 ~G4RPGNucleonInelastic ()
 
- Public Member Functions inherited from G4RPGInelastic
 G4RPGInelastic (const G4String &modelName="RPGInelastic")
 
virtual ~G4RPGInelastic ()
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int value)
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 
virtual void ModelDescription (std::ostream &outFile) const
 
virtual void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void InitialiseModel ()
 
 G4HadronicInteraction (const G4HadronicInteraction &right)=delete
 
const G4HadronicInteractionoperator= (const G4HadronicInteraction &right)=delete
 
G4bool operator== (const G4HadronicInteraction &right) const =delete
 
G4bool operator!= (const G4HadronicInteraction &right) const =delete
 

Protected Member Functions

G4int GetMultiplicityT1 (G4double KE) const
 
G4int GetMultiplicityT0 (G4double KE) const
 
std::vector< G4intGetFSPartTypesForT1 (G4int mult, G4double KE, G4int tindex) const
 
std::vector< G4intGetFSPartTypesForT0 (G4int mult, G4double KE) const
 
std::vector< G4intGetFSPartTypesForPP (G4int mult, G4double KE) const
 
std::vector< G4intGetFSPartTypesForNN (G4int mult, G4double KE) const
 
std::vector< G4intGetFSPartTypesForPN (G4int mult, G4double KE) const
 
std::vector< G4intGetFSPartTypesForNP (G4int mult, G4double KE) const
 
- Protected Member Functions inherited from G4RPGInelastic
G4double Pmltpc (G4int np, G4int nm, G4int nz, G4int n, G4double b, G4double c)
 
G4int Factorial (G4int n)
 
G4bool MarkLeadingStrangeParticle (const G4ReactionProduct &currentParticle, const G4ReactionProduct &targetParticle, G4ReactionProduct &leadParticle)
 
void SetUpPions (const G4int np, const G4int nm, const G4int nz, G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen)
 
void GetNormalizationConstant (const G4double availableEnergy, G4double &n, G4double &anpn)
 
void CalculateMomenta (G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, const G4HadProjectile *originalIncident, const G4DynamicParticle *originalTarget, G4ReactionProduct &modifiedOriginal, G4Nucleus &targetNucleus, G4ReactionProduct &currentParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged, G4bool &targetHasChanged, G4bool quasiElastic)
 
void SetUpChange (G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct &currentParticle, G4ReactionProduct &targetParticle, G4bool &incidentHasChanged)
 
std::pair< G4int, G4doubleinterpolateEnergy (G4double ke) const
 
G4int sampleFlat (std::vector< G4double > sigma) const
 
void CheckQnums (G4FastVector< G4ReactionProduct, 256 > &vec, G4int &vecLen, G4ReactionProduct &currentParticle, G4ReactionProduct &targetParticle, G4double Q, G4double B, G4double S)
 
- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 

Static Protected Attributes

static const G4int pPindex [8][2]
 
static const G4int pNindex [8][2]
 
static const G4int T1_2bfs [2][1][2]
 
static const G4int T1_3bfs [2][6][3]
 
static const G4int T1_4bfs [2][18][4]
 
static const G4int T1_5bfs [2][32][5]
 
static const G4int T1_6bfs [2][7][6]
 
static const G4int T1_7bfs [2][8][7]
 
static const G4int T1_8bfs [2][10][8]
 
static const G4int T1_9bfs [2][11][9]
 
static const G4int T0_2bfs [1][2]
 
static const G4int T0_3bfs [9][3]
 
static const G4int T0_4bfs [22][4]
 
static const G4int T0_5bfs [38][5]
 
static const G4int T0_6bfs [7][6]
 
static const G4int T0_7bfs [9][7]
 
static const G4int T0_8bfs [10][8]
 
static const G4int T0_9bfs [12][9]
 
static G4ThreadLocal G4double pPtot [30]
 
static G4ThreadLocal G4double pNtot [30]
 
static G4ThreadLocal G4double t1_dSigma_dMult [8][30]
 
static G4ThreadLocal G4double t0_dSigma_dMult [8][30]
 
static const G4float pPCrossSections [93][30]
 
static const G4float pNCrossSections [108][30]
 

Additional Inherited Members

- Protected Types inherited from G4RPGInelastic
enum  {
  pi0 , pip , pim , kp ,
  km , k0 , k0b , pro ,
  neu , lam , sp , s0 ,
  sm , xi0 , xim , om ,
  ap , an
}
 
- Protected Attributes inherited from G4RPGInelastic
G4RPGFragmentation fragmentation
 
G4RPGTwoCluster twoCluster
 
G4RPGPionSuppression pionSuppression
 
G4RPGStrangeProduction strangeProduction
 
G4RPGTwoBody twoBody
 
G4ParticleDefinitionparticleDef [18]
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Detailed Description

Definition at line 41 of file G4RPGNucleonInelastic.hh.

Constructor & Destructor Documentation

◆ G4RPGNucleonInelastic()

G4RPGNucleonInelastic::G4RPGNucleonInelastic ( const G4String modelName = "RPGNucleonInelastic")

Definition at line 32 of file G4RPGNucleonInelastic.cc.

33 :G4RPGInelastic(modelName)
34{
35 SetMinEnergy( 0.0 );
36 SetMaxEnergy( 30.*GeV );
37
38 // Initialize t1_dSigma_dMult, t0_dSigma_dMult,
39 // nucleon-nucleon inelastic cross sections for a given multiplicity
40 // for |T_z| = 1 and 0, respectively
41
42 G4int i, j, k;
43 G4int start, stop;
44
45 for (j = 0; j < 8; j++) {
46 start = pPindex[j][0];
47 stop = pPindex[j][1] + 1;
48 for (k = 0; k < 30; k++) {
49 t1_dSigma_dMult[j][k] = 0.0;
50 for (i = start; i < stop; i++) t1_dSigma_dMult[j][k] += pPCrossSections[i][k];
51 }
52
53 start = pNindex[j][0];
54 stop = pNindex[j][1] + 1;
55 for (k = 0; k < 30; k++) {
56 t0_dSigma_dMult[j][k] = 0.0;
57 for (i = start; i < stop; i++) t0_dSigma_dMult[j][k] += pNCrossSections[i][k];
58 }
59 }
60
61 // Initialize total cross section array
62
63 for (k = 0; k < 30; k++) {
64 pPtot[k] = 0.0;
65 pNtot[k] = 0.0;
66 for (j = 0; j < 8; j++) {
67 pPtot[k] += t1_dSigma_dMult[j][k];
68 pNtot[k] += t0_dSigma_dMult[j][k];
69 }
70 }
71
72 // printCrossSections();
73}
int G4int
Definition: G4Types.hh:85
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
static G4ThreadLocal G4double t1_dSigma_dMult[8][30]
static G4ThreadLocal G4double pPtot[30]
static const G4float pPCrossSections[93][30]
static G4ThreadLocal G4double t0_dSigma_dMult[8][30]
static const G4int pPindex[8][2]
static const G4int pNindex[8][2]
static G4ThreadLocal G4double pNtot[30]
static const G4float pNCrossSections[108][30]

◆ ~G4RPGNucleonInelastic()

G4RPGNucleonInelastic::~G4RPGNucleonInelastic ( )
inline

Definition at line 47 of file G4RPGNucleonInelastic.hh.

47{ }

Member Function Documentation

◆ GetFSPartTypesForNN()

std::vector< G4int > G4RPGNucleonInelastic::GetFSPartTypesForNN ( G4int  mult,
G4double  KE 
) const
inlineprotected

Definition at line 64 of file G4RPGNucleonInelastic.hh.

65 {return GetFSPartTypesForT1(mult, KE, 1); }
std::vector< G4int > GetFSPartTypesForT1(G4int mult, G4double KE, G4int tindex) const

◆ GetFSPartTypesForNP()

std::vector< G4int > G4RPGNucleonInelastic::GetFSPartTypesForNP ( G4int  mult,
G4double  KE 
) const
inlineprotected

Definition at line 70 of file G4RPGNucleonInelastic.hh.

71 {return GetFSPartTypesForT0(mult, KE); }
std::vector< G4int > GetFSPartTypesForT0(G4int mult, G4double KE) const

◆ GetFSPartTypesForPN()

std::vector< G4int > G4RPGNucleonInelastic::GetFSPartTypesForPN ( G4int  mult,
G4double  KE 
) const
inlineprotected

Definition at line 67 of file G4RPGNucleonInelastic.hh.

68 {return GetFSPartTypesForT0(mult, KE); }

◆ GetFSPartTypesForPP()

std::vector< G4int > G4RPGNucleonInelastic::GetFSPartTypesForPP ( G4int  mult,
G4double  KE 
) const
inlineprotected

Definition at line 61 of file G4RPGNucleonInelastic.hh.

62 {return GetFSPartTypesForT1(mult, KE, 0); }

◆ GetFSPartTypesForT0()

std::vector< G4int > G4RPGNucleonInelastic::GetFSPartTypesForT0 ( G4int  mult,
G4double  KE 
) const
protected

Definition at line 137 of file G4RPGNucleonInelastic.cc.

138{
139 G4int i;
140 G4double sigint(0.);
141 std::vector<G4double> sigma;
142
143 std::pair<G4int, G4double> epair = interpolateEnergy(KE);
144 G4int k = epair.first;
145 G4double fraction = epair.second;
146
147 G4int start = pNindex[mult-2][0];
148 G4int stop = pNindex[mult-2][1];
149
150 for(i = start; i < stop; i++) {
151 sigint = pNCrossSections[i][k]
152 + fraction*(pNCrossSections[i][k+1] - pNCrossSections[i][k]);
153 sigma.push_back(sigint);
154 }
155
156 G4int channel = sampleFlat(sigma);
157
158 std::vector<G4int> kinds;
159
160 if (mult == 2) {
161 for(i = 0; i < mult; i++) kinds.push_back(T0_2bfs[channel][i]);
162 } else if (mult == 3) {
163 for(i = 0; i < mult; i++) kinds.push_back(T0_3bfs[channel][i]);
164 } else if (mult == 4) {
165 for(i = 0; i < mult; i++) kinds.push_back(T0_4bfs[channel][i]);
166 } else if (mult == 5) {
167 for(i = 0; i < mult; i++) kinds.push_back(T0_5bfs[channel][i]);
168 } else if (mult == 6) {
169 for(i = 0; i < mult; i++) kinds.push_back(T0_6bfs[channel][i]);
170 } else if (mult == 7) {
171 for(i = 0; i < mult; i++) kinds.push_back(T0_7bfs[channel][i]);
172 } else if (mult == 8) {
173 for(i = 0; i < mult; i++) kinds.push_back(T0_8bfs[channel][i]);
174 } else if (mult == 9) {
175 for(i = 0; i < mult; i++) kinds.push_back(T0_9bfs[channel][i]);
176 } else {
177 G4cout << " Illegal multiplicity " << G4endl;
178 }
179
180 return kinds;
181}
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4int sampleFlat(std::vector< G4double > sigma) const
std::pair< G4int, G4double > interpolateEnergy(G4double ke) const
static const G4int T0_2bfs[1][2]
static const G4int T0_8bfs[10][8]
static const G4int T0_9bfs[12][9]
static const G4int T0_4bfs[22][4]
static const G4int T0_5bfs[38][5]
static const G4int T0_6bfs[7][6]
static const G4int T0_7bfs[9][7]
static const G4int T0_3bfs[9][3]

Referenced by GetFSPartTypesForNP(), and GetFSPartTypesForPN().

◆ GetFSPartTypesForT1()

std::vector< G4int > G4RPGNucleonInelastic::GetFSPartTypesForT1 ( G4int  mult,
G4double  KE,
G4int  tindex 
) const
protected

Definition at line 185 of file G4RPGNucleonInelastic.cc.

187{
188 G4int i;
189 G4double sigint(0.);
190 std::vector<G4double> sigma;
191
192 std::pair<G4int, G4double> epair = interpolateEnergy(KE);
193 G4int k = epair.first;
194 G4double fraction = epair.second;
195
196 G4int start = pPindex[mult-2][0];
197 G4int stop = pPindex[mult-2][1];
198
199 for(i = start; i < stop; i++) {
200 sigint = pPCrossSections[i][k]
201 + fraction*(pPCrossSections[i][k+1] - pPCrossSections[i][k]);
202 sigma.push_back(sigint);
203 }
204
205 G4int channel = sampleFlat(sigma);
206
207 std::vector<G4int> kinds;
208
209 if (mult == 2) {
210 for(i = 0; i < mult; i++) kinds.push_back(T1_2bfs[tzindex][channel][i]);
211 } else if (mult == 3) {
212 for(i = 0; i < mult; i++) kinds.push_back(T1_3bfs[tzindex][channel][i]);
213 } else if (mult == 4) {
214 for(i = 0; i < mult; i++) kinds.push_back(T1_4bfs[tzindex][channel][i]);
215 } else if (mult == 5) {
216 for(i = 0; i < mult; i++) kinds.push_back(T1_5bfs[tzindex][channel][i]);
217 } else if (mult == 6) {
218 for(i = 0; i < mult; i++) kinds.push_back(T1_6bfs[tzindex][channel][i]);
219 } else if (mult == 7) {
220 for(i = 0; i < mult; i++) kinds.push_back(T1_7bfs[tzindex][channel][i]);
221 } else if (mult == 8) {
222 for(i = 0; i < mult; i++) kinds.push_back(T1_8bfs[tzindex][channel][i]);
223 } else if (mult == 9) {
224 for(i = 0; i < mult; i++) kinds.push_back(T1_9bfs[tzindex][channel][i]);
225 } else {
226 G4cout << " Illegal multiplicity " << G4endl;
227 }
228
229 return kinds;
230}
static const G4int T1_3bfs[2][6][3]
static const G4int T1_2bfs[2][1][2]
static const G4int T1_4bfs[2][18][4]
static const G4int T1_5bfs[2][32][5]
static const G4int T1_9bfs[2][11][9]
static const G4int T1_7bfs[2][8][7]
static const G4int T1_6bfs[2][7][6]
static const G4int T1_8bfs[2][10][8]

Referenced by GetFSPartTypesForNN(), and GetFSPartTypesForPP().

◆ GetMultiplicityT0()

G4int G4RPGNucleonInelastic::GetMultiplicityT0 ( G4double  KE) const
protected

Definition at line 98 of file G4RPGNucleonInelastic.cc.

99{
100 G4double multint(0.);
101 std::vector<G4double> sigma;
102
103 std::pair<G4int, G4double> epair = interpolateEnergy(KE);
104 G4int k = epair.first;
105 G4double fraction = epair.second;
106
107 for(G4int j = 0; j < 8; j++) {
108 multint = t0_dSigma_dMult[j][k]
109 + fraction*(t0_dSigma_dMult[j][k+1] - t0_dSigma_dMult[j][k]);
110 sigma.push_back(multint);
111 }
112
113 return sampleFlat(sigma) + 2;
114}

◆ GetMultiplicityT1()

G4int G4RPGNucleonInelastic::GetMultiplicityT1 ( G4double  KE) const
protected

Definition at line 117 of file G4RPGNucleonInelastic.cc.

118{
119 G4double multint(0.);
120 std::vector<G4double> sigma;
121
122 std::pair<G4int, G4double> epair = interpolateEnergy(KE);
123 G4int k = epair.first;
124 G4double fraction = epair.second;
125
126 for(G4int j = 0; j < 8; j++) {
127 multint = t1_dSigma_dMult[j][k]
128 + fraction*(t1_dSigma_dMult[j][k+1] - t1_dSigma_dMult[j][k]);
129 sigma.push_back(multint);
130 }
131
132 return sampleFlat(sigma) + 2;
133}

Member Data Documentation

◆ pNCrossSections

const G4float G4RPGNucleonInelastic::pNCrossSections
staticprotected

Definition at line 101 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetFSPartTypesForT0().

◆ pNindex

const G4int G4RPGNucleonInelastic::pNindex
staticprotected
Initial value:
=
{{0, 0}, {1,9}, {10,31}, {32,69}, {70,76}, {77,85}, {86,95}, {96,107}}

Definition at line 75 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetFSPartTypesForT0().

◆ pNtot

G4ThreadLocal G4double G4RPGNucleonInelastic::pNtot
staticprotected

Definition at line 96 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic().

◆ pPCrossSections

const G4float G4RPGNucleonInelastic::pPCrossSections
staticprotected

Definition at line 100 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetFSPartTypesForT1().

◆ pPindex

const G4int G4RPGNucleonInelastic::pPindex
staticprotected
Initial value:
=
{{0, 0}, {1, 6}, {7,24}, {25,56}, {57,63}, {64,71}, {72,81}, {82,92}}

Definition at line 74 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetFSPartTypesForT1().

◆ pPtot

G4ThreadLocal G4double G4RPGNucleonInelastic::pPtot
staticprotected

Definition at line 95 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic().

◆ T0_2bfs

const G4int G4RPGNucleonInelastic::T0_2bfs
staticprotected
Initial value:

Definition at line 86 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT0().

◆ T0_3bfs

const G4int G4RPGNucleonInelastic::T0_3bfs
staticprotected

◆ T0_4bfs

const G4int G4RPGNucleonInelastic::T0_4bfs
staticprotected
Initial value:

Definition at line 88 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT0().

◆ T0_5bfs

const G4int G4RPGNucleonInelastic::T0_5bfs
staticprotected

◆ T0_6bfs

const G4int G4RPGNucleonInelastic::T0_6bfs
staticprotected
Initial value:

Definition at line 90 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT0().

◆ T0_7bfs

const G4int G4RPGNucleonInelastic::T0_7bfs
staticprotected

◆ T0_8bfs

const G4int G4RPGNucleonInelastic::T0_8bfs
staticprotected

◆ T0_9bfs

const G4int G4RPGNucleonInelastic::T0_9bfs
staticprotected

◆ t0_dSigma_dMult

G4ThreadLocal G4double G4RPGNucleonInelastic::t0_dSigma_dMult
staticprotected

Definition at line 98 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetMultiplicityT0().

◆ T1_2bfs

const G4int G4RPGNucleonInelastic::T1_2bfs
staticprotected
Initial value:
=
{{{pro,pro}},
{{neu,neu}}}

Definition at line 77 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT1().

◆ T1_3bfs

const G4int G4RPGNucleonInelastic::T1_3bfs
staticprotected
Initial value:
=
{{{pro,pro,pi0}, {pro,neu,pip}, {pro,lam,kp},
{pro,s0,kp}, {pro,sp,k0}, {neu,sp,kp}},
{{neu,neu,pi0}, {pro,neu,pim}, {neu,lam,k0},
{neu,s0,k0}, {neu,sm,kp}, {pro,sm,k0}}}

Definition at line 78 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT1().

◆ T1_4bfs

const G4int G4RPGNucleonInelastic::T1_4bfs
staticprotected
Initial value:

Definition at line 79 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT1().

◆ T1_5bfs

const G4int G4RPGNucleonInelastic::T1_5bfs
staticprotected

◆ T1_6bfs

const G4int G4RPGNucleonInelastic::T1_6bfs
staticprotected

◆ T1_7bfs

const G4int G4RPGNucleonInelastic::T1_7bfs
staticprotected

◆ T1_8bfs

◆ T1_9bfs

◆ t1_dSigma_dMult

G4ThreadLocal G4double G4RPGNucleonInelastic::t1_dSigma_dMult
staticprotected

Definition at line 97 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetMultiplicityT1().


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