- Timestamp:
- Apr 6, 2009, 12:21:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/electromagnetic/utils/src/G4ionEffectiveCharge.cc
r819 r961 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4ionEffectiveCharge.cc,v 1. 17.2.1 2008/04/22 15:28:13 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-0 1-patch-02 $26 // $Id: G4ionEffectiveCharge.cc,v 1.24 2008/12/18 13:01:46 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-02-ref-02 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 54 54 #include "G4ionEffectiveCharge.hh" 55 55 #include "G4UnitsTable.hh" 56 #include "G4ParticleDefinition.hh"57 56 #include "G4Material.hh" 57 #include "G4NistManager.hh" 58 58 59 59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... … … 62 62 { 63 63 chargeCorrection = 1.0; 64 energyHighLimit = 10.0*MeV;64 energyHighLimit = 20.0*MeV; 65 65 energyLowLimit = 1.0*keV; 66 66 energyBohr = 25.*keV; 67 67 massFactor = amu_c2/(proton_mass_c2*keV); 68 minCharge = 0.1; 68 minCharge = 1.0; 69 lastPart = 0; 70 lastMat = 0; 71 lastKinEnergy = 0.0; 72 effCharge = eplus; 73 nist = G4NistManager::Instance(); 69 74 } 70 75 … … 78 83 G4double G4ionEffectiveCharge::EffectiveCharge(const G4ParticleDefinition* p, 79 84 const G4Material* material, 80 85 G4double kineticEnergy) 81 86 { 87 if(p == lastPart && material == lastMat && kineticEnergy == lastKinEnergy) 88 return effCharge; 89 90 lastPart = p; 91 lastMat = material; 92 lastKinEnergy = kineticEnergy; 93 82 94 G4double mass = p->GetPDGMass(); 83 95 G4double charge = p->GetPDGCharge(); … … 85 97 86 98 chargeCorrection = 1.0; 99 effCharge = charge; 87 100 88 101 // The aproximation of ion effective charge from: … … 94 107 if( reducedEnergy > Zi*energyHighLimit || Zi < 1.5 || !material) return charge; 95 108 96 static G4double c[6] = {0.2865, 0.1266, -0.001429,97 0.02402,-0.01135, 0.001475} ;98 99 109 G4double z = material->GetIonisation()->GetZeffective(); 100 reducedEnergy = std::max(reducedEnergy,energyLowLimit); 101 G4double q; 110 // reducedEnergy = std::max(reducedEnergy,energyLowLimit); 102 111 103 112 // Helium ion case 104 113 if( Zi < 2.5 ) { 114 115 static G4double c[6] = {0.2865, 0.1266, -0.001429, 116 0.02402,-0.01135, 0.001475} ; 105 117 106 118 G4double Q = std::max(0.0,std::log(reducedEnergy*massFactor)); … … 120 132 if(tq2 < 0.2) tt *= (1.0 - tq2 + 0.5*tq2*tq2); 121 133 else tt *= std::exp(-tq2); 122 q = (1.0 + tt) * std::sqrt(ex); 134 135 effCharge = charge*(1.0 + tt) * std::sqrt(ex); 123 136 124 137 // Heavy ion case 125 138 } else { 126 139 127 G4double z23 = std::pow(z, 0.666666); 128 G4double zi13 = std::pow(Zi, 0.333333); 140 G4double y; 141 // = nist->GetZ13(z); 142 //G4double z23 = y*y; 143 G4double zi13 = nist->GetZ13(Zi); 129 144 G4double zi23 = zi13*zi13; 130 G4double e = std::max(reducedEnergy,energyBohr/z23); 145 // G4double e = std::max(reducedEnergy,energyBohr/z23); 146 //G4double e = reducedEnergy; 131 147 132 148 // v1 is ion velocity in vF unit 133 149 G4double eF = material->GetIonisation()->GetFermiEnergy(); 134 G4double v1sq = e/eF;150 G4double v1sq = reducedEnergy/eF; 135 151 G4double vFsq = eF/energyBohr; 136 G4double vF = std::sqrt(vFsq); 137 138 G4double y ; 152 G4double vF = std::sqrt(eF/energyBohr); 139 153 140 154 // Faster than Fermi velocity … … 147 161 } 148 162 163 G4double q; 149 164 G4double y3 = std::pow(y, 0.3) ; 150 // G4cout << "y= " << y << " y3= " << y3 << " v1= " << v1 << " vF= " << vF <<G4endl;165 // G4cout<<"y= "<<y<<" y3= "<<y3<<" v1= "<<v1<<" vF= "<<vF<<G4endl; 151 166 q = 1.0 - std::exp( 0.803*y3 - 1.3167*y3*y3 - 0.38157*y - 0.008983*y*y ) ; 152 153 // q = 1.0 - std::exp(-0.95*std::sqrt(reducedEnergy/energyBohr)/zi23); 167 168 //y *= 0.77; 169 //y *= (0.75 + 0.52/Zi); 170 171 //if( y < 0.2 ) q = y*(1.0 - 0.5*y); 172 //else q = 1.0 - std::exp(-y); 154 173 155 174 G4double qmin = minCharge/Zi; 156 157 175 if(q < qmin) q = qmin; 176 177 effCharge = q*charge; 178 179 /* 180 G4double x1 = 1.0*effCharge*(1.0 - 0.132*std::log(y))/(y*std::sqrt(z)); 181 G4double x2 = 0.1*effCharge*effCharge*energyBohr/reducedEnergy; 182 183 chargeCorrection = 1.0 + x1 - x2; 184 185 G4cout << "x1= "<<x1<<" x2= "<< x2<<" corr= "<<chargeCorrection<<G4endl; 186 */ 158 187 159 188 G4double tq = 7.6 - std::log(reducedEnergy/keV); … … 170 199 171 200 G4double lambda = 10.0 * vF / (zi13 * (6.0 + q)); 172 if(q < 0.2) lambda *= (1.0 - 0.666666 *q - q*q/9.0);201 if(q < 0.2) lambda *= (1.0 - 0.66666667*q - q*q/9.0); 173 202 else lambda *= std::pow(1.0-q, 0.666666); 174 203 … … 180 209 181 210 chargeCorrection = sq * (1.0 + xx); 211 182 212 } 183 213 // G4cout << "G4ionEffectiveCharge: charge= " << charge << " q= " << q 184 214 // << " chargeCor= " << chargeCorrection 185 215 // << " e(MeV)= " << kineticEnergy/MeV << G4endl; 186 return q*charge;216 return effCharge; 187 217 } 188 218
Note: See TracChangeset
for help on using the changeset viewer.