#include <G4ParticleHPMadlandNixSpectrum.hh>
◆ G4ParticleHPMadlandNixSpectrum()
G4ParticleHPMadlandNixSpectrum::G4ParticleHPMadlandNixSpectrum |
( |
| ) |
|
|
inline |
Definition at line 54 of file G4ParticleHPMadlandNixSpectrum.hh.
55 {
57 theAvarageKineticPerNucleonForLightFragments = 0.0;
58 theAvarageKineticPerNucleonForHeavyFragments = 0.0;
59 }
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
◆ ~G4ParticleHPMadlandNixSpectrum()
G4ParticleHPMadlandNixSpectrum::~G4ParticleHPMadlandNixSpectrum |
( |
| ) |
|
|
overridedefault |
◆ GetFractionalProbability()
G4double G4ParticleHPMadlandNixSpectrum::GetFractionalProbability |
( |
G4double | anEnergy | ) |
|
|
inlineoverridevirtual |
◆ Init()
void G4ParticleHPMadlandNixSpectrum::Init |
( |
std::istream & | aDataFile | ) |
|
|
inlineoverridevirtual |
Implements G4VParticleHPEDis.
Definition at line 62 of file G4ParticleHPMadlandNixSpectrum.hh.
63 {
64 theFractionalProb.
Init(aDataFile);
65 aDataFile >> theAvarageKineticPerNucleonForLightFragments;
66 theAvarageKineticPerNucleonForLightFragments *= CLHEP::eV;
67 aDataFile >> theAvarageKineticPerNucleonForHeavyFragments;
68 theAvarageKineticPerNucleonForHeavyFragments *= CLHEP::eV;
69 theMaxTemp.
Init(aDataFile);
70 }
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
◆ Sample()
Implements G4VParticleHPEDis.
Definition at line 73 of file G4ParticleHPMadlandNixSpectrum.cc.
74{
76 G4double last = 0, buff, current = 100 * MeV;
78 G4double newValue = 0., oldValue = 0.;
80
82 G4int icounter_max = 1024;
83 do {
84 icounter++;
85 if (icounter > icounter_max) {
86 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of "
87 << __FILE__ <<
"." <<
G4endl;
88 break;
89 }
90 oldValue = newValue;
91 newValue = FissionIntegral(tm, current);
92 if (newValue < random) {
93 buff = current;
94 current += std::abs(current - last) / 2.;
95 last = buff;
96 if (current > 190 * MeV)
98 "Madland-Nix Spectrum has not converged in sampling");
99 }
100 else {
101 buff = current;
102 current -= std::abs(current - last) / 2.;
103 last = buff;
104 }
105 } while (std::abs(oldValue - newValue)
106 > precision * newValue);
107 return current;
108}
G4GLOB_DLL std::ostream G4cout
The documentation for this class was generated from the following files: