Geant4  10.02.p03
G4RDLogLogInterpolation Class Reference

#include <G4RDLogLogInterpolation.hh>

Inheritance diagram for G4RDLogLogInterpolation:
Collaboration diagram for G4RDLogLogInterpolation:

Public Member Functions

 G4RDLogLogInterpolation ()
 
 ~G4RDLogLogInterpolation ()
 
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 G4RDLogLogInterpolation.hh.

Constructor & Destructor Documentation

◆ G4RDLogLogInterpolation()

G4RDLogLogInterpolation::G4RDLogLogInterpolation ( )

Definition at line 42 of file G4RDLogLogInterpolation.cc.

43 { }
Here is the caller graph for this function:

◆ ~G4RDLogLogInterpolation()

G4RDLogLogInterpolation::~G4RDLogLogInterpolation ( )

Definition at line 47 of file G4RDLogLogInterpolation.cc.

48 { }

Member Function Documentation

◆ Calculate()

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

Implements G4RDVDataSetAlgorithm.

Definition at line 54 of file G4RDLogLogInterpolation.cc.

57 {
58  G4int nBins = data.size() - 1;
59  G4double value = 0.;
60  if (x < points[0])
61  {
62  value = 0.;
63  }
64  else if (bin < nBins)
65  {
66  G4double e1 = points[bin];
67  G4double e2 = points[bin+1];
68  G4double d1 = data[bin];
69  G4double d2 = data[bin+1];
70  value = (std::log10(d1)*std::log10(e2/x) + std::log10(d2)*std::log10(x/e1)) / std::log10(e2/e1);
71  value = std::pow(10.,value);
72  }
73  else
74  {
75  value = data[nBins];
76  }
77 
78  return value;
79 }
static const G4double d1
float bin[41]
Definition: plottest35.C:14
static const G4double e2
int G4int
Definition: G4Types.hh:78
static const G4double e1
double G4double
Definition: G4Types.hh:76
static const G4double d2

◆ Clone()

G4RDVDataSetAlgorithm * G4RDLogLogInterpolation::Clone ( ) const
virtual

Implements G4RDVDataSetAlgorithm.

Definition at line 50 of file G4RDLogLogInterpolation.cc.

Here is the call graph for this function:

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