Files
geant4/source/processes/electromagnetic/lowenergy/include/G4LowEnergyRayleigh.icc
T
2016-06-08 15:28:20 +02:00

62 lines
2.0 KiB
Plaintext

// This code implementation is the intellectual property of
// the 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: G4LowEnergyRayleigh.icc,v 1.7.8.1 1999/12/07 20:50:21 gunter Exp $
// GEANT4 tag $Name: geant4-01-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
// ------------ G4LowEnergyRayleigh 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
// ---------------------------------------------------------------
inline G4bool G4LowEnergyRayleigh::IsApplicable(const G4ParticleDefinition& particle){
return ( &particle == G4Gamma::Gamma() );
}
inline G4double G4LowEnergyRayleigh::GetMeanFreePath(const G4Track& aTrack, G4double, G4ForceCondition*){
// returns the gamma mean free path in GEANT4 internal units
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 = DBL_MIN;
}
else {
MeanFreePath = util.DataLogInterpolation(GammaEnergy,
aMaterial->GetIndex(),
theMeanFreePathTable);
}
return MeanFreePath;
}