laura is hosted by Hepforge, IPPP Durham
Laura++  v1r1p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class for defining a PDF that is the sum of two other PDFs. More...

#include <LauSumPdf.hh>

Inheritance diagram for LauSumPdf:
LauAbsPdf

Public Member Functions

 LauSumPdf (LauAbsPdf *pdf1, LauAbsPdf *pdf2, LauParameter *frac1)
 Constructor. More...
 
virtual ~LauSumPdf ()
 Destructor. More...
 
 LauSumPdf (const LauSumPdf &other)
 Copy constructor. More...
 
UInt_t nInputVars () const
 Returns the number of input variables. More...
 
virtual Bool_t isDPDependent () const
 Boolean for the DP dependence of PDFs in the sum. More...
 
virtual void cacheInfo (const LauFitDataTree &inputData)
 Cache information from data. More...
 
virtual void calcLikelihoodInfo (const LauAbscissas &abscissas)
 Calculate the likelihood (and intermediate info) for a given abscissa. More...
 
virtual void calcLikelihoodInfo (UInt_t iEvt)
 Calculate the likelihood (and intermediate info) for a given event number. More...
 
virtual void checkPositiveness ()
 Check that PDF is positive. More...
 
virtual void calcNorm ()
 Calculate the normalisation. More...
 
virtual void calcPDFHeight (const LauKinematics *kinematics)
 Calculate the PDF height. More...
 
- Public Member Functions inherited from LauAbsPdf
 LauAbsPdf (const TString &theVarName, const std::vector< LauParameter * > &params, Double_t minAbscissa, Double_t maxAbscissa)
 Constructor for a 1D PDF. More...
 
 LauAbsPdf (const std::vector< TString > &theVarNames, const std::vector< LauParameter * > &params, const LauFitData &minAbscissas, const LauFitData &maxAbscissas)
 Constructor for a multidimensional PDF. More...
 
virtual ~LauAbsPdf ()
 Destructor. More...
 
virtual const TString & varName () const
 Retrieve the name of the abscissa. More...
 
virtual std::vector< TString > varNames () const
 Retrieve the names of the abscissas. More...
 
virtual UInt_t nParameters () const
 Retrieve the number of PDF parameters. More...
 
virtual UInt_t nFixedParameters () const
 Retrieve the number of fixed PDF parameters. More...
 
virtual Double_t getParValue (const TString &parName) const
 Retrieve the value of the specified parameter. More...
 
virtual Double_t getParMin (const TString &parName) const
 Retrieve the minimum value of the specified parameter. More...
 
virtual Double_t getParMax (const TString &parName) const
 Retrieve the maximum value of the specified parameter. More...
 
virtual Double_t getParRange (const TString &parName) const
 Retrieve the range of the specified parameter. More...
 
virtual Bool_t parFixed (const TString &parName) const
 Retrieve whether the specified parameter is fixed. More...
 
virtual Bool_t parClone (const TString &parName) const
 Retrieve whether the specified parameter is a clone. More...
 
virtual Double_t getMinAbscissa () const
 Retrieve the minimum value of the (primary) abscissa. More...
 
virtual Double_t getMaxAbscissa () const
 Retrieve the maximum value of the (primary) abscissa. More...
 
virtual Double_t getRange () const
 Retrieve the range of the (primary) abscissa. More...
 
virtual Double_t getMinAbscissa (const TString &theVarName) const
 Retrieve the minimum value of the specified abscissa. More...
 
virtual Double_t getMaxAbscissa (const TString &theVarName) const
 Retrieve the maximum value of the specified abscissa. More...
 
virtual Double_t getRange (const TString &theVarName) const
 Retrieve the range of the specified abscissa. More...
 
virtual LauFitData getMinAbscissas () const
 Retrieve the minimum values of all the abscissas. More...
 
virtual LauFitData getMaxAbscissas () const
 Retrieve the maximum values of all the abscissas. More...
 
virtual LauFitData getRanges () const
 Retrieve the ranges of all the abscissas. More...
 
virtual void setParValue (const TString &parName, Double_t value)
 Change the value of the specified parameter. More...
 
virtual void setParMin (const TString &parName, Double_t minValue)
 Change the minimum value of the specified parameter. More...
 
virtual void setParMax (const TString &parName, Double_t maxValue)
 Change the maximum value of the specified parameter. More...
 
virtual void setParRange (const TString &parName, Double_t minValue, Double_t maxValue)
 Change the range of the specified parameter. More...
 
virtual void fixPar (const TString &parName)
 Fix the specified parameter. More...
 
virtual void floatPar (const TString &parName)
 Float the specified parameter. More...
 
virtual void updatePulls ()
 Update the pulls for all parameters. More...
 
virtual Double_t getUnNormLikelihood () const
 Retrieve the unnormalised likelihood value. More...
 
virtual Double_t getNorm () const
 Retrieve the normalisation factor. More...
 
virtual Double_t getLikelihood () const
 Retrieve the normalised likelihood value. More...
 
virtual Double_t getLikelihood (const TString &theVarName) const
 For multidimentional PDFs, retrieve the normalised likelihood value of a named variable. More...
 
virtual Double_t getMaxHeight () const
 Retrieve the maximum height. More...
 
virtual LauFitData generate (const LauKinematics *kinematics)
 Generate an event from the PDF. More...
 
virtual void setRandomFun (TRandom *randomFun)
 Set the random function used for toy MC generation. More...
 
virtual const std::vector
< LauParameter * > & 
getParameters () const
 Retrieve the parameters of the PDF, e.g. so that they can be loaded into a fit. More...
 
virtual std::vector
< LauParameter * > & 
getParameters ()
 Retrieve the parameters of the PDF, e.g. so that they can be loaded into a fit. More...
 
virtual Bool_t heightUpToDate () const
 Check if the maximum height of the PDF is up to date. More...
 
virtual Bool_t cachePDF () const
 Check if the PDF is to be cached. More...
 
virtual Int_t nNormPoints () const
 Retrieve the number of points to integrate over when normalising. More...
 
virtual void nNormPoints (Int_t nPoints)
 Set the number of points to integrate over when normalising. More...
 
virtual IntMethod integMethod () const
 Retrieve the integration method used to normalise the PDF. More...
 
virtual void integMethod (IntMethod method)
 Set the integration method used to normalise the PDF. More...
 

Private Attributes

LauAbsPdfpdf1_
 First PDF. More...
 
LauAbsPdfpdf2_
 Second PDF. More...
 
LauParameterfrac_
 Fractional contribution of first PDF to the final PDF. More...
 

Additional Inherited Members

- Public Types inherited from LauAbsPdf
enum  IntMethod { GaussLegendre, Trapezoid }
 The possible numerical intergration methods. More...
 
typedef std::vector< Double_t > LauAbscissas
 The type used for containing multiple abscissa values. More...
 
- Protected Member Functions inherited from LauAbsPdf
virtual void cachePDF (Bool_t doCachePDF)
 Set whether the PDF is to be cached. More...
 
virtual void heightUpToDate (Bool_t hutd)
 Set whether the height is up to date. More...
 
virtual Double_t integrGaussLegendre ()
 Integrate the PDF using the Gauss-Legendre method. More...
 
virtual Double_t integTrapezoid ()
 Integrate the PDF using the simple trapezoid method. More...
 
virtual void setNorm (Double_t norm)
 Set the normalisation factor. More...
 
virtual void setMaxHeight (Double_t maxHeight)
 Set the maximum height. More...
 
virtual void setMinAbscissa (const TString &theVarName, Double_t minAbscissa)
 Set the minimum value of the specified abscissa. More...
 
virtual void setMaxAbscissa (const TString &theVarName, Double_t maxAbscissa)
 Set the maximum value of the specified abscissa. More...
 
virtual void setRange (const TString &theVarName, Double_t minAbscissa, Double_t maxAbscissa)
 Set the range of the specified abscissa. More...
 
virtual Bool_t checkRange (const LauAbscissas &abscissas) const
 Check that all abscissas are within their allowed ranges. More...
 
virtual void setUnNormPDFVal (Double_t unNormPDFVal)
 Set the unnormalised likelihood. More...
 
virtual LauParameterfindParameter (const TString &parName)
 Retrieve the specified parameter. More...
 
virtual const LauParameterfindParameter (const TString &parName) const
 Retrieve the specified parameter. More...
 
virtual TRandom * getRandomFun () const
 Retrieve the random function used for MC generation. More...
 
virtual std::vector
< LauAbscissas > & 
getAbscissas ()
 Retrieve the abscissa(s) More...
 
virtual const std::vector
< LauAbscissas > & 
getAbscissas () const
 Retrieve the abscissa(s) More...
 
virtual std::vector< Double_t > & getUnNormPDFValues ()
 Retrieve the cached unnormalised likelihood values. More...
 
virtual const std::vector
< Double_t > & 
getUnNormPDFValues () const
 Retrieve the cached unnormalised likelihood values. More...
 
virtual void addParameters (std::vector< LauParameter * > &params)
 Add parameters to the PDF. More...
 
virtual Bool_t withinNormCalc () const
 Check whether the calcNorm method is running. More...
 
virtual void withinNormCalc (Bool_t yorn)
 Set flag to track whether the calcNorm method is running. More...
 
virtual Bool_t withinGeneration () const
 Check whether the generate method is running. More...
 
virtual void withinGeneration (Bool_t yorn)
 Set flag to track whether the generate method is running. More...
 
virtual Bool_t normWeightsDone () const
 Check whether the normalisation weights have been calculated. More...
 
virtual void normWeightsDone (Bool_t yorn)
 Set whether the normalisation weights have been calculated. More...
 
virtual void getNormWeights ()
 Calculate the weights and abscissas used for normalisation. More...
 
virtual const std::vector
< LauAbscissas > & 
normAbscissas () const
 Retrieve the abscissa points used for normalisation. More...
 
virtual const std::vector
< Double_t > & 
normWeights () const
 Retrieve the weights used for normalisation. More...
 

Detailed Description

Class for defining a PDF that is the sum of two other PDFs.

Class that allows the user to define PDF that is the sum of two other PDFs. The relative fraction of the two PDFs is user-defined and can be a free parameter.

Definition at line 32 of file LauSumPdf.hh.

Constructor & Destructor Documentation

LauSumPdf::LauSumPdf ( LauAbsPdf pdf1,
LauAbsPdf pdf2,
LauParameter frac1 
)

Constructor.

Parameters
[in]pdf1the first PDF
[in]pdf2the second PDF
[in]frac1the fractional contribution of the first PDF to the final PDF

Definition at line 28 of file LauSumPdf.cc.

LauSumPdf::~LauSumPdf ( )
virtual

Destructor.

Definition at line 98 of file LauSumPdf.cc.

LauSumPdf::LauSumPdf ( const LauSumPdf other)

Copy constructor.

Definition at line 103 of file LauSumPdf.cc.

Member Function Documentation

void LauSumPdf::cacheInfo ( const LauFitDataTree inputData)
virtual

Cache information from data.

Parameters
[in]inputDatathe input data

Reimplemented from LauAbsPdf.

Definition at line 183 of file LauSumPdf.cc.

void LauSumPdf::calcLikelihoodInfo ( const LauAbscissas abscissas)
virtual

Calculate the likelihood (and intermediate info) for a given abscissa.

Parameters
[in]abscissasthe values of the abscissa(s)

Implements LauAbsPdf.

Definition at line 112 of file LauSumPdf.cc.

void LauSumPdf::calcLikelihoodInfo ( UInt_t  iEvt)
virtual

Calculate the likelihood (and intermediate info) for a given event number.

Parameters
[in]iEvtevent number

Reimplemented from LauAbsPdf.

Definition at line 197 of file LauSumPdf.cc.

void LauSumPdf::calcNorm ( )
virtual

Calculate the normalisation.

Reimplemented from LauAbsPdf.

Definition at line 133 of file LauSumPdf.cc.

void LauSumPdf::calcPDFHeight ( const LauKinematics kinematics)
virtual

Calculate the PDF height.

Parameters
[in]kinematicsthe current DP kinematics

Implements LauAbsPdf.

Definition at line 139 of file LauSumPdf.cc.

void LauSumPdf::checkPositiveness ( )
virtual

Check that PDF is positive.

Implements LauAbsPdf.

Definition at line 174 of file LauSumPdf.cc.

virtual Bool_t LauSumPdf::isDPDependent ( ) const
inlinevirtual

Boolean for the DP dependence of PDFs in the sum.

Returns
DP dependence of PDF

Reimplemented from LauAbsPdf.

Definition at line 59 of file LauSumPdf.hh.

UInt_t LauSumPdf::nInputVars ( ) const
inlinevirtual

Returns the number of input variables.

Returns
the number of input variables

Reimplemented from LauAbsPdf.

Definition at line 53 of file LauSumPdf.hh.

Member Data Documentation

LauParameter* LauSumPdf::frac_
private

Fractional contribution of first PDF to the final PDF.

Definition at line 101 of file LauSumPdf.hh.

LauAbsPdf* LauSumPdf::pdf1_
private

First PDF.

Definition at line 95 of file LauSumPdf.hh.

LauAbsPdf* LauSumPdf::pdf2_
private

Second PDF.

Definition at line 98 of file LauSumPdf.hh.


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