meerkat is hosted by Hepforge, IPPP Durham
Meerkat  v1r3
Multidimensional kernel density estimation package
ProductDensity.hh
Go to the documentation of this file.
1 #ifndef PRODUCT_DENSITY
2 #define PRODUCT_DENSITY
3 
4 #include "AbsDensity.hh"
5 #include "AbsPhaseSpace.hh"
6 
7 #include "TMath.h"
8 
9 #include <vector>
10 
12 
13 class ProductDensity : public AbsDensity {
14 
15  public:
16 
18 
23  ProductDensity(const char* pdfName,
24  AbsPhaseSpace* thePhaseSpace,
25  std::vector<AbsDensity*> &densityComponents);
26 
28 
36  ProductDensity(const char* pdfName,
37  AbsPhaseSpace* thePhaseSpace,
38  AbsDensity* d1,
39  AbsDensity* d2,
40  AbsDensity* d3 = 0,
41  AbsDensity* d4 = 0);
42 
44  virtual ~ProductDensity();
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
UInt_t m_dim
Cached dimensionality of the phase space.
Abstract class which defines probability density interface.
Definition: AbsDensity.hh:16
AbsPhaseSpace * phaseSpace()
Return phase space definition for this PDF.
Double_t density(std::vector< Double_t > &x)
Calculate PDF value at the given point.
Abstract class which defines phase space interface.
ProductDensity(const char *pdfName, AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents)
Constructor of Product density of an arbitrary number of density components.
Class that describes the product density: the product of two or more densities in the same phase spac...
void init(AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents)
Common initialise function used by all constructors.
std::vector< AbsDensity * > m_densityComponents
Vector of density components.
virtual ~ProductDensity()
Destructor.
AbsPhaseSpace * m_phaseSpace
Reference to phase space.