61 _x(
"x",
"Dependent", this,
x),
62 _coefList(
"coefficients",
"List of coefficients",this)
68 cout <<
"RooBernstein::ctor(" <<
GetName() <<
") ERROR: coefficient " << coef->
GetName()
69 <<
" is not of type RooAbsReal" << endl ;
81 _x(
"x", this, other._x),
82 _coefList(
"coefList",this,other._coefList)
111 }
else if(degree == 1) {
117 }
else if(degree == 2) {
122 return (a2 *
x + a1) *
x + a0;
124 }
else if(degree > 2) {
130 for(
Int_t i = 1; i < degree; i++) {
148 std::vector<double> extraArgs(nCoef+2);
149 for (
int i=0; i<nCoef; i++)
151 extraArgs[nCoef] =
_x.
min();
152 extraArgs[nCoef+1] =
_x.
max();
183 for (
int i=0; i<=degree; ++i){
188 for (
int j=i; j<=degree; ++j){
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.
Storage_t::size_type size() const
TIterator * createIterator(Bool_t dir=kIterForward) const
TIterator-style iteration over contained elements.
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
std::pair< double, double > getRange(const char *name=0) const
Get low and high bound of the variable.
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().
Double_t getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
virtual void compute(cudaStream_t *, Computer, RestrictArr, size_t, const VarVector &, const ArgVector &={})=0
Bernstein basis polynomials are positive-definite in the range [0,1].
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
std::string _refRangeName
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const
Compute multiple values of Bernstein distribution.
RooTemplateProxy< RooAbsRealLValue > _x
void selectNormalizationRange(const char *rangeName=0, Bool_t force=kFALSE)
Force use of a given normalisation range.
double evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooAbsArg * next()
Return next element or nullptr if at end.
auto & at(RooAbsArg const *arg, RooAbsArg const *=nullptr)
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE) override
Reimplementation of standard RooArgList::add()
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.
Iterator abstract base class.
virtual TObject * Next()=0
virtual const char * GetName() const
Returns name of object.
R__EXTERN RooBatchComputeInterface * dispatchCUDA
R__EXTERN RooBatchComputeInterface * dispatchCPU
This dispatch pointer points to an implementation of the compute library, provided one has been loade...
Double_t Binomial(Int_t n, Int_t k)
Calculate the binomial coefficient n over k.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Double_t SignalingNaN()
Returns a signaling NaN as defined by IEEE 754](http://en.wikipedia.org/wiki/NaN#Signaling_NaN)
static void output(int code)