17#ifndef ROO_BIN_SAMPLING__PDF
18#define ROO_BIN_SAMPLING__PDF
43 return _pdf->forceAnalyticalInt(dep);
47 const char* rangeName=
nullptr)
const override {
48 return _pdf->getAnalyticalIntegralWN(allVars, analVars, normSet, rangeName);
52 const char* rangeName=
nullptr)
const override {
53 return _pdf->getAnalyticalIntegral(allVars, numVars, rangeName);
57 return _pdf->analyticalIntegralWN(code, normSet, rangeName);
61 return _pdf->analyticalIntegral(code, rangeName);
65 return _pdf->createExpectedEventsFunc(nset);
75 const char* rangeName=
nullptr)
const override {
76 return _pdf->createIntegral(iset, nset, cfg, rangeName);
84 return _pdf->getGenerator(directVars, generateVars, staticInitOK);
105 std::unique_ptr<ROOT::Math::IntegratorOneDim>&
integrator()
const;
120 template<
typename Func>
131 mutable std::unique_ptr<ROOT::Math::IntegratorOneDim>
_integrator{
nullptr};
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Template class to wrap any C++ callable object which takes one argument i.e.
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value that may appear on the left hand side of ...
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
The RooBinSamplingPdf is supposed to be used as an adapter between a continuous PDF and a binned dist...
double integrate(const RooArgSet *normSet, double low, double high) const
Integrate the wrapped PDF using our current integrator, with given norm set and limits.
RooTemplateProxy< RooAbsPdf > _pdf
std::vector< double > _binBoundaries
! Workspace to store data for bin sampling
void doEval(RooFit::EvalContext &) const override
Integrate the PDF over all its bins, and return a batch with those values.
RooFit::OwningPtr< RooAbsReal > createIntegral(const RooArgSet &iset, const RooArgSet *nset=nullptr, const RooNumIntConfig *cfg=nullptr, const char *rangeName=nullptr) const override
Forwards to the PDF's implementation.
std::unique_ptr< ROOT::Math::IntegratorOneDim > & integrator() const
Direct access to the unique_ptr holding the integrator that's used to sample the bins.
double expectedEvents(const RooArgSet *nset) const override
Return expected number of events to be used in calculation of extended likelihood.
RooTemplateProxy< RooAbsRealLValue > _observable
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, bool staticInitOK=true) const override
Forwards to the PDF's implementation.
std::unique_ptr< RooAbsReal > createExpectedEventsFunc(const RooArgSet *nset) const override
Forwards to the PDF's implementation.
double maxVal(Int_t code) const override
Return maximum value for set of observables identified by code assigned in getMaxVal.
bool forceAnalyticalInt(const RooAbsArg &dep) const override
void initGenerator(Int_t code) override
Forwards to the PDF's implementation.
std::unique_ptr< ROOT::Math::IntegratorOneDim > _integrator
! Integrator used to sample bins.
bool isDirectGenSafe(const RooAbsArg &arg) const override
Forwards to the PDF's implementation.
double _relEpsilon
Default integrator precision.
TObject * clone(const char *newname) const override
ExtendMode extendMode() const override
Returns ability of PDF to provide extended likelihood terms.
std::span< const double > binBoundaries() const
Get the bin boundaries for the observable.
Int_t getMaxVal(const RooArgSet &vars) const override
Advertise capability to determine maximum value of function for given set of observables.
void generateEvent(Int_t code) override
Forwards to the PDF's implementation.
double analyticalIntegralWN(Int_t code, const RooArgSet *normSet, const char *rangeName) const override
Forwards to the PDF's implementation.
static std::unique_ptr< RooAbsPdf > create(RooAbsPdf &pdf, RooAbsData const &data, double precision)
Creates a wrapping RooBinSamplingPdf if appropriate.
Int_t getAnalyticalIntegralWN(RooArgSet &allVars, RooArgSet &analVars, const RooArgSet *normSet, const char *rangeName=nullptr) const override
Forwards to the PDF's implementation.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &numVars, const char *rangeName=nullptr) const override
Forwards to the PDF's implementation.
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Forwards to the PDF's implementation.
bool isBinnedDistribution(const RooArgSet &) const override
Returns true, since this PDF is meant to be binned.
double operator()(double x) const
Binding used by the integrator to evaluate the PDF.
bool selfNormalized() const override
Forwards to the PDF's implementation.
double evaluate() const override
Integrate the PDF over the current bin of the observable.
Int_t minTrialSamples(const RooArgSet &arGenObs) const override
const RooAbsPdf & pdf() const
std::list< double > * plotSamplingHint(RooAbsRealLValue &obs, double xlo, double xhi) const override
Return a list of all bin edges, so the PDF is plotted as a step function.
const RooAbsReal & observable() const
Holds the configuration parameters of the various numeric integrators used by RooRealIntegral.
Mother of all ROOT objects.
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...