Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NeutronHPFissionSpectrum Class Reference

#include <G4NeutronHPFissionSpectrum.hh>

+ Inheritance diagram for G4NeutronHPFissionSpectrum:

Public Member Functions

 G4NeutronHPFissionSpectrum ()
 
 ~G4NeutronHPFissionSpectrum ()
 
void Init (std::ifstream &aDataFile)
 
G4double GetFractionalProbability (G4double anEnergy)
 
G4double Sample (G4double anEnergy)
 
- Public Member Functions inherited from G4VNeutronHPEDis
 G4VNeutronHPEDis ()
 
virtual ~G4VNeutronHPEDis ()
 
virtual void Init (std::ifstream &theData)=0
 
virtual G4double GetFractionalProbability (G4double anEnergy)=0
 
virtual G4double Sample (G4double anEnergy)=0
 

Detailed Description

Definition at line 43 of file G4NeutronHPFissionSpectrum.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPFissionSpectrum()

G4NeutronHPFissionSpectrum::G4NeutronHPFissionSpectrum ( )
inline

Definition at line 46 of file G4NeutronHPFissionSpectrum.hh.

47 {
48 expm1 = std::exp(-1.);
49 }

◆ ~G4NeutronHPFissionSpectrum()

G4NeutronHPFissionSpectrum::~G4NeutronHPFissionSpectrum ( )
inline

Definition at line 50 of file G4NeutronHPFissionSpectrum.hh.

51 {
52 }

Member Function Documentation

◆ GetFractionalProbability()

G4double G4NeutronHPFissionSpectrum::GetFractionalProbability ( G4double  anEnergy)
inlinevirtual

Implements G4VNeutronHPEDis.

Definition at line 60 of file G4NeutronHPFissionSpectrum.hh.

61 {
62 return theFractionalProb.GetY(anEnergy);
63 }
G4double GetY(G4double x)

◆ Init()

void G4NeutronHPFissionSpectrum::Init ( std::ifstream &  aDataFile)
inlinevirtual

Implements G4VNeutronHPEDis.

Definition at line 54 of file G4NeutronHPFissionSpectrum.hh.

55 {
56 theFractionalProb.Init(aDataFile, CLHEP::eV);
57 theThetaDist.Init(aDataFile, CLHEP::eV);
58 }
void Init(std::ifstream &aDataFile, G4int total, G4double ux=1., G4double uy=1.)

◆ Sample()

G4double G4NeutronHPFissionSpectrum::Sample ( G4double  anEnergy)
inlinevirtual

Implements G4VNeutronHPEDis.

Definition at line 65 of file G4NeutronHPFissionSpectrum.hh.

66 {
67 G4double theta = theThetaDist.GetY(anEnergy);
68 // here we need to sample Maxwells distribution, if
69 // need be.
70 G4double result, cut;
71 G4double range =50*CLHEP::MeV;
72 G4double max = Maxwell((theta*CLHEP::eV)/2., theta);
73 G4double value;
74 do
75 {
76 result = range*G4UniformRand();
77 value = Maxwell(result, theta);
78 cut = G4UniformRand();
79 }
80 while(cut > value/max);
81 return result;
82 }
double G4double
Definition: G4Types.hh:64
#define G4UniformRand()
Definition: Randomize.hh:53

The documentation for this class was generated from the following file: