- 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/G4UInelasticCrossSection.cc
r962 r1340 78 78 } 79 79 80 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 81 82 G4 bool G4UInelasticCrossSection::IsZAApplicable(const G4DynamicParticle* dp,83 G4double Z, G4doubleA)80 81 G4bool 82 G4UInelasticCrossSection::IsIsoApplicable(const G4DynamicParticle* dp, 83 G4int Z, G4int A) 84 84 { 85 85 G4bool res = false; … … 94 94 } 95 95 96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 97 98 G4 double G4UInelasticCrossSection::GetCrossSection(const G4DynamicParticle* dp,99 100 101 { 102 return GetIsoZACrossSection(dp, elm->GetZ(), elm->GetN(), temp);103 } 104 105 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 106 107 G4double G4UInelasticCrossSection::GetIsoZACrossSection(const G4DynamicParticle* dp, 108 G4double Z, 109 G4double A,110 96 97 G4double 98 G4UInelasticCrossSection::GetCrossSection(const G4DynamicParticle* dp, 99 const G4Element* elm, 100 G4double temp) 101 { 102 G4int Z = G4lrint(elm->GetZ()); 103 G4int N = G4lrint(elm->GetN()); 104 return GetIsoZACrossSection(dp, Z, N, temp); 105 } 106 107 108 G4double 109 G4UInelasticCrossSection::GetZandACrossSection(const G4DynamicParticle* dp, 110 G4int Z, G4int A, G4double) 111 111 { 112 112 G4double cross = 0.0; 113 113 G4double ekin = dp->GetKineticEnergy(); 114 G4int iz = G4int(Z);115 if( iz > 92) iz= 92;114 // G4int iz = G4int(Z); 115 if(Z > 92) Z = 92; 116 116 117 117 // proton and neutron 118 118 if(fNucleon) { 119 if( iz== 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);119 if(Z == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A); 120 120 else if(ekin > thEnergy) { 121 cross = theFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);121 cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 122 122 } else { 123 123 cross = fNucleon->GetIsoZACrossSection(dp, Z, A); … … 126 126 // pions 127 127 } else if(fUPi) { 128 if( iz== 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A);128 if(Z == 1) cross = fGheisha->GetInelasticCrossSection(dp, Z, A); 129 129 else if(ekin > thEnergy) { 130 cross = theFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);130 cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 131 131 } else { 132 132 cross = fUPi->GetInelasticCrossSection(dp, Z, A); … … 136 136 } else { 137 137 if(hasGlauber && ekin > thEnergy) { 138 cross = theFac[ iz]*fGlauber->GetInelasticGlauberGribov(dp, Z, A);138 cross = theFac[Z]*fGlauber->GetInelasticGlauberGribov(dp, Z, A); 139 139 } else if(fGheisha->IsApplicable(dp, Z, A)){ 140 140 cross = fGheisha->GetInelasticCrossSection(dp, Z, A); … … 153 153 } 154 154 155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......156 155 157 156 void G4UInelasticCrossSection::BuildPhysicsTable(const G4ParticleDefinition& p) … … 173 172 174 173 175 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......176 177 174 void G4UInelasticCrossSection::Initialise(const G4ParticleDefinition* p) 178 175 { … … 182 179 183 180 G4NistManager* nist = G4NistManager::Instance(); 184 G4 double A = nist->GetAtomicMassAmu(2);185 186 if(fGlauber->Is ZAApplicable(&dp, 2.0, A)) {181 G4int A = G4lrint(nist->GetAtomicMassAmu(2)); 182 183 if(fGlauber->IsIsoApplicable(&dp, 2, A)) { 187 184 hasGlauber = true; 188 185 … … 193 190 194 191 G4double Z = G4double(iz); 195 A = nist->GetAtomicMassAmu(iz);196 csup = fGlauber->GetInelasticGlauberGribov(&dp, Z, A);192 A = G4lrint(nist->GetAtomicMassAmu(iz)); 193 csup = fGlauber->GetInelasticGlauberGribov(&dp, iz, A); 197 194 198 195 // proton and neutron 199 196 if(fNucleon) { 200 csdn = fNucleon->GetIsoZACrossSection(&dp, Z, A);197 csdn = fNucleon->GetIsoZACrossSection(&dp, iz, A); 201 198 202 199 // pions 203 200 } else if(fUPi) { 204 csdn = fUPi->GetInelasticCrossSection(&dp, Z, A);201 csdn = fUPi->GetInelasticCrossSection(&dp, iz, A); 205 202 206 203 // other 207 } else if(fGheisha->IsApplicable(&dp, Z, A)) {208 csdn = fGheisha->GetInelasticCrossSection(&dp, Z, A);204 } else if(fGheisha->IsApplicable(&dp, iz, A)) { 205 csdn = fGheisha->GetInelasticCrossSection(&dp, iz, A); 209 206 210 207 } else { … … 218 215 } 219 216 220 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......221 222
Note: See TracChangeset
for help on using the changeset viewer.