Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -21,41 +21,38 @@
// ********************************************************************
//
//
// $Id: G4GammaConversion.icc,v 1.3.2.2 2001/06/28 20:19:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GammaConversion.icc,v 1.7 2001/09/17 17:07:11 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// History: first implementation, based on object model of
// 2nd December 1995, G.Cosmo
// ------------ G4GammaConversion physics process ---------
// ------------ G4GammaConversion physics process -------------------------
// by Michel Maire, 24 May 1996
// ***************************************************************
//
// 11-06-96, in GetMeanFreePath() the partial sum is stored, by M.Maire
// 16-09-96, dynamical array PartialSumSigma, by M.Maire
// 13-12-96, Sign corrected in the ScreenFunctions, by L.Urban
// 14-01-97, crossection table + meanfreepath table.
// PartialSumSigma removed, by M.Maire
// 14-01-97, new physics scheme for geant4alpha, M.Maire
// 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
// ---------------------------------------------------------------
// 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
// 17-09-01, migration of Materials to pure STL (mma)
// -----------------------------------------------------------------------------
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool G4GammaConversion::IsApplicable(const G4ParticleDefinition& particle)
inline G4bool G4GammaConversion::IsApplicable(
const G4ParticleDefinition& particle)
{
return ( &particle == G4Gamma::Gamma() );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4GammaConversion::GetMicroscopicCrossSection(
inline G4double G4GammaConversion::GetCrossSectionPerAtom(
const G4DynamicParticle* aDynamicGamma,
G4Element* anElement)
// gives the microscopic total cross section in GEANT4 internal units
// gives the total cross section per atom in GEANT4 internal units
{
G4double crossSection;
@@ -65,7 +62,7 @@ inline G4double G4GammaConversion::GetMicroscopicCrossSection(
if (GammaEnergy < LowestEnergyLimit)
crossSection = 0. ;
else {
if (GammaEnergy > HighestEnergyLimit) GammaEnergy = 0.99*HighestEnergyLimit ;
if (GammaEnergy > HighestEnergyLimit) GammaEnergy=0.99*HighestEnergyLimit;
crossSection = (*theCrossSectionTable)(anElement->GetIndex())->
GetValue( GammaEnergy, isOutRange );
}
@@ -73,7 +70,7 @@ inline G4double G4GammaConversion::GetMicroscopicCrossSection(
return crossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4GammaConversion::GetMeanFreePath(const G4Track& aTrack,
G4double,
@@ -87,12 +84,12 @@ inline G4double G4GammaConversion::GetMeanFreePath(const G4Track& aTrack,
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4bool isOutRange ;
G4bool isOutRange;
if (GammaEnergy < LowestEnergyLimit)
MeanFreePath = DBL_MAX;
else {
if (GammaEnergy > HighestEnergyLimit) GammaEnergy = 0.99*HighestEnergyLimit ;
if (GammaEnergy > HighestEnergyLimit) GammaEnergy=0.99*HighestEnergyLimit;
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
GetValue( GammaEnergy, isOutRange );
}
@@ -100,7 +97,7 @@ inline G4double G4GammaConversion::GetMeanFreePath(const G4Track& aTrack,
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4GammaConversion::ComputeMeanFreePath(G4double GammaEnergy,
G4Material* aMaterial)
@@ -108,22 +105,22 @@ inline G4double G4GammaConversion::ComputeMeanFreePath(G4double GammaEnergy,
// computes and returns the photon mean free path in GEANT4 internal units
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* theAtomNumDensityVector = aMaterial->GetAtomicNumDensityVector();
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
G4double SIGMA = 0 ;
for ( size_t i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
{
SIGMA += theAtomNumDensityVector[i] *
ComputeMicroscopicCrossSection(GammaEnergy,
(*theElementVector)(i)->GetZ() );
SIGMA += NbOfAtomsPerVolume[i] *
ComputeCrossSectionPerAtom(GammaEnergy,
(*theElementVector)[i]->GetZ());
}
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4GammaConversion::ScreenFunction1(G4double ScreenVariable)
@@ -135,12 +132,12 @@ inline G4double G4GammaConversion::ScreenFunction1(G4double ScreenVariable)
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 42.392 - ScreenVariable* (7.796 - 1.961*ScreenVariable);
screenVal = 42.392 - ScreenVariable*(7.796 - 1.961*ScreenVariable);
return screenVal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4GammaConversion::ScreenFunction2(G4double ScreenVariable)
@@ -152,9 +149,9 @@ inline G4double G4GammaConversion::ScreenFunction2(G4double ScreenVariable)
if (ScreenVariable > 1.)
screenVal = 42.24 - 8.368*log(ScreenVariable+0.952);
else
screenVal = 41.405 - ScreenVariable* (5.828 - 0.8945*ScreenVariable);
screenVal = 41.405 - ScreenVariable*(5.828 - 0.8945*ScreenVariable);
return screenVal;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......