Geant4 9.6.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)=0
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &, G4Nucleus &)
 
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)
 
const G4HadronicInteractionGetMyPointer () const
 
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
 
G4bool operator== (const G4HadronicInteraction &right) const
 
G4bool operator!= (const G4HadronicInteraction &right) 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
 

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 G4double pPtot [30]
 
static G4double pNtot [30]
 
static G4double t1_dSigma_dMult [8][30]
 
static 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 42 of file G4RPGNucleonInelastic.hh.

Constructor & Destructor Documentation

◆ G4RPGNucleonInelastic()

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

Definition at line 33 of file G4RPGNucleonInelastic.cc.

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

◆ ~G4RPGNucleonInelastic()

G4RPGNucleonInelastic::~G4RPGNucleonInelastic ( )
inline

Definition at line 48 of file G4RPGNucleonInelastic.hh.

48{ }

Member Function Documentation

◆ GetFSPartTypesForNN()

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

Definition at line 65 of file G4RPGNucleonInelastic.hh.

66 {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 71 of file G4RPGNucleonInelastic.hh.

72 {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 68 of file G4RPGNucleonInelastic.hh.

69 {return GetFSPartTypesForT0(mult, KE); }

◆ GetFSPartTypesForPP()

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

Definition at line 62 of file G4RPGNucleonInelastic.hh.

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

◆ GetFSPartTypesForT0()

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

Definition at line 138 of file G4RPGNucleonInelastic.cc.

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

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

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

◆ GetMultiplicityT1()

G4int G4RPGNucleonInelastic::GetMultiplicityT1 ( G4double  KE) const
protected

Definition at line 118 of file G4RPGNucleonInelastic.cc.

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

Member Data Documentation

◆ pNCrossSections

const G4float G4RPGNucleonInelastic::pNCrossSections
staticprotected

Definition at line 102 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 76 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetFSPartTypesForT0().

◆ pNtot

G4double G4RPGNucleonInelastic::pNtot
staticprotected

Definition at line 97 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic().

◆ pPCrossSections

const G4float G4RPGNucleonInelastic::pPCrossSections
staticprotected

Definition at line 101 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 75 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetFSPartTypesForT1().

◆ pPtot

G4double G4RPGNucleonInelastic::pPtot
staticprotected

Definition at line 96 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic().

◆ T0_2bfs

const G4int G4RPGNucleonInelastic::T0_2bfs
staticprotected
Initial value:

Definition at line 87 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT0().

◆ T0_3bfs

◆ T0_4bfs

const G4int G4RPGNucleonInelastic::T0_4bfs
staticprotected
Initial value:

Definition at line 89 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 91 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

◆ t0_dSigma_dMult

G4double G4RPGNucleonInelastic::t0_dSigma_dMult
staticprotected

Definition at line 99 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 78 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 79 of file G4RPGNucleonInelastic.hh.

Referenced by GetFSPartTypesForT1().

◆ T1_4bfs

const G4int G4RPGNucleonInelastic::T1_4bfs
staticprotected
Initial value:

Definition at line 80 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

G4double G4RPGNucleonInelastic::t1_dSigma_dMult
staticprotected

Definition at line 98 of file G4RPGNucleonInelastic.hh.

Referenced by G4RPGNucleonInelastic(), and GetMultiplicityT1().


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