Geant4 Cross Reference |
1 // 1 2 // ******************************************* 3 // * License and Disclaimer 4 // * 5 // * The Geant4 software is copyright of th 6 // * the Geant4 Collaboration. It is provided 7 // * conditions of the Geant4 Software License 8 // * LICENSE and available at http://cern.ch/ 9 // * include a list of copyright holders. 10 // * 11 // * Neither the authors of this software syst 12 // * institutes,nor the agencies providing fin 13 // * work make any representation or warran 14 // * regarding this software system or assum 15 // * use. Please see the license in the file 16 // * for the full disclaimer and the limitatio 17 // * 18 // * This code implementation is the result 19 // * technical work of the GEANT4 collaboratio 20 // * By using, copying, modifying or distri 21 // * any work based on the software) you ag 22 // * use in resulting scientific publicati 23 // * acceptance of all terms of the Geant4 Sof 24 // ******************************************* 25 // 26 // 27 // =========================================== 28 // GEANT4 class 29 // 30 // Class: G4IonParametrisedLoss 31 // 32 // Base class: G4VEmModel (utils) 33 // 34 // Author: Anton Lechner (Anton. 35 // 36 // First implementation: 10. 11. 2008 37 // 38 // Modifications: 03. 02. 2009 - Bug fix itera 39 // 11. 03. 2009 - Introduced ne 40 // and modified 41 // (tables are n 42 // Minor bug fix 43 // 20. 11. 2009 - Added set-met 44 // 04. 11. 2010 - Moved virtual 45 // 46 // Class description: 47 // Model for computing the energy loss of i 48 // parameterisation of dE/dx tables (defaul 49 // ion-material combinations and/or project 50 // by this model, the G4BraggIonModel and G 51 // employed. 52 // 53 // Comments: 54 // 55 // =========================================== 56 57 inline G4double G4IonParametrisedLossModel::De 58 const G4 59 const G4ParticleDefinition 60 G4double kineticEnergy, 61 G4double cutEnergy) { 62 63 // ############## Mean energy transferred to 64 // Computes the mean energy transfered to de 65 // considering only delta-rays with energies 66 // (energy cut) 67 // 68 // The mean energy transfer rate is derived 69 // cross section given in the references bel 70 // 71 // See Geant4 physics reference manual (vers 72 // 73 // Ref.: W.M. Yao et al, Jour. of Phys. G 33 74 // B. Rossi, High energy particles, Ne 75 // 76 // (Implementation adapted from G4BraggIonMo 77 78 79 // *** Variables: 80 // kineticEnergy = kinetic energy of proje 81 // totEnergy = total energy of project 82 // plus rest energy (Mc^2) 83 // betaSquared = beta of projectile squa 84 // beta^2 = 1 - 1 / (E/ 85 // = T * ( E + M 86 // where T = kineticEnergy 87 // cutEnergy = energy threshold for se 88 // i.e. energy cut, below 89 // electrons is treated as 90 // maxKinEnergy = maximum energy transfer 91 // meanRate = mean kinetic energy of 92 // (above cutEnergy) 93 94 G4double meanRate = 0.0; 95 96 G4double maxKinEnergy = MaxSecondaryEnergy(p 97 98 if (cutEnergy < maxKinEnergy) { 99 100 G4double totalEnergy = kineticEnergy + ca 101 G4double betaSquared = kineticEnergy * 102 (totalEnergy + cacheMass) / 103 104 G4double cutMaxEnergyRatio = cutEnergy / m 105 106 meanRate = 107 (- std::log(cutMaxEnergyRatio) - (1.0 108 CLHEP::twopi_mc2_rcl2 * 109 (material->GetTotNbOfElectPerVolume()) 110 111 meanRate *= GetChargeSquareRatio(particle, 112 } 113 114 return meanRate; 115 } 116 117 inline 118 void G4IonParametrisedLossModel::UpdateCache( 119 const G4ParticleD 120 121 cacheParticle = particle; 122 cacheMass = particle -> GetPDGMass(); 123 cacheElecMassRatio = CLHEP::electron_mass_c2 124 G4double q = particle -> GetPDGCharge() / CL 125 cacheChargeSquare = q * q; 126 } 127 128 inline 129 LossTableList::iterator G4IonParametrisedLossM 130 const G4ParticleDefinition 131 const G4Material* material 132 133 LossTableList::iterator iter = lossTableList 134 LossTableList::iterator iterTables = lossTab 135 LossTableList::iterator iterTables_end = los 136 137 for(;iterTables != iterTables_end; iterTable 138 G4bool isApplicable = (*iterTables) -> 139 IsApplicable(particle, 140 if(isApplicable) { 141 iter = iterTables; 142 break; 143 } 144 } 145 146 return iter; 147 } 148 149 150 inline 151 void G4IonParametrisedLossModel::SetEnergyLoss 152 G4 153 154 if(ionEnergyLossLimit > 0 && ionEnergyLossLi 155 156 energyLossLimit = ionEnergyLossLimit; 157 } 158 } 159