45 numberOfXNodes(0), numberOfYNodes(0),
46 verboseLevel(0), useBicubic(false)
53 numberOfXNodes(nx), numberOfYNodes(ny),
54 verboseLevel(0), useBicubic(false)
89 if (&right==
this) {
return *
this; }
148 size_t& idx,
size_t& idy)
const
181 return ((y2 - y)*(v11*(x2 - x) + v12*(x - x1)) +
182 ((y - y1)*(v21*(x2 - x) + v22*(x - x1))))/((x2 -
x1)*(y2 - y1));
190 size_t idx,
size_t idy)
const
238 f1 + f1y*h2 + (3*(f4-
f1) - 2*f1y - f4y)*h22 + (2*(f1 -
f4) + f1y + f4y)*h23
239 + f1x*h1 + f1xy*h1*h2 +(3*(f4x - f1x) - 2*f1xy - f4xy)*h1*h22
240 + (2*(f1x - f4x) + f1xy + f4xy)*h1*h23
241 + (3*(f2 -
f1) - 2*f1x - f2x)*h12 + (3*f2y - 3*f1y - 2*f1xy - f2xy)*h12*h2
242 + (9*(f1 - f2 + f3 - f4) + 6*f1x + 3*f2x - 3*f3x - 6*f4x + 6*f1y - 6*f2y
243 - 3*f3y + 3*f4y + 4*f1xy + 2*f2xy + f3xy + 2*f4xy)*h12*h22
244 + (6*(-f1 + f2 - f3 + f4) - 4*f1x - 2*f2x + 2*f3x + 4*f4x - 3*f1y
245 + 3*f2y + 3*f3y - 3*f4y - 2*f1xy - f2xy - f3xy - 2*f4xy)*h12*h23
246 + (2*(f1 - f2) + f1x + f2x)*h13 + (2*(f1y - f2y) + f1xy + f2xy)*h13*h2
247 + (6*(-f1 + f2 -f3 + f4) + 3*(-f1x - f2x + f3x + f4x) - 4*f1y
248 + 4*f2y + 2*f3y - 2*f4y - 2*f1xy - 2*f2xy - f3xy - f4xy)*h13*h22
249 + (4*(f1 - f2 + f3 -
f4) + 2*(f1x + f2x - f3x - f4x)
250 + 2*(f1y - f2y - f3y + f4y) + f1xy + f2xy + f3xy + f4xy)*h13*h23;
257 const std::vector<G4double>& vecY)
279 out << std::setprecision(5);
291 for(
size_t i = 0; i<numberOfXNodes-1; ++i) {
315 if( 0 >= numberOfYNodes || numberOfYNodes >=
INT_MAX) {
327 if (in.fail()) {
return false; }
331 if (in.fail()) {
return false; }
336 if (in.fail()) {
return false; }
365 size_t binmax = v.size() - 2;
367 if(z <= v[0]) { bin = 0; }
368 else if(z >= v[binmax]) { bin = binmax; }
370 bin = std::lower_bound(v.begin(), v.end(),
z) - v.begin() - 1;
397 res += (x2 -
x1)*(y - yVector[idy])/del;
407 size_t nn = v.size();
408 if(1 >= nn) {
return 0.0; }
419 n2 = (n3 + n1 + 1)/2;
424 res += (y - v[n1])*(
xVector[n3] - res)/del;
void PutValue(size_t idx, size_t idy, G4double value)
Float_t y1[n_points_granero]
Float_t x1[n_points_granero]
G4bool Retrieve(std::ifstream &fIn)
size_t FindBinLocation(G4double z, const G4PV2DDataVector &) const
G4double DerivativeXY(size_t idx, size_t idy, G4double fac) const
Float_t y2[n_points_geant4]
void ScaleVector(G4double factor)
G4double FindLinearX(G4double rand, G4double y, size_t &lastidy) const
const XML_Char int const XML_Char * value
size_t FindBinLocationX(G4double x, size_t lastidx) const
std::vector< G4PV2DDataVector * > value
G4double InterpolateLinearX(G4PV2DDataVector &v, G4double rand) const
size_t FindBinLocationY(G4double y, size_t lastidy) const
G4double Value(G4double x, G4double y, size_t &lastidx, size_t &lastidy) const
G4double DerivativeY(size_t idx, size_t idy, G4double fac) const
void CopyData(const G4Physics2DVector &vec)
G4double DerivativeX(size_t idx, size_t idy, G4double fac) const
G4double GetValue(size_t idx, size_t idy) const
void PutVectors(const std::vector< G4double > &vecX, const std::vector< G4double > &vecY)
void Store(std::ofstream &fOut) const
Float_t x2[n_points_geant4]
G4double BicubicInterpolation(G4double x, G4double y, size_t idx, size_t idy) const
G4Physics2DVector & operator=(const G4Physics2DVector &)
std::vector< G4double > G4PV2DDataVector