meerkat is hosted by Hepforge, IPPP Durham
Meerkat  v1r3
Multidimensional kernel density estimation package
PolynomialDensity.hh
Go to the documentation of this file.
1 #ifndef POLYNOMIAL_DENSITY
2 #define POLYNOMIAL_DENSITY
3 
4 #include "AbsDensity.hh"
5 #include "AbsPhaseSpace.hh"
6 #include "OneDimPhaseSpace.hh"
7 
8 #include <vector>
9 
13 
14 class PolynomialDensity : public AbsDensity {
15 
16  public:
17 
20 
28  PolynomialDensity(const char* pdfName,
29  OneDimPhaseSpace* thePhaseSpace,
30  UInt_t maxPower,
31  TTree* tree,
32  const char* var,
33  UInt_t maxEvents = 0);
34 
37 
47  PolynomialDensity(const char* pdfName,
48  AbsPhaseSpace* thePhaseSpace,
49  UInt_t maxPower,
50  TTree* tree,
51  const char* var1,
52  const char* var2,
53  UInt_t integEvents,
54  UInt_t maxEvents = 0);
55 
57  virtual ~PolynomialDensity();
58 
60 
64  Double_t density(std::vector<Double_t> &x);
65 
67 
71 
72  private:
73 
75  void readTuple(TTree* tree, std::vector<TString> &vars, UInt_t maxEvents = 0);
76 
79 
81  UInt_t m_dim;
82 
84  Double_t m_par[100];
85 
87  UInt_t m_power;
88 };
89 
90 #endif
91 
AbsPhaseSpace * phaseSpace()
Return phase space definition for this PDF.
void readTuple(TTree *tree, std::vector< TString > &vars, UInt_t maxEvents=0)
Read Ntuple contaning data points to be used for the fit.
Abstract class which defines probability density interface.
Definition: AbsDensity.hh:16
virtual ~PolynomialDensity()
Destructor.
UInt_t m_dim
Cached dimensionality of the phase space.
Abstract class which defines phase space interface.
AbsPhaseSpace * m_phaseSpace
Reference to phase space.
PolynomialDensity(const char *pdfName, OneDimPhaseSpace *thePhaseSpace, UInt_t maxPower, TTree *tree, const char *var, UInt_t maxEvents=0)
Double_t m_par[100]
Vector of fitted parameters.
UInt_t m_power
Power of the polynomial.
Double_t density(std::vector< Double_t > &x)
Calculate PDF value at the given point.