13#ifndef RooFit_RooFuncWrapper_h
14#define RooFit_RooFuncWrapper_h
28namespace Experimental {
46 void gradient(
double *out)
const override;
48 void gradient(
const double *
x,
double *
g)
const;
80 using Func =
double (*)(
double *,
double const *,
double const *);
81 using Grad = void (*)(
double *,
double const *,
double const *,
double *);
98 std::map<RooFit::Detail::DataKey, ObsInfo>
_obsInfos;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Storage_t::size_type size() const
Abstract base class for binned and unbinned datasets.
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.
A wrapper class to store a C++ function of type 'double (*)(double*, double*)'.
std::map< RooFit::Detail::DataKey, std::size_t > _nodeOutputSizes
std::string const & funcName() const
double(*)(double *, double const *, double const *) Func
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
std::unique_ptr< RooAbsReal > _absReal
TObject * clone(const char *newname) const override
double defaultErrorLevel() const override
std::string buildCode(RooAbsReal const &head)
std::size_t getNumParams() const
std::vector< double > _xlArr
bool hasGradient() const override
std::vector< double > _observables
void loadParamsAndData(RooAbsArg const *head, RooArgSet const ¶mSet, const RooAbsData *data, RooSimultaneous const *simPdf)
void buildFuncAndGradFunctors()
void writeDebugMacro(std::string const &) const
Dumps a macro "filename.C" that can be used to test and debug the generated code and gradient.
void constOptimizeTestStatistic(ConstOpCode, bool) override
No constant term optimization is possible in code-generation mode.
void gradient(double *out) const override
std::map< RooFit::Detail::DataKey, ObsInfo > _obsInfos
std::vector< double > _gradientVarBuffer
void(*)(double *, double const *, double const *, double *) Grad
void updateGradientVarBuffer() const
std::stringstream _allCode
std::string declareFunction(std::string const &funcBody)
bool declareToInterpreter(std::string const &code)
Declare code to the interpreter and keep track of all declared code in this RooFuncWrapper.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
Mother of all ROOT objects.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
ObsInfo(std::size_t i, std::size_t n)