Files
geant4/source/processes/electromagnetic/lowenergy/include/G4LowEnergyPhotoElectric.icc
T
2016-06-08 16:10:37 +02:00

105 lines
3.6 KiB
Plaintext

//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4LowEnergyPhotoElectric.icc,v 1.18.2.2 2001/06/28 20:19:24 gunter Exp $
// GEANT4 tag $Name: $
//
//
// ---------------------------------------------------------------
// GEANT 4 class inlined methods file
//
// ------------ G4LowEnergyPhotoElectric physics process ---------
// by A.Forti 1999/03/02
//
// 10/05/2001 V.Ivanchenko Clean up againist Linux compilation with -Wall
//
// ***************************************************************
// ..
inline G4bool G4LowEnergyPhotoElectric::IsApplicable(const G4ParticleDefinition& particle)
{
return ( &particle == G4Gamma::Gamma() );
}
// ..
inline G4double
G4LowEnergyPhotoElectric::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;
}
// ..
inline G4double G4LowEnergyPhotoElectric::GetCrossSection(G4DynamicParticle* aDynamicGamma,
G4Element* anElement)
// gives the microscopic total cross section in GEANT4 internal units
{
G4double crossSection;
G4double GammaEnergy = aDynamicGamma->GetKineticEnergy();
if (GammaEnergy < lowestEnergyLimit || GammaEnergy > highestEnergyLimit)
crossSection = 0.;
else{
G4int elemZ = (G4int) anElement->GetZ();
const G4FirstLevel* oneAtomCS
= (*theCrossSectionTable)[ZNumVec->index(elemZ)];
crossSection = util.DataLogInterpolation(GammaEnergy,
(*(*oneAtomCS)[0]), (*(*oneAtomCS)[1]))*barn;
}
return crossSection;
}
// ..