- 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/G4IonsSihverCrossSection.cc
r819 r1340 31 31 #include "G4ParticleTable.hh" 32 32 #include "G4IonTable.hh" 33 #include "G4HadTmpUtil.hh" 33 34 34 35 G4double G4IonsSihverCrossSection:: 35 Get IsoZACrossSection(const G4DynamicParticle* aParticle, G4double /*ZZ*/,36 G4doubleAA, G4double /*aTemperature*/)36 GetZandACrossSection(const G4DynamicParticle* aParticle, 37 G4int /*ZZ*/, G4int AA, G4double /*aTemperature*/) 37 38 { 38 39 G4double xsection = 0.0; 39 40 G4int At = G4int(AA); 41 //G4int Zt = G4int(ZZ); // not used 40 G4int At = AA; 42 41 43 42 G4int Ap = aParticle->GetDefinition()->GetBaryonNumber(); 44 //Zp = aParticle->GetDefinition()->GetPDGCharge(); // not used45 43 46 44 G4double one_third = 1.0 / 3.0; … … 49 47 G4double cubicrAp = std::pow ( G4double(Ap) , G4double(one_third) ); 50 48 51 G4double b0 = 1.581 - 0.876 * ( 1.0 / cubicrAp + 1.0 / cubicrAt);49 G4double b0 = 1.581 - 0.876 * (1.0/cubicrAp + 1.0/cubicrAt); 52 50 53 51 xsection = pi * square_r0 54 * std::pow ( G4double(cubicrAp + cubicrAt - b0 * ( 1.0 / cubicrAp + 1.0 / cubicrAt ) ), G4double(2));52 * std::pow(G4double(cubicrAp + cubicrAt - b0 * (1.0/cubicrAp + 1.0/cubicrAt)), G4double(2)); 55 53 56 54 return xsection; … … 69 67 G4IsotopeVector* isoVector = anElement->GetIsotopeVector(); 70 68 G4double* abundVector = anElement->GetRelativeAbundanceVector(); 71 G4 doubleZZ;72 G4 doubleAA;69 G4int ZZ; 70 G4int AA; 73 71 74 72 for (G4int i = 0; i < nIso; i++) { 75 ZZ = G4double( (*isoVector)[i]->GetZ());76 AA = G4double( (*isoVector)[i]->GetN());73 ZZ = (*isoVector)[i]->GetZ(); 74 AA = (*isoVector)[i]->GetN(); 77 75 sig = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 78 76 xsection += sig*abundVector[i]; … … 80 78 81 79 } else { 82 xsection =83 GetIsoZACrossSection(aParticle, anElement->GetZ(), anElement->GetN(),84 80 G4int ZZ = G4lrint(anElement->GetZ()); 81 G4int AA = G4lrint(anElement->GetN()); 82 xsection = GetIsoZACrossSection(aParticle, ZZ, AA, temperature); 85 83 } 86 84
Note: See TracChangeset
for help on using the changeset viewer.