74 _x(
"x",
"Dependent", this,
x),
75 _coefList(
"coefList",
"List of coefficients",this),
76 _lowestOrder(lowestOrder)
81 <<
") WARNING: lowestOrder must be >=0, setting value to 0" << endl ;
88 <<
" is not of type RooAbsReal" << endl ;
100 _x(
"x",
"Dependent", this,
x),
101 _coefList(
"coefList",
"List of coefficients",this),
110 _x(
"x", this, other._x),
111 _coefList(
"coefList",this,other._coefList),
112 _lowestOrder(other._lowestOrder)
134 for (
auto *
c : static_range_cast<RooAbsReal *>(
_coefList)) {
135 _wksp.push_back(
c->getVal(nset));
139 double retVal =
_wksp[sz - 1];
140 for (
unsigned i = sz - 1; i--; ) retVal =
_wksp[i] +
x * retVal;
183 for (
auto *
c : static_range_cast<RooAbsReal *>(
_coefList)) {
184 _wksp.push_back(
c->getVal(nset) /
double(i));
188 double min =
_wksp[sz - 1], max =
_wksp[sz - 1];
189 for (
unsigned i = sz - 1; i--; )
Int_t getSize() const
Return the number of elements in the collection.
const RooArgSet * nset() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
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...
RooPolynomial implements a polynomial p.d.f of the form.
double evaluate() const override
do not persist
std::vector< double > _wksp
RooPolynomial()
coverity[UNINIT_CTOR]
~RooPolynomial() override
Destructor.
RooAbsReal const & x() const
Get the x variable.
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 lowestOrder() const
Return the order for the first coefficient in the list.
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.
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.
RVec< PromoteTypes< T0, T1 > > pow(const T0 &x, const RVec< T1 > &v)