- 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/G4HadronCrossSections.cc
r1337 r1340 25 25 // 26 26 // 27 // GEANT4 tag $Name: geant4-09-04-beta-01$27 // GEANT4 tag $Name: hadr-cross-V09-03-12 $ 28 28 // 29 29 // … … 1230 1230 G4IsotopeVector* isoVector = element->GetIsotopeVector(); 1231 1231 G4double* abundVector = element->GetRelativeAbundanceVector(); 1232 G4 doubleZZ;1233 G4 doubleAA;1232 G4int ZZ; 1233 G4int AA; 1234 1234 1235 1235 for (G4int i = 0; i < nIso; i++) { 1236 ZZ = G4double( (*isoVector)[i]->GetZ());1237 AA = G4double( (*isoVector)[i]->GetN());1236 ZZ = (*isoVector)[i]->GetZ(); 1237 AA = (*isoVector)[i]->GetN(); 1238 1238 CalcScatteringCrossSections(particle, ZZ, AA); 1239 1239 cross_section += siginelastic*abundVector[i]; … … 1241 1241 siginelastic = cross_section; 1242 1242 1243 } else { 1244 CalcScatteringCrossSections(particle, element->GetZ(), element->GetN()); 1243 } else { 1244 G4int ZZ = G4lrint(element->GetZ()); 1245 G4int AA = G4lrint(element->GetN()); 1246 CalcScatteringCrossSections(particle, ZZ, AA); 1245 1247 } 1246 1248 } … … 1249 1251 1250 1252 1251 G4double G4HadronCrossSections::GetInelasticCrossSection(1252 1253 G4double ZZ, G4doubleAA)1253 G4double 1254 G4HadronCrossSections::GetInelasticCrossSection(const G4DynamicParticle* particle, 1255 G4int ZZ, G4int AA) 1254 1256 { 1255 1257 prevElement = 0; // force new cross section calculation for next call of … … 1274 1276 G4IsotopeVector* isoVector = element->GetIsotopeVector(); 1275 1277 G4double* abundVector = element->GetRelativeAbundanceVector(); 1276 G4 doubleZZ;1277 G4 doubleAA;1278 G4int ZZ; 1279 G4int AA; 1278 1280 1279 1281 for (G4int i = 0; i < nIso; i++) { 1280 ZZ = G4double( (*isoVector)[i]->GetZ());1281 AA = G4double( (*isoVector)[i]->GetN());1282 ZZ = (*isoVector)[i]->GetZ(); 1283 AA = (*isoVector)[i]->GetN(); 1282 1284 CalcScatteringCrossSections(particle, ZZ, AA); 1283 1285 cross_section += sigelastic*abundVector[i]; … … 1285 1287 sigelastic = cross_section; 1286 1288 1287 } else { 1288 CalcScatteringCrossSections(particle, element->GetZ(), element->GetN()); 1289 } else { 1290 G4int ZZ = G4lrint(element->GetZ()); 1291 G4int AA = G4lrint(element->GetN()); 1292 CalcScatteringCrossSections(particle, ZZ, AA); 1289 1293 } 1290 1294 } … … 1293 1297 1294 1298 1295 G4double G4HadronCrossSections::GetElasticCrossSection(1296 1297 G4double ZZ, G4doubleAA)1299 G4double 1300 G4HadronCrossSections::GetElasticCrossSection(const G4DynamicParticle* particle, 1301 G4int ZZ, G4int AA) 1298 1302 { 1299 1303 prevElement = 0; // force new cross section calculation for next call of … … 1312 1316 G4HadronCrossSections::CalcScatteringCrossSections( 1313 1317 const G4DynamicParticle* aParticle, 1314 G4 double ZZ, G4doubleAA)1318 G4int ZZ, G4int AA) 1315 1319 { 1316 1320 G4double sigel, sigin, sigtot; … … 1583 1587 G4HadronCrossSections::GetCaptureCrossSection( 1584 1588 const G4DynamicParticle* aParticle, 1585 G4 double ZZ, G4double/*AA*/)1589 G4int ZZ, G4int /*AA*/) 1586 1590 { 1587 1591 if (GetParticleCode(aParticle) != 16) { return 0.; } … … 1596 1600 } 1597 1601 1598 G4int izno = static_cast<G4int> (ZZ + 0.01);1602 G4int izno = ZZ; 1599 1603 if (izno > 100) izno = 100; // Not in GHESIG 1600 1604 izno = izno - 1; // For array indexing … … 1609 1613 G4HadronCrossSections::GetFissionCrossSection( 1610 1614 const G4DynamicParticle* aParticle, 1611 G4 double ZZ, G4doubleAA)1615 G4int ZZ, G4int AA) 1612 1616 { 1613 if (AA < 230 .) return 0;1617 if (AA < 230) return 0; 1614 1618 1615 1619 G4double ek = aParticle->GetKineticEnergy()/GeV; 1616 1617 // G4int i = NFISS;1618 // for (G4int ii = 1; i <= NFISS; i++) {1619 // if (ek < ekfiss[ii - 1]) {1620 // i = ii;1621 // break;1622 // }1623 // }1624 // i = i - 1; // For array indexing1625 1620 1626 1621 G4int ie1 = 0; … … 1638 1633 G4int j = 4; 1639 1634 if (ek <= 0.01) { 1640 if (ZZ == 92 . && std::abs(AA - 233.) < 0.5) j = 1;1641 else if (ZZ == 92 . && std::abs(AA - 235.) < 0.5) j = 2;1642 else if (ZZ == 94 . && std::abs(AA - 239.) < 0.5) j = 3;1635 if (ZZ == 92 && AA == 233) j = 1; 1636 else if (ZZ == 92 && AA == 235) j = 2; 1637 else if (ZZ == 94 && AA == 239) j = 3; 1643 1638 } 1644 1639 G4double z43ba; 1645 1640 if (j == 4) { 1646 z43ba = std::pow( ZZ, 4./3.)/AA;1641 z43ba = std::pow(G4double(ZZ), 4./3.)/G4double(AA); 1647 1642 z43ba = std::max(-67. + 38.7*z43ba, 0.); 1648 1643 }
Note: See TracChangeset
for help on using the changeset viewer.