meerkat is hosted by Hepforge, IPPP Durham
Meerkat  v1r3
Multidimensional kernel density estimation package
HistogramDensity.hh
Go to the documentation of this file.
1 #ifndef HISTOGRAM_DENSITY
2 #define HISTOGRAM_DENSITY
3 
4 #include "AbsDensity.hh"
5 #include "AbsPhaseSpace.hh"
6 
7 #include "TH1.h"
8 
9 #include <vector>
10 
13 
14 class HistogramDensity : public AbsDensity {
15 
16  public:
17 
19 
24  HistogramDensity(const char* pdfName,
25  AbsPhaseSpace* thePhaseSpace,
26  TH1* Histogram);
27 
28  virtual ~HistogramDensity();
29 
31 
35  Double_t density(std::vector<Double_t> &x);
36 
38 
42 
43  private:
44 
47 
49  TH1* m_hist;
50 
52  UInt_t m_dim;
53 };
54 
55 #endif
56 
virtual ~HistogramDensity()
Abstract class which defines probability density interface.
Definition: AbsDensity.hh:16
AbsPhaseSpace * phaseSpace()
Return phase space definition for this PDF.
Abstract class which defines phase space interface.
TH1 * m_hist
ROOT Histogram.
Double_t density(std::vector< Double_t > &x)
Calculate PDF value at the given point.
HistogramDensity(const char *pdfName, AbsPhaseSpace *thePhaseSpace, TH1 *Histogram)
Constructor.
AbsPhaseSpace * m_phaseSpace
Reference to phase space.
UInt_t m_dim
Cached dimensionality of the phase space.