Changeset 1340 for trunk/source/processes/hadronic/cross_sections/src/G4GeneralSpaceNNCrossSection.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/G4GeneralSpaceNNCrossSection.cc
r819 r1340 65 65 #include "G4ParticleTable.hh" 66 66 #include "G4IonTable.hh" 67 #include "G4HadTmpUtil.hh" 67 68 68 69 #include <iomanip> 69 /////////////////////////////////////////////////////////////////////////////// 70 // 70 71 71 72 G4GeneralSpaceNNCrossSection::G4GeneralSpaceNNCrossSection () 72 73 { … … 79 80 return; 80 81 } 81 /////////////////////////////////////////////////////////////////////////////// 82 // 82 83 83 84 G4GeneralSpaceNNCrossSection::~G4GeneralSpaceNNCrossSection () 84 85 { … … 92 93 // 93 94 94 G4bool G4GeneralSpaceNNCrossSection::Is ZAApplicable95 (const G4DynamicParticle* theProjectile, G4 double ZZ, G4doubleAA)96 { 97 G4bool result = protonInelastic->Is ZAApplicable(theProjectile, ZZ, AA);95 G4bool G4GeneralSpaceNNCrossSection::IsIsoApplicable 96 (const G4DynamicParticle* theProjectile, G4int ZZ, G4int AA) 97 { 98 G4bool result = protonInelastic->IsIsoApplicable(theProjectile, ZZ, AA); 98 99 if (!result) 99 100 { 100 result = ionProton->Is ZAApplicable(theProjectile, ZZ, AA);101 result = ionProton->IsIsoApplicable(theProjectile, ZZ, AA); 101 102 if (!result) 102 103 { 103 result = TripathiGeneral->Is ZAApplicable(theProjectile, ZZ, AA);104 result = TripathiGeneral->IsIsoApplicable(theProjectile, ZZ, AA); 104 105 if (!result) 105 result = Shen->Is ZAApplicable(theProjectile, ZZ, AA);106 result = Shen->IsIsoApplicable(theProjectile, ZZ, AA); 106 107 } 107 108 } … … 139 140 G4IsotopeVector* isoVector = theTarget->GetIsotopeVector(); 140 141 G4double* abundVector = theTarget->GetRelativeAbundanceVector(); 141 G4 doubleZZ;142 G4 doubleAA;142 G4int ZZ; 143 G4int AA; 143 144 144 145 for (G4int i = 0; i < nIso; i++) { 145 ZZ = G4double( (*isoVector)[i]->GetZ());146 AA = G4double( (*isoVector)[i]->GetN());147 sig = Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);146 ZZ = (*isoVector)[i]->GetZ(); 147 AA = (*isoVector)[i]->GetN(); 148 sig = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 148 149 xsection += sig*abundVector[i]; 149 150 } 150 151 151 152 } else { 152 xsection =153 GetIsoZACrossSection(theProjectile, theTarget->GetZ(), theTarget->GetN(),154 153 G4int ZZ = G4lrint(theTarget->GetZ()); 154 G4int AA = G4lrint(theTarget->GetN()); 155 xsection = GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 155 156 } 156 157 … … 159 160 160 161 161 G4double G4GeneralSpaceNNCrossSection::GetIsoZACrossSection162 (const G4DynamicParticle* theProjectile, G4double ZZ, G4double AA,163 G4double theTemperature)162 G4double 163 G4GeneralSpaceNNCrossSection::GetZandACrossSection(const G4DynamicParticle* theProjectile, 164 G4int ZZ, G4int AA, G4double theTemperature) 164 165 { 165 166 G4double result = 0.0; … … 186 187 { 187 188 result = protonInelastic-> 188 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);189 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 189 190 if (verboseLevel >= 2) 190 191 G4cout <<"Selecting G4ProtonInelasticCrossSection" <<G4endl; … … 193 194 { 194 195 result = TripathiLight-> 195 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);196 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 196 197 if (verboseLevel >= 2) 197 198 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl; … … 203 204 { 204 205 result = ionProton-> 205 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);206 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 206 207 if (verboseLevel >= 2) 207 208 G4cout <<"Selecting G4IonProtonCrossSection" <<G4endl; … … 210 211 { 211 212 result = TripathiLight-> 212 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);213 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 213 214 if (verboseLevel >= 2) 214 215 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl; … … 217 218 else 218 219 { 219 if (TripathiLight->Is ZAApplicable(theProjectile, ZZ, AA))220 if (TripathiLight->IsIsoApplicable(theProjectile, ZZ, AA)) 220 221 { 221 222 result = TripathiLight-> 222 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);223 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 223 224 if (verboseLevel >= 2) 224 225 G4cout <<"Selecting G4TripathiLightCrossSection" <<G4endl; 225 226 } 226 else if (TripathiGeneral->Is ZAApplicable(theProjectile, ZZ, AA))227 else if (TripathiGeneral->IsIsoApplicable(theProjectile, ZZ, AA)) 227 228 { 228 229 result = TripathiGeneral-> 229 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);230 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 230 231 if (verboseLevel >= 2) 231 232 G4cout <<"Selecting G4TripathiCrossSection" <<G4endl; 232 233 } 233 else if (Shen->Is ZAApplicable(theProjectile, ZZ, AA))234 else if (Shen->IsIsoApplicable(theProjectile, ZZ, AA)) 234 235 { 235 236 result = Shen-> 236 Get IsoZACrossSection(theProjectile, ZZ, AA, theTemperature);237 GetZandACrossSection(theProjectile, ZZ, AA, theTemperature); 237 238 if (verboseLevel >= 2) 238 239 G4cout <<"Selecting G4IonsShenCrossSection" <<G4endl; … … 247 248 return result; 248 249 } 249 /////////////////////////////////////////////////////////////////////////////// 250 // 250
Note: See TracChangeset
for help on using the changeset viewer.