#include <G4ParticleHPWattSpectrum.hh>
Definition at line 45 of file G4ParticleHPWattSpectrum.hh.
◆ G4ParticleHPWattSpectrum()
G4ParticleHPWattSpectrum::G4ParticleHPWattSpectrum |
( |
| ) |
|
|
inline |
◆ ~G4ParticleHPWattSpectrum()
G4ParticleHPWattSpectrum::~G4ParticleHPWattSpectrum |
( |
| ) |
|
|
overridedefault |
◆ GetFractionalProbability()
G4double G4ParticleHPWattSpectrum::GetFractionalProbability |
( |
G4double | anEnergy | ) |
|
|
inlineoverridevirtual |
◆ Init()
void G4ParticleHPWattSpectrum::Init |
( |
std::istream & | aDataFile | ) |
|
|
inlineoverridevirtual |
Implements G4VParticleHPEDis.
Definition at line 51 of file G4ParticleHPWattSpectrum.hh.
52 {
53 theFractionalProb.
Init(aDataFile, CLHEP::eV);
54 theApar.
Init(aDataFile, CLHEP::eV);
55 theBpar.
Init(aDataFile, CLHEP::eV);
56 }
void Init(std::istream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)
◆ Sample()
Implements G4VParticleHPEDis.
Definition at line 36 of file G4ParticleHPWattSpectrum.cc.
37{
42 max = std::sinh(std::sqrt(b * 15. * a));
43
45 G4int icounter_max = 1024;
46 do {
47 icounter++;
48 if (icounter > icounter_max) {
49 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of "
50 << __FILE__ <<
"." <<
G4endl;
51 break;
52 }
54 result = -a *
G4Log(random);
56 } while (cut > std::sinh(std::sqrt(b * result)) / max);
57 return result;
58}
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
T max(const T t1, const T t2)
brief Return the largest of the two arguments
The documentation for this class was generated from the following files: