Files
geant4/source/processes/electromagnetic/lowenergy/include/G4IonParametrisedLossModel.icc
2018-12-07 15:15:39 +01:00

159 lines
6.4 KiB
Plaintext

//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
// ===========================================================================
// GEANT4 class
//
// Class: G4IonParametrisedLossModel
//
// Base class: G4VEmModel (utils)
//
// Author: Anton Lechner (Anton.Lechner@cern.ch)
//
// First implementation: 10. 11. 2008
//
// Modifications: 03. 02. 2009 - Bug fix iterators (AL)
// 11. 03. 2009 - Introduced new table handler (G4IonDEDXHandler)
// and modified method to add/remove tables
// (tables are now built in initialisation phase),
// Minor bug fix in ComputeDEDXPerVolume (AL)
// 20. 11. 2009 - Added set-method for energy loss limit (AL)
// 04. 11. 2010 - Moved virtual methods to the source (VI)
//
// Class description:
// Model for computing the energy loss of ions by employing a
// parameterisation of dE/dx tables (default ICRU 73 tables). For
// ion-material combinations and/or projectile energies not covered
// by this model, the G4BraggIonModel and G4BetheBloch models are
// employed.
//
// Comments:
//
// ===========================================================================
inline G4double G4IonParametrisedLossModel::DeltaRayMeanEnergyTransferRate(
const G4Material* material,
const G4ParticleDefinition* particle,
G4double kineticEnergy,
G4double cutEnergy) {
// ############## Mean energy transferred to delta-rays ###################
// Computes the mean energy transfered to delta-rays per unit length,
// considering only delta-rays with energies above the energy threshold
// (energy cut)
//
// The mean energy transfer rate is derived by using the differential
// cross section given in the references below.
//
// See Geant4 physics reference manual (version 9.1), section 9.1.3
//
// Ref.: W.M. Yao et al, Jour. of Phys. G 33 (2006) 1.
// B. Rossi, High energy particles, New York, NY: Prentice-Hall (1952).
//
// (Implementation adapted from G4BraggIonModel)
// *** Variables:
// kineticEnergy = kinetic energy of projectile
// totEnergy = total energy of projectile, i.e. kinetic energy
// plus rest energy (Mc^2)
// betaSquared = beta of projectile squared, calculated as
// beta^2 = 1 - 1 / (E/Mc^2)^2
// = T * ( E + Mc^2 ) / E^2
// where T = kineticEnergy, E = totEnergy
// cutEnergy = energy threshold for secondary particle production
// i.e. energy cut, below which energy transfered to
// electrons is treated as continuous loss of projectile
// maxKinEnergy = maximum energy transferable to secondary electrons
// meanRate = mean kinetic energy of delta ray (per unit length)
// (above cutEnergy)
G4double meanRate = 0.0;
G4double maxKinEnergy = MaxSecondaryEnergy(particle, kineticEnergy);
if (cutEnergy < maxKinEnergy) {
G4double totalEnergy = kineticEnergy + cacheMass;
G4double betaSquared = kineticEnergy *
(totalEnergy + cacheMass) / (totalEnergy * totalEnergy);
G4double cutMaxEnergyRatio = cutEnergy / maxKinEnergy;
meanRate =
(- std::log(cutMaxEnergyRatio) - (1.0 - cutMaxEnergyRatio) * betaSquared) *
CLHEP::twopi_mc2_rcl2 *
(material->GetTotNbOfElectPerVolume()) / betaSquared;
meanRate *= GetChargeSquareRatio(particle, material, kineticEnergy);
}
return meanRate;
}
inline
void G4IonParametrisedLossModel::UpdateCache(
const G4ParticleDefinition* particle) {
cacheParticle = particle;
cacheMass = particle -> GetPDGMass();
cacheElecMassRatio = CLHEP::electron_mass_c2 / cacheMass;
G4double q = particle -> GetPDGCharge() / CLHEP::eplus;
cacheChargeSquare = q * q;
}
inline
LossTableList::iterator G4IonParametrisedLossModel::IsApplicable(
const G4ParticleDefinition* particle, // Projectile (ion)
const G4Material* material) { // Target material
LossTableList::iterator iter = lossTableList.end();
LossTableList::iterator iterTables = lossTableList.begin();
LossTableList::iterator iterTables_end = lossTableList.end();
for(;iterTables != iterTables_end; iterTables++) {
G4bool isApplicable = (*iterTables) ->
IsApplicable(particle, material);
if(isApplicable) {
iter = iterTables;
break;
}
}
return iter;
}
inline
void G4IonParametrisedLossModel::SetEnergyLossLimit(
G4double ionEnergyLossLimit) {
if(ionEnergyLossLimit > 0 && ionEnergyLossLimit <=1) {
energyLossLimit = ionEnergyLossLimit;
}
}