Ignore:
Timestamp:
Nov 5, 2010, 3:45:55 PM (14 years ago)
Author:
garnier
Message:

update ti head

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/processes/hadronic/cross_sections/src/G4HadronCrossSections.cc

    r1337 r1340  
    2525//
    2626//
    27 // GEANT4 tag $Name: geant4-09-04-beta-01 $
     27// GEANT4 tag $Name: hadr-cross-V09-03-12 $
    2828//
    2929//
     
    12301230      G4IsotopeVector* isoVector = element->GetIsotopeVector();
    12311231      G4double* abundVector = element->GetRelativeAbundanceVector();
    1232       G4double ZZ;
    1233       G4double AA;
     1232      G4int ZZ;
     1233      G4int AA;
    12341234
    12351235      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();
    12381238        CalcScatteringCrossSections(particle, ZZ, AA);
    12391239        cross_section += siginelastic*abundVector[i];
     
    12411241      siginelastic = cross_section;
    12421242
    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);
    12451247    }
    12461248  }
     
    12491251
    12501252
    1251 G4double G4HadronCrossSections::GetInelasticCrossSection(
    1252                           const G4DynamicParticle* particle,
    1253                           G4double ZZ, G4double AA)
     1253G4double
     1254G4HadronCrossSections::GetInelasticCrossSection(const G4DynamicParticle* particle,
     1255                                                G4int ZZ, G4int AA)
    12541256{
    12551257  prevElement = 0; // force new cross section calculation for next call of
     
    12741276      G4IsotopeVector* isoVector = element->GetIsotopeVector();
    12751277      G4double* abundVector = element->GetRelativeAbundanceVector();
    1276       G4double ZZ;
    1277       G4double AA;
     1278      G4int ZZ;
     1279      G4int AA;
    12781280
    12791281      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();
    12821284        CalcScatteringCrossSections(particle, ZZ, AA);
    12831285        cross_section += sigelastic*abundVector[i];
     
    12851287      sigelastic = cross_section;
    12861288
    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);
    12891293    }
    12901294  }
     
    12931297
    12941298
    1295 G4double G4HadronCrossSections::GetElasticCrossSection(
    1296                           const G4DynamicParticle* particle,
    1297                           G4double ZZ, G4double AA)
     1299G4double
     1300G4HadronCrossSections::GetElasticCrossSection(const G4DynamicParticle* particle,
     1301                                              G4int ZZ, G4int AA)
    12981302{
    12991303  prevElement = 0; // force new cross section calculation for next call of
     
    13121316G4HadronCrossSections::CalcScatteringCrossSections(
    13131317                          const G4DynamicParticle* aParticle,
    1314                           G4double ZZ, G4double AA)
     1318                          G4int ZZ, G4int AA)
    13151319{
    13161320   G4double sigel, sigin, sigtot;
     
    15831587G4HadronCrossSections::GetCaptureCrossSection(
    15841588                          const G4DynamicParticle* aParticle,
    1585                           G4double ZZ, G4double /*AA*/)
     1589                          G4int ZZ, G4int /*AA*/)
    15861590{
    15871591   if (GetParticleCode(aParticle) != 16)  { return 0.; }
     
    15961600   }
    15971601
    1598    G4int izno = static_cast<G4int> (ZZ + 0.01);
     1602   G4int izno = ZZ;
    15991603   if (izno > 100) izno = 100;      // Not in GHESIG
    16001604   izno = izno - 1;      // For array indexing
     
    16091613G4HadronCrossSections::GetFissionCrossSection(
    16101614                          const G4DynamicParticle* aParticle,
    1611                           G4double ZZ, G4double AA)
     1615                          G4int ZZ, G4int AA)
    16121616{
    1613    if (AA < 230.) return 0;
     1617   if (AA < 230) return 0;
    16141618
    16151619   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 indexing
    16251620
    16261621   G4int ie1 = 0;
     
    16381633   G4int j = 4;
    16391634   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;
    16431638   }
    16441639   G4double z43ba;
    16451640   if (j == 4) {
    1646       z43ba = std::pow(ZZ, 4./3.)/AA;
     1641      z43ba = std::pow(G4double(ZZ), 4./3.)/G4double(AA);
    16471642      z43ba = std::max(-67. + 38.7*z43ba, 0.);
    16481643   }
Note: See TracChangeset for help on using the changeset viewer.