- 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/G4UElasticCrossSection.cc
r962 r1340 80 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 81 81 82 G4bool G4UElasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp, 83 G4double Z, G4double A) 82 // G4bool G4UElasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp, 83 // G4double Z, G4double A) 84 G4bool G4UElasticCrossSection::IsIsoApplicable(const G4DynamicParticle* dp, 85 G4int Z, G4int A) 84 86 { 85 87 G4bool res = false; … … 94 96 } 95 97 96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 97 98 G4 double G4UElasticCrossSection::GetCrossSection(const G4DynamicParticle* dp,99 const G4Element* elm, 100 G4double temp) 101 { 102 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);103 } 104 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 106 107 G4double G4UElasticCrossSection::GetIsoZACrossSection(const G4DynamicParticle* dp, 108 G4double Z, 109 G4double A,110 98 99 G4double 100 G4UElasticCrossSection::GetCrossSection(const G4DynamicParticle* dp, 101 const G4Element* elm, G4double temp) 102 { 103 G4int Z = G4lrint(elm->GetZ()); 104 G4int N = G4lrint(elm->GetN()); 105 106 return GetZandACrossSection(dp, Z, N, temp); 107 } 108 109 110 G4double 111 G4UElasticCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, 112 G4int Z, G4int A, G4double) 111 113 { 112 114 G4double cross = 0.0; 113 115 G4double ekin = dp->GetKineticEnergy(); 114 G4int iz = G4int(Z);115 if( iz > 92) iz= 92;116 // G4int iz = G4int(Z); 117 if(Z > 92) Z = 92; 116 118 117 119 // proton and neutron 118 120 if(fNucleon) { 119 if( iz== 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);121 if(Z == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A); 120 122 else if(ekin > thEnergy) { 121 cross = theFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);123 cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 122 124 } else { 123 125 cross = fNucleon->GetElasticCrossSection(dp, Z, A); … … 126 128 // pions 127 129 } else if(fUPi) { 128 if( iz== 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A);130 if(Z == 1) cross = fGheisha->GetElasticCrossSection(dp, Z, A); 129 131 else if(ekin > thEnergy) { 130 cross = theFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);132 cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 131 133 } else { 132 134 cross = fUPi->GetElasticCrossSection(dp, Z, A); … … 136 138 } else { 137 139 if(hasGlauber && ekin > thEnergy) { 138 cross = theFac[ iz]*fGlauber->GetElasticGlauberGribov(dp, Z, A);140 cross = theFac[Z]*fGlauber->GetElasticGlauberGribov(dp, Z, A); 139 141 } else if(fGheisha->IsApplicable(dp, Z, A)) { 140 142 cross = fGheisha->GetElasticCrossSection(dp, Z, A); … … 182 184 183 185 G4NistManager* nist = G4NistManager::Instance(); 184 G4 double A = nist->GetAtomicMassAmu(2);186 G4int A = G4lrint(nist->GetAtomicMassAmu(2)); 185 187 186 188 if(fGlauber->IsZAApplicable(&dp, 2.0, A)) { … … 193 195 194 196 G4double Z = G4double(iz); 195 A = nist->GetAtomicMassAmu(iz);196 csup = fGlauber->GetElasticGlauberGribov(&dp, Z, A);197 A = G4lrint(nist->GetAtomicMassAmu(iz)); 198 csup = fGlauber->GetElasticGlauberGribov(&dp, iz, A); 197 199 // proton and neutron 198 200 if(fNucleon) { 199 csdn = fNucleon->GetElasticCrossSection(&dp, Z, A);201 csdn = fNucleon->GetElasticCrossSection(&dp, iz, A); 200 202 201 203 // pions 202 204 } else if(fUPi) { 203 csdn = fUPi->GetElasticCrossSection(&dp, Z, A);205 csdn = fUPi->GetElasticCrossSection(&dp, iz, A); 204 206 205 207 // other 206 } else if(fGheisha->IsApplicable(&dp, Z, A)) {207 csdn = fGheisha->GetElasticCrossSection(&dp, Z, A);208 } else if(fGheisha->IsApplicable(&dp, iz, A)) { 209 csdn = fGheisha->GetElasticCrossSection(&dp, iz, A); 208 210 209 211 } else { … … 217 219 } 218 220 219 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 220 221 221
Note: See TracChangeset
for help on using the changeset viewer.