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/G4NeutronInelasticCrossSection.cc

    r1228 r1340  
    3030
    3131#include "G4NeutronInelasticCrossSection.hh"
     32#include "G4HadTmpUtil.hh"
    3233#include "globals.hh"
    3334
     
    4445    G4IsotopeVector* isoVector = anEle->GetIsotopeVector();
    4546    G4double* abundVector = anEle->GetRelativeAbundanceVector();
    46     G4double ZZ;
    47     G4double AA;
     47    G4int ZZ;
     48    G4int AA;
    4849
    4950    for (G4int i = 0; i < nIso; i++) {
    50       ZZ = G4double( (*isoVector)[i]->GetZ() );
    51       AA = G4double( (*isoVector)[i]->GetN() );
     51      ZZ = (*isoVector)[i]->GetZ();
     52      AA = (*isoVector)[i]->GetN();
    5253      psig = GetCrossSection(KE, AA, ZZ);
    5354      cross_section += psig*abundVector[i];
     
    5556 
    5657  } else {
    57     cross_section = GetCrossSection(KE, anEle->GetN(), anEle->GetZ());
     58    G4int ZZ = G4lrint(anEle->GetZ());
     59    G4int AA = G4lrint(anEle->GetN());
     60    cross_section = GetCrossSection(KE, AA, ZZ);
    5861  }
    5962
     
    6366   
    6467G4double G4NeutronInelasticCrossSection::
    65 GetCrossSection(G4double anEnergy, G4double atomicNumber, G4double nOfProtons)
     68GetCrossSection(G4double anEnergy, G4int AA, G4int ZZ)
    6669{
     70  G4double atomicNumber = G4double(AA);
     71  G4double nOfProtons = G4double(ZZ);
     72
    6773  if (anEnergy > 19.9*GeV )
    6874  { // constant cross section above ~20GeV.
    69     return  GetCrossSection(19.8*GeV,atomicNumber,nOfProtons);
     75    return  GetCrossSection(19.8*GeV, AA, ZZ);
    7076  }
    7177  G4double kineticEnergy = std::log10(DBL_MIN/MeV);
Note: See TracChangeset for help on using the changeset viewer.