Import Geant4 10.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 14:11:04 +02:00
parent c9b32a6c0a
commit d4af681f38
4886 changed files with 420149 additions and 1023309 deletions
@@ -72,7 +72,7 @@ G4double G4ProtonInelasticCrossSection::GetProtonCrossSection(
if (kineticEnergy > thEnergy) { kineticEnergy = thEnergy; }
G4double a = nist->GetAtomicMassAmu(Z);
G4double a13 = std::pow(a,-0.3333333333);
G4double a13 = G4Pow::GetInstance()->powA(a,-0.3333333333);
G4int nOfNeutrons = G4lrint(a) - Z;
kineticEnergy /=GeV;
G4double alog10E = std::log10(kineticEnergy);
@@ -83,18 +83,18 @@ G4double G4ProtonInelasticCrossSection::GetProtonCrossSection(
G4double b0 = 2.247-0.915*(1 - a13);
G4double fac1 = b0*(1 - a13);
G4double fac2 = 1.;
if(nOfNeutrons > 1) { fac2=std::log((G4double(nOfNeutrons))); }
if(nOfNeutrons > 1) { fac2=G4Log((G4double(nOfNeutrons))); }
G4double crossSection = 1.0E31*fac*fac2*(1. + 1./a13 - fac1);
// high energy correction
crossSection *= (1 - 0.15*std::exp(-kineticEnergy))/(1.0 - 0.0007*a);
crossSection *= (1 - 0.15*G4Exp(-kineticEnergy))/(1.0 - 0.0007*a);
// first try on low energies: rise
G4double ff1= 0.70-0.002*a; // slope of the drop at medium energies.
G4double ff2= 1.00+1/a; // start of the slope.
G4double ff3= 0.8+18/a-0.002*a; // stephight
G4double ff4= 1.0 - (1.0/(1+std::exp(-8*ff1*(alog10E + 1.37*ff2))));
G4double ff4= 1.0 - (1.0/(1+G4Exp(-8*ff1*(alog10E + 1.37*ff2))));
crossSection *= (1 + ff3*ff4);
@@ -105,6 +105,6 @@ G4double G4ProtonInelasticCrossSection::GetProtonCrossSection(
ff4=-8.*ff1*(alog10E + 2.0*ff2);
crossSection *= millibarn/(1. + std::exp(ff4));
crossSection *= millibarn/(1. + G4Exp(ff4));
return crossSection;
}