| 113 |
|
|
| 114 |
// calculate derivative using mathcore derivator |
// calculate derivative using mathcore derivator |
| 115 |
double DoDerivative (const double * x, unsigned int icoord ) const { |
double DoDerivative (const double * x, unsigned int icoord ) const { |
| 116 |
static double step = 1.0E-8; |
static double kEps = 1.E-6; |
| 117 |
|
static double kPrecision = 1.E-8; // sqrt(epsilon) |
| 118 |
|
double x0 = x[icoord]; |
| 119 |
|
double step = std::max( kEps* std::abs(x0), 8.0*kPrecision*(std::abs(x0) + kPrecision) ); |
| 120 |
return ROOT::Math::Derivator::Eval(*fFunc, x, icoord, step); |
return ROOT::Math::Derivator::Eval(*fFunc, x, icoord, step); |
| 121 |
} |
} |
| 122 |
|
|