59 _x(
"x",
"Dependent", this,
x),
60 _coefList(
"coefList",
"List of coefficients",this),
61 _lowestOrder(lowestOrder)
66 <<
") WARNING: lowestOrder must be >=0, setting value to 0" << endl ;
75 <<
" is not of type RooAbsReal" << endl ;
89 _x(
"x",
"Dependent", this,
x),
90 _coefList(
"coefList",
"List of coefficients",this),
101 _x(
"x", this, other._x),
102 _coefList(
"coefList",this,other._coefList),
103 _lowestOrder(other._lowestOrder)
125 if (!sz)
return lowestOrder ? 1. : 0.;
132 _wksp.push_back(
c->getVal(nset));
137 for (
unsigned i = sz - 1; i--; ) retVal =
_wksp[i] +
x * retVal;
138 return retVal *
std::pow(
x, lowestOrder);
170 unsigned i = 1 + lowestOrder;
178 for (
unsigned i = sz - 1; i--; )
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Int_t getSize() const
Return the number of elements in the collection.
RooFIter fwdIterator() const
One-time forward iterator.
const RooArgSet * nset() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Bool_t 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 one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
Class RooPolyVar is a RooAbsReal implementing a polynomial in terms of a list of RooAbsReal coefficie...
Double_t evaluate() const override
Calculate and return value of polynomial.
RooPolyVar()
Default constructor.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const override
Calculate and return analytical integral over x.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const override
Advertise that we can internally integrate over x.
~RooPolyVar() override
Destructor.
std::vector< Double_t > _wksp
! do not persist
double min(const char *rname=0) const
Query lower limit of range. This requires the payload to be RooAbsRealLValue or derived.
double max(const char *rname=0) const
Query upper 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)