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,35 +21,31 @@
// ********************************************************************
//
//
// $Id: G4ComptonScattering.icc,v 1.3.2.2 2001/06/28 20:19:46 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ComptonScattering.icc,v 1.8 2001/09/21 09:50:53 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
// ------------ G4ComptonScattering physics process ---------
//------------------ G4ComptonScattering physics process -----------------------
// by Michel Maire, April 1996
// ***************************************************************
//
// 10-06-96, updated by M.Maire
// 06-01-97, crossection table + meanfreepath table, M.Maire
// 12-03-97, new Physics scheme
// 21-11-97, change for lowest energy limit default action
// 15-12-98, return DBL_MAX below LowestEnergyLimit
// 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 G4ComptonScattering::IsApplicable(const G4ParticleDefinition& particle)
inline G4bool G4ComptonScattering::IsApplicable(
const G4ParticleDefinition& particle)
{
return ( &particle == G4Gamma::Gamma() );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4ComptonScattering::GetMeanFreePath(const G4Track& aTrack,
G4double,
@@ -63,18 +59,17 @@ inline G4double G4ComptonScattering::GetMeanFreePath(const G4Track& aTrack,
G4Material* aMaterial = aTrack.GetMaterial();
G4double MeanFreePath;
G4bool isOutRange ;
G4bool isOutRange;
if (GammaEnergy > HighestEnergyLimit || GammaEnergy < LowestEnergyLimit)
MeanFreePath = DBL_MAX;
else
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
GetValue(GammaEnergy, isOutRange);
GetValue(GammaEnergy, isOutRange);
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4ComptonScattering::ComputeMeanFreePath(G4double GammaEnergy,
G4Material* aMaterial)
@@ -83,25 +78,24 @@ inline G4double G4ComptonScattering::ComputeMeanFreePath(G4double GammaEnergy,
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
G4double SIGMA = 0. ;
G4double SIGMA = 0.;
for ( size_t elm=0 ; elm < aMaterial->GetNumberOfElements() ; elm++ )
{
SIGMA += NbOfAtomsPerVolume[elm] *
ComputeCrossSectionPerAtom( GammaEnergy,
(*theElementVector)(elm)->GetZ());
SIGMA += NbOfAtomsPerVolume[elm] *
ComputeCrossSectionPerAtom(GammaEnergy,
(*theElementVector)[elm]->GetZ());
}
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4ComptonScattering::GetMicroscopicCrossSection(
G4DynamicParticle* aDynamicGamma,
G4Element* anElement)
G4DynamicParticle* aDynamicGamma,
G4Element* anElement)
// gives the microscopic total cross section in GEANT4 internal units
@@ -109,15 +103,14 @@ inline G4double G4ComptonScattering::GetMicroscopicCrossSection(
G4double crossSection;
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
G4bool isOutRange ;
if (GammaEnergy < LowestEnergyLimit || GammaEnergy > HighestEnergyLimit)
crossSection = 0.;
else
crossSection = (*theCrossSectionTable)(anElement->GetIndex())->
GetValue(GammaEnergy, isOutRange);
GetValue(GammaEnergy, isOutRange);
return crossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......