54#include <gsl/gsl_integration.h>
69namespace RooFit_internal {
72 static void registerIntegrator()
79struct Roo_reg_GKInteg1D {
80 Roo_reg_GKInteg1D() { Roo_internal_GKInteg1D::registerIntegrator(); }
95 return std::make_unique<RooGaussKronrodIntegrator1D>(function, config);
104 oocoutI(
nullptr, Integration) <<
"RooGaussKronrodIntegrator1D has been registered" << std::endl;
115 _epsAbs(config.epsRel()),
116 _epsRel(config.epsAbs())
130 _epsAbs(config.epsRel()),
131 _epsRel(config.epsAbs()),
161 oocoutE(
nullptr,Eval) <<
"RooGaussKronrodIntegrator1D::setLimits: cannot override integrand's limits" << endl;
static Roo_reg_AGKInteg1D instance
double RooGaussKronrodIntegrator1D_GSL_GlueFunction(double x, void *data)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
virtual double getMaxLimit(UInt_t dimension) const =0
virtual double getMinLimit(UInt_t dimension) const =0
UInt_t getDimension() const
Abstract interface for integrators of real-valued functions that implement the RooAbsFunc interface.
bool isValid() const
Is integrator in valid state.
const RooAbsFunc * _function
Pointer to function binding of integrand.
const RooAbsFunc * integrand() const
Return integrand function binding.
bool _valid
Is integrator in valid state?
RooGaussKronrodIntegrator1D implements the Gauss-Kronrod integration algorithm.
double _epsAbs
do not persist
double integral(const double *yvec=nullptr) override
Calculate and return integral.
double _xmax
Lower integration bound.
RooGaussKronrodIntegrator1D(const RooAbsFunc &function, const RooNumIntConfig &config)
Construct integral on 'function' using given configuration object.
friend double RooGaussKronrodIntegrator1D_GSL_GlueFunction(double x, void *data)
bool initialize()
Perform one-time initialization of integrator.
bool checkLimits() const override
Check that our integration range is finite and otherwise return false.
bool setLimits(double *xmin, double *xmax) override
Change our integration limits.
static void registerIntegrator(RooNumIntFactory &fact)
Register RooGaussKronrodIntegrator1D, its parameters and capabilities with RooNumIntConfig.
RooNumIntConfig holds the configuration parameters of the various numeric integrators used by RooReal...
RooNumIntFactory is a factory to instantiate numeric integrators from a given function binding and a ...
static RooNumIntFactory & instance()
Static method returning reference to singleton instance of factory.
bool registerPlugin(std::string const &name, Creator const &creator, const RooArgSet &defConfig, bool canIntegrate1D, bool canIntegrate2D, bool canIntegrateND, bool canIntegrateOpenEnded, const char *depName="")
Method accepting registration of a prototype numeric integrator along with a RooArgSet of its default...