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

#include <G4NeutronHPPolynomExpansion.hh>

Public Member Functions

 G4NeutronHPPolynomExpansion ()
 
 ~G4NeutronHPPolynomExpansion ()
 
void Init (std::ifstream &theData)
 
G4double GetValue (G4double anEnergy)
 

Detailed Description

Definition at line 38 of file G4NeutronHPPolynomExpansion.hh.

Constructor & Destructor Documentation

◆ G4NeutronHPPolynomExpansion()

G4NeutronHPPolynomExpansion::G4NeutronHPPolynomExpansion ( )
inline

Definition at line 41 of file G4NeutronHPPolynomExpansion.hh.

42 {
43 theCoeff = 0;
44 nPoly=0;
45 }

◆ ~G4NeutronHPPolynomExpansion()

G4NeutronHPPolynomExpansion::~G4NeutronHPPolynomExpansion ( )
inline

Definition at line 46 of file G4NeutronHPPolynomExpansion.hh.

47 {
48 if(theCoeff!=0) delete [] theCoeff;
49 }

Member Function Documentation

◆ GetValue()

G4double G4NeutronHPPolynomExpansion::GetValue ( G4double  anEnergy)
inline

Definition at line 62 of file G4NeutronHPPolynomExpansion.hh.

63 {
64 G4int i;
65 G4double result=0;
66 G4double base = anEnergy/CLHEP::eV;
67 G4double running = 1;
68 for(i=0; i<nPoly; i++)
69 {
70 result+=theCoeff[i]*running;
71 running *= base;
72 }
73 return result;
74 }
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66

Referenced by G4NeutronHPNeutronYield::GetMean().

◆ Init()

void G4NeutronHPPolynomExpansion::Init ( std::ifstream &  theData)
inline

Definition at line 51 of file G4NeutronHPPolynomExpansion.hh.

52 {
53 theData >> nPoly;
54 theCoeff = new G4double[nPoly];
55 G4int i;
56 for(i=0;i<nPoly;i++)
57 {
58 theData >> theCoeff[i];
59 }
60 }

Referenced by G4NeutronHPNeutronYield::InitMean().


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