132 {
134 if ( MTnumber == 2 ) {
136 } else if ( MTnumber == 102 ) {
138 } else if ( MTnumber == 18 ) {
140 }
141 }
144
145 if ( kineticEnergy < Emin || kineticEnergy >
Emax ) {
146
149 for (
G4int j = 0; j < (
G4int)
ele->GetNumberOfIsotopes(); j++ ) {
150 if (
A == (
G4int)
ele->GetIsotope(j)->GetN() ) {
151 isotopeJ = j;
152 break;
153 }
154 }
155 if (isotopeJ == -1) { return 0.0; }
156 G4double frac =
ele->GetRelativeAbundanceVector()[isotopeJ];
159 if ( manHP->GetNeglectDoppler() ) {
160 weightedelasticXS = (*manHP->GetElasticFinalStates())[indexEl]->GetWeightedXsec( kineticEnergy, isotopeJ );
161 weightedcaptureXS = (*manHP->GetCaptureFinalStates())[indexEl]->GetWeightedXsec( kineticEnergy, isotopeJ );
162 } else {
165 }
170 } else {
171 if ( manHP->GetNeglectDoppler() ) {
172 G4double weightedfissionXS = (*manHP->GetFissionFinalStates())[indexEl]->GetWeightedXsec( kineticEnergy, isotopeJ );
174 } else {
177 }
178 }
179 } else if ( lssf_flag == 0 ) {
181 std::vector< G4double >* theProbability1 =
theProbabilities->at(indexE - 1);
188 for ( indexP1 = 0; indexP1 < tableOrder; indexP1++ ) {
189 if ( rand <= theProbability1->at(indexP1) ) break;
190 }
191 for ( indexP2 = 0; indexP2 < tableOrder; indexP2++ ) {
192 if ( rand <= theProbability2->at(indexP2) ) break;
193 }
198 xsela_cache[id] = theInt.Lin( kineticEnergy, ene1, ene2, ela1, ela2 ) * barn;
199 xscap_cache[id] = theInt.Lin( kineticEnergy, ene1, ene2, cap1, cap2 ) * barn;
202 } else {
205 xsfiss_cache[id] = theInt.Lin( kineticEnergy, ene1, ene2, fiss1, fiss2 ) * barn;
206 }
207 } else if ( lssf_flag == 1 ) {
209 std::vector< G4double >* theProbability1 =
theProbabilities->at(indexE - 1);
216 for ( indexP1 = 0; indexP1 < tableOrder; indexP1++ ) {
217 if ( rand <= theProbability1->at(indexP1) ) break;
218 }
219 for ( indexP2 = 0; indexP2 < tableOrder; indexP2++ ) {
220 if ( rand <= theProbability2->at(indexP2) ) break;
221 }
224 for (
G4int j = 0; j < (
G4int)
ele->GetNumberOfIsotopes(); j++ ) {
225 if (
A == (
G4int)
ele->GetIsotope(j)->GetN() ) {
226 isotopeJ = j;
227 break;
228 }
229 }
230 if (isotopeJ == -1) { return 0.0; }
231 G4double frac =
ele->GetRelativeAbundanceVector()[isotopeJ];
234 if ( manHP->GetNeglectDoppler() ) {
235 weightedelasticXS = (*manHP->GetElasticFinalStates())[indexEl]->GetWeightedXsec( kineticEnergy, isotopeJ );
236 weightedcaptureXS = (*manHP->GetCaptureFinalStates())[indexEl]->GetWeightedXsec( kineticEnergy, isotopeJ );
237 } else {
240 }
245 G4double elasticXS = weightedelasticXS / frac;
246 G4double captureXS = weightedcaptureXS / frac;
247 xsela_cache[id] = theInt.Lin( kineticEnergy, ene1, ene2, ela1, ela2 ) * elasticXS;
248 xscap_cache[id] = theInt.Lin( kineticEnergy, ene1, ene2, cap1, cap2 ) * captureXS;
251 } else {
252 if ( manHP->GetNeglectDoppler() ) {
253 G4double weightedfissionXS = (*manHP->GetFissionFinalStates())[indexEl]->GetWeightedXsec( kineticEnergy, isotopeJ );
254 G4double fissionXS = weightedfissionXS / frac;
257 xsfiss_cache[id] = theInt.Lin( kineticEnergy, ene1, ene2, fiss1, fiss2 ) * fissionXS;
258 } else {
260 G4double fissionXS = weightedfissionXS / frac;
263 xsfiss_cache[id] = theInt.Lin( kineticEnergy, ene1, ene2, fiss1, fiss2 ) * fissionXS;
264 }
265 }
266 }
267 if ( MTnumber == 2 ) {
269 } else if ( MTnumber == 102 ) {
271 } else if ( MTnumber == 18 ) {
273 } else {
274
275 return 0;
276 }
277}
G4ParticleHPVector * theEnergies
std::map< std::thread::id, G4double > xsela_cache
std::map< std::thread::id, G4double > xscap_cache
std::map< std::thread::id, G4double > energy_cache
G4double GetDopplerBroadenedFissionXS(const G4DynamicParticle *, G4int, G4int)
std::vector< std::vector< G4double > * > * theElasticData
std::vector< std::vector< G4double > * > * theFissionData
std::map< std::thread::id, G4double > xsfiss_cache
std::vector< std::vector< G4double > * > * theCaptureData
G4double GetDopplerBroadenedCaptureXS(const G4DynamicParticle *, G4int, G4int)
G4double GetDopplerBroadenedElasticXS(const G4DynamicParticle *, G4int, G4int)
std::vector< std::vector< G4double > * > * theProbabilities
static G4ParticleHPManager * GetInstance()