Geant4 Cross Reference |
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,v 1.13 2006/06/29 19:55:27 gunter Exp $ >> 27 // GEANT4 tag $Name: geant4-08-01 $ 26 // 28 // 27 // ------------------------------------------- 29 // ------------------------------------------------------------------- 28 // 30 // 29 // GEANT4 Class file 31 // GEANT4 Class file 30 // 32 // 31 // 33 // 32 // File name: G4ionEffectiveCharge 34 // File name: G4ionEffectiveCharge 33 // 35 // 34 // Author: Vladimir Ivanchenko 36 // Author: Vladimir Ivanchenko 35 // 37 // 36 // Creation date: 07.05.2002 38 // Creation date: 07.05.2002 37 // 39 // 38 // Modifications: 40 // Modifications: 39 // 12.09.2004 Set low energy limit to 1 keV (V 41 // 12.09.2004 Set low energy limit to 1 keV (V.Ivanchenko) 40 // 25.01.2005 Add protection - min Charge 0.1 42 // 25.01.2005 Add protection - min Charge 0.1 eplus (V.Ivanchenko) 41 // 28.04.2006 Set upper energy limit to 50 MeV 43 // 28.04.2006 Set upper energy limit to 50 MeV (V.Ivanchenko) 42 // 23.05.2006 Set upper energy limit to Z*10 M 44 // 23.05.2006 Set upper energy limit to Z*10 MeV (V.Ivanchenko) 43 // 15.08.2006 Add protection for not defined m << 44 // 27-09-2007 Use Fermi energy from material, << 45 // 45 // 46 46 47 // ------------------------------------------- 47 // ------------------------------------------------------------------- 48 // 48 // 49 //....oooOO0OOooo........oooOO0OOooo........oo 49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 50 //....oooOO0OOooo........oooOO0OOooo........oo 50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 51 51 52 #include "G4ionEffectiveCharge.hh" 52 #include "G4ionEffectiveCharge.hh" 53 #include "G4PhysicalConstants.hh" << 54 #include "G4SystemOfUnits.hh" << 55 #include "G4UnitsTable.hh" 53 #include "G4UnitsTable.hh" >> 54 #include "G4ParticleDefinition.hh" 56 #include "G4Material.hh" 55 #include "G4Material.hh" 57 #include "G4NistManager.hh" << 58 #include "G4Log.hh" << 59 #include "G4Exp.hh" << 60 #include "G4Pow.hh" << 61 56 62 //....oooOO0OOooo........oooOO0OOooo........oo 57 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 63 58 64 G4ionEffectiveCharge::G4ionEffectiveCharge() 59 G4ionEffectiveCharge::G4ionEffectiveCharge() 65 { 60 { 66 chargeCorrection = 1.0; 61 chargeCorrection = 1.0; 67 energyHighLimit = 20.0*CLHEP::MeV; << 62 energyHighLimit = 10.0*MeV; 68 energyLowLimit = 1.0*CLHEP::keV; << 63 energyLowLimit = 1.0*keV; 69 energyBohr = 25.*CLHEP::keV; << 64 energyBohr = 25.*keV; 70 massFactor = CLHEP::amu_c2/(CLHEP::pro << 65 massFactor = amu_c2/(proton_mass_c2*keV); 71 minCharge = 1.0; << 66 minCharge = 0.1; 72 lastKinEnergy = 0.0; << 73 effCharge = CLHEP::eplus; << 74 inveplus = 1.0/CLHEP::eplus; << 75 g4calc = G4Pow::GetInstance(); << 76 } 67 } 77 68 78 //....oooOO0OOooo........oooOO0OOooo........oo 69 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... 79 70 >> 71 G4ionEffectiveCharge::~G4ionEffectiveCharge() >> 72 {} >> 73 >> 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 75 80 G4double G4ionEffectiveCharge::EffectiveCharge 76 G4double G4ionEffectiveCharge::EffectiveCharge(const G4ParticleDefinition* p, 81 77 const G4Material* material, 82 << 78 G4double kineticEnergy) 83 { 79 { 84 if(p == lastPart && material == lastMat && k << 80 G4double mass = p->GetPDGMass(); 85 return effCharge; << 81 G4double charge = p->GetPDGCharge(); >> 82 G4double Zi = charge/eplus; 86 83 87 lastPart = p; << 88 lastMat = material; << 89 lastKinEnergy = kineticEnergy; << 90 << 91 G4double mass = p->GetPDGMass(); << 92 effCharge = p->GetPDGCharge(); << 93 G4int Zi = G4lrint(effCharge*inveplus); << 94 chargeCorrection = 1.0; 84 chargeCorrection = 1.0; 95 if(Zi <= 1) { return effCharge; } << 96 85 97 // The aproximation of ion effective charge 86 // The aproximation of ion effective charge from: 98 // J.F.Ziegler, J.P. Biersack, U. Littmark 87 // J.F.Ziegler, J.P. Biersack, U. Littmark 99 // The Stopping and Range of Ions in Matter, 88 // The Stopping and Range of Ions in Matter, 100 // Vol.1, Pergamon Press, 1985 89 // Vol.1, Pergamon Press, 1985 101 // Fast ions or hadrons 90 // Fast ions or hadrons 102 G4double reducedEnergy = kineticEnergy * CLH << 91 G4double reducedEnergy = kineticEnergy * proton_mass_c2/mass ; >> 92 if( reducedEnergy > Zi*energyHighLimit || Zi < 1.5 ) return charge; 103 93 104 //G4cout << "e= " << reducedEnergy << " Zi= << 94 static G4double vFermi[92] = { 105 //<< material->GetName() << G4endl; << 95 1.0309, 0.15976, 0.59782, 1.0781, 1.0486, 1.0, 1.058, 0.93942, 0.74562, 0.3424, >> 96 0.45259, 0.71074, 0.90519, 0.97411, 0.97184, 0.89852, 0.70827, 0.39816, 0.36552, 0.62712, >> 97 0.81707, 0.9943, 1.1423, 1.2381, 1.1222, 0.92705, 1.0047, 1.2, 1.0661, 0.97411, >> 98 0.84912, 0.95, 1.0903, 1.0429, 0.49715, 0.37755, 0.35211, 0.57801, 0.77773, 1.0207, >> 99 1.029, 1.2542, 1.122, 1.1241, 1.0882, 1.2709, 1.2542, 0.90094, 0.74093, 0.86054, >> 100 0.93155, 1.0047, 0.55379, 0.43289, 0.32636, 0.5131, 0.695, 0.72591, 0.71202, 0.67413, >> 101 0.71418, 0.71453, 0.5911, 0.70263, 0.68049, 0.68203, 0.68121, 0.68532, 0.68715, 0.61884, >> 102 0.71801, 0.83048, 1.1222, 1.2381, 1.045, 1.0733, 1.0953, 1.2381, 1.2879, 0.78654, >> 103 0.66401, 0.84912, 0.88433, 0.80746, 0.43357, 0.41923, 0.43638, 0.51464, 0.73087, 0.81065, >> 104 1.9578, 1.0257} ; >> 105 >> 106 static G4double lFactor[92] = { >> 107 1.0, 1.0, 1.1, 1.06, 1.01, 1.03, 1.04, 0.99, 0.95, 0.9, >> 108 0.82, 0.81, 0.83, 0.88, 1.0, 0.95, 0.97, 0.99, 0.98, 0.97, >> 109 0.98, 0.97, 0.96, 0.93, 0.91, 0.9, 0.88, 0.9, 0.9, 0.9, >> 110 0.9, 0.85, 0.9, 0.9, 0.91, 0.92, 0.9, 0.9, 0.9, 0.9, >> 111 0.9, 0.88, 0.9, 0.88, 0.88, 0.9, 0.9, 0.88, 0.9, 0.9, >> 112 0.9, 0.9, 0.96, 1.2, 0.9, 0.88, 0.88, 0.85, 0.9, 0.9, >> 113 0.92, 0.95, 0.99, 1.03, 1.05, 1.07, 1.08, 1.1, 1.08, 1.08, >> 114 1.08, 1.08, 1.09, 1.09, 1.1, 1.11, 1.12, 1.13, 1.14, 1.15, >> 115 1.17, 1.2, 1.18, 1.17, 1.17, 1.16, 1.16, 1.16, 1.16, 1.16, >> 116 1.16, 1.16} ; >> 117 >> 118 static G4double c[6] = {0.2865, 0.1266, -0.001429, >> 119 0.02402,-0.01135, 0.001475} ; >> 120 >> 121 // get elements in the actual material, >> 122 const G4ElementVector* theElementVector = material->GetElementVector() ; >> 123 const G4double* theAtomicNumDensityVector = >> 124 material->GetAtomicNumDensityVector() ; >> 125 const G4int NumberOfElements = material->GetNumberOfElements() ; >> 126 >> 127 // loop for the elements in the material >> 128 // to find out average values Z, vF, lF >> 129 G4double z = 0.0, vF = 0.0, lF = 0.0, norm = 0.0 ; >> 130 >> 131 if( 1 == NumberOfElements ) { >> 132 z = material->GetZ() ; >> 133 G4int iz = G4int(z) - 1 ; >> 134 if(iz < 0) iz = 0 ; >> 135 else if(iz > 91) iz = 91 ; >> 136 vF = vFermi[iz] ; >> 137 lF = lFactor[iz] ; >> 138 >> 139 } else { >> 140 for (G4int iel=0; iel<NumberOfElements; iel++) >> 141 { >> 142 const G4Element* element = (*theElementVector)[iel] ; >> 143 G4double z2 = element->GetZ() ; >> 144 const G4double weight = theAtomicNumDensityVector[iel] ; >> 145 norm += weight ; >> 146 z += z2 * weight ; >> 147 G4int iz = G4int(z2) - 1 ; >> 148 if(iz < 0) iz = 0 ; >> 149 else if(iz > 91) iz =91 ; >> 150 vF += vFermi[iz] * weight ; >> 151 lF += lFactor[iz] * weight ; >> 152 } >> 153 z /= norm ; >> 154 vF /= norm ; >> 155 lF /= norm ; >> 156 } 106 157 107 if(reducedEnergy > effCharge*energyHighLimit << 108 return effCharge; << 109 } << 110 G4double z = material->GetIonisation()->GetZ << 111 reducedEnergy = std::max(reducedEnergy,energ 158 reducedEnergy = std::max(reducedEnergy,energyLowLimit); >> 159 G4double q; 112 160 113 // Helium ion case 161 // Helium ion case 114 if( Zi <= 2 ) { << 162 if( Zi < 2.5 ) { 115 << 116 static const G4double c[6] = << 117 {0.2865,0.1266,-0.001429,0.02402,-0.0113 << 118 163 119 G4double Q = std::max(0.0,G4Log(reducedEne << 164 G4double Q = std::max(0.0,std::log(reducedEnergy*massFactor)); 120 G4double x = c[0]; 165 G4double x = c[0]; 121 G4double y = 1.0; 166 G4double y = 1.0; 122 for (G4int i=1; i<6; ++i) { << 167 for (G4int i=1; i<6; i++) { 123 y *= Q; 168 y *= Q; 124 x += y * c[i] ; 169 x += y * c[i] ; 125 } 170 } 126 G4double ex = (x < 0.2) ? x * (1 - 0.5*x) << 127 << 128 G4double tq = 7.6 - Q; 171 G4double tq = 7.6 - Q; 129 G4double tq2= tq*tq; << 172 q = (1.0 + ( 0.007 + 0.00005 * z ) * std::exp( -tq*tq )) * std::sqrt(1.0 - std::exp(-x)) ; 130 G4double tt = ( 0.007 + 0.00005 * z ); << 131 if(tq2 < 0.2) { tt *= (1.0 - tq2 + 0.5*tq2 << 132 else { tt *= G4Exp(-tq2); } << 133 << 134 effCharge *= (1.0 + tt) * std::sqrt(ex); << 135 173 136 // Heavy ion case 174 // Heavy ion case 137 } else { 175 } else { 138 176 139 G4double zi13 = g4calc->Z13(Zi); << 177 G4double z23 = std::pow(z, 0.666667); >> 178 G4double zi13 = std::pow(Zi, 0.33333); 140 G4double zi23 = zi13*zi13; 179 G4double zi23 = zi13*zi13; 141 << 180 G4double e = std::max(reducedEnergy,energyBohr/z23); >> 181 142 // v1 is ion velocity in vF unit 182 // v1 is ion velocity in vF unit 143 G4double eF = material->GetIonisation()- << 183 G4double v1 = std::sqrt( e / energyBohr )/ vF ; 144 G4double v1sq = reducedEnergy/eF; << 184 G4double y ; 145 G4double vFsq = eF/energyBohr; << 185 146 G4double vF = std::sqrt(vFsq); << 186 // Faster than Fermi velocity 147 << 187 if ( v1 > 1.0 ) { 148 G4double y = ( v1sq > 1.0 ) << 188 y = vF * v1 * ( 1.0 + 0.2 / (v1*v1) ) / zi23 ; 149 // Faster than Fermi velocity << 189 150 ? vF * std::sqrt(v1sq) * ( 1.0 + 0.2/v1s << 151 // Slower than Fermi velocity 190 // Slower than Fermi velocity 152 : 0.692308 * vF * (1.0 + 0.666666*v1sq + << 191 } else { >> 192 y = 0.6923 * vF * (1.0 + 2.0*v1*v1/3.0 + v1*v1*v1*v1/15.0) / zi23 ; >> 193 } >> 194 >> 195 G4double y3 = std::pow(y, 0.3) ; >> 196 // G4cout << "y= " << y << " y3= " << y3 << " v1= " << v1 << " vF= " << vF << G4endl; >> 197 q = 1.0 - std::exp( 0.803*y3 - 1.3167*y3*y3 - 0.38157*y - 0.008983*y*y ) ; >> 198 >> 199 // q = 1.0 - std::exp(-0.95*std::sqrt(reducedEnergy/energyBohr)/zi23); 153 200 154 G4double y3 = G4Exp(0.3*G4Log(y)); << 201 G4double qmin = minCharge/Zi; 155 // G4cout<<"y= "<<y<<" y3= "<<y3<<" v1= "< << 202 156 G4double q = std::max(1.0 - G4Exp( 0.803*y << 203 if(q < qmin) q = qmin; 157 - 0.00898 << 158 204 159 // compute charge correction << 205 G4double tq = 7.6 - std::log(reducedEnergy/keV); 160 G4double tq = 7.6 - G4Log(reducedEnergy/CL << 206 G4double sq = 1.0 + ( 0.18 + 0.0015 * z ) * std::exp( -tq*tq )/ (Zi*Zi); 161 G4double tq2= tq*tq; << 162 G4double sq = 1.0 + ( 0.18 + 0.0015 * z )* << 163 // G4cout << "sq= " << sq << G4endl; 207 // G4cout << "sq= " << sq << G4endl; 164 208 165 // Screen length according to 209 // Screen length according to 166 // J.F.Ziegler and J.M.Manoyan, The stoppi 210 // J.F.Ziegler and J.M.Manoyan, The stopping of ions in compaunds, 167 // Nucl. Inst. & Meth. in Phys. Res. B35 ( 211 // Nucl. Inst. & Meth. in Phys. Res. B35 (1988) 215-228. 168 212 169 G4double lambda = 10.0 * vF *g4calc->A23(1 << 213 G4double lambda = 10.0 * vF * std::pow(1.0-q, 0.6667) / (zi13 * (6.0 + q)) ; 170 G4double lambda2 = lambda*lambda; << 214 chargeCorrection = sq * (1.0 + (0.5/q - 0.5)*std::log(1.0 + lambda*lambda)/(vF*vF) ); 171 G4double xx = (0.5/q - 0.5)*G4Log(1.0 + la << 215 172 << 173 effCharge *= q; << 174 chargeCorrection = sq * (1.0 + xx); << 175 } 216 } 176 // G4cout << "G4ionEffectiveCharge: charge= 217 // G4cout << "G4ionEffectiveCharge: charge= " << charge << " q= " << q 177 // << " chargeCor= " << chargeCorrec 218 // << " chargeCor= " << chargeCorrection 178 // << " e(MeV)= " << kineticEnergy << 219 // << " e(MeV)= " << kineticEnergy/MeV << G4endl; 179 return effCharge; << 220 return q*charge; 180 } 221 } 181 222 182 //....oooOO0OOooo........oooOO0OOooo........oo 223 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... >> 224 >> 225 183 226