51 _precision(precision),
69 double s, st, ost(0.0);
72 s = (4.0 * st - ost)/3.0;
78 s = (4.0 * st - ost)/3.0;
80 if (fabs(
s - olds) < _precision*fabs(olds) || (
s==0.0 && olds==0.0))
return s;
84 for (j=5;j<_maxLoop;j++){
87 s = (4.0 * st - ost)/3.0;
89 if (fabs(
s - olds) < _precision*fabs(olds) || (
s==0.0 && olds==0.0))
return s;
94 report(
ERROR,
"EvtGen") <<
"Severe error in EvtItgSimpsonIntegrator. Failed to converge after loop with 2**"
95 << _maxLoop <<
" calls to the integrand in." << endl;
ostream & report(Severity severity, const char *facility)
double trapezoid(double lower, double higher, int n, double &result) const
EvtItgSimpsonIntegrator(const EvtItgAbsFunction &, double precision=1.0e-5, int maxLoop=20)
virtual double evaluateIt(double, double) const
virtual ~EvtItgSimpsonIntegrator()