G4NeutronHPFissionSpectrum Class Reference

#include <G4NeutronHPFissionSpectrum.hh>

Inheritance diagram for G4NeutronHPFissionSpectrum:

G4VNeutronHPEDis

Public Member Functions

 G4NeutronHPFissionSpectrum ()
 ~G4NeutronHPFissionSpectrum ()
void Init (std::ifstream &aDataFile)
G4double GetFractionalProbability (G4double anEnergy)
G4double Sample (G4double anEnergy)

Detailed Description

Definition at line 43 of file G4NeutronHPFissionSpectrum.hh.


Constructor & Destructor Documentation

G4NeutronHPFissionSpectrum::G4NeutronHPFissionSpectrum (  )  [inline]

Definition at line 46 of file G4NeutronHPFissionSpectrum.hh.

00047   {
00048     expm1 = std::exp(-1.);
00049   }

G4NeutronHPFissionSpectrum::~G4NeutronHPFissionSpectrum (  )  [inline]

Definition at line 50 of file G4NeutronHPFissionSpectrum.hh.

00051   {
00052   }


Member Function Documentation

G4double G4NeutronHPFissionSpectrum::GetFractionalProbability ( G4double  anEnergy  )  [inline, virtual]

Implements G4VNeutronHPEDis.

Definition at line 60 of file G4NeutronHPFissionSpectrum.hh.

References G4NeutronHPVector::GetY().

00061   {
00062     return theFractionalProb.GetY(anEnergy);
00063   }

void G4NeutronHPFissionSpectrum::Init ( std::ifstream &  aDataFile  )  [inline, virtual]

Implements G4VNeutronHPEDis.

Definition at line 54 of file G4NeutronHPFissionSpectrum.hh.

References G4NeutronHPVector::Init().

00055   {
00056     theFractionalProb.Init(aDataFile, CLHEP::eV);
00057     theThetaDist.Init(aDataFile, CLHEP::eV);
00058   }

G4double G4NeutronHPFissionSpectrum::Sample ( G4double  anEnergy  )  [inline, virtual]

Implements G4VNeutronHPEDis.

Definition at line 65 of file G4NeutronHPFissionSpectrum.hh.

References G4UniformRand, and G4NeutronHPVector::GetY().

00066   {
00067     G4double theta = theThetaDist.GetY(anEnergy);
00068     // here we need to sample Maxwells distribution, if 
00069     // need be.
00070     G4double result, cut;
00071     G4double range =50*CLHEP::MeV;
00072     G4double max = Maxwell((theta*CLHEP::eV)/2., theta);
00073     G4double value;
00074     do
00075     {
00076       result = range*G4UniformRand();
00077       value = Maxwell(result, theta);
00078       cut = G4UniformRand();
00079     }
00080     while(cut > value/max);
00081     return result;
00082   }


The documentation for this class was generated from the following file:
Generated on Mon May 27 17:52:38 2013 for Geant4 by  doxygen 1.4.7