Logo ROOT   master
Reference Guide
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 "RooRealProxy.h"
18 #include "RooListProxy.h"
19 
20 class RooRealVar;
21 class RooArgList ;
22 
23 class RooBernstein : public RooAbsPdf {
24 public:
25 
26  RooBernstein() ;
27  RooBernstein(const char *name, const char *title,
28  RooAbsReal& _x, const RooArgList& _coefList) ;
29 
30  RooBernstein(const RooBernstein& other, const char* name = 0);
31  virtual TObject* clone(const char* newname) const { return new RooBernstein(*this, newname); }
32  inline virtual ~RooBernstein() { }
33 
34  Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
35  Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
36 
37 private:
38 
41 
42  Double_t evaluate() const;
43  RooSpan<double> evaluateBatch(std::size_t begin, std::size_t batchSize) const;
44 
45 
46  ClassDef(RooBernstein,1) // Bernstein polynomial PDF
47 };
48 
49 #endif
RooRealProxy _x
Definition: RooBernstein.h:39
A simple container to hold a batch of data values.
Definition: RooSpan.h:32
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
Bernstein basis polynomials are positive-definite in the range [0,1].
Definition: RooBernstein.h:23
RooListProxy _coefList
Definition: RooBernstein.h:40
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
No analytical calculation available (yet) of integrals over subranges.
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral. ...
#define ClassDef(name, id)
Definition: Rtypes.h:326
virtual ~RooBernstein()
Definition: RooBernstein.h:32
RooRealVar represents a fundamental (non-derived) real-valued object.
Definition: RooRealVar.h:36
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooListProxy is the concrete proxy for RooArgList objects.
Definition: RooListProxy.h:25
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:59
RooSpan< double > evaluateBatch(std::size_t begin, std::size_t batchSize) const
Evaluate function for a batch of input data points.
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsPdf, the base class of all PDFs
Definition: RooAbsPdf.h:40
RooArgList is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgList.h:21
virtual TObject * clone(const char *newname) const
Definition: RooBernstein.h:31
char name[80]
Definition: TGX11.cxx:109