Changeset 1340 for trunk/source/processes/hadronic/cross_sections/src/G4NeutronInelasticCrossSection.cc
- 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/G4NeutronInelasticCrossSection.cc
r1228 r1340 30 30 31 31 #include "G4NeutronInelasticCrossSection.hh" 32 #include "G4HadTmpUtil.hh" 32 33 #include "globals.hh" 33 34 … … 44 45 G4IsotopeVector* isoVector = anEle->GetIsotopeVector(); 45 46 G4double* abundVector = anEle->GetRelativeAbundanceVector(); 46 G4 doubleZZ;47 G4 doubleAA;47 G4int ZZ; 48 G4int AA; 48 49 49 50 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(); 52 53 psig = GetCrossSection(KE, AA, ZZ); 53 54 cross_section += psig*abundVector[i]; … … 55 56 56 57 } 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); 58 61 } 59 62 … … 63 66 64 67 G4double G4NeutronInelasticCrossSection:: 65 GetCrossSection(G4double anEnergy, G4 double atomicNumber, G4double nOfProtons)68 GetCrossSection(G4double anEnergy, G4int AA, G4int ZZ) 66 69 { 70 G4double atomicNumber = G4double(AA); 71 G4double nOfProtons = G4double(ZZ); 72 67 73 if (anEnergy > 19.9*GeV ) 68 74 { // constant cross section above ~20GeV. 69 return GetCrossSection(19.8*GeV, atomicNumber,nOfProtons);75 return GetCrossSection(19.8*GeV, AA, ZZ); 70 76 } 71 77 G4double kineticEnergy = std::log10(DBL_MIN/MeV);
Note: See TracChangeset
for help on using the changeset viewer.