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

#include <G4RDSemiLogInterpolation.hh>

Inheritance diagram for G4RDSemiLogInterpolation:
Collaboration diagram for G4RDSemiLogInterpolation:

Public Member Functions

 G4RDSemiLogInterpolation ()
 
 ~G4RDSemiLogInterpolation ()
 
G4double Calculate (G4double point, G4int bin, const G4DataVector &energies, const G4DataVector &data) const
 
virtual G4RDVDataSetAlgorithmClone () const
 
- Public Member Functions inherited from G4RDVDataSetAlgorithm
 G4RDVDataSetAlgorithm ()
 
virtual ~G4RDVDataSetAlgorithm ()
 

Detailed Description

Definition at line 51 of file G4RDSemiLogInterpolation.hh.

Constructor & Destructor Documentation

G4RDSemiLogInterpolation::G4RDSemiLogInterpolation ( )

Definition at line 42 of file G4RDSemiLogInterpolation.cc.

43 { }

Here is the caller graph for this function:

G4RDSemiLogInterpolation::~G4RDSemiLogInterpolation ( )

Definition at line 48 of file G4RDSemiLogInterpolation.cc.

49 { }

Member Function Documentation

G4double G4RDSemiLogInterpolation::Calculate ( G4double  point,
G4int  bin,
const G4DataVector energies,
const G4DataVector data 
) const
virtual

Implements G4RDVDataSetAlgorithm.

Definition at line 55 of file G4RDSemiLogInterpolation.cc.

58 {
59  G4int nBins = data.size() - 1;
60  G4double value = 0.;
61  if (x < points[0])
62  {
63  value = 0.;
64  }
65  else if (bin < nBins)
66  {
67  G4double e1 = points[bin];
68  G4double e2 = points[bin+1];
69  G4double d1 = data[bin];
70  G4double d2 = data[bin+1];
71  value = (d1*std::log10(e2/x) + d2*std::log10(x/e1)) / std::log10(e2/e1);
72  }
73  else
74  {
75  value = data[nBins];
76  }
77  return value;
78 }
tuple bin
Definition: plottest35.py:22
static const G4double d2
tuple x
Definition: test.py:50
int G4int
Definition: G4Types.hh:78
const XML_Char int const XML_Char * value
Definition: expat.h:331
static const G4double d1
double G4double
Definition: G4Types.hh:76
G4RDVDataSetAlgorithm * G4RDSemiLogInterpolation::Clone ( ) const
virtual

Implements G4RDVDataSetAlgorithm.

Definition at line 51 of file G4RDSemiLogInterpolation.cc.

Here is the call graph for this function:


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