183 lines
6.6 KiB
Plaintext
183 lines
6.6 KiB
Plaintext
// This code implementation is the intellectual property of
|
|
// the RD44 GEANT4 collaboration.
|
|
//
|
|
// By copying, distributing or modifying the Program (or any work
|
|
// based on the Program) you indicate your acceptance of this statement,
|
|
// and all its terms.
|
|
//
|
|
// $Id: G4PhotoAbsorption.icc,v 2.4 1998/11/20 15:53:03 maire Exp $
|
|
// GEANT4 tag $Name: geant4-00 $
|
|
//
|
|
//
|
|
// ---------------------------------------------------------------
|
|
// GEANT 4 class inlined methods file
|
|
//
|
|
// For information related to this code contact:
|
|
// CERN, CN Division, ASD group
|
|
// History: first implementation, based on object model of
|
|
// 2nd December 1995, G.Cosmo
|
|
// ------------ G4PhotoAbsorption physics process ---------
|
|
// by Michel Maire, April 1996
|
|
// ***************************************************************
|
|
// 12-06-96, update by M.Maire
|
|
// 17-09-96, PartialSumSigma(i)
|
|
// split ComputeBinbingEnergy(), M.Maire
|
|
// 08-01-97, crossection table + meanfreepath table , M.Maire
|
|
// 13-03-97, adapted for the new physics scheme, M.Maire
|
|
// 20-11-97, change for lowest energy limit default action
|
|
// 10-11-98, new treatment of energies < 50 keV, V.Grichine
|
|
// 20-11-98, adapted to a new Material/SandiaTable interface. mma
|
|
//
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4bool G4PhotoAbsorption::IsApplicable(const G4ParticleDefinition& particle)
|
|
{
|
|
return ( &particle == G4Gamma::Gamma() );
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4double G4PhotoAbsorption::GetCrossSectionPerAtom(
|
|
const G4DynamicParticle* aDynamicGamma,
|
|
G4Element* anElement)
|
|
|
|
// gives the microscopic total cross section in GEANT4 internal units
|
|
|
|
{
|
|
G4double crossSection;
|
|
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
|
G4bool isOutRange ;
|
|
|
|
if (GammaEnergy > HighestEnergyLimit)
|
|
crossSection = 0.;
|
|
else {
|
|
if (GammaEnergy < LowestEnergyLimit) GammaEnergy = LowestEnergyLimit;
|
|
crossSection = (*theCrossSectionTable)(anElement->GetIndex())->
|
|
GetValue(GammaEnergy, isOutRange);
|
|
}
|
|
|
|
return crossSection;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4double
|
|
G4PhotoAbsorption::ComputeSandiaMeanFreePath( G4double GammaEnergy,
|
|
G4Material* aMaterial )
|
|
{
|
|
G4double energy2 = GammaEnergy*GammaEnergy,
|
|
energy3 = GammaEnergy*energy2,
|
|
energy4 = energy2*energy2;
|
|
|
|
G4double SIGMA = 0;
|
|
|
|
G4int i = aMaterial->GetSandiaTable()->GetMatNbOfIntervals() - 1;
|
|
while ((i>0)&&(GammaEnergy < aMaterial->GetSandiaTable()
|
|
->GetSandiaCofForMaterial(i,0))) i--;
|
|
|
|
SIGMA=aMaterial->GetSandiaTable()->GetSandiaCofForMaterial(i,1)/GammaEnergy +
|
|
aMaterial->GetSandiaTable()->GetSandiaCofForMaterial(i,2)/energy2 +
|
|
aMaterial->GetSandiaTable()->GetSandiaCofForMaterial(i,3)/energy3 +
|
|
aMaterial->GetSandiaTable()->GetSandiaCofForMaterial(i,4)/energy4;
|
|
|
|
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX ;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4double G4PhotoAbsorption::GetMeanFreePath(const G4Track& aTrack,
|
|
G4double,
|
|
G4ForceCondition*)
|
|
|
|
|
|
// returns the gamma mean free path in GEANT4 internal units
|
|
// ( MeanFreePath is a private data member of the class)
|
|
|
|
{
|
|
const G4DynamicParticle* aDynamicGamma = aTrack.GetDynamicParticle();
|
|
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
|
|
G4Material* aMaterial = aTrack.GetMaterial();
|
|
|
|
G4bool isOutRange ;
|
|
|
|
if (GammaEnergy > HighestEnergyLimit)
|
|
MeanFreePath = DBL_MAX;
|
|
else if (GammaEnergy < LowestEnergyLimit)
|
|
MeanFreePath = ComputeSandiaMeanFreePath(GammaEnergy,aMaterial);
|
|
else
|
|
MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
|
|
GetValue(GammaEnergy, isOutRange);
|
|
|
|
return MeanFreePath;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4double G4PhotoAbsorption::ComputeMeanFreePath(G4double GammaEnergy,
|
|
G4Material* aMaterial)
|
|
|
|
// returns the gamma mean free path in GEANT4 internal units
|
|
|
|
{
|
|
const G4ElementVector* theElementVector = aMaterial->GetElementVector() ;
|
|
const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
|
|
|
|
G4double SIGMA = 0 ;
|
|
|
|
for ( G4int elm=0 ; elm < aMaterial->GetNumberOfElements() ; elm++ )
|
|
{
|
|
SIGMA += NbOfAtomsPerVolume[elm] *
|
|
ComputeCrossSectionPerAtom(GammaEnergy,
|
|
(*theElementVector)(elm)->GetZ());
|
|
}
|
|
|
|
return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX ;
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4double G4PhotoAbsorption::ComputeKBindingEnergy (G4double Z)
|
|
|
|
// Calculates the binding energy of the K electronic shell, as a function
|
|
// of the Atomic Number, from a parametrized formula of L. Urban.
|
|
// (The coefficients are initialized in the constructor)
|
|
|
|
{
|
|
const G4double
|
|
aK ( 6.6644 *eV), bK (2.2077e-1*eV), cK (-3.2552e-3*eV), dK (1.8199e-5*eV);
|
|
|
|
return Z*Z*(aK + Z* (bK + Z* (cK + Z* dK)));
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4double G4PhotoAbsorption::ComputeL1BindingEnergy (G4double Z)
|
|
|
|
// Calculates the binding energy of the L1 electronic shell, as a function
|
|
// of the Atomic Number, from a parametrized formula of L. Urban.
|
|
// (The coefficients are initialized in the constructor)
|
|
|
|
{
|
|
const G4double
|
|
aL1(-2.9179e-1*eV), bL1(8.7983e-2*eV), cL1(-1.2589e-3*eV), dL1(6.9602e-6*eV);
|
|
|
|
return Z*Z*(aL1 + Z* (bL1 + Z* (cL1 + Z* dL1)));
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
|
|
|
inline G4double G4PhotoAbsorption::ComputeL2BindingEnergy (G4double Z)
|
|
|
|
// Calculates the binding energy of the L2 electronic shell, as a function
|
|
// of the Atomic Number, from a parametrized formula of L. Urban.
|
|
// (The coefficients are initialized in the constructor)
|
|
|
|
{
|
|
const G4double
|
|
aL2(-6.8606e-1*eV), bL2(1.0078e-1*eV), cL2(-1.4496e-3*eV), dL2(7.8809e-6*eV);
|
|
|
|
return Z*Z*(aL2 + Z* (bL2 + Z* (cL2 + Z* dL2)));
|
|
}
|
|
|
|
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|