Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
39  RooRealProxy _x;
40  RooListProxy _coefList ;
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