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p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/electromagnetic/lowenergy/include/G4IonParametrisedLossModel.icc (Version 11.3.0) and /processes/electromagnetic/lowenergy/include/G4IonParametrisedLossModel.icc (Version 10.6)


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