Changeset 1340 for trunk/source/processes/hadronic/cross_sections/src/G4TripathiLightCrossSection.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/G4TripathiLightCrossSection.cc
r1228 r1340 63 63 #include "G4ParticleTable.hh" 64 64 #include "G4IonTable.hh" 65 #include "G4HadTmpUtil.hh" 66 65 67 66 68 /////////////////////////////////////////////////////////////////////////////// … … 101 103 (const G4DynamicParticle* theProjectile, const G4Element* theTarget) 102 104 { 103 return IsZAApplicable(theProjectile, theTarget->GetZ(), theTarget->GetN()); 104 } 105 106 107 G4bool G4TripathiLightCrossSection::IsZAApplicable 108 (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA) 105 G4int Z = G4lrint(theTarget->GetZ()); 106 G4int A = G4lrint(theTarget->GetN()); 107 return IsIsoApplicable(theProjectile, Z, A); 108 } 109 110 111 G4bool 112 G4TripathiLightCrossSection::IsIsoApplicable(const G4DynamicParticle* theProjectile, 113 G4int ZZ, G4int AA) 109 114 { 110 115 G4bool result = false; … … 122 127 return result; 123 128 } 124 /////////////////////////////////////////////////////////////////////////////// 125 // 126 G4double G4TripathiLightCrossSection::GetIsoZACrossSection 127 (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA, 128 G4double /*theTemperature*/) 129 130 /////////////////////////////////////////////////////////////////////////////// 131 // 132 G4double 133 G4TripathiLightCrossSection::GetZandACrossSection(const G4DynamicParticle* theProjectile, 134 G4int ZZ, G4int AA, G4double /*theTemperature*/) 129 135 { 130 136 // … … 301 307 SetLowEnergyCheck(true); 302 308 G4double resultp = 303 Get IsoZACrossSection(&slowerProjectile, ZZ, AA, 0.0);309 GetZandACrossSection(&slowerProjectile, ZZ, AA, 0.0); 304 310 SetLowEnergyCheck(savelowenergy); 305 311 if (resultp >result) result = 0.0; … … 322 328 G4IsotopeVector* isoVector = theTarget->GetIsotopeVector(); 323 329 G4double* abundVector = theTarget->GetRelativeAbundanceVector(); 324 G4 doubleZZ;325 G4 doubleAA;330 G4int ZZ; 331 G4int AA; 326 332 327 333 for (G4int i = 0; i < nIso; i++) { 328 ZZ = G4double( (*isoVector)[i]->GetZ());329 AA = G4double( (*isoVector)[i]->GetN());330 sig = Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);334 ZZ = (*isoVector)[i]->GetZ(); 335 AA = (*isoVector)[i]->GetN(); 336 sig = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 331 337 xsection += sig*abundVector[i]; 332 338 } 333 339 334 340 } else { 335 xsection =336 GetIsoZACrossSection(theProjectile, theTarget->GetZ(), theTarget->GetN(),337 341 G4int ZZ = G4lrint(theTarget->GetZ()); 342 G4int AA = G4lrint(theTarget->GetN()); 343 xsection = GetIsoZACrossSection(theProjectile, ZZ, AA, theTemperature); 338 344 } 339 345 … … 348 354 lowEnergyCheck = aLowEnergyCheck; 349 355 } 350 /////////////////////////////////////////////////////////////////////////////// 351 // 356
Note: See TracChangeset
for help on using the changeset viewer.