|
Meerkat
v1r3
Multidimensional kernel density estimation package
|
Class that describes the sum density: the sum of two or more densities in the same phase spaces with optional weights.
More...
#include <SumDensity.hh>
|
| SumDensity (const char *pdfName, AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents, std::vector< Double_t > &weights) |
| Constructor of Sum density of an arbitrary number of density components. More...
|
|
| SumDensity (const char *pdfName, AbsPhaseSpace *thePhaseSpace, AbsDensity *d1, AbsDensity *d2, Double_t w1=1., Double_t w2=1.) |
| Constructor of Sum density of up to four density components. More...
|
|
| SumDensity (const char *pdfName, AbsPhaseSpace *thePhaseSpace, AbsDensity *d1, AbsDensity *d2, AbsDensity *d3, Double_t w1=1., Double_t w2=1., Double_t w3=1.) |
| Constructor of Sum density of up to four density components. More...
|
|
| SumDensity (const char *pdfName, AbsPhaseSpace *thePhaseSpace, AbsDensity *d1, AbsDensity *d2, AbsDensity *d3, AbsDensity *d4, Double_t w1=1., Double_t w2=1., Double_t w3=1., Double_t w4=1.) |
| Constructor of Sum density of up to four density components. More...
|
|
virtual | ~SumDensity () |
| Destructor. More...
|
|
Double_t | density (std::vector< Double_t > &x) |
| Calculate PDF value at the given point. More...
|
|
AbsPhaseSpace * | phaseSpace () |
| Return phase space definition for this PDF. More...
|
|
| 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...
|
|
|
void | init (AbsPhaseSpace *thePhaseSpace, std::vector< AbsDensity * > &densityComponents, std::vector< Double_t > &weights) |
| Common initialise function used by all constructors. More...
|
|
Class that describes the sum density: the sum of two or more densities in the same phase spaces with optional weights.
Definition at line 13 of file SumDensity.hh.
SumDensity::SumDensity |
( |
const char * |
pdfName, |
|
|
AbsPhaseSpace * |
thePhaseSpace, |
|
|
std::vector< AbsDensity * > & |
densityComponents, |
|
|
std::vector< Double_t > & |
weights |
|
) |
| |
Constructor of Sum density of an arbitrary number of density components.
- Parameters
-
[in] | pdfName | PDF name |
[in] | thePhaseSpace | phase space. Dimensionality of the phase space should be equal to the ones of all density components. |
[in] | densityComponents | vector of density components. |
[in] | weights | vector of weights |
Definition at line 13 of file SumDensity.cpp.
Constructor of Sum density of up to four density components.
- Parameters
-
[in] | pdfName | PDF name |
[in] | thePhaseSpace | phase space. Dimensionality of the phase space should be equal to the ones of all density components. |
[in] | d1 | 1st density component. |
[in] | d2 | 2nd density component. |
[in] | w1 | 1rd density component weight. |
[in] | w2 | 2th density component weight. |
Definition at line 21 of file SumDensity.cpp.
Constructor of Sum density of up to four density components.
- Parameters
-
[in] | pdfName | PDF name |
[in] | thePhaseSpace | phase space. Dimensionality of the phase space should be equal to the ones of all density components. |
[in] | d1 | 1st density component. |
[in] | d2 | 2nd density component. |
[in] | d3 | 2nd density component. |
[in] | w1 | 1rd density component weight. |
[in] | w2 | 2th density component weight. |
[in] | w3 | 2th density component weight. |
Definition at line 37 of file SumDensity.cpp.
Constructor of Sum density of up to four density components.
- Parameters
-
[in] | pdfName | PDF name |
[in] | thePhaseSpace | phase space. Dimensionality of the phase space should be equal to the ones of all density components. |
[in] | d1 | 1st density component. |
[in] | d2 | 2nd density component. |
[in] | d3 | 2nd density component. |
[in] | d4 | 2nd density component. |
[in] | w1 | 1rd density component weight. |
[in] | w2 | 2th density component weight. |
[in] | w3 | 2th density component weight. |
[in] | w4 | 2th density component weight. |
Definition at line 55 of file SumDensity.cpp.
SumDensity::~SumDensity |
( |
| ) |
|
|
virtual |
Double_t SumDensity::density |
( |
std::vector< Double_t > & |
x | ) |
|
|
virtual |
Calculate PDF value at the given point.
- Parameters
-
[in] | x | the point at which to calculate the PDF |
- Returns
- PDF value
Implements AbsDensity.
Definition at line 107 of file SumDensity.cpp.
void SumDensity::init |
( |
AbsPhaseSpace * |
thePhaseSpace, |
|
|
std::vector< AbsDensity * > & |
densityComponents, |
|
|
std::vector< Double_t > & |
weights |
|
) |
| |
|
private |
Common initialise function used by all constructors.
- Parameters
-
[in] | thePhaseSpace | phase space |
[in] | densityComponents | vector of density components. |
[in] | weights | vector of weights |
Definition at line 79 of file SumDensity.cpp.
Return phase space definition for this PDF.
- Returns
- PDF phase space
Implements AbsDensity.
Definition at line 103 of file SumDensity.hh.
std::vector<AbsDensity*> SumDensity::m_densityComponents |
|
private |
Cached dimensionality of the phase space.
Definition at line 127 of file SumDensity.hh.
std::vector<Double_t> SumDensity::m_weights |
|
private |
Vector of density component weights.
Definition at line 124 of file SumDensity.hh.
The documentation for this class was generated from the following files:
|