54#include <gsl/gsl_integration.h>
67namespace RooFit_internal {
70 static void registerIntegrator()
77struct Roo_reg_GKInteg1D {
78 Roo_reg_GKInteg1D() { Roo_internal_GKInteg1D::registerIntegrator(); }
93 return std::make_unique<RooGaussKronrodIntegrator1D>(
function, config);
102 oocoutI(
nullptr, Integration) <<
"RooGaussKronrodIntegrator1D has been registered" << std::endl;
126 _useIntegrandLimits(false),
127 _epsAbs(config.epsRel()),
128 _epsRel(config.epsAbs()),
157 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.
double integrand(const double x[]) const
Return value of integrand at given observable values.
const RooAbsFunc * _function
Pointer to function binding of integrand.
const RooAbsFunc * integrand() const
Return integrand function binding.
bool _valid
Is integrator in valid state?
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.
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
Factory to instantiate numeric integrators from a given function binding and a given configuration.
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...
double(* function)(double x, void *params)