#include <G4LinInterpolation.hh>
|
| G4LinInterpolation () |
|
| ~G4LinInterpolation () |
|
G4double | Calculate (G4double point, G4int bin, const G4DataVector &energies, const G4DataVector &data) const override |
|
G4double | Calculate (G4double point, G4int bin, const G4DataVector &energies, const G4DataVector &data, const G4DataVector &log_energies, const G4DataVector &log_data) const override |
|
G4VDataSetAlgorithm * | Clone () const override |
|
| G4VDataSetAlgorithm () |
|
virtual | ~G4VDataSetAlgorithm () |
|
virtual G4double | Calculate (G4double point, G4int bin, const G4DataVector &energies, const G4DataVector &data) const =0 |
|
virtual G4double | Calculate (G4double point, G4int bin, const G4DataVector &energies, const G4DataVector &data, const G4DataVector &log_energies, const G4DataVector &log_data) const =0 |
|
virtual G4VDataSetAlgorithm * | Clone () const =0 |
|
| G4VDataSetAlgorithm (const G4VDataSetAlgorithm &)=delete |
|
G4VDataSetAlgorithm & | operator= (const G4VDataSetAlgorithm &right)=delete |
|
Definition at line 51 of file G4LinInterpolation.hh.
◆ G4LinInterpolation()
G4LinInterpolation::G4LinInterpolation |
( |
| ) |
|
|
explicit |
◆ ~G4LinInterpolation()
G4LinInterpolation::~G4LinInterpolation |
( |
| ) |
|
◆ Calculate() [1/2]
◆ Calculate() [2/2]
Implements G4VDataSetAlgorithm.
Definition at line 85 of file G4LinInterpolation.cc.
90{
91
92
93
97 if (x < points[0])
98 {
99 value = 0.;
100 }
101 else if (bin < nBins)
102 {
104 G4double log_e2 = log_points[bin+1];
107
108
109
110
111 value = log_d1 + (log_d2 - log_d1)*(log_x - log_e1)/(log_e2 - log_e1);
112
113
114 value = std::pow(10.,value);
115 }
116 else
117 {
118 value = data[nBins];
119 }
120 return value;
121}
◆ Clone()
The documentation for this class was generated from the following files: