Meerkat is hosted by Hepforge, IPPP Durham
Meerkat  v1r3
Multidimensional kernel density estimation package

Class that describes the factorised density: the product of densities in two or more component phase spaces. More...

#include <FactorisedDensity.hh>

Inheritance diagram for FactorisedDensity:
AbsDensity

Public Member Functions

 FactorisedDensity (const char *pdfName, AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents)
 Constructor of factorised density of an arbitrary number of density components. More...
 
 FactorisedDensity (const char *pdfName, AbsPhaseSpace *thePhaseSpace, AbsDensity *d1, AbsDensity *d2, AbsDensity *d3=0, AbsDensity *d4=0)
 Constructor of factorised density of up to four density components. More...
 
virtual ~FactorisedDensity ()
 Destructor. More...
 
Double_t density (std::vector< Double_t > &x)
 Calculate PDF value at the given point. More...
 
AbsPhaseSpacephaseSpace ()
 Return phase space definition for this PDF. More...
 
- Public Member Functions inherited from AbsDensity
 AbsDensity (const char *pdfName)
 Constructor. More...
 
virtual ~AbsDensity ()
 Destructor. More...
 
void slice (std::vector< Double_t > &x, UInt_t num, TH1F *hist)
 Calculate 1D slice of the PDF. More...
 
void slice (std::vector< Double_t > &x, UInt_t numx, UInt_t numy, TH2F *hist, Bool_t inPhaseSpace=true)
 Calculate 2D slice of the PDF. More...
 
double transform (TH1F *hist1, TH1F *hist2, double x)
 
void project (TH1F *hist)
 Calculate projection of the 1D PDF. More...
 
void project (TH2F *hist, Bool_t inPhaseSpace=true)
 Calculate projection of the 2D PDF. More...
 
void setMajorant (Double_t majorant)
 Set majorant for accept-reject method. More...
 
void setMaxTries (UInt_t maxTries)
 Set maximum number of tries for accept-reject method. More...
 
Double_t generate (std::vector< Double_t > &x)
 Generate a single point within the phase space according to the PDF using accept-reject method. More...
 
void generate (TNtuple *tree, UInt_t numEvents)
 Generate a sample of points within the phase space according to the PDF using accept-reject method. More...
 
const char * name (void)
 Return the name of the PDF. More...
 
void setSeed (UInt_t seed=0)
 Set random seed. More...
 

Private Member Functions

void init (AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents)
 Common initialise function used by all constructors. More...
 

Private Attributes

AbsPhaseSpacem_phaseSpace
 Reference to phase space. More...
 
std::vector< AbsDensity * > m_densityComponents
 Vector of density components. More...
 
UInt_t m_dim
 Cached dimensionality of the phase space. More...
 

Additional Inherited Members

- Protected Attributes inherited from AbsDensity
char m_name [256]
 PDF name. More...
 
Double_t m_majorant
 PDF majorant (maximum PDF value needed for accept-reject). More...
 
UInt_t m_maxTries
 Maximum number of tries for accept-reject method. More...
 
TRandom3 m_rnd
 Random number generator. More...
 

Detailed Description

Class that describes the factorised density: the product of densities in two or more component phase spaces.

Definition at line 13 of file FactorisedDensity.hh.

Constructor & Destructor Documentation

FactorisedDensity::FactorisedDensity ( const char *  pdfName,
AbsPhaseSpace thePhaseSpace,
std::vector< AbsDensity * > &  densityComponents 
)

Constructor of factorised density of an arbitrary number of density components.

Parameters
[in]pdfNamePDF name
[in]thePhaseSpacephase space. Dimensionality of the phase space should be equal to the sum of dimensionalities of all density components.
[in]densityComponentsvector of density components.

Definition at line 13 of file FactorisedDensity.cpp.

FactorisedDensity::FactorisedDensity ( const char *  pdfName,
AbsPhaseSpace thePhaseSpace,
AbsDensity d1,
AbsDensity d2,
AbsDensity d3 = 0,
AbsDensity d4 = 0 
)

Constructor of factorised density of up to four density components.

Parameters
[in]pdfNamePDF name
[in]thePhaseSpacephase space. Dimensionality of the phase space should be equal to the sum of dimensionalities of all density components.
[in]d11st density component.
[in]d22nd density component.
[in]d33rd density component.
[in]d44th density component.

Definition at line 20 of file FactorisedDensity.cpp.

FactorisedDensity::~FactorisedDensity ( )
virtual

Destructor.

Definition at line 37 of file FactorisedDensity.cpp.

Member Function Documentation

Double_t FactorisedDensity::density ( std::vector< Double_t > &  x)
virtual

Calculate PDF value at the given point.

Parameters
[in]xthe point at which to calculate the PDF
Returns
PDF value

Implements AbsDensity.

Definition at line 63 of file FactorisedDensity.cpp.

void FactorisedDensity::init ( AbsPhaseSpace thePhaseSpace,
std::vector< AbsDensity * > &  densityComponents 
)
private

Common initialise function used by all constructors.

Parameters
[in]thePhaseSpacephase space
[in]densityComponentsvector of density components.

Definition at line 41 of file FactorisedDensity.cpp.

AbsPhaseSpace* FactorisedDensity::phaseSpace ( )
inlinevirtual

Return phase space definition for this PDF.

Returns
PDF phase space

Implements AbsDensity.

Definition at line 57 of file FactorisedDensity.hh.

Member Data Documentation

std::vector<AbsDensity*> FactorisedDensity::m_densityComponents
private

Vector of density components.

Definition at line 73 of file FactorisedDensity.hh.

UInt_t FactorisedDensity::m_dim
private

Cached dimensionality of the phase space.

Definition at line 76 of file FactorisedDensity.hh.

AbsPhaseSpace* FactorisedDensity::m_phaseSpace
private

Reference to phase space.

Definition at line 70 of file FactorisedDensity.hh.


The documentation for this class was generated from the following files: