Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4NeutronHPPolynomExpansion Class Reference

#include <G4NeutronHPPolynomExpansion.hh>

Public Member Functions

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

Detailed Description

Definition at line 37 of file G4NeutronHPPolynomExpansion.hh.

Constructor & Destructor Documentation

G4NeutronHPPolynomExpansion::G4NeutronHPPolynomExpansion ( )
inline

Definition at line 40 of file G4NeutronHPPolynomExpansion.hh.

41  {
42  theCoeff = 0;
43  nPoly=0;
44  }
G4NeutronHPPolynomExpansion::~G4NeutronHPPolynomExpansion ( )
inline

Definition at line 45 of file G4NeutronHPPolynomExpansion.hh.

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

Member Function Documentation

G4double G4NeutronHPPolynomExpansion::GetValue ( G4double  anEnergy)
inline

Definition at line 61 of file G4NeutronHPPolynomExpansion.hh.

Referenced by Lesson1Wx.Counter::Adjusted(), Lesson2Wx.Counter::Adjusted(), and G4NeutronHPNeutronYield::GetMean().

62  {
63  G4int i;
64  G4double result=0;
65  G4double base = anEnergy/CLHEP::eV;
66  G4double running = 1;
67  for(i=0; i<nPoly; i++)
68  {
69  result+=theCoeff[i]*running;
70  running *= base;
71  }
72  return result;
73  }
int G4int
Definition: G4Types.hh:78
const XML_Char int const XML_Char int const XML_Char * base
double G4double
Definition: G4Types.hh:76
void G4NeutronHPPolynomExpansion::Init ( std::istream &  theData)
inline

Definition at line 50 of file G4NeutronHPPolynomExpansion.hh.

Referenced by G4NeutronHPNeutronYield::InitMean().

51  {
52  theData >> nPoly;
53  theCoeff = new G4double[nPoly];
54  G4int i;
55  for(i=0;i<nPoly;i++)
56  {
57  theData >> theCoeff[i];
58  }
59  }
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76

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