68 _x(
"x",
"Dependent", this,
x),
69 _coefList(
"coefList",
"List of coefficients", this),
70 _lowestOrder(lowestOrder)
74 coutE(InputArguments) <<
"RooPolynomial::ctor(" <<
GetName()
75 <<
") WARNING: lowestOrder must be >=0, setting value to 0" << std::endl;
81 coutE(InputArguments) <<
"RooPolynomial::ctor(" <<
GetName() <<
") ERROR: coefficient " << coef->GetName()
82 <<
" is not of type RooAbsReal" << std::endl;
93 _x(
"x",
"Dependent", this,
x),
94 _coefList(
"coefList",
"List of coefficients", this),
104 _x(
"x", this, other._x),
105 _coefList(
"coefList", this, other._coefList),
106 _lowestOrder(other._lowestOrder)
120 return RooFit::Detail::EvaluateFuncs::polynomialEvaluate<true>(
_wksp.data(), sz,
_lowestOrder,
_x);
Int_t getSize() const
Return the number of elements in the collection.
Storage_t::size_type size() const
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
bool matchArgs(const RooArgSet &allDeps, RooArgSet &numDeps, const RooArgProxy &a) const
Utility function for use in getAnalyticalIntegral().
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
bool add(const RooAbsArg &var, bool valueServer, bool shapeServer, bool silent)
Overloaded RooCollection_t::add() method insert object into set and registers object as server to own...
A class to maintain the context for squashing of RooFit models into code.
std::string buildCall(std::string const &funcname, Args_t const &...args)
Build the code to call the function with name funcname, passing some arguments.
void addResult(RooAbsArg const *key, std::string const &value)
A function to save an expression that includes/depends on the result of the input node.
static void fillCoeffValues(std::vector< double > &wksp, RooListProxy const &coefList)
static void computeBatchImpl(RooAbsArg const *caller, double *output, size_t nEvents, RooFit::Detail::DataMap const &, RooAbsReal const &x, RooArgList const &coefs, int lowestOrder)
RooPolynomial implements a polynomial p.d.f of the form.
void computeBatch(double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of Polynomial.
double evaluate() const override
do not persist
void translate(RooFit::Detail::CodeSquashContext &ctx) const override
This function defines a translation for each RooAbsReal based object that can be used to express the ...
std::string buildCallToAnalyticIntegral(Int_t code, const char *rangeName, RooFit::Detail::CodeSquashContext &ctx) const override
This function defines the analytical integral translation for the class.
std::vector< double > _wksp
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Do the analytical integral according to the code that was returned by getAnalyticalIntegral().
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Advertise to RooFit that this function can be analytically integrated.
RooArgList const & coefList() const
Get the coefficient list.
double max(const char *rname=nullptr) const
Query upper limit of range. This requires the payload to be RooAbsRealLValue or derived.
const T & arg() const
Return reference to object held in proxy.
double min(const char *rname=nullptr) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
const char * GetName() const override
Returns name of object.