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

#include <G4HadronCrossSections.hh>

+ Inheritance diagram for G4HadronCrossSections:

Public Member Functions

 G4HadronCrossSections ()
 
 ~G4HadronCrossSections ()
 
G4bool IsApplicable (const G4DynamicParticle *aParticle)
 
G4double GetElasticCrossSection (const G4DynamicParticle *, G4int, G4int)
 
G4double GetInelasticCrossSection (const G4DynamicParticle *, G4int, G4int)
 
G4double GetCaptureCrossSection (const G4DynamicParticle *, G4int)
 
G4double GetFissionCrossSection (const G4DynamicParticle *, G4int, G4int)
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel ()
 

Static Public Member Functions

static G4HadronCrossSectionsInstance ()
 
static void SetCorrectInelasticNearZero (G4bool value)
 
static G4bool GetCorrectInelasticNearZero ()
 

Detailed Description

Definition at line 63 of file G4HadronCrossSections.hh.

Constructor & Destructor Documentation

◆ G4HadronCrossSections()

G4HadronCrossSections::G4HadronCrossSections ( )

Definition at line 1217 of file G4HadronCrossSections.cc.

1218 : prevParticleDefinition(0), prevElement(0), prevZZ(0), prevAA(0),
1219 prevKineticEnergy(DBL_MAX), lastEkx(0.), lastEkxPower(0.), verboseLevel(0)
1220{
1221 siginelastic = sigelastic = 0.0;
1222 g4pow = G4Pow::GetInstance();
1223}
static G4Pow * GetInstance()
Definition: G4Pow.cc:50
#define DBL_MAX
Definition: templates.hh:83

◆ ~G4HadronCrossSections()

G4HadronCrossSections::~G4HadronCrossSections ( )

Definition at line 1225 of file G4HadronCrossSections.cc.

1226{}

Member Function Documentation

◆ GetCaptureCrossSection()

G4double G4HadronCrossSections::GetCaptureCrossSection ( const G4DynamicParticle aParticle,
G4int  ZZ 
)

Definition at line 1556 of file G4HadronCrossSections.cc.

1558{
1559 if (GetParticleCode(aParticle) != 16) return 0.;
1560 G4double ek = aParticle->GetKineticEnergy()/GeV;
1561 if (ek > 0.0327) { return 0.; }
1562
1563 G4double ekx = std::max(ek, 1.e-9);
1564 if (ekx != lastEkx) {
1565 lastEkx = ekx;
1566 lastEkxPower = std::pow(ekx*1.e6, 0.577);
1567 }
1568
1569 G4int izno = ZZ;
1570 if (izno > 100) izno = 100; // Not in GHESIG
1571 izno = izno - 1; // For array indexing
1572 G4double sigcap = 11.12*cscap[izno]/lastEkxPower;
1573
1574 // Convert cross section from mb to default units
1575 sigcap = sigcap*millibarn;
1576 return sigcap;
1577}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
G4double GetKineticEnergy() const

Referenced by G4HadronCaptureDataSet::GetElementCrossSection().

◆ GetCorrectInelasticNearZero()

static G4bool G4HadronCrossSections::GetCorrectInelasticNearZero ( )
inlinestatic

Definition at line 89 of file G4HadronCrossSections.hh.

90 {return correctInelasticNearZero;}

◆ GetElasticCrossSection()

G4double G4HadronCrossSections::GetElasticCrossSection ( const G4DynamicParticle particle,
G4int  ZZ,
G4int  AA 
)

Definition at line 1260 of file G4HadronCrossSections.cc.

1262{
1263 if (particle->GetDefinition() != prevParticleDefinition ||
1264 particle->GetKineticEnergy() != prevKineticEnergy ||
1265 ZZ != prevZZ || AA != prevAA)
1266 { CalcScatteringCrossSections(particle, ZZ, AA); }
1267
1268 if (verboseLevel > 1) {
1269 G4cout << " x-section elastic(mb)= "
1270 << sigelastic/millibarn << G4endl;
1271 }
1272 return sigelastic;
1273}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition * GetDefinition() const

Referenced by G4HadronElasticDataSet::GetElementCrossSection().

◆ GetFissionCrossSection()

G4double G4HadronCrossSections::GetFissionCrossSection ( const G4DynamicParticle aParticle,
G4int  ZZ,
G4int  AA 
)

Definition at line 1581 of file G4HadronCrossSections.cc.

1583{
1584 if (AA < 230) return 0;
1585
1586 G4double ek = aParticle->GetKineticEnergy()/GeV;
1587
1588 G4int ie1 = 0;
1589 G4int ie2 = NFISS - 1;
1590 do {
1591 G4int midBin = (ie1 + ie2)/2;
1592 if (ek < ekfiss[midBin])
1593 ie2 = midBin;
1594 else
1595 ie1 = midBin;
1596 } while (ie2 - ie1 > 1);
1597 G4int i = ie2;
1598 if (ek < ekfiss[0]) i = 0;
1599
1600 G4int j = 4;
1601 if (ek <= 0.01) {
1602 if (ZZ == 92 && AA == 233) j = 1;
1603 else if (ZZ == 92 && AA == 235) j = 2;
1604 else if (ZZ == 94 && AA == 239) j = 3;
1605 }
1606
1607 G4double z43ba;
1608 if (j == 4) {
1609 z43ba = ZZ*g4pow->Z13(ZZ)/G4double(AA);
1610 z43ba = std::max(-67. + 38.7*z43ba, 0.);
1611 } else {
1612 z43ba = 1.;
1613 }
1614 j = j - 1; // For array indexing
1615
1616 G4double sigfiss = csfiss[j][i]*z43ba;
1617 sigfiss = sigfiss*millibarn;
1618 return sigfiss;
1619}
G4double Z13(G4int Z)
Definition: G4Pow.hh:110

Referenced by G4HadronFissionDataSet::GetElementCrossSection().

◆ GetInelasticCrossSection()

G4double G4HadronCrossSections::GetInelasticCrossSection ( const G4DynamicParticle particle,
G4int  ZZ,
G4int  AA 
)

Definition at line 1243 of file G4HadronCrossSections.cc.

1245{
1246 if (particle->GetDefinition() != prevParticleDefinition ||
1247 particle->GetKineticEnergy() != prevKineticEnergy ||
1248 ZZ != prevZZ || AA != prevAA)
1249 { CalcScatteringCrossSections(particle, ZZ, AA); }
1250 if (verboseLevel > 1) {
1251 G4cout << " x-section inelastic(mb)= "
1252 << siginelastic/millibarn << G4endl;
1253 }
1254
1255 return siginelastic;
1256}

Referenced by G4HadronInelasticDataSet::GetElementCrossSection().

◆ GetVerboseLevel()

G4int G4HadronCrossSections::GetVerboseLevel ( )
inline

Definition at line 94 of file G4HadronCrossSections.hh.

94{return verboseLevel;}

◆ Instance()

G4HadronCrossSections * G4HadronCrossSections::Instance ( )
static

◆ IsApplicable()

G4bool G4HadronCrossSections::IsApplicable ( const G4DynamicParticle aParticle)

Definition at line 1237 of file G4HadronCrossSections.cc.

1238{
1239 return (GetParticleCode(aParticle) > 0);
1240}

Referenced by G4HadronElasticDataSet::IsElementApplicable(), G4HadronFissionDataSet::IsElementApplicable(), and G4HadronInelasticDataSet::IsElementApplicable().

◆ SetCorrectInelasticNearZero()

static void G4HadronCrossSections::SetCorrectInelasticNearZero ( G4bool  value)
inlinestatic

Definition at line 86 of file G4HadronCrossSections.hh.

87 {correctInelasticNearZero = value;}

◆ SetVerboseLevel()

void G4HadronCrossSections::SetVerboseLevel ( G4int  value)
inline

Definition at line 92 of file G4HadronCrossSections.hh.

92{verboseLevel = value;}

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