Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -0,0 +1,202 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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:
|
||||
//
|
||||
//
|
||||
// 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) *
|
||||
twopi_mc2_rcl2 *
|
||||
(material->GetTotNbOfElectPerVolume()) / betaSquared;
|
||||
|
||||
meanRate *= GetChargeSquareRatio(particle, material, kineticEnergy);
|
||||
}
|
||||
|
||||
return meanRate;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
G4double G4IonParametrisedLossModel::MaxSecondaryEnergy(
|
||||
const G4ParticleDefinition* particle,
|
||||
G4double kineticEnergy) {
|
||||
|
||||
// ############## Maximum energy of secondaries ##########################
|
||||
// Function computes maximum energy of secondary electrons which are
|
||||
// released by an ion
|
||||
//
|
||||
// See Geant4 physics reference manual (version 9.1), section 9.1.1
|
||||
//
|
||||
// Ref.: W.M. Yao et al, Jour. of Phys. G 33 (2006) 1.
|
||||
// C.Caso et al. (Part. Data Group), Europ. Phys. Jour. C 3 1 (1998).
|
||||
// B. Rossi, High energy particles, New York, NY: Prentice-Hall (1952).
|
||||
//
|
||||
// (Implementation adapted from G4BraggIonModel)
|
||||
|
||||
if(particle != cacheParticle) UpdateCache(particle);
|
||||
|
||||
G4double tau = kineticEnergy/cacheMass;
|
||||
G4double tmax = 2.0 * electron_mass_c2 * tau * (tau + 2.) /
|
||||
(1. + 2.0 * (tau + 1.) * cacheElecMassRatio +
|
||||
cacheElecMassRatio * cacheElecMassRatio);
|
||||
|
||||
return tmax;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
void G4IonParametrisedLossModel::UpdateCache(
|
||||
const G4ParticleDefinition* particle) {
|
||||
|
||||
cacheParticle = particle;
|
||||
cacheMass = particle -> GetPDGMass();
|
||||
cacheElecMassRatio = electron_mass_c2 / cacheMass;
|
||||
G4double q = particle -> GetPDGCharge() / eplus;
|
||||
cacheChargeSquare = q * q;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
G4double G4IonParametrisedLossModel::GetChargeSquareRatio(
|
||||
const G4ParticleDefinition* particle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy) { // Kinetic energy
|
||||
|
||||
G4double chargeSquareRatio = corrections ->
|
||||
EffectiveChargeSquareRatio(particle,
|
||||
material,
|
||||
kineticEnergy);
|
||||
corrFactor = chargeSquareRatio *
|
||||
corrections -> EffectiveChargeCorrection(particle,
|
||||
material,
|
||||
kineticEnergy);
|
||||
return corrFactor;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
G4double G4IonParametrisedLossModel::GetParticleCharge(
|
||||
const G4ParticleDefinition* particle,
|
||||
const G4Material* material,
|
||||
G4double kineticEnergy) { // Kinetic energy
|
||||
|
||||
return corrections -> GetParticleCharge(particle, material, kineticEnergy);
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
LossTableList::iterator G4IonParametrisedLossModel::IsApplicable(
|
||||
const G4ParticleDefinition* particle, // Projectile (ion)
|
||||
const G4Material* material) { // Target material
|
||||
|
||||
LossTableList::iterator iter = lossTableList.begin();
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user