Import Geant4 7.0.0 source tree
This commit is contained in:
@@ -38,26 +38,27 @@
|
||||
// 03/10/2000 V.Ivanchenko CodeWizard clean up
|
||||
// 10/05/2001 V.Ivanchenko Clean up againist Linux compilation with -Wall
|
||||
// 30/12/2003 V.Ivanchenko SRIM2003 model is added
|
||||
// 07/05/2004 V.Ivanchenko Fix Graphite problem, add QAO model
|
||||
//
|
||||
// Class Description:
|
||||
// Class Description:
|
||||
//
|
||||
// Low energy protons/ions electronic stopping power parametrisation
|
||||
//
|
||||
// Class Description: End
|
||||
// Class Description: End
|
||||
//
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#include "G4hParametrisedLossModel.hh"
|
||||
#include "G4hParametrisedLossModel.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4hZiegler1977p.hh"
|
||||
#include "G4hZiegler1977He.hh"
|
||||
#include "G4hZiegler1985p.hh"
|
||||
#include "G4hSRIM2000p.hh"
|
||||
//#include "G4hSRIM2003p.hh"
|
||||
//#include "G4hQAOModel.hh"
|
||||
#include "G4hICRU49p.hh"
|
||||
#include "G4hICRU49He.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
@@ -87,6 +88,7 @@ void G4hParametrisedLossModel::InitializeMe()
|
||||
G4String ir49He = G4String("ICRU_R49He") ;
|
||||
G4String zi85p = G4String("Ziegler1985p") ;
|
||||
G4String zi00p = G4String("SRIM2000p") ;
|
||||
G4String qao = G4String("QAO") ;
|
||||
if(zi77p == modelName) {
|
||||
eStopingPowerTable = new G4hZiegler1977p();
|
||||
highEnergyLimit = 100.0*MeV;
|
||||
@@ -102,7 +104,7 @@ void G4hParametrisedLossModel::InitializeMe()
|
||||
highEnergyLimit = 100.0*MeV;
|
||||
lowEnergyLimit = 1.0*keV;
|
||||
|
||||
} else if(zi00p == modelName) {
|
||||
} else if(zi00p == modelName ) {
|
||||
eStopingPowerTable = new G4hSRIM2000p();
|
||||
highEnergyLimit = 100.0*MeV;
|
||||
lowEnergyLimit = 1.0*keV;
|
||||
@@ -116,104 +118,104 @@ void G4hParametrisedLossModel::InitializeMe()
|
||||
eStopingPowerTable = new G4hICRU49He();
|
||||
highEnergyLimit = 10.0*MeV/4.0;
|
||||
lowEnergyLimit = 1.0*keV/4.0;
|
||||
|
||||
/*
|
||||
} else if(qao == modelName) {
|
||||
eStopingPowerTable = new G4hQAOModel();
|
||||
highEnergyLimit = 2.0*MeV;
|
||||
lowEnergyLimit = 5.0*keV;
|
||||
*/
|
||||
} else {
|
||||
G4cout <<
|
||||
"G4hLowEnergyIonisation warning: There is no table with the modelName <"
|
||||
<< modelName << ">" << "for electronic stopping, <ICRU_R49p> is applied"
|
||||
<< G4endl;
|
||||
eStopingPowerTable = new G4hICRU49p();
|
||||
highEnergyLimit = 1.0*MeV;
|
||||
lowEnergyLimit = 1.0*keV;
|
||||
}
|
||||
//G4cout << "G4hParametrisedLossModel: the model <" << modelName
|
||||
// << "> is accepted" << G4endl;
|
||||
eStopingPowerTable = new G4hICRU49p();
|
||||
highEnergyLimit = 2.0*MeV;
|
||||
lowEnergyLimit = 1.0*keV;
|
||||
G4cout << "G4hParametrisedLossModel Warning: <" << modelName
|
||||
<< "> is unknown - default <"
|
||||
<< ir49p << ">" << " is used for Electronic Stopping"
|
||||
<< G4endl;
|
||||
modelName = ir49p;
|
||||
}
|
||||
/*
|
||||
G4cout << "G4hParametrisedLossModel: the model <"
|
||||
<< modelName << ">" << " is used for Electronic Stopping"
|
||||
<< G4endl;
|
||||
*/
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4hParametrisedLossModel::~G4hParametrisedLossModel()
|
||||
G4hParametrisedLossModel::~G4hParametrisedLossModel()
|
||||
{
|
||||
delete eStopingPowerTable;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::TheValue(
|
||||
const G4DynamicParticle* particle,
|
||||
const G4Material* material)
|
||||
G4double G4hParametrisedLossModel::TheValue(const G4DynamicParticle* particle,
|
||||
const G4Material* material)
|
||||
{
|
||||
G4double scaledEnergy = (particle->GetKineticEnergy())
|
||||
* proton_mass_c2/(particle->GetMass());
|
||||
|
||||
G4double eloss = StoppingPower(material,scaledEnergy) * theZieglerFactor;
|
||||
G4double factor = theZieglerFactor;
|
||||
if (scaledEnergy < lowEnergyLimit) {
|
||||
if (modelName != "QAO") factor *= std::sqrt(scaledEnergy/lowEnergyLimit);
|
||||
scaledEnergy = lowEnergyLimit;
|
||||
}
|
||||
G4double eloss = StoppingPower(material,scaledEnergy) * factor;
|
||||
|
||||
return eloss;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::TheValue(
|
||||
const G4ParticleDefinition* aParticle,
|
||||
G4double G4hParametrisedLossModel::TheValue(const G4ParticleDefinition* aParticle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
G4double scaledEnergy = kineticEnergy
|
||||
* proton_mass_c2/(aParticle->GetPDGMass());
|
||||
|
||||
G4double eloss = StoppingPower(material,scaledEnergy) * theZieglerFactor;
|
||||
|
||||
// G4cout << "G4hParametrisedLossModel: the model <" << modelName
|
||||
// << "> return " << eloss*mm/MeV << G4endl;
|
||||
G4double factor = theZieglerFactor;
|
||||
if (scaledEnergy < lowEnergyLimit) {
|
||||
if (modelName != "QAO") factor *= std::sqrt(scaledEnergy/lowEnergyLimit);
|
||||
scaledEnergy = lowEnergyLimit;
|
||||
}
|
||||
G4double eloss = StoppingPower(material,scaledEnergy) * factor;
|
||||
|
||||
return eloss;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* ,
|
||||
|
||||
G4double G4hParametrisedLossModel::LowEnergyLimit(const G4ParticleDefinition* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return lowEnergyLimit;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* ,
|
||||
|
||||
G4double G4hParametrisedLossModel::HighEnergyLimit(const G4ParticleDefinition* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return highEnergyLimit;
|
||||
}
|
||||
}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::LowEnergyLimit(
|
||||
const G4ParticleDefinition* ) const
|
||||
|
||||
G4double G4hParametrisedLossModel::LowEnergyLimit(const G4ParticleDefinition* ) const
|
||||
{
|
||||
return lowEnergyLimit;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::HighEnergyLimit(
|
||||
const G4ParticleDefinition* ) const
|
||||
|
||||
G4double G4hParametrisedLossModel::HighEnergyLimit(const G4ParticleDefinition* ) const
|
||||
{
|
||||
return highEnergyLimit;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hParametrisedLossModel::IsInCharge(
|
||||
const G4DynamicParticle* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hParametrisedLossModel::IsInCharge(
|
||||
const G4ParticleDefinition* ,
|
||||
|
||||
G4bool G4hParametrisedLossModel::IsInCharge(const G4DynamicParticle* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return true;
|
||||
@@ -221,43 +223,57 @@ G4bool G4hParametrisedLossModel::IsInCharge(
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::StoppingPower(
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
G4bool G4hParametrisedLossModel::IsInCharge(const G4ParticleDefinition* ,
|
||||
const G4Material*) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4double G4hParametrisedLossModel::StoppingPower(const G4Material* material,
|
||||
G4double kineticEnergy)
|
||||
{
|
||||
G4double eloss = 0.0;
|
||||
|
||||
const G4int numberOfElements = material->GetNumberOfElements() ;
|
||||
const G4double* theAtomicNumDensityVector =
|
||||
material->GetAtomicNumDensityVector() ;
|
||||
|
||||
|
||||
|
||||
// compound material with parametrisation
|
||||
if( (eStopingPowerTable->HasMaterial(material)) ) {
|
||||
|
||||
eloss = eStopingPowerTable->StoppingPower(material, kineticEnergy);
|
||||
if ("QAO" != modelName) {
|
||||
eloss *= material->GetTotNbOfAtomsPerVolume();
|
||||
if(1 < numberOfElements) {
|
||||
G4int nAtoms = 0;
|
||||
|
||||
const G4int* theAtomsVector = material->GetAtomsVector();
|
||||
for (G4int iel=0; iel<numberOfElements; iel++) {
|
||||
nAtoms += theAtomsVector[iel];
|
||||
}
|
||||
eloss /= nAtoms;
|
||||
}
|
||||
}
|
||||
|
||||
// pure material
|
||||
if(1 == numberOfElements) {
|
||||
} else if(1 == numberOfElements) {
|
||||
|
||||
G4double z = material->GetZ();
|
||||
eloss = (eStopingPowerTable->ElectronicStoppingPower(z, kineticEnergy))
|
||||
* (material->GetTotNbOfAtomsPerVolume()) ;
|
||||
|
||||
// compaund material with parametrisation
|
||||
} else if( (eStopingPowerTable->HasMaterial(material)) ) {
|
||||
|
||||
eloss = eStopingPowerTable->StoppingPower(material, kineticEnergy)
|
||||
* (material->GetTotNbOfAtomsPerVolume()) ;
|
||||
G4int nAtoms = 0;
|
||||
|
||||
const G4int* theAtomsVector = material->GetAtomsVector() ;
|
||||
for (G4int iel=0; iel<numberOfElements; iel++) {
|
||||
nAtoms += theAtomsVector[iel];
|
||||
}
|
||||
eloss /= nAtoms;
|
||||
|
||||
// Experimental data exist only for kinetic energy 125 keV
|
||||
} else if( MolecIsInZiegler1988(material) ) {
|
||||
} else if( MolecIsInZiegler1988(material)) {
|
||||
|
||||
// Cycle over elements - calculation based on Bragg's rule
|
||||
// Cycle over elements - calculation based on Bragg's rule
|
||||
G4double eloss125 = 0.0 ;
|
||||
const G4ElementVector* theElementVector =
|
||||
material->GetElementVector() ;
|
||||
|
||||
|
||||
|
||||
// loop for the elements in the material
|
||||
for (G4int i=0; i<numberOfElements; i++) {
|
||||
const G4Element* element = (*theElementVector)[i] ;
|
||||
@@ -266,16 +282,16 @@ G4double G4hParametrisedLossModel::StoppingPower(
|
||||
* theAtomicNumDensityVector[i] ;
|
||||
eloss125 +=(eStopingPowerTable->ElectronicStoppingPower(z,125.0*keV))
|
||||
* theAtomicNumDensityVector[i] ;
|
||||
}
|
||||
}
|
||||
|
||||
// Chemical factor is taken into account
|
||||
eloss *= ChemicalFactor(kineticEnergy, eloss125) ;
|
||||
|
||||
|
||||
// Brugg's rule calculation
|
||||
} else {
|
||||
const G4ElementVector* theElementVector =
|
||||
material->GetElementVector() ;
|
||||
|
||||
|
||||
// loop for the elements in the material
|
||||
for (G4int i=0; i<numberOfElements; i++)
|
||||
{
|
||||
@@ -283,7 +299,7 @@ G4double G4hParametrisedLossModel::StoppingPower(
|
||||
G4double z = element->GetZ() ;
|
||||
eloss += (eStopingPowerTable->ElectronicStoppingPower(z,kineticEnergy))
|
||||
* theAtomicNumDensityVector[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
return eloss;
|
||||
}
|
||||
@@ -291,12 +307,12 @@ G4double G4hParametrisedLossModel::StoppingPower(
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
G4bool G4hParametrisedLossModel::MolecIsInZiegler1988(
|
||||
const G4Material* material)
|
||||
const G4Material* material)
|
||||
{
|
||||
// The list of molecules from
|
||||
// J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
|
||||
// Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
|
||||
|
||||
|
||||
G4String myFormula = G4String(" ") ;
|
||||
const G4String chFormula = material->GetChemicalFormula() ;
|
||||
if (myFormula == chFormula ) return false ;
|
||||
@@ -399,13 +415,13 @@ G4double G4hParametrisedLossModel::ChemicalFactor(
|
||||
G4double gamma = 1.0 + kineticEnergy/proton_mass_c2 ;
|
||||
G4double gamma25 = 1.0 + 25.0*keV /proton_mass_c2 ;
|
||||
G4double gamma125 = 1.0 + 125.0*keV/proton_mass_c2 ;
|
||||
G4double beta = sqrt(1.0 - 1.0/(gamma*gamma)) ;
|
||||
G4double beta25 = sqrt(1.0 - 1.0/(gamma25*gamma25)) ;
|
||||
G4double beta125 = sqrt(1.0 - 1.0/(gamma125*gamma125)) ;
|
||||
G4double beta = std::sqrt(1.0 - 1.0/(gamma*gamma)) ;
|
||||
G4double beta25 = std::sqrt(1.0 - 1.0/(gamma25*gamma25)) ;
|
||||
G4double beta125 = std::sqrt(1.0 - 1.0/(gamma125*gamma125)) ;
|
||||
|
||||
G4double factor = 1.0 + (expStopPower125/eloss125 - 1.0) *
|
||||
(1.0 + exp( 1.48 * ( beta125/beta25 - 7.0 ) ) ) /
|
||||
(1.0 + exp( 1.48 * ( beta/beta25 - 7.0 ) ) ) ;
|
||||
(1.0 + std::exp( 1.48 * ( beta125/beta25 - 7.0 ) ) ) /
|
||||
(1.0 + std::exp( 1.48 * ( beta/beta25 - 7.0 ) ) ) ;
|
||||
|
||||
return factor ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user