75 _x(
"x",
"Dependent", this,
x),
76 _coefList(
"coefList",
"List of coefficients",this),
77 _lowestOrder(lowestOrder)
81 coutE(InputArguments) <<
"RooPolynomial::ctor(" <<
GetName()
82 <<
") WARNING: lowestOrder must be >=0, setting value to 0" << endl ;
90 coutE(InputArguments) <<
"RooPolynomial::ctor(" <<
GetName() <<
") ERROR: coefficient " << coef->
GetName()
91 <<
" is not of type RooAbsReal" << endl ;
103 _x(
"x",
"Dependent", this,
x),
104 _coefList(
"coefList",
"List of coefficients",this),
113 _x(
"x", this, other._x),
114 _coefList(
"coefList",this,other._coefList),
115 _lowestOrder(other._lowestOrder)
132 if (!sz)
return lowestOrder ? 1. : 0.;
143 for (
unsigned i = sz - 1; i--; ) retVal =
_wksp[i] +
x * retVal;
144 return retVal * std::pow(
x, lowestOrder) + (lowestOrder ? 1.0 : 0.0);
151 int batchSize = xData.
size();
156 std::vector<RooBatchCompute::BracketAdapterWithMask> coefList;
157 for (
int i=0; i<nCoef; i++) {
159 coefList.emplace_back(valBatch);
189 unsigned i = 1 + lowestOrder;
197 for (
unsigned i = sz - 1; i--; )
199 return max * std::pow(
xmax, 1 + lowestOrder) - min * std::pow(
xmin, 1 + lowestOrder) +
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
RooFIter fwdIterator() const
One-time forward iterator.
RooSpan< const double > getValues(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Compute batch of values for given input data, and normalise by integrating over the observables in no...
const RooArgSet * nset() const
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
virtual RooSpan< const double > getValues(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet=nullptr) const
by this change, please consult the release notes for ROOT 6.24 for guidance on how to make this trans...
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.
virtual void computePolynomial(size_t batchSize, double *__restrict output, const double *__restrict const xData, int lowestOrder, std::vector< BracketAdapterWithMask > &coef)=0
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::add()
RooPolynomial implements a polynomial p.d.f of the form.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Advertise to RooFit that this function can be analytically integrated.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Do the analytical integral according to the code that was returned by getAnalyticalIntegral().
RooPolynomial()
coverity[UNINIT_CTOR]
Double_t evaluate() const
do not persist
RooSpan< double > evaluateSpan(RooBatchCompute::RunContext &evalData, const RooArgSet *normSet) const
Compute multiple values of Polynomial.
std::vector< Double_t > _wksp
virtual ~RooPolynomial()
Destructor.
A simple container to hold a batch of data values.
constexpr std::span< T >::pointer data() const
constexpr std::span< T >::index_type size() const noexcept
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.
virtual const char * GetName() const
Returns name of object.
R__EXTERN RooBatchComputeInterface * dispatch
This dispatch pointer points to an implementation of the compute library, provided one has been loade...
This struct enables passing computation data around between elements of a computation graph.
RooSpan< double > makeBatch(const RooAbsReal *owner, std::size_t size)
Create a writable batch.
static void output(int code)