meerkat is hosted by Hepforge, IPPP Durham
Meerkat  v1r3
Multidimensional kernel density estimation package
FormulaDensity.hh
Go to the documentation of this file.
1 #ifndef FORMULA_DENSITY
2 #define FORMULA_DENSITY
3 
4 #include "AbsDensity.hh"
5 #include "AbsPhaseSpace.hh"
6 
7 #include "TFormula.h"
8 
9 #include <vector>
10 
13 
14 class FormulaDensity : public AbsDensity {
15 
16  public:
17 
19 
24  FormulaDensity(const char* pdfName,
25  AbsPhaseSpace* thePhaseSpace,
26  const char* formula);
27 
29 
34  FormulaDensity(const char* pdfName,
35  AbsPhaseSpace* thePhaseSpace,
36  TFormula* formula);
37 
38  virtual ~FormulaDensity();
39 
41 
45  Double_t density(std::vector<Double_t> &x);
46 
48 
52 
53  private:
54 
57 
59  TFormula* m_formula;
60 
62  UInt_t m_dim;
63 };
64 
65 #endif
66 
FormulaDensity(const char *pdfName, AbsPhaseSpace *thePhaseSpace, const char *formula)
Constructor.
Abstract class which defines probability density interface.
Definition: AbsDensity.hh:16
AbsPhaseSpace * m_phaseSpace
Reference to phase space.
TFormula * m_formula
ROOT formula.
Abstract class which defines phase space interface.
Double_t density(std::vector< Double_t > &x)
Calculate PDF value at the given point.
AbsPhaseSpace * phaseSpace()
Return phase space definition for this PDF.
virtual ~FormulaDensity()
UInt_t m_dim
Cached dimensionality of the phase space.