Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/electromagnetic/highenergy/src/G4mplIonisationModel.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.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/highenergy/src/G4mplIonisationModel.cc (Version 11.3.0) and /processes/electromagnetic/highenergy/src/G4mplIonisationModel.cc (Version 10.2.p1)


  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 // $Id: G4mplIonisationModel.cc 91869 2015-08-07 15:21:02Z gcosmo $
 26 //                                                 27 //
 27 // -------------------------------------------     28 // -------------------------------------------------------------------
 28 //                                                 29 //
 29 // GEANT4 Class header file                        30 // GEANT4 Class header file
 30 //                                                 31 //
 31 //                                                 32 //
 32 // File name:     G4mplIonisationModel             33 // File name:     G4mplIonisationModel
 33 //                                                 34 //
 34 // Author:        Vladimir Ivanchenko              35 // Author:        Vladimir Ivanchenko 
 35 //                                                 36 //
 36 // Creation date: 06.09.2005                       37 // Creation date: 06.09.2005
 37 //                                                 38 //
 38 // Modifications:                                  39 // Modifications:
 39 // 12.08.2007 Changing low energy approximatio     40 // 12.08.2007 Changing low energy approximation and extrapolation. 
 40 //            Small bug fixing and refactoring     41 //            Small bug fixing and refactoring (M. Vladymyrov)
 41 // 13.11.2007 Use low-energy asymptotic from [     42 // 13.11.2007 Use low-energy asymptotic from [3] (V.Ivanchenko) 
 42 //                                                 43 //
 43 //                                                 44 //
 44 // -------------------------------------------     45 // -------------------------------------------------------------------
 45 // References                                      46 // References
 46 // [1] Steven P. Ahlen: Energy loss of relativ     47 // [1] Steven P. Ahlen: Energy loss of relativistic heavy ionizing particles, 
 47 //     S.P. Ahlen, Rev. Mod. Phys 52(1980), p1     48 //     S.P. Ahlen, Rev. Mod. Phys 52(1980), p121
 48 // [2] K.A. Milton arXiv:hep-ex/0602040            49 // [2] K.A. Milton arXiv:hep-ex/0602040
 49 // [3] S.P. Ahlen and K. Kinoshita, Phys. Rev.     50 // [3] S.P. Ahlen and K. Kinoshita, Phys. Rev. D26 (1982) 2347
 50                                                    51 
 51                                                    52 
 52 //....oooOO0OOooo........oooOO0OOooo........oo     53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 53 //....oooOO0OOooo........oooOO0OOooo........oo     54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 54                                                    55 
 55 #include "G4mplIonisationModel.hh"                 56 #include "G4mplIonisationModel.hh"
 56 #include "Randomize.hh"                            57 #include "Randomize.hh"
 57 #include "G4PhysicalConstants.hh"                  58 #include "G4PhysicalConstants.hh"
 58 #include "G4SystemOfUnits.hh"                      59 #include "G4SystemOfUnits.hh"
 59 #include "G4ParticleChangeForLoss.hh"              60 #include "G4ParticleChangeForLoss.hh"
 60 #include "G4ProductionCutsTable.hh"                61 #include "G4ProductionCutsTable.hh"
 61 #include "G4MaterialCutsCouple.hh"                 62 #include "G4MaterialCutsCouple.hh"
 62 #include "G4Log.hh"                                63 #include "G4Log.hh"
 63 #include "G4Pow.hh"                            << 
 64                                                    64 
 65 //....oooOO0OOooo........oooOO0OOooo........oo     65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 66                                                    66 
 67 std::vector<G4double>* G4mplIonisationModel::d <<  67 using namespace std;
                                                   >>  68 
                                                   >>  69 std::vector<G4double>* G4mplIonisationModel::dedx0 = 0;
 68                                                    70 
 69 G4mplIonisationModel::G4mplIonisationModel(G4d     71 G4mplIonisationModel::G4mplIonisationModel(G4double mCharge, const G4String& nam)
 70   : G4VEmModel(nam),G4VEmFluctuationModel(nam)     72   : G4VEmModel(nam),G4VEmFluctuationModel(nam),
 71   magCharge(mCharge),                              73   magCharge(mCharge),
 72   twoln10(G4Log(100.0)),                       <<  74   twoln10(log(100.0)),
 73   betalow(0.01),                                   75   betalow(0.01),
 74   betalim(0.1),                                    76   betalim(0.1),
 75   beta2lim(betalim*betalim),                       77   beta2lim(betalim*betalim),
 76   bg2lim(beta2lim*(1.0 + beta2lim))                78   bg2lim(beta2lim*(1.0 + beta2lim))
 77 {                                                  79 {
 78   nmpl = G4int(std::abs(magCharge) * 2 * CLHEP <<  80   nmpl         = G4int(abs(magCharge) * 2 * fine_structure_const + 0.5);
 79   if(nmpl > 6)      { nmpl = 6; }                  81   if(nmpl > 6)      { nmpl = 6; }
 80   else if(nmpl < 1) { nmpl = 1; }                  82   else if(nmpl < 1) { nmpl = 1; }
 81   pi_hbarc2_over_mc2 = CLHEP::pi*CLHEP::hbarc* <<  83   pi_hbarc2_over_mc2 = pi * hbarc * hbarc / electron_mass_c2;
 82   chargeSquare = magCharge * magCharge;            84   chargeSquare = magCharge * magCharge;
 83   dedxlim = 45.*nmpl*nmpl*CLHEP::GeV*CLHEP::cm <<  85   dedxlim = 45.*nmpl*nmpl*GeV*cm2/g;
                                                   >>  86   fParticleChange = 0;
                                                   >>  87   monopole = 0;
                                                   >>  88   mass = 0.0;
 84 }                                                  89 }
 85                                                    90 
 86 //....oooOO0OOooo........oooOO0OOooo........oo     91 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 87                                                    92 
 88 G4mplIonisationModel::~G4mplIonisationModel()      93 G4mplIonisationModel::~G4mplIonisationModel()
 89 {                                                  94 {
 90   if(IsMaster()) { delete dedx0; }                 95   if(IsMaster()) { delete dedx0; }
 91 }                                                  96 }
 92                                                    97 
 93 //....oooOO0OOooo........oooOO0OOooo........oo     98 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 94                                                    99 
 95 void G4mplIonisationModel::SetParticle(const G    100 void G4mplIonisationModel::SetParticle(const G4ParticleDefinition* p)
 96 {                                                 101 {
 97   monopole = p;                                   102   monopole = p;
 98   mass     = monopole->GetPDGMass();              103   mass     = monopole->GetPDGMass();
 99   G4double emin =                                 104   G4double emin = 
100     std::min(LowEnergyLimit(),0.1*mass*(1./std << 105     std::min(LowEnergyLimit(),0.1*mass*(1/sqrt(1 - betalow*betalow) - 1)); 
101   G4double emax =                                 106   G4double emax = 
102     std::max(HighEnergyLimit(),10.*mass*(1./st << 107     std::max(HighEnergyLimit(),10*mass*(1/sqrt(1 - beta2lim) - 1)); 
103   SetLowEnergyLimit(emin);                        108   SetLowEnergyLimit(emin);
104   SetHighEnergyLimit(emax);                       109   SetHighEnergyLimit(emax);
105 }                                                 110 }
106                                                   111 
107 //....oooOO0OOooo........oooOO0OOooo........oo    112 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
108                                                   113 
109 void G4mplIonisationModel::Initialise(const G4    114 void G4mplIonisationModel::Initialise(const G4ParticleDefinition* p,
110               const G4DataVector&)                115               const G4DataVector&)
111 {                                                 116 {
112   if(nullptr == monopole) { SetParticle(p); }  << 117   if(!monopole) { SetParticle(p); }
113   if(nullptr == fParticleChange) { fParticleCh << 118   if(!fParticleChange) { fParticleChange = GetParticleChangeForLoss(); }
114   if(IsMaster()) {                                119   if(IsMaster()) {
115     if(nullptr == dedx0) { dedx0 = new std::ve << 120     if(!dedx0) { dedx0 = new std::vector<G4double>; }
116     G4ProductionCutsTable* theCoupleTable=        121     G4ProductionCutsTable* theCoupleTable=
117       G4ProductionCutsTable::GetProductionCuts    122       G4ProductionCutsTable::GetProductionCutsTable();
118     G4int numOfCouples = (G4int)theCoupleTable << 123     G4int numOfCouples = theCoupleTable->GetTableSize();
119     G4int n = (G4int)dedx0->size();            << 124     G4int n = dedx0->size();
120     if(n < numOfCouples) { dedx0->resize(numOf    125     if(n < numOfCouples) { dedx0->resize(numOfCouples); }
121                                                   126 
122     G4Pow* g4calc = G4Pow::GetInstance();      << 127     // initialise vector
123                                                << 
124     // initialise vector assuming low conducti << 
125     for(G4int i=0; i<numOfCouples; ++i) {         128     for(G4int i=0; i<numOfCouples; ++i) {
126                                                   129 
127       const G4Material* material =                130       const G4Material* material = 
128         theCoupleTable->GetMaterialCutsCouple( << 131   theCoupleTable->GetMaterialCutsCouple(i)->GetMaterial();
129       G4double eDensity = material->GetElectro    132       G4double eDensity = material->GetElectronDensity();
130       G4double vF2 = 2*electron_Compton_length << 133       G4double vF = electron_Compton_length*pow(3*pi*pi*eDensity,0.3333333333);
131       (*dedx0)[i] = pi_hbarc2_over_mc2*eDensit    134       (*dedx0)[i] = pi_hbarc2_over_mc2*eDensity*nmpl*nmpl*
132         (G4Log(vF2/fine_structure_const) - 0.5 << 135   (G4Log(2*vF/fine_structure_const) - 0.5)/vF;
133     }                                             136     }
134   }                                               137   }
135 }                                                 138 }
136                                                   139 
137 //....oooOO0OOooo........oooOO0OOooo........oo    140 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
138                                                   141 
139 G4double G4mplIonisationModel::ComputeDEDXPerV    142 G4double G4mplIonisationModel::ComputeDEDXPerVolume(const G4Material* material,
140                 const G4ParticleDefinition* p,    143                 const G4ParticleDefinition* p,
141                 G4double kineticEnergy,           144                 G4double kineticEnergy,
142                 G4double)                         145                 G4double)
143 {                                                 146 {
144   if(nullptr == monopole) { SetParticle(p); }  << 147   if(!monopole) { SetParticle(p); }
145   G4double tau   = kineticEnergy / mass;          148   G4double tau   = kineticEnergy / mass;
146   G4double gam   = tau + 1.0;                     149   G4double gam   = tau + 1.0;
147   G4double bg2   = tau * (tau + 2.0);             150   G4double bg2   = tau * (tau + 2.0);
148   G4double beta2 = bg2 / (gam * gam);             151   G4double beta2 = bg2 / (gam * gam);
149   G4double beta  = std::sqrt(beta2);           << 152   G4double beta  = sqrt(beta2);
150                                                   153 
151   // low-energy asymptotic formula                154   // low-energy asymptotic formula
152   //G4double dedx  = dedxlim*beta*material->Ge    155   //G4double dedx  = dedxlim*beta*material->GetDensity();
153   G4double dedx = (*dedx0)[CurrentCouple()->Ge    156   G4double dedx = (*dedx0)[CurrentCouple()->GetIndex()]*beta;
154                                                   157 
155   // above asymptotic                             158   // above asymptotic
156   if(beta > betalow) {                            159   if(beta > betalow) {
157                                                   160 
158     // high energy                                161     // high energy
159     if(beta >= betalim) {                         162     if(beta >= betalim) {
160       dedx = ComputeDEDXAhlen(material, bg2);     163       dedx = ComputeDEDXAhlen(material, bg2);
161                                                   164 
162     } else {                                      165     } else {
163                                                   166 
164       //G4double dedx1 = dedxlim*betalow*mater    167       //G4double dedx1 = dedxlim*betalow*material->GetDensity();
165       G4double dedx1 = (*dedx0)[CurrentCouple(    168       G4double dedx1 = (*dedx0)[CurrentCouple()->GetIndex()]*betalow;
166       G4double dedx2 = ComputeDEDXAhlen(materi    169       G4double dedx2 = ComputeDEDXAhlen(material, bg2lim);
167                                                   170 
168       // extrapolation between two formula        171       // extrapolation between two formula 
169       G4double kapa2 = beta - betalow;            172       G4double kapa2 = beta - betalow;
170       G4double kapa1 = betalim - beta;            173       G4double kapa1 = betalim - beta;
171       dedx = (kapa1*dedx1 + kapa2*dedx2)/(kapa    174       dedx = (kapa1*dedx1 + kapa2*dedx2)/(kapa1 + kapa2);
172     }                                             175     }
173   }                                               176   }
174   return dedx;                                    177   return dedx;
175 }                                                 178 }
176                                                   179 
177 //....oooOO0OOooo........oooOO0OOooo........oo    180 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
178                                                   181 
179 G4double G4mplIonisationModel::ComputeDEDXAhle    182 G4double G4mplIonisationModel::ComputeDEDXAhlen(const G4Material* material, 
180             G4double bg2)                         183             G4double bg2)
181 {                                                 184 {
182   G4double eDensity = material->GetElectronDen    185   G4double eDensity = material->GetElectronDensity();
183   G4double eexc  = material->GetIonisation()->    186   G4double eexc  = material->GetIonisation()->GetMeanExcitationEnergy();
184   G4double cden  = material->GetIonisation()->    187   G4double cden  = material->GetIonisation()->GetCdensity();
185   G4double mden  = material->GetIonisation()->    188   G4double mden  = material->GetIonisation()->GetMdensity();
186   G4double aden  = material->GetIonisation()->    189   G4double aden  = material->GetIonisation()->GetAdensity();
187   G4double x0den = material->GetIonisation()->    190   G4double x0den = material->GetIonisation()->GetX0density();
188   G4double x1den = material->GetIonisation()->    191   G4double x1den = material->GetIonisation()->GetX1density();
189                                                   192 
190   // Ahlen's formula for nonconductors, [1]p15    193   // Ahlen's formula for nonconductors, [1]p157, f(5.7)
191   G4double dedx = std::log(2.0 * electron_mass << 194   G4double dedx = log(2.0 * electron_mass_c2 * bg2 / eexc) - 0.5;
192                                                   195 
193   // Kazama et al. cross-section correction       196   // Kazama et al. cross-section correction
194   G4double  k = 0.406;                            197   G4double  k = 0.406;
195   if(nmpl > 1) k = 0.346;                         198   if(nmpl > 1) k = 0.346;
196                                                   199 
197   // Bloch correction                             200   // Bloch correction
198   const G4double B[7] = { 0.0, 0.248, 0.672, 1    201   const G4double B[7] = { 0.0, 0.248, 0.672, 1.022, 1.243, 1.464, 1.685}; 
199                                                   202 
200   dedx += 0.5 * k - B[nmpl];                      203   dedx += 0.5 * k - B[nmpl];
201                                                   204 
202   // density effect correction                    205   // density effect correction
203   G4double deltam;                                206   G4double deltam;
204   G4double x = std::log(bg2) / twoln10;        << 207   G4double x = log(bg2) / twoln10;
205   if ( x >= x0den ) {                             208   if ( x >= x0den ) {
206     deltam = twoln10 * x - cden;                  209     deltam = twoln10 * x - cden;
207     if ( x < x1den ) deltam += aden * std::pow << 210     if ( x < x1den ) deltam += aden * pow((x1den-x), mden);
208     dedx -= 0.5 * deltam;                         211     dedx -= 0.5 * deltam;
209   }                                               212   }
210                                                   213 
211   // now compute the total ionization loss        214   // now compute the total ionization loss
212   dedx *=  pi_hbarc2_over_mc2 * eDensity * nmp    215   dedx *=  pi_hbarc2_over_mc2 * eDensity * nmpl * nmpl;
213                                                   216 
214   if (dedx < 0.0) dedx = 0.;                   << 217   if (dedx < 0.0) dedx = 0;
215   return dedx;                                    218   return dedx;
216 }                                                 219 }
217                                                   220 
218 //....oooOO0OOooo........oooOO0OOooo........oo    221 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
219                                                   222 
220 void G4mplIonisationModel::SampleSecondaries(s    223 void G4mplIonisationModel::SampleSecondaries(std::vector<G4DynamicParticle*>*,
221                const G4MaterialCutsCouple*,       224                const G4MaterialCutsCouple*,
222                const G4DynamicParticle*,          225                const G4DynamicParticle*,
223                G4double,                          226                G4double,
224                G4double)                          227                G4double)
225 {}                                                228 {}
226                                                   229 
227 //....oooOO0OOooo........oooOO0OOooo........oo    230 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
228                                                   231 
229 G4double G4mplIonisationModel::SampleFluctuati    232 G4double G4mplIonisationModel::SampleFluctuations(
230                const G4MaterialCutsCouple* cou    233                const G4MaterialCutsCouple* couple,
231                const G4DynamicParticle* dp,       234                const G4DynamicParticle* dp,
232                                        const G << 235                G4double tmax,
233                                        const G << 236                G4double length,
234                const G4double length,          << 237                G4double meanLoss)
235                const G4double meanLoss)        << 
236 {                                                 238 {
237   G4double siga = Dispersion(couple->GetMateri << 239   G4double siga = Dispersion(couple->GetMaterial(),dp,tmax,length);
238   G4double loss = meanLoss;                       240   G4double loss = meanLoss;
239   siga = std::sqrt(siga);                      << 241   siga = sqrt(siga);
240   G4double twomeanLoss = meanLoss + meanLoss;     242   G4double twomeanLoss = meanLoss + meanLoss;
241                                                   243 
242   if(twomeanLoss < siga) {                        244   if(twomeanLoss < siga) {
243     G4double x;                                   245     G4double x;
244     do {                                          246     do {
245       loss = twomeanLoss*G4UniformRand();         247       loss = twomeanLoss*G4UniformRand();
246       x = (loss - meanLoss)/siga;                 248       x = (loss - meanLoss)/siga;
247       // Loop checking, 07-Aug-2015, Vladimir     249       // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
248     } while (1.0 - 0.5*x*x < G4UniformRand());    250     } while (1.0 - 0.5*x*x < G4UniformRand());
249   } else {                                        251   } else {
250     do {                                          252     do {
251       loss = G4RandGauss::shoot(meanLoss,siga)    253       loss = G4RandGauss::shoot(meanLoss,siga);
252       // Loop checking, 07-Aug-2015, Vladimir     254       // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
253     } while (0.0 > loss || loss > twomeanLoss)    255     } while (0.0 > loss || loss > twomeanLoss);
254   }                                               256   }
255   return loss;                                    257   return loss;
256 }                                                 258 }
257                                                   259 
258 //....oooOO0OOooo........oooOO0OOooo........oo    260 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
259                                                   261 
260 G4double G4mplIonisationModel::Dispersion(cons    262 G4double G4mplIonisationModel::Dispersion(const G4Material* material,
261             const G4DynamicParticle* dp,          263             const G4DynamicParticle* dp,
262             const G4double tcut,               << 264             G4double tmax,
263             const G4double tmax,               << 265             G4double length)
264             const G4double length)             << 
265 {                                                 266 {
266   G4double siga = 0.0;                            267   G4double siga = 0.0;
267   G4double tau   = dp->GetKineticEnergy()/mass    268   G4double tau   = dp->GetKineticEnergy()/mass;
268   if(tau > 0.0) {                                 269   if(tau > 0.0) { 
269     const G4double beta = dp->GetBeta();       << 270     G4double electronDensity = material->GetElectronDensity();
270     siga  = (tmax/(beta*beta) - 0.5*tcut) * tw << 271     G4double gam   = tau + 1.0;
271       * material->GetElectronDensity() * charg << 272     G4double invbeta2 = (gam*gam)/(tau * (tau+2.0));
                                                   >> 273     siga  = (invbeta2 - 0.5) * twopi_mc2_rcl2 * tmax * length
                                                   >> 274       * electronDensity * chargeSquare;
272   }                                               275   }
273   return siga;                                    276   return siga;
274 }                                                 277 }
275                                                   278 
276 //....oooOO0OOooo........oooOO0OOooo........oo    279 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
277                                                   280