54 _x(
"x",
"Dependent", this,
x),
55 _coefList(
"coefficients",
"List of coefficients",this)
57 for (
auto *coef : coefList) {
59 cout <<
"RooBernstein::ctor(" <<
GetName() <<
") ERROR: coefficient " << coef->GetName()
60 <<
" is not of type RooAbsReal" << endl ;
70 :
RooAbsPdf(other,
name), _x(
"x", this, other._x), _coefList(
"coefList", this, other._coefList)
109 return (a2 *
x + a1) *
x + a0;
136 std::vector<double> extraArgs(nCoef+2);
137 for (
int i=0; i<nCoef; i++)
139 extraArgs[nCoef] =
_x.
min();
140 extraArgs[nCoef+1] =
_x.
max();
170 for (
int i=0; i<=
degree; ++i){
175 for (
int j=i; j<=
degree; ++j){
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Int_t getSize() const
Return the number of elements in the collection.
Storage_t::size_type size() const
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...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
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.
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].
std::string _refRangeName
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
double analyticalIntegral(Int_t code, const char *rangeName=0) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
RooTemplateProxy< RooAbsRealLValue > _x
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of Bernstein distribution.
void selectNormalizationRange(const char *rangeName=0, bool force=false) override
Force use of a given normalisation range.
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...
auto & at(RooAbsArg const *arg, RooAbsArg const *=nullptr)
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)
R__EXTERN RooBatchComputeInterface * dispatchCUDA
R__EXTERN RooBatchComputeInterface * dispatchCPU
This dispatch pointer points to an implementation of the compute library, provided one has been loade...
static constexpr double s
static constexpr double degree
Double_t Binomial(Int_t n, Int_t k)
Calculates the binomial coefficient n over k.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Double_t SignalingNaN()
Returns a signaling NaN as defined by IEEE 754](http://en.wikipedia.org/wiki/NaN#Signaling_NaN).