Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ParticleHPPolynomExpansion Class Reference

#include <G4ParticleHPPolynomExpansion.hh>

Public Member Functions

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

Detailed Description

Definition at line 38 of file G4ParticleHPPolynomExpansion.hh.

Constructor & Destructor Documentation

G4ParticleHPPolynomExpansion::G4ParticleHPPolynomExpansion ( )
inline

Definition at line 41 of file G4ParticleHPPolynomExpansion.hh.

42  {
43  theCoeff = 0;
44  nPoly=0;
45  }
G4ParticleHPPolynomExpansion::~G4ParticleHPPolynomExpansion ( )
inline

Definition at line 46 of file G4ParticleHPPolynomExpansion.hh.

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

Member Function Documentation

G4double G4ParticleHPPolynomExpansion::GetValue ( G4double  anEnergy)
inline

Definition at line 62 of file G4ParticleHPPolynomExpansion.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  }
G4double G4ParticleHPJENDLHEData::G4double result
const XML_Char int const XML_Char int const XML_Char * base
Definition: expat.h:331
int G4int
Definition: G4Types.hh:78
static constexpr double eV
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

void G4ParticleHPPolynomExpansion::Init ( std::istream &  theData)
inline

Definition at line 51 of file G4ParticleHPPolynomExpansion.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  }
int G4int
Definition: G4Types.hh:78
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:


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