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] [ 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/utils/src/G4ionEffectiveCharge.cc (Version 11.3.0) and /processes/electromagnetic/utils/src/G4ionEffectiveCharge.cc (Version 10.0.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: G4ionEffectiveCharge.cc 74376 2013-10-04 08:25:47Z gcosmo $
 26 //                                                 27 //
 27 // -------------------------------------------     28 // -------------------------------------------------------------------
 28 //                                                 29 //
 29 // GEANT4 Class file                               30 // GEANT4 Class file
 30 //                                                 31 //
 31 //                                                 32 //
 32 // File name:     G4ionEffectiveCharge             33 // File name:     G4ionEffectiveCharge
 33 //                                                 34 //
 34 // Author:        Vladimir Ivanchenko              35 // Author:        Vladimir Ivanchenko
 35 //                                                 36 //
 36 // Creation date: 07.05.2002                       37 // Creation date: 07.05.2002
 37 //                                                 38 //
 38 // Modifications:                                  39 // Modifications:
 39 // 12.09.2004 Set low energy limit to 1 keV (V     40 // 12.09.2004 Set low energy limit to 1 keV (V.Ivanchenko) 
 40 // 25.01.2005 Add protection - min Charge 0.1      41 // 25.01.2005 Add protection - min Charge 0.1 eplus (V.Ivanchenko) 
 41 // 28.04.2006 Set upper energy limit to 50 MeV     42 // 28.04.2006 Set upper energy limit to 50 MeV (V.Ivanchenko) 
 42 // 23.05.2006 Set upper energy limit to Z*10 M     43 // 23.05.2006 Set upper energy limit to Z*10 MeV (V.Ivanchenko) 
 43 // 15.08.2006 Add protection for not defined m     44 // 15.08.2006 Add protection for not defined material (V.Ivanchenko) 
 44 // 27-09-2007 Use Fermi energy from material,      45 // 27-09-2007 Use Fermi energy from material, optimazed formulas (V.Ivanchenko)
 45 //                                                 46 //
 46                                                    47 
 47 // -------------------------------------------     48 // -------------------------------------------------------------------
 48 //                                                 49 //
 49 //....oooOO0OOooo........oooOO0OOooo........oo     50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 50 //....oooOO0OOooo........oooOO0OOooo........oo     51 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 51                                                    52 
 52 #include "G4ionEffectiveCharge.hh"                 53 #include "G4ionEffectiveCharge.hh"
 53 #include "G4PhysicalConstants.hh"                  54 #include "G4PhysicalConstants.hh"
 54 #include "G4SystemOfUnits.hh"                      55 #include "G4SystemOfUnits.hh"
 55 #include "G4UnitsTable.hh"                         56 #include "G4UnitsTable.hh"
 56 #include "G4Material.hh"                           57 #include "G4Material.hh"
 57 #include "G4NistManager.hh"                        58 #include "G4NistManager.hh"
 58 #include "G4Log.hh"                                59 #include "G4Log.hh"
 59 #include "G4Exp.hh"                                60 #include "G4Exp.hh"
 60 #include "G4Pow.hh"                                61 #include "G4Pow.hh"
 61                                                    62 
 62 //....oooOO0OOooo........oooOO0OOooo........oo     63 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 63                                                    64 
 64 G4ionEffectiveCharge::G4ionEffectiveCharge()       65 G4ionEffectiveCharge::G4ionEffectiveCharge()
 65 {                                                  66 {
 66   chargeCorrection = 1.0;                          67   chargeCorrection = 1.0;
 67   energyHighLimit  = 20.0*CLHEP::MeV;          <<  68   energyHighLimit  = 20.0*MeV;
 68   energyLowLimit   = 1.0*CLHEP::keV;           <<  69   energyLowLimit   = 1.0*keV;
 69   energyBohr       = 25.*CLHEP::keV;           <<  70   energyBohr       = 25.*keV;
 70   massFactor       = CLHEP::amu_c2/(CLHEP::pro <<  71   massFactor       = amu_c2/(proton_mass_c2*keV);
 71   minCharge        = 1.0;                          72   minCharge        = 1.0;
                                                   >>  73   lastPart         = 0;
                                                   >>  74   lastMat          = 0;
 72   lastKinEnergy    = 0.0;                          75   lastKinEnergy    = 0.0;
 73   effCharge        = CLHEP::eplus;             <<  76   effCharge        = eplus;
 74   inveplus         = 1.0/CLHEP::eplus;         <<  77   g4pow = G4Pow::GetInstance();
 75   g4calc = G4Pow::GetInstance();               << 
 76 }                                                  78 }
 77                                                    79 
 78 //....oooOO0OOooo........oooOO0OOooo........oo     80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 79                                                    81 
                                                   >>  82 G4ionEffectiveCharge::~G4ionEffectiveCharge()
                                                   >>  83 {}
                                                   >>  84 
                                                   >>  85 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >>  86 
 80 G4double G4ionEffectiveCharge::EffectiveCharge     87 G4double G4ionEffectiveCharge::EffectiveCharge(const G4ParticleDefinition* p,
 81                                                    88                                                const G4Material* material,
 82                                                <<  89                  G4double kineticEnergy)
 83 {                                                  90 {
 84   if(p == lastPart && material == lastMat && k     91   if(p == lastPart && material == lastMat && kineticEnergy == lastKinEnergy)
 85     return effCharge;                              92     return effCharge;
 86                                                    93 
 87   lastPart      = p;                               94   lastPart      = p;
 88   lastMat       = material;                        95   lastMat       = material;
 89   lastKinEnergy = kineticEnergy;                   96   lastKinEnergy = kineticEnergy;
 90                                                    97 
 91   G4double mass = p->GetPDGMass();             <<  98   G4double mass   = p->GetPDGMass();
 92   effCharge = p->GetPDGCharge();               <<  99   G4double charge = p->GetPDGCharge();
 93   G4int Zi = G4lrint(effCharge*inveplus);      << 100   G4double Zi     = charge/eplus;
                                                   >> 101 
 94   chargeCorrection = 1.0;                         102   chargeCorrection = 1.0;
 95   if(Zi <= 1) { return effCharge; }            << 103   effCharge = charge;
 96                                                   104 
 97   // The aproximation of ion effective charge     105   // The aproximation of ion effective charge from:
 98   // J.F.Ziegler, J.P. Biersack, U. Littmark      106   // J.F.Ziegler, J.P. Biersack, U. Littmark
 99   // The Stopping and Range of Ions in Matter,    107   // The Stopping and Range of Ions in Matter,
100   // Vol.1, Pergamon Press, 1985                  108   // Vol.1, Pergamon Press, 1985
101   // Fast ions or hadrons                         109   // Fast ions or hadrons
102   G4double reducedEnergy = kineticEnergy * CLH << 110   G4double reducedEnergy = kineticEnergy * proton_mass_c2/mass ;
103                                                   111 
104   //G4cout << "e= " << reducedEnergy << " Zi=  << 112   //G4cout << "e= " << reducedEnergy << " Zi= " << Zi << "  " << material->GetName() << G4endl;
105   //<< material->GetName() << G4endl;          << 
106                                                   113 
107   if(reducedEnergy > effCharge*energyHighLimit << 114   if( reducedEnergy > Zi*energyHighLimit || Zi < 1.5 || !material) return charge;
108     return effCharge;                          << 115 
109   }                                            << 116   G4double z    = material->GetIonisation()->GetZeffective();
110   G4double z = material->GetIonisation()->GetZ << 
111   reducedEnergy = std::max(reducedEnergy,energ    117   reducedEnergy = std::max(reducedEnergy,energyLowLimit);
112                                                   118 
113   // Helium ion case                              119   // Helium ion case
114   if( Zi <= 2 ) {                              << 120   if( Zi < 2.5 ) {
115                                                   121 
116     static const G4double c[6] =               << 122     static const G4double c[6] = {0.2865,0.1266,-0.001429,0.02402,-0.01135,0.001475};
117       {0.2865,0.1266,-0.001429,0.02402,-0.0113 << 
118                                                   123 
119     G4double Q = std::max(0.0,G4Log(reducedEne    124     G4double Q = std::max(0.0,G4Log(reducedEnergy*massFactor));
120     G4double x = c[0];                            125     G4double x = c[0];
121     G4double y = 1.0;                             126     G4double y = 1.0;
122     for (G4int i=1; i<6; ++i) {                << 127     for (G4int i=1; i<6; i++) {
123       y *= Q;                                     128       y *= Q;
124       x += y * c[i] ;                             129       x += y * c[i] ;
125     }                                             130     }
126     G4double ex = (x < 0.2) ? x * (1 - 0.5*x)  << 131     G4double ex;
                                                   >> 132     if(x < 0.2) ex = x * (1 - 0.5*x);
                                                   >> 133     else        ex = 1. - G4Exp(-x);
127                                                   134 
128     G4double tq = 7.6 - Q;                        135     G4double tq = 7.6 - Q;
129     G4double tq2= tq*tq;                          136     G4double tq2= tq*tq;
130     G4double tt = ( 0.007 + 0.00005 * z );        137     G4double tt = ( 0.007 + 0.00005 * z );
131     if(tq2 < 0.2) { tt *= (1.0 - tq2 + 0.5*tq2 << 138     if(tq2 < 0.2) tt *= (1.0 - tq2 + 0.5*tq2*tq2);
132     else          { tt *= G4Exp(-tq2); }       << 139     else          tt *= G4Exp(-tq2);
133                                                   140 
134     effCharge *= (1.0 + tt) * std::sqrt(ex);   << 141     effCharge = charge*(1.0 + tt) * std::sqrt(ex);
135                                                   142 
136     // Heavy ion case                             143     // Heavy ion case
137   } else {                                        144   } else {
138                                                   145     
139     G4double zi13 = g4calc->Z13(Zi);           << 146     G4double y;
                                                   >> 147     //    = g4pow->A13(Zi);
                                                   >> 148     //G4double z23  = y*y;
                                                   >> 149     G4double zi13 = g4pow->A13(Zi);
140     G4double zi23 = zi13*zi13;                    150     G4double zi23 = zi13*zi13;
                                                   >> 151     //    G4double e = std::max(reducedEnergy,energyBohr/z23);
                                                   >> 152     //G4double e = reducedEnergy;
141                                                   153 
142     // v1 is ion velocity in vF unit              154     // v1 is ion velocity in vF unit
143     G4double eF   = material->GetIonisation()-    155     G4double eF   = material->GetIonisation()->GetFermiEnergy();
144     G4double v1sq = reducedEnergy/eF;             156     G4double v1sq = reducedEnergy/eF;
145     G4double vFsq = eF/energyBohr;                157     G4double vFsq = eF/energyBohr;
146     G4double vF = std::sqrt(vFsq);             << 158     G4double vF   = std::sqrt(eF/energyBohr);
                                                   >> 159 
                                                   >> 160     // Faster than Fermi velocity
                                                   >> 161     if ( v1sq > 1.0 ) {
                                                   >> 162       y = vF * std::sqrt(v1sq) * ( 1.0 + 0.2/v1sq ) / zi23 ;
147                                                   163 
148     G4double y = ( v1sq > 1.0 )                << 
149       // Faster than Fermi velocity            << 
150       ? vF * std::sqrt(v1sq) * ( 1.0 + 0.2/v1s << 
151       // Slower than Fermi velocity               164       // Slower than Fermi velocity
152       : 0.692308 * vF * (1.0 + 0.666666*v1sq + << 165     } else {
                                                   >> 166       y = 0.692308 * vF * (1.0 + 0.666666*v1sq + v1sq*v1sq/15.0) / zi23 ;
                                                   >> 167     }
153                                                   168 
154     G4double y3 = G4Exp(0.3*G4Log(y));         << 169     G4double q;
                                                   >> 170     G4double y3 = std::pow(y, 0.3) ;
155     // G4cout<<"y= "<<y<<" y3= "<<y3<<" v1= "<    171     // G4cout<<"y= "<<y<<" y3= "<<y3<<" v1= "<<v1<<" vF= "<<vF<<G4endl; 
156     G4double q = std::max(1.0 - G4Exp( 0.803*y << 172     q = 1.0 - G4Exp( 0.803*y3 - 1.3167*y3*y3 - 0.38157*y - 0.008983*y*y ) ;
157                                      - 0.00898 << 173     
                                                   >> 174     //y *= 0.77;
                                                   >> 175     //y *= (0.75 + 0.52/Zi);
                                                   >> 176 
                                                   >> 177     //if( y < 0.2 ) q = y*(1.0 - 0.5*y);
                                                   >> 178     //else          q = 1.0 - G4Exp(-y);
                                                   >> 179 
                                                   >> 180     G4double qmin = minCharge/Zi;
                                                   >> 181     if(q < qmin) q = qmin;
                                                   >> 182   
                                                   >> 183     effCharge = q*charge;
                                                   >> 184 
                                                   >> 185     /*
                                                   >> 186     G4double x1 = 1.0*effCharge*(1.0 - 0.132*G4Log(y))/(y*std::sqrt(z));
                                                   >> 187     G4double x2 = 0.1*effCharge*effCharge*energyBohr/reducedEnergy;
                                                   >> 188 
                                                   >> 189     chargeCorrection = 1.0 + x1 - x2;
                                                   >> 190 
                                                   >> 191     G4cout << "x1= "<<x1<<" x2= "<< x2<<" corr= "<<chargeCorrection<<G4endl;
                                                   >> 192     */
158                                                   193     
159     // compute charge correction               << 194     G4double tq = 7.6 - G4Log(reducedEnergy/keV);
160     G4double tq = 7.6 - G4Log(reducedEnergy/CL << 
161     G4double tq2= tq*tq;                          195     G4double tq2= tq*tq;
162     G4double sq = 1.0 + ( 0.18 + 0.0015 * z )* << 196     G4double sq = 1.0 + ( 0.18 + 0.0015 * z )*G4Exp(-tq2)/ (Zi*Zi);
                                                   >> 197  
163     //    G4cout << "sq= " << sq << G4endl;       198     //    G4cout << "sq= " << sq << G4endl;
164                                                   199 
165     // Screen length according to                 200     // Screen length according to
166     // J.F.Ziegler and J.M.Manoyan, The stoppi    201     // J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds,
167     // Nucl. Inst. & Meth. in Phys. Res. B35 (    202     // Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228.
168                                                   203 
169     G4double lambda = 10.0 * vF *g4calc->A23(1 << 204     G4double lambda = 10.0 * vF *g4pow->A23(1.0 - q)/ (zi13 * (6.0 + q));
                                                   >> 205 
170     G4double lambda2 = lambda*lambda;             206     G4double lambda2 = lambda*lambda;
                                                   >> 207 
171     G4double xx = (0.5/q - 0.5)*G4Log(1.0 + la    208     G4double xx = (0.5/q - 0.5)*G4Log(1.0 + lambda2)/vFsq;
172                                                   209 
173     effCharge *= q;                            << 
174     chargeCorrection = sq * (1.0 + xx);           210     chargeCorrection = sq * (1.0 + xx);
                                                   >> 211     
175   }                                               212   }
176   //  G4cout << "G4ionEffectiveCharge: charge=    213   //  G4cout << "G4ionEffectiveCharge: charge= " << charge << " q= " << q 
177   //         << " chargeCor= " << chargeCorrec    214   //         << " chargeCor= " << chargeCorrection 
178   //           << " e(MeV)= " << kineticEnergy << 215   //     << " e(MeV)= " << kineticEnergy/MeV << G4endl;
179   return effCharge;                               216   return effCharge;
180 }                                                 217 }
181                                                   218 
182 //....oooOO0OOooo........oooOO0OOooo........oo    219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
                                                   >> 220 
                                                   >> 221 
183                                                   222