A class to represent the prior of a parameter by a formula through a TF1. More...

#include <BCTF1Prior.h>

Inheritance diagram for BCTF1Prior:
[legend]
Collaboration diagram for BCTF1Prior:
[legend]

Public Member Functions

Constructor & Destructor
 BCTF1Prior (TF1 &f)
 Constructor taking TF1.
 
 BCTF1Prior (const std::string &formula, double xmin, double xmax)
 Constructor with formula and limits. More...
 
virtual ~BCTF1Prior ()
 Destrcutor.
 
Functions overloaded from BCPrior
virtual BCPriorClone () const
 Clone function.
 
virtual bool IsValid () const
 
virtual double GetPrior (double x, bool normalize=false)
 Get prior. More...
 
virtual double GetLogPrior (double x)
 Get prior. More...
 
- Public Member Functions inherited from BCPrior
 BCPrior ()
 Empty constructor.
 
 BCPrior (const BCPrior &other)
 Copy constructor.
 
virtual ~BCPrior ()
 Destructor.
 
virtual double GetLogNormalizedPrior (double x)
 Get log of normalized prior. More...
 
virtual TF1 & GetFunction ()
 Return back ROOT TF1 evaluating BCPrior::GetPrior.
 
virtual const TF1 & GetFunction () const
 Return back ROOT TF1 evaluating BCPrior::GetPrior.
 
virtual void SetFunctionRange (double xmin, double xmax)
 Set range of ROOT TF1 function. More...
 
virtual double GetMode (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Return mode of prior (in range). More...
 
virtual double GetRawMoment (unsigned n, double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get raw moment of prior distrubion. More...
 
virtual double GetIntegral (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get integral of prior. More...
 
virtual double GetCentralMoment (unsigned n, double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get central moment of prior distrubion. More...
 
virtual double GetStandardizedMoment (unsigned n, double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get standardised moment of prior distrubion. More...
 
virtual double GetMean (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get mean of prior. More...
 
virtual double GetVariance (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get variance of prior. More...
 
virtual double GetStandardDeviation (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get standard deviation of prior. More...
 
virtual double GetSkewness (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get skewness of prior. More...
 
virtual double GetKurtosis (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Get kurtosis of prior. More...
 
virtual double GetRandomValue (double xmin, double xmax, TRandom *const R=NULL)
 
virtual double GetPriorForROOT (double *x, double *)
 For accessing prior as ROOT TF1.
 
virtual double GetNormalizedPriorForROOT (double *x, double *)
 For accessing normalized prior as ROOT TF1.
 
virtual double GetLogPriorForROOT (double *x, double *)
 For accessing log(prior) as ROOT TF1.
 
virtual double GetNormalizedLogPriorForROOT (double *x, double *)
 For accessing normalized log(prior) as ROOT TF1.
 
virtual double CalculateAndStoreIntegral (double xmin=-std::numeric_limits< double >::infinity(), double xmax=std::numeric_limits< double >::infinity())
 Calculate and store integral for use in normalized TF1s.
 
virtual void StoreIntegral (double I)
 Store integral;.
 
virtual void StoreLogIntegral (double logI)
 Store log(integral);.
 
virtual double GetStoredIntegral () const
 Get stored integral. More...
 
virtual double GetStoredLogIntegral () const
 Get stored integral. More...
 
virtual void FillHistogramByCenterValue (TH1 *h)
 Fill histogram by prior evaluated at bin center. More...
 
virtual void FillHistogramByIntegral (TH1 *h)
 Fill histogram by integrating prior over bin and dividing by bin width. More...
 
virtual BCH1D GetBCH1D (TH1 *bins, const std::string &name="prior")
 Get BCH1D object for prior. More...
 
virtual BCH2D GetBCH2D (BCPrior *ordinate, TH2 *bins, const std::string &name="prior")
 Get BCH2D object for prior. More...
 

Additional Inherited Members

- Protected Attributes inherited from BCPrior
double fLogIntegral
 Log of integral of unnormalized pdf over the range.
 
TF1 fPriorFunction
 

Detailed Description

A class to represent the prior of a parameter by a formula through a TF1.

Author
Daniel Greenwald
Version
1.0
Date
01.2015

Definition at line 32 of file BCTF1Prior.h.

Constructor & Destructor Documentation

BCTF1Prior::BCTF1Prior ( const std::string &  formula,
double  xmin,
double  xmax 
)

Constructor with formula and limits.

Definition at line 23 of file BCTF1Prior.cxx.

Member Function Documentation

virtual double BCTF1Prior::GetLogPrior ( double  x)
inlinevirtual

Get prior.

Parameters
xvalue to evaluate log(prior) at
Returns
log(prior)

Implements BCPrior.

Definition at line 73 of file BCTF1Prior.h.

virtual double BCTF1Prior::GetPrior ( double  x,
bool  normalize = false 
)
inlinevirtual

Get prior.

Parameters
xvalue to evaluate prior at
normalizeWhether to normalize prior with stored integral
Returns
prior

Reimplemented from BCPrior.

Definition at line 66 of file BCTF1Prior.h.

virtual bool BCTF1Prior::IsValid ( ) const
inlinevirtual
Returns
Whether everything needed for prior is set and prior can be used.

Implements BCPrior.

Definition at line 58 of file BCTF1Prior.h.


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