meerkat is hosted by Hepforge, IPPP Durham
Meerkat  v1r3
Multidimensional kernel density estimation package
FactorisedDensity.hh
Go to the documentation of this file.
1 #ifndef FACTORISED_DENSITY
2 #define FACTORISED_DENSITY
3 
4 #include "AbsDensity.hh"
5 #include "AbsPhaseSpace.hh"
6 
7 #include "TMath.h"
8 
9 #include <vector>
10 
12 
13 class FactorisedDensity : public AbsDensity {
14 
15  public:
16 
18 
23  FactorisedDensity(const char* pdfName,
24  AbsPhaseSpace* thePhaseSpace,
25  std::vector<AbsDensity*> &densityComponents);
26 
28 
36  FactorisedDensity(const char* pdfName,
37  AbsPhaseSpace* thePhaseSpace,
38  AbsDensity* d1,
39  AbsDensity* d2,
40  AbsDensity* d3 = 0,
41  AbsDensity* d4 = 0);
42 
44  virtual ~FactorisedDensity();
45 
47 
51  Double_t density(std::vector<Double_t> &x);
52 
54 
58 
59  private:
60 
62 
66  void init(AbsPhaseSpace* thePhaseSpace,
67  std::vector<AbsDensity*> &densityComponents);
68 
71 
73  std::vector<AbsDensity*> m_densityComponents;
74 
76  UInt_t m_dim;
77 
78 };
79 
80 #endif
Abstract class which defines probability density interface.
Definition: AbsDensity.hh:16
AbsPhaseSpace * phaseSpace()
Return phase space definition for this PDF.
FactorisedDensity(const char *pdfName, AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents)
Constructor of factorised density of an arbitrary number of density components.
void init(AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents)
Common initialise function used by all constructors.
Abstract class which defines phase space interface.
UInt_t m_dim
Cached dimensionality of the phase space.
std::vector< AbsDensity * > m_densityComponents
Vector of density components.
AbsPhaseSpace * m_phaseSpace
Reference to phase space.
virtual ~FactorisedDensity()
Destructor.
Class that describes the factorised density: the product of densities in two or more component phase ...
Double_t density(std::vector< Double_t > &x)
Calculate PDF value at the given point.