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,30 +21,32 @@
// ********************************************************************
//
//
// $Id: G4eplusAnnihilation.icc,v 1.4.2.1 2001/06/28 19:12:36 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4eplusAnnihilation.icc,v 1.8 2001/09/17 17:07:11 maire Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// 10-01-97, crossection table + meanfreepath table, M.Maire
// 17-03-97, merge 'in fly' and 'at rest', M.Maire
// 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....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4bool G4eplusAnnihilation::IsApplicable(const G4ParticleDefinition& particle)
inline G4bool G4eplusAnnihilation::IsApplicable(
const G4ParticleDefinition& particle)
{
return ( &particle == G4Positron::Positron() );
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4eplusAnnihilation::GetCrossSectionPerAtom(
G4DynamicParticle* aDynamicPositron,
G4Element* anElement)
// gives the microscopic total cross section in GEANT4 internal units
// return the total cross section per atom in GEANT4 internal units
{
G4double crossSection;
@@ -62,7 +64,7 @@ inline G4double G4eplusAnnihilation::GetCrossSectionPerAtom(
return crossSection;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4eplusAnnihilation::GetMeanFreePath(const G4Track& aTrack,
G4double,
@@ -71,48 +73,50 @@ inline G4double G4eplusAnnihilation::GetMeanFreePath(const G4Track& aTrack,
// returns the positron mean free path in GEANT4 internal units
{
const G4DynamicParticle* aDynamicPositron = aTrack.GetDynamicParticle();
G4double PositronEnergy = aDynamicPositron->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
const G4DynamicParticle* aDynamicPositron = aTrack.GetDynamicParticle();
G4double PositronEnergy = aDynamicPositron->GetKineticEnergy();
G4Material* aMaterial = aTrack.GetMaterial();
G4double MeanFreePath;
G4bool isOutRange ;
G4double MeanFreePath;
G4bool isOutRange ;
if (PositronEnergy > HighestEnergyLimit)
MeanFreePath = DBL_MAX;
else {
if (PositronEnergy < LowestEnergyLimit) PositronEnergy = 1.01*LowestEnergyLimit;
if (PositronEnergy > HighestEnergyLimit) MeanFreePath = DBL_MAX;
else
{
if (PositronEnergy < LowestEnergyLimit)
PositronEnergy = 1.01*LowestEnergyLimit;
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
GetValue( PositronEnergy, isOutRange );
}
}
return MeanFreePath;
return MeanFreePath;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4eplusAnnihilation::ComputeMeanFreePath(G4double PositKinEnergy,
inline G4double G4eplusAnnihilation::ComputeMeanFreePath(
G4double PositKinEnergy,
G4Material* aMaterial)
// returns the positron mean free path in GEANT4 internal units
{
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
G4double SIGMA = 0 ;
for ( size_t elm=0 ; elm < aMaterial->GetNumberOfElements() ; elm++ )
{
SIGMA += NbOfAtomsPerVolume[elm] *
ComputeCrossSectionPerAtom(PositKinEnergy,
(*theElementVector)(elm)->GetZ());
}
for (size_t elm=0 ; elm < aMaterial->GetNumberOfElements() ; elm++ )
{
SIGMA += NbOfAtomsPerVolume[elm] *
ComputeCrossSectionPerAtom(PositKinEnergy,
(*theElementVector)[elm]->GetZ());
}
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
inline G4double G4eplusAnnihilation::GetMeanLifeTime(const G4Track&,
G4ForceCondition*)
@@ -123,5 +127,5 @@ inline G4double G4eplusAnnihilation::GetMeanLifeTime(const G4Track&,
return 0.0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......