Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBernstein.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitModels *
4 * File: $Id$
5 * Authors: *
6 * Kyle Cranmer
7 * *
8 * *
9 * Redistribution and use in source and binary forms, *
10 * with or without modification, are permitted according to the terms *
11 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
12 *****************************************************************************/
13#ifndef ROO_BERNSTEIN
14#define ROO_BERNSTEIN
15
16#include "RooAbsPdf.h"
17#include "RooTemplateProxy.h"
18#include "RooRealVar.h"
19#include "RooListProxy.h"
20#include "RooAbsRealLValue.h"
21#include <string>
22
23class RooRealVar;
24class RooArgList;
25
26class RooBernstein : public RooAbsPdf {
27public:
28
30 RooBernstein(const char *name, const char *title,
32
33 RooBernstein(const RooBernstein &other, const char *name = nullptr);
34
35 TObject* clone(const char* newname) const override { return new RooBernstein(*this, newname); }
36 inline ~RooBernstein() override { }
37
38 Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
39 double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
40 void selectNormalizationRange(const char* rangeName=nullptr, bool force=false) override ;
41
42private:
43
46 std::string _refRangeName ;
47
48 double evaluate() const override;
49 void computeBatch(cudaStream_t*, double* output, size_t nEvents, RooFit::Detail::DataMap const&) const override;
50 inline bool canComputeBatchWithCuda() const override { return true; }
51
52 ClassDefOverride(RooBernstein,2) // Bernstein polynomial PDF
53};
54
55#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:339
char name[80]
Definition TGX11.cxx:110
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition RooArgList.h:22
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
Bernstein basis polynomials are positive-definite in the range [0,1].
void selectNormalizationRange(const char *rangeName=nullptr, bool force=false) override
Force use of a given normalisation range.
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=nullptr) const override
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
TObject * clone(const char *newname) const override
~RooBernstein() override
bool canComputeBatchWithCuda() const override
std::string _refRangeName
double analyticalIntegral(Int_t code, const char *rangeName=nullptr) const override
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooTemplateProxy< RooAbsRealLValue > _x
void computeBatch(cudaStream_t *, double *output, size_t nEvents, RooFit::Detail::DataMap const &) const override
Compute multiple values of Bernstein distribution.
RooListProxy _coefList
RooRealVar represents a variable that can be changed from the outside.
Definition RooRealVar.h:40
Mother of all ROOT objects.
Definition TObject.h:41
static void output()