331 G4int IsotopeIndex = 0;
335 for (
G4int i = 0; SpontaneousWattIsotopesIndex[i] != -1; i++) {
344 A = SpontaneousWattConstants[IsotopeIndex][0];
349 for (
G4int i = 0; NeutronInducedWattIsotopesIndex[i] != -1; i++) {
359 A = NeutronInducedWattConstants[IsotopeIndex][0][0];
364 "Incident neutron energy above 14 MeV requested.",
JustWarning,
365 "Using Watt fission constants for 14 Mev.");
367 A = NeutronInducedWattConstants[IsotopeIndex][2][0];
371 G4int EnergyIndex = 0;
373 G4double RangeDifference, ConstantDifference;
375 for (
G4int i = 1; IncidentEnergyBins[i] != -1; i++) {
379 if (EnergyDifference != 0) {
380 std::ostringstream Temp;
381 Temp <<
"Incident neutron energy of ";
383 Temp <<
"explicitly listed in the data tables";
393 RangeDifference = IncidentEnergyBins[EnergyIndex] - IncidentEnergyBins[EnergyIndex - 1];
396 ConstantDifference = NeutronInducedWattConstants[IsotopeIndex][EnergyIndex][0]
397 - NeutronInducedWattConstants[IsotopeIndex][EnergyIndex - 1][0];
398 A = (EnergyDifference / RangeDifference) * ConstantDifference
399 + NeutronInducedWattConstants[IsotopeIndex][EnergyIndex - 1][0];
402 ConstantDifference = NeutronInducedWattConstants[IsotopeIndex][EnergyIndex][1]
403 - NeutronInducedWattConstants[IsotopeIndex][EnergyIndex - 1][1];
404 WattConstants_->
B = (EnergyDifference / RangeDifference) * ConstantDifference
405 + NeutronInducedWattConstants[IsotopeIndex][EnergyIndex - 1][1];
411 G4String Temp =
"Watt fission spectra data not available for ";
413 Temp +=
"proton induced fission.";
416 Temp +=
"gamma induced fission.";
419 Temp +=
"!Warning! unknown cause.";
422 "Fission events will not be sampled in this run.");
493 G4double ErfContainer, AdjustedErfContainer, Container;
502 G4bool ToleranceCheck =
false;
513 G4int icounter_max = 1024;
516 if (icounter > icounter_max) {
517 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of "
518 << __FILE__ <<
"." <<
G4endl;
523 AdjustedErfContainer = 0;
526 for (
G4int i = 0; i <= UpperLimit; i++) {
528 LowErf = ((AdjMean - i) / Normalization);
529 HighErf = ((AdjMean - (i + 1.0)) / Normalization);
537#if defined WIN32 - VC
540 Container = (erf(HighErf) - erf(LowErf)) / 2.0;
543 else if (HighErf < 0) {
547#if defined WIN32 - VC
550 Container = (erf(HighErf) + erf(LowErf)) / 2.0;
555#if defined WIN32 - VC
558 Container = (erf(LowErf) - erf(HighErf)) / 2.0;
562#if defined WIN32 - VC
564 if (Container != Container) Container = 0;
568 ErfContainer += Container;
569 AdjustedErfContainer += Container * i;
573 Container = AdjustedErfContainer / ErfContainer;
577 if (
static_cast<int>(ToleranceCheck) ==
TRUE) {
582 if (
static_cast<int>(HalfDelta) ==
TRUE) {
587 if (Container >
Mean_) {