#include <G4NeutronHPAngularP.hh>
Public Member Functions | |
G4NeutronHPAngularP () | |
~G4NeutronHPAngularP () | |
void | Init (std::ifstream &aDataFile) |
void | Init (G4double e, G4int n) |
void | SetEnergy (G4double energy) |
void | SetCosTh (G4int l, G4double coeff) |
void | SetProb (G4int l, G4double coeff) |
G4double | GetCosTh (G4int l) |
G4double | GetProb (G4int l) |
G4double | GetEnergy () |
G4int | GetNumberOfPoints () |
G4double | GetCosTh () |
Definition at line 37 of file G4NeutronHPAngularP.hh.
G4NeutronHPAngularP::G4NeutronHPAngularP | ( | ) | [inline] |
G4NeutronHPAngularP::~G4NeutronHPAngularP | ( | ) | [inline] |
G4double G4NeutronHPAngularP::GetCosTh | ( | ) | [inline] |
Definition at line 84 of file G4NeutronHPAngularP.hh.
References G4UniformRand, GetNumberOfPoints(), GetProb(), G4InterpolationManager::GetScheme(), and G4NeutronHPInterpolator::Interpolate().
00085 { 00086 G4int i; 00087 G4double rand = G4UniformRand(); 00088 G4double run=0, runo=0; 00089 for (i=0; i<GetNumberOfPoints(); i++) 00090 { 00091 runo=run; 00092 run += GetProb(i); 00093 if(run>rand) break; 00094 } 00095 if(i == GetNumberOfPoints()) i--; 00096 G4double costh = theInt.Interpolate(theManager.GetScheme(i), rand, 00097 runo, run, GetCosTh(i-1), GetCosTh(i)); 00098 return costh; 00099 }
Definition at line 80 of file G4NeutronHPAngularP.hh.
Referenced by G4NeutronHPPhotonDist::GetPhotons().
G4double G4NeutronHPAngularP::GetEnergy | ( | ) | [inline] |
G4int G4NeutronHPAngularP::GetNumberOfPoints | ( | ) | [inline] |
void G4NeutronHPAngularP::Init | ( | std::ifstream & | aDataFile | ) | [inline] |
Definition at line 52 of file G4NeutronHPAngularP.hh.
References G4InterpolationManager::Init(), SetCosTh(), and SetProb().
00053 { 00054 G4double eNeu, cosTheta, probDist; 00055 G4int nProb; 00056 aDataFile >> eNeu >> nProb; 00057 theManager.Init(aDataFile); 00058 eNeu *= CLHEP::eV; 00059 Init(eNeu, nProb); 00060 for (G4int iii=0; iii<nProb; iii++) 00061 { 00062 aDataFile >> cosTheta >> probDist; 00063 SetCosTh(iii, cosTheta); 00064 SetProb(iii,probDist); 00065 } 00066 }
void G4NeutronHPAngularP::SetEnergy | ( | G4double | energy | ) | [inline] |