[968] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
[1340] | 26 | // $Id: G4IonParametrisedLossModel.icc,v 1.7 2010/11/04 12:21:47 vnivanch Exp $ |
---|
[1347] | 27 | // GEANT4 tag $Name: geant4-09-04-ref-00 $ |
---|
[968] | 28 | // |
---|
| 29 | // =========================================================================== |
---|
| 30 | // GEANT4 class |
---|
| 31 | // |
---|
| 32 | // Class: G4IonParametrisedLossModel |
---|
| 33 | // |
---|
| 34 | // Base class: G4VEmModel (utils) |
---|
| 35 | // |
---|
| 36 | // Author: Anton Lechner (Anton.Lechner@cern.ch) |
---|
| 37 | // |
---|
| 38 | // First implementation: 10. 11. 2008 |
---|
| 39 | // |
---|
[1055] | 40 | // Modifications: 03. 02. 2009 - Bug fix iterators (AL) |
---|
| 41 | // 11. 03. 2009 - Introduced new table handler (G4IonDEDXHandler) |
---|
| 42 | // and modified method to add/remove tables |
---|
| 43 | // (tables are now built in initialisation phase), |
---|
| 44 | // Minor bug fix in ComputeDEDXPerVolume (AL) |
---|
[1196] | 45 | // 20. 11. 2009 - Added set-method for energy loss limit (AL) |
---|
[1340] | 46 | // 04. 11. 2010 - Moved virtual methods to the source (VI) |
---|
[968] | 47 | // |
---|
| 48 | // Class description: |
---|
| 49 | // Model for computing the energy loss of ions by employing a |
---|
| 50 | // parameterisation of dE/dx tables (default ICRU 73 tables). For |
---|
| 51 | // ion-material combinations and/or projectile energies not covered |
---|
| 52 | // by this model, the G4BraggIonModel and G4BetheBloch models are |
---|
| 53 | // employed. |
---|
| 54 | // |
---|
| 55 | // Comments: |
---|
| 56 | // |
---|
| 57 | // =========================================================================== |
---|
| 58 | |
---|
| 59 | inline G4double G4IonParametrisedLossModel::DeltaRayMeanEnergyTransferRate( |
---|
| 60 | const G4Material* material, |
---|
| 61 | const G4ParticleDefinition* particle, |
---|
| 62 | G4double kineticEnergy, |
---|
| 63 | G4double cutEnergy) { |
---|
| 64 | |
---|
| 65 | // ############## Mean energy transferred to delta-rays ################### |
---|
| 66 | // Computes the mean energy transfered to delta-rays per unit length, |
---|
| 67 | // considering only delta-rays with energies above the energy threshold |
---|
| 68 | // (energy cut) |
---|
| 69 | // |
---|
| 70 | // The mean energy transfer rate is derived by using the differential |
---|
| 71 | // cross section given in the references below. |
---|
| 72 | // |
---|
| 73 | // See Geant4 physics reference manual (version 9.1), section 9.1.3 |
---|
| 74 | // |
---|
| 75 | // Ref.: W.M. Yao et al, Jour. of Phys. G 33 (2006) 1. |
---|
| 76 | // B. Rossi, High energy particles, New York, NY: Prentice-Hall (1952). |
---|
| 77 | // |
---|
| 78 | // (Implementation adapted from G4BraggIonModel) |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | // *** Variables: |
---|
| 82 | // kineticEnergy = kinetic energy of projectile |
---|
| 83 | // totEnergy = total energy of projectile, i.e. kinetic energy |
---|
| 84 | // plus rest energy (Mc^2) |
---|
| 85 | // betaSquared = beta of projectile squared, calculated as |
---|
| 86 | // beta^2 = 1 - 1 / (E/Mc^2)^2 |
---|
| 87 | // = T * ( E + Mc^2 ) / E^2 |
---|
| 88 | // where T = kineticEnergy, E = totEnergy |
---|
| 89 | // cutEnergy = energy threshold for secondary particle production |
---|
| 90 | // i.e. energy cut, below which energy transfered to |
---|
| 91 | // electrons is treated as continuous loss of projectile |
---|
| 92 | // maxKinEnergy = maximum energy transferable to secondary electrons |
---|
| 93 | // meanRate = mean kinetic energy of delta ray (per unit length) |
---|
| 94 | // (above cutEnergy) |
---|
| 95 | |
---|
| 96 | G4double meanRate = 0.0; |
---|
| 97 | |
---|
| 98 | G4double maxKinEnergy = MaxSecondaryEnergy(particle, kineticEnergy); |
---|
| 99 | |
---|
| 100 | if (cutEnergy < maxKinEnergy) { |
---|
| 101 | |
---|
| 102 | G4double totalEnergy = kineticEnergy + cacheMass; |
---|
| 103 | G4double betaSquared = kineticEnergy * |
---|
| 104 | (totalEnergy + cacheMass) / (totalEnergy * totalEnergy); |
---|
| 105 | |
---|
| 106 | G4double cutMaxEnergyRatio = cutEnergy / maxKinEnergy; |
---|
| 107 | |
---|
| 108 | meanRate = |
---|
| 109 | (- std::log(cutMaxEnergyRatio) - (1.0 - cutMaxEnergyRatio) * betaSquared) * |
---|
| 110 | twopi_mc2_rcl2 * |
---|
| 111 | (material->GetTotNbOfElectPerVolume()) / betaSquared; |
---|
| 112 | |
---|
| 113 | meanRate *= GetChargeSquareRatio(particle, material, kineticEnergy); |
---|
| 114 | } |
---|
| 115 | |
---|
| 116 | return meanRate; |
---|
| 117 | } |
---|
| 118 | |
---|
| 119 | inline |
---|
| 120 | void G4IonParametrisedLossModel::UpdateCache( |
---|
| 121 | const G4ParticleDefinition* particle) { |
---|
| 122 | |
---|
| 123 | cacheParticle = particle; |
---|
| 124 | cacheMass = particle -> GetPDGMass(); |
---|
| 125 | cacheElecMassRatio = electron_mass_c2 / cacheMass; |
---|
| 126 | G4double q = particle -> GetPDGCharge() / eplus; |
---|
| 127 | cacheChargeSquare = q * q; |
---|
| 128 | } |
---|
| 129 | |
---|
| 130 | inline |
---|
| 131 | LossTableList::iterator G4IonParametrisedLossModel::IsApplicable( |
---|
| 132 | const G4ParticleDefinition* particle, // Projectile (ion) |
---|
| 133 | const G4Material* material) { // Target material |
---|
| 134 | |
---|
[1055] | 135 | LossTableList::iterator iter = lossTableList.end(); |
---|
[968] | 136 | LossTableList::iterator iterTables = lossTableList.begin(); |
---|
| 137 | LossTableList::iterator iterTables_end = lossTableList.end(); |
---|
| 138 | |
---|
| 139 | for(;iterTables != iterTables_end; iterTables++) { |
---|
| 140 | G4bool isApplicable = (*iterTables) -> |
---|
| 141 | IsApplicable(particle, material); |
---|
| 142 | if(isApplicable) { |
---|
| 143 | iter = iterTables; |
---|
| 144 | break; |
---|
| 145 | } |
---|
| 146 | } |
---|
| 147 | |
---|
| 148 | return iter; |
---|
| 149 | } |
---|
[1196] | 150 | |
---|
| 151 | |
---|
| 152 | inline |
---|
| 153 | void G4IonParametrisedLossModel::SetEnergyLossLimit( |
---|
| 154 | G4double ionEnergyLossLimit) { |
---|
| 155 | |
---|
| 156 | if(ionEnergyLossLimit > 0 && ionEnergyLossLimit <=1) { |
---|
| 157 | |
---|
| 158 | energyLossLimit = ionEnergyLossLimit; |
---|
| 159 | } |
---|
| 160 | } |
---|