51 _x(
"x",
"Dependent",
this,
x),
52 _coefList(
"coefList",
"List of coefficients",
this),
53 _lowestOrder(lowestOrder)
57 coutE(InputArguments) <<
"RooPolyVar::ctor(" <<
GetName()
58 <<
") WARNING: lowestOrder must be >=0, setting value to 0" << std::endl;
70 _x(
"x",
"Dependent",
this,
x),
71 _coefList(
"coefList",
"List of coefficients",
this),
82 _coefList(
"coefList",
this,
other._coefList),
83 _lowestOrder(
other._lowestOrder)
95 wksp.push_back(
c->getVal(nset));
123 std::vector<std::span<const double>> vars;
124 vars.reserve(coefs.
size() + 2);
129 std::array<double, RooBatchCompute::bufferSize>
zeros;
130 std::array<double, RooBatchCompute::bufferSize>
ones;
132 std::fill_n(
ones.data(),
ones.size(), 1.0);
140 vars.push_back(ctx.
at(coef));
142 vars.push_back(ctx.
at(&
x));
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Storage_t::size_type size() const
bool addTyped(const RooAbsCollection &list, bool silent=false)
Adds elements of a given RooAbsCollection to the container if they match the specified type.
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.
std::span< const double > at(RooAbsArg const *arg, RooAbsArg const *caller=nullptr)
std::span< double > output()
RooBatchCompute::Config config(RooAbsArg const *arg) const
A RooAbsReal implementing a polynomial in terms of a list of RooAbsReal coefficients.
static void fillCoeffValues(std::vector< double > &wksp, RooListProxy const &coefList)
void doEval(RooFit::EvalContext &) const override
Compute multiple values of Polynomial.
double evaluate() const override
Calculate and return value of polynomial.
RooRealProxy const & x() const
RooArgList const & coefList() const
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Advertise that we can internally integrate over x.
std::vector< double > _wksp
! do not persist
static void doEvalImpl(RooAbsArg const *caller, RooFit::EvalContext &, RooAbsReal const &x, RooArgList const &coefs, int lowestOrder)
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Calculate and return analytical integral over x.
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.
void compute(Config cfg, Computer comp, std::span< double > output, VarSpan vars, ArgSpan extraArgs={})
double polynomial(double const *coeffs, int nCoeffs, int lowestOrder, double x)
In pdfMode, a coefficient for the constant term of 1.0 is implied if lowestOrder > 0.
double polynomialIntegral(double const *coeffs, int nCoeffs, int lowestOrder, double xMin, double xMax)
In pdfMode, a coefficient for the constant term of 1.0 is implied if lowestOrder > 0.