#include <G4LinInterpolation.hh>
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: