144 lines
4.9 KiB
Plaintext
144 lines
4.9 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: G4LowEnergyBremsstrahlung.icc,v 1.18.2.2 2001/06/28 20:19:23 gunter Exp $
|
|
// GEANT4 tag $Name: $
|
|
//
|
|
//
|
|
// ---------------------------------------------------------------
|
|
// GEANT 4 class inlined methods file
|
|
//
|
|
// ------------ G4LowEnergyBremsstrahlung physics process ---------
|
|
// by A.Forti 1999/03/27
|
|
//
|
|
// 18.04.2000 V.Lefebure
|
|
// - First implementation of continuous energy loss.
|
|
// - Return an infinite MeanfreePath when cross-section = 0.
|
|
// ***************************************************************
|
|
#include "G4Gamma.hh"
|
|
|
|
//
|
|
|
|
inline G4bool G4LowEnergyBremsstrahlung::IsApplicable(
|
|
const G4ParticleDefinition& particle)
|
|
{
|
|
return( (&particle == G4Electron::Electron())
|
|
/////////////||(&particle == G4Positron::Positron())
|
|
);
|
|
}
|
|
|
|
inline G4double G4LowEnergyBremsstrahlung::GetMeanFreePath(const G4Track& track,
|
|
G4double,
|
|
G4ForceCondition*)
|
|
|
|
// gives the MeanFreePath in GEANT4 internal units
|
|
|
|
{
|
|
|
|
const G4DynamicParticle* aDynamicParticle = track.GetDynamicParticle();
|
|
G4double KineticEnergy = aDynamicParticle->GetKineticEnergy();
|
|
G4Material* aMaterial = track.GetMaterial();
|
|
const G4ElementVector* theElementVector = aMaterial->GetElementVector();
|
|
const G4double* theAtomicNumDensityVector = aMaterial->GetAtomicNumDensityVector();
|
|
const G4int NumberOfElements = aMaterial->GetNumberOfElements() ;
|
|
G4double* CutInKineticEnergy = G4Gamma::Gamma()->GetCutsInEnergy() ;
|
|
G4double Threshold = CutInKineticEnergy[aMaterial->GetIndex()] ;
|
|
G4double MeanFreePath;
|
|
// G4bool isOutRange ;
|
|
|
|
if (KineticEnergy < lowestKineticEnergy)
|
|
|
|
////MeanFreePath = DBL_MIN;
|
|
MeanFreePath = DBL_MAX;
|
|
|
|
else {
|
|
|
|
if (KineticEnergy > highestKineticEnergy) KineticEnergy = 0.99*highestKineticEnergy ;
|
|
|
|
///MeanFreePath = util.DataLogInterpolation(KineticEnergy, aMaterial->GetIndex(), theMeanFreePathTable);
|
|
/// MeanFreePath = (*theMeanFreePathTable)(aMaterial->GetIndex())->
|
|
//// GetValue( KineticEnergy, isOutRange );
|
|
G4double SIGMA = 0.;
|
|
G4int iel;
|
|
for (iel=0; iel<NumberOfElements; iel++ ){
|
|
SIGMA += theAtomicNumDensityVector[iel]*
|
|
GetCrossSectionWithCut( (*theElementVector)(iel)->GetZ(),
|
|
KineticEnergy,
|
|
Threshold);
|
|
}
|
|
MeanFreePath = SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
|
|
}
|
|
|
|
return MeanFreePath;
|
|
}
|
|
|
|
|
|
inline G4double G4LowEnergyBremsstrahlung::ComputeA(const G4int AtomicNumber,const G4double ElectronKinEnergy){
|
|
|
|
G4double aVal;
|
|
G4FirstLevel* oneAtomCoeff = (*ATable)[AtomicNumber-1];
|
|
G4DataVector* ElectEnVec = (*oneAtomCoeff)[0];
|
|
G4DataVector* AValueVec = (*oneAtomCoeff)[1];
|
|
|
|
aVal = util.DataLogInterpolation(ElectronKinEnergy, (*ElectEnVec), (*AValueVec));
|
|
|
|
if(AtomicNumber > 99){
|
|
|
|
aVal = 0;
|
|
}
|
|
|
|
return aVal;
|
|
}
|
|
|
|
inline G4double G4LowEnergyBremsstrahlung::ComputeB(const G4int AtomicNumber,const G4double ElectronKinEnergy){
|
|
|
|
G4double bVal;
|
|
G4double constTerm = (*(*BTable)[0])[AtomicNumber-1];
|
|
G4double linearTerm = (*(*BTable)[1])[AtomicNumber-1];
|
|
G4double logElectEn = log10(ElectronKinEnergy);
|
|
if(logElectEn > -5 && logElectEn < (-constTerm/linearTerm)){
|
|
|
|
bVal = linearTerm*logElectEn+constTerm;
|
|
}
|
|
else{
|
|
|
|
bVal = 0;
|
|
}
|
|
|
|
if(AtomicNumber > 99){
|
|
bVal = 0;
|
|
}
|
|
|
|
return bVal;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|