// // ******************************************************************** // * 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: G4PhotoElectricEffect.icc,v 1.8 2001/09/17 17:07:11 maire Exp $ // GEANT4 tag $Name: geant4-04-00 $ // //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... // 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 // 17-11-98, use table of atomic shells in PostStepDoIt, mma // 06-01-99, use Sandia crossSection, V.Grichine mma // 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 G4PhotoElectricEffect::IsApplicable(const G4ParticleDefinition& particle) { return ( &particle == G4Gamma::Gamma() ); } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... inline G4double G4PhotoElectricEffect::GetCrossSectionPerAtom( const G4DynamicParticle* aDynamicGamma, G4Element* anElement) // gives the microscopic total cross section in GEANT4 internal units { G4double crossSection; G4double GammaEnergy = aDynamicGamma->GetKineticEnergy(); G4double AtomicNumber = anElement->GetZ(); G4bool isOutRange; if (GammaEnergy > HighestEnergyLimit) crossSection = 0.; else if (GammaEnergy > LowestEnergyLimit) crossSection = (*theCrossSectionTable)(anElement->GetIndex())-> GetValue(GammaEnergy, isOutRange); else crossSection = ComputeSandiaCrossSection(GammaEnergy,AtomicNumber); return crossSection; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... inline G4double G4PhotoElectricEffect::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 = (*theMeanFreePathTable)(aMaterial->GetIndex())-> GetValue(GammaEnergy, isOutRange); else MeanFreePath = ComputeSandiaMeanFreePath(GammaEnergy, aMaterial); return MeanFreePath; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... inline G4double G4PhotoElectricEffect::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 ( size_t 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 G4PhotoElectricEffect::ComputeSandiaMeanFreePath(G4double GammaEnergy, G4Material* aMaterial) { G4double energy2 = GammaEnergy*GammaEnergy, energy3 = GammaEnergy*energy2, energy4 = energy2*energy2; G4double* SandiaCof = aMaterial->GetSandiaTable() ->GetSandiaCofForMaterial(GammaEnergy); G4double SIGMA = SandiaCof[0]/GammaEnergy + SandiaCof[1]/energy2 + SandiaCof[2]/energy3 + SandiaCof[3]/energy4; return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX ; } //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... inline G4double G4PhotoElectricEffect::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. { 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 G4PhotoElectricEffect::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. { 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 G4PhotoElectricEffect::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. { 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......