Import Geant4 10.4.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2017-06-30 10:49:55 +02:00
parent 3a5407696b
commit 1a1316fea4
2180 changed files with 237880 additions and 59109 deletions
@@ -23,7 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4EmCorrections.cc 100363 2016-10-19 09:24:47Z gcosmo $
// $Id: G4EmCorrections.cc 103954 2017-05-04 11:29:22Z gcosmo $
//
// -------------------------------------------------------------------
//
@@ -135,9 +135,7 @@ G4EmCorrections::G4EmCorrections(G4int verb)
mass = tau = gamma = bg2 = beta2 = beta = ba2 = tmax = charge = q2 = 0.0;
// Constants
theZieglerFactor = CLHEP::eV*CLHEP::cm2*1.0e-15;
alpha2 = CLHEP::fine_structure_const*CLHEP::fine_structure_const;
lossFlucFlag = true;
alpha2 = CLHEP::fine_structure_const*CLHEP::fine_structure_const;
// G.S. Khandelwal Nucl. Phys. A116(1968)97 - 111.
// "Shell corrections for K- and L- electrons
@@ -745,199 +743,6 @@ G4double G4EmCorrections::MottCorrection(const G4ParticleDefinition* p,
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EmCorrections::NuclearDEDX(const G4ParticleDefinition* p,
const G4Material* mat,
G4double e,
G4bool fluct)
{
G4double nloss = 0.0;
if(e <= 0.0) return nloss;
SetupKinematics(p, mat, e);
lossFlucFlag = fluct;
// Projectile nucleus
G4double z1 = std::abs(particle->GetPDGCharge()*inveplus);
G4double mass1 = mass/amu_c2;
// loop for the elements in the material
for (G4int iel=0; iel<numberOfElements; iel++) {
const G4Element* element = (*theElementVector)[iel] ;
G4double z2 = element->GetZ();
G4double mass2 = element->GetN();
nloss += (NuclearStoppingPower(kinEnergy, z1, z2, mass1, mass2))
* atomDensity[iel] ;
}
nloss *= theZieglerFactor;
return nloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double G4EmCorrections::NuclearStoppingPower(G4double kineticEnergy,
G4double z1, G4double z2,
G4double mass1, G4double mass2)
{
G4double energy = kineticEnergy/CLHEP::keV ; // energy in keV
G4double nloss = 0.0;
G4double rm;
if(z1 > 1.5) rm = (mass1 + mass2) * ( g4calc->Z23(G4lrint(z1)) + g4calc->Z23(G4lrint(z2)) ) ;
else rm = (mass1 + mass2) * g4calc->Z13(G4lrint(z2));
G4double er = 32.536 * mass2 * energy / ( z1 * z2 * rm ) ; // reduced energy
static const G4double nuca[104][2] = {
{ 1.0E+8, 5.831E-8},
{ 8.0E+7, 7.288E-8},
{ 6.0E+7, 9.719E-8},
{ 5.0E+7, 1.166E-7},
{ 4.0E+7, 1.457E-7},
{ 3.0E+7, 1.942E-7},
{ 2.0E+7, 2.916E-7},
{ 1.5E+7, 3.887E-7},
{ 1.0E+7, 5.833E-7},
{ 8.0E+6, 7.287E-7},
{ 6.0E+6, 9.712E-7},
{ 5.0E+6, 1.166E-6},
{ 4.0E+6, 1.457E-6},
{ 3.0E+6, 1.941E-6},
{ 2.0E+6, 2.911E-6},
{ 1.5E+6, 3.878E-6},
{ 1.0E+6, 5.810E-6},
{ 8.0E+5, 7.262E-6},
{ 6.0E+5, 9.663E-6},
{ 5.0E+5, 1.157E-5},
{ 4.0E+5, 1.442E-5},
{ 3.0E+5, 1.913E-5},
{ 2.0E+5, 2.845E-5},
{ 1.5E+5, 3.762E-5},
{ 1.0E+5, 5.554E-5},
{ 8.0E+4, 6.866E-5},
{ 6.0E+4, 9.020E-5},
{ 5.0E+4, 1.070E-4},
{ 4.0E+4, 1.319E-4},
{ 3.0E+4, 1.722E-4},
{ 2.0E+4, 2.499E-4},
{ 1.5E+4, 3.248E-4},
{ 1.0E+4, 4.688E-4},
{ 8.0E+3, 5.729E-4},
{ 6.0E+3, 7.411E-4},
{ 5.0E+3, 8.718E-4},
{ 4.0E+3, 1.063E-3},
{ 3.0E+3, 1.370E-3},
{ 2.0E+3, 1.955E-3},
{ 1.5E+3, 2.511E-3},
{ 1.0E+3, 3.563E-3},
{ 8.0E+2, 4.314E-3},
{ 6.0E+2, 5.511E-3},
{ 5.0E+2, 6.430E-3},
{ 4.0E+2, 7.756E-3},
{ 3.0E+2, 9.855E-3},
{ 2.0E+2, 1.375E-2},
{ 1.5E+2, 1.736E-2},
{ 1.0E+2, 2.395E-2},
{ 8.0E+1, 2.850E-2},
{ 6.0E+1, 3.552E-2},
{ 5.0E+1, 4.073E-2},
{ 4.0E+1, 4.802E-2},
{ 3.0E+1, 5.904E-2},
{ 1.5E+1, 9.426E-2},
{ 1.0E+1, 1.210E-1},
{ 8.0E+0, 1.377E-1},
{ 6.0E+0, 1.611E-1},
{ 5.0E+0, 1.768E-1},
{ 4.0E+0, 1.968E-1},
{ 3.0E+0, 2.235E-1},
{ 2.0E+0, 2.613E-1},
{ 1.5E+0, 2.871E-1},
{ 1.0E+0, 3.199E-1},
{ 8.0E-1, 3.354E-1},
{ 6.0E-1, 3.523E-1},
{ 5.0E-1, 3.609E-1},
{ 4.0E-1, 3.693E-1},
{ 3.0E-1, 3.766E-1},
{ 2.0E-1, 3.803E-1},
{ 1.5E-1, 3.788E-1},
{ 1.0E-1, 3.711E-1},
{ 8.0E-2, 3.644E-1},
{ 6.0E-2, 3.530E-1},
{ 5.0E-2, 3.444E-1},
{ 4.0E-2, 3.323E-1},
{ 3.0E-2, 3.144E-1},
{ 2.0E-2, 2.854E-1},
{ 1.5E-2, 2.629E-1},
{ 1.0E-2, 2.298E-1},
{ 8.0E-3, 2.115E-1},
{ 6.0E-3, 1.883E-1},
{ 5.0E-3, 1.741E-1},
{ 4.0E-3, 1.574E-1},
{ 3.0E-3, 1.372E-1},
{ 2.0E-3, 1.116E-1},
{ 1.5E-3, 9.559E-2},
{ 1.0E-3, 7.601E-2},
{ 8.0E-4, 6.668E-2},
{ 6.0E-4, 5.605E-2},
{ 5.0E-4, 5.008E-2},
{ 4.0E-4, 4.352E-2},
{ 3.0E-4, 3.617E-2},
{ 2.0E-4, 2.768E-2},
{ 1.5E-4, 2.279E-2},
{ 1.0E-4, 1.723E-2},
{ 8.0E-5, 1.473E-2},
{ 6.0E-5, 1.200E-2},
{ 5.0E-5, 1.052E-2},
{ 4.0E-5, 8.950E-3},
{ 3.0E-5, 7.246E-3},
{ 2.0E-5, 5.358E-3},
{ 1.5E-5, 4.313E-3},
{ 0.0, 3.166E-3}
};
if (er >= nuca[0][0]) { nloss = nuca[0][1]; }
else {
// the table is inverse in energy
for (G4int i=102; i>=0; --i) {
G4double edi = nuca[i][0];
if (er <= edi) {
G4double edi1 = nuca[i+1][0];
G4double ai = nuca[i][1];
G4double ai1 = nuca[i+1][1];
nloss = (ai - ai1)*(er - edi1)/(edi - edi1) + ai1;
break;
}
}
}
// Stragling
if(lossFlucFlag) {
G4double sig = 4.0 * mass1 * mass2 / ((mass1 + mass2)*(mass1 + mass2)*
(4.0 + 0.197/(er*er) + 6.584/er));
nloss *= G4RandGauss::shoot(1.0,sig) ;
}
nloss *= 8.462 * z1 * z2 * mass1 / rm ; // Return to [ev/(10^15 atoms/cm^2]
nloss = std::max(nloss, 0.0);
return nloss;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4double
G4EmCorrections::EffectiveChargeCorrection(const G4ParticleDefinition* p,
const G4Material* mat,