- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/cross_sections/src/G4BGGNucleonElasticXS.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4BGGNucleonElasticXS.cc,v 1. 7 2009/11/19 19:40:45 vnivanchExp $27 // GEANT4 tag $Name: geant4-09-04-beta-01$26 // $Id: G4BGGNucleonElasticXS.cc,v 1.8 2010/10/12 06:02:41 dennis Exp $ 27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 51 51 #include "G4NistManager.hh" 52 52 53 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......54 53 55 54 G4BGGNucleonElasticXS::G4BGGNucleonElasticXS(const G4ParticleDefinition*) … … 75 74 } 76 75 77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 78 79 G4double G4BGGNucleonElasticXS::GetIsoZACrossSection(const G4DynamicParticle* dp, 80 G4double Z, 81 G4double A, 82 G4double) 76 77 G4double 78 G4BGGNucleonElasticXS::GetZandACrossSection(const G4DynamicParticle* dp, 79 G4int Z, G4int A, G4double) 83 80 { 84 81 G4double cross = 0.0; 85 82 G4double ekin = dp->GetKineticEnergy(); 86 G4int iz = G4int(Z); 87 if(iz > 92) iz = 92; 83 if(Z > 92) Z = 92; 88 84 89 85 if(ekin <= fLowEnergy) { 90 cross = theCoulombFac[ iz];86 cross = theCoulombFac[Z]; 91 87 if(isProton) { cross *= CoulombFactor(ekin, A); } 92 88 93 } else if( iz== 1) {94 if( A < 1.5) {89 } else if(Z == 1) { 90 if( A < 2) { 95 91 fHadron->GetHadronNucleonXscNS(dp, G4Proton::Proton()); 96 92 cross = fHadron->GetElasticHadronNucleonXsc(); … … 102 98 } 103 99 } else if(ekin > fGlauberEnergy) { 104 cross = theGlauberFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);100 cross = theGlauberFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 105 101 } else { 106 102 cross = fNucleon->GetElasticCrossSection(dp, Z, A); … … 159 155 G4NistManager* nist = G4NistManager::Instance(); 160 156 161 G4double A, csup, csdn; 157 G4double csup, csdn; 158 G4int A; 162 159 163 160 if(verboseLevel > 0) G4cout << "### G4BGGNucleonElasticXS::Initialise for " … … 167 164 168 165 G4double Z = G4double(iz); 169 A = nist->GetAtomicMassAmu(iz);170 171 csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);172 csdn = fNucleon->GetElasticCrossSection(&dp, Z, A);166 A = G4lrint(nist->GetAtomicMassAmu(iz)); 167 168 csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A); 169 csdn = fNucleon->GetElasticCrossSection(&dp, iz, A); 173 170 174 171 theGlauberFac[iz] = csdn/csup; … … 179 176 fHadron->GetHadronNucleonXscNS(&dp, G4Proton::Proton()); 180 177 theCoulombFac[1] = fHadron->GetElasticHadronNucleonXsc(); 181 if(isProton) { theCoulombFac[1] /= CoulombFactor(fLowEnergy, 1 .0); }178 if(isProton) { theCoulombFac[1] /= CoulombFactor(fLowEnergy, 1); } 182 179 183 180 for(G4int iz=2; iz<93; iz++) { 184 181 185 182 G4double Z = G4double(iz); 186 A = nist->GetAtomicMassAmu(iz);187 188 theCoulombFac[iz] = fNucleon->GetElasticCrossSection(&dp, Z, A);183 A = G4lrint(nist->GetAtomicMassAmu(iz)); 184 185 theCoulombFac[iz] = fNucleon->GetElasticCrossSection(&dp, iz, A); 189 186 if(isProton) { theCoulombFac[iz] /= CoulombFactor(fLowEnergy, A); } 190 187 if(verboseLevel > 0) G4cout << "Z= " << Z << " A= " << A … … 195 192 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 196 193 197 G4double G4BGGNucleonElasticXS::CoulombFactor(G4double kinEnergy, G4 doubleA)198 { 199 G4double res = 0.0;194 G4double G4BGGNucleonElasticXS::CoulombFactor(G4double kinEnergy, G4int A) 195 { 196 G4double res = 0.0; 200 197 if(kinEnergy <= DBL_MIN) return res; 201 else if(A < 1.5) return kinEnergy*kinEnergy;198 else if(A < 2) return kinEnergy*kinEnergy; 202 199 203 200 G4double elog = std::log10(kinEnergy/GeV); 201 G4double aa = A; 204 202 205 203 // from G4ProtonInelasticCrossSection 206 G4double f1 = 8.0 - 8.0/ A - 0.008*A;207 G4double f2 = 2.34 - 5.4/ A - 0.0028*A;204 G4double f1 = 8.0 - 8.0/aa - 0.008*aa; 205 G4double f2 = 2.34 - 5.4/aa - 0.0028*aa; 208 206 209 207 res = 1.0/(1.0 + std::exp(-f1*(elog + f2))); 210 208 211 f1 = 5.6 - 0.016* A;212 f2 = 1.37 + 1.37/ A;213 res *= ( 1.0 + (0.8 + 18./ A - 0.002*A)/(1.0 + std::exp(f1*(elog + f2))));209 f1 = 5.6 - 0.016*aa; 210 f2 = 1.37 + 1.37/aa; 211 res *= ( 1.0 + (0.8 + 18./aa - 0.002*aa)/(1.0 + std::exp(f1*(elog + f2)))); 214 212 return res; 215 213 } 216 214 217 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 218 219 215
Note: See TracChangeset
for help on using the changeset viewer.