Logo ROOT  
Reference Guide
RooStats::BernsteinCorrection Class Reference

BernsteinCorrection is a utility in RooStats to augment a nominal PDF with a polynomial correction term.

This is useful for incorporating systematic variations to the nominal PDF. The Bernstein basis polynomials are particularly appropriate because they are positive definite.

This tool was inspired by the work of Glen Cowan together with Stephan Horner, Sascha Caron, Eilam Gross, and others. The initial implementation is independent work. The major step forward in the approach was to provide a well defined algorithm that specifies the order of polynomial to be included in the correction. This is an empirical algorithm, so in addition to the nominal model it needs either a real data set or a simulated one. In the early work, the nominal model was taken to be a histogram from Monte Carlo simulations, but in this implementation it is generalized to an arbitrary PDF (which includes a RooHistPdf). The algorithm basically consists of a hypothesis test of an nth-order correction (null) against a n+1-th order correction (alternate). The quantity q = -2 log LR is used to determine whether the n+1-th order correction is a major improvement to the n-th order correction. The distribution of q is expected to be roughly \(\chi^2\) with one degree of freedom if the n-th order correction is a good model for the data. Thus, one only moves to the n+1-th order correction of q is relatively large. The chance that one moves from the n-th to the n+1-th order correction when the n-th order correction (eg. a type 1 error) is sufficient is given by the Prob( \(\chi^2_1\) > threshold). The constructor of this class allows you to directly set this tolerance (in terms of probability that the n+1-th term is added unnecessarily).

To do: Add another method to the utility that will make the sampling distribution for -2 log lambda for various m vs. m+1 order corrections using a nominal model and perhaps having two ways of generating the toys (either via a histogram or via an independent model that is supposed to reflect reality). That will allow one to make plots like Glen has at the end of his DRAFT very easily.

Definition at line 22 of file BernsteinCorrection.h.

Public Member Functions

 BernsteinCorrection (double tolerance=0.05)
 
virtual ~BernsteinCorrection ()
 
void CreateQSamplingDist (RooWorkspace *wks, const char *nominalName, const char *varName, const char *dataName, TH1F *, TH1F *, Int_t degree, Int_t nToys=500)
 Create sampling distribution for q given degree-1 vs. degree corrections. More...
 
Int_t ImportCorrectedPdf (RooWorkspace *, const char *, const char *, const char *)
 Main method for Bernstein correction. More...
 
virtual TClassIsA () const
 
void SetMaxCorrection (double maxCorr)
 
void SetMaxDegree (Int_t maxDegree)
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Private Attributes

double fMaxCorrection
 maximum correction factor at any point (default is 100) More...
 
Int_t fMaxDegree
 maximum polynomial degree correction (default is 10) More...
 
double fTolerance
 probability to add an unnecessary term More...
 

#include <RooStats/BernsteinCorrection.h>

Constructor & Destructor Documentation

◆ BernsteinCorrection()

BernsteinCorrection::BernsteinCorrection ( double  tolerance = 0.05)

Definition at line 79 of file BernsteinCorrection.cxx.

◆ ~BernsteinCorrection()

virtual RooStats::BernsteinCorrection::~BernsteinCorrection ( )
inlinevirtual

Definition at line 26 of file BernsteinCorrection.h.

Member Function Documentation

◆ Class()

static TClass * RooStats::BernsteinCorrection::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooStats::BernsteinCorrection::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t RooStats::BernsteinCorrection::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 47 of file BernsteinCorrection.h.

◆ CreateQSamplingDist()

void BernsteinCorrection::CreateQSamplingDist ( RooWorkspace wks,
const char *  nominalName,
const char *  varName,
const char *  dataName,
TH1F samplingDist,
TH1F samplingDistExtra,
Int_t  degree,
Int_t  nToys = 500 
)

Create sampling distribution for q given degree-1 vs. degree corrections.

Definition at line 203 of file BernsteinCorrection.cxx.

◆ DeclFileName()

static const char * RooStats::BernsteinCorrection::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 47 of file BernsteinCorrection.h.

◆ ImportCorrectedPdf()

Int_t BernsteinCorrection::ImportCorrectedPdf ( RooWorkspace wks,
const char *  nominalName,
const char *  varName,
const char *  dataName 
)

Main method for Bernstein correction.

Definition at line 87 of file BernsteinCorrection.cxx.

◆ IsA()

virtual TClass * RooStats::BernsteinCorrection::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Definition at line 47 of file BernsteinCorrection.h.

◆ SetMaxCorrection()

void RooStats::BernsteinCorrection::SetMaxCorrection ( double  maxCorr)
inline

Definition at line 29 of file BernsteinCorrection.h.

◆ SetMaxDegree()

void RooStats::BernsteinCorrection::SetMaxDegree ( Int_t  maxDegree)
inline

Definition at line 30 of file BernsteinCorrection.h.

◆ Streamer()

virtual void RooStats::BernsteinCorrection::Streamer ( TBuffer )
virtual

◆ StreamerNVirtual()

void RooStats::BernsteinCorrection::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 47 of file BernsteinCorrection.h.

Member Data Documentation

◆ fMaxCorrection

double RooStats::BernsteinCorrection::fMaxCorrection
private

maximum correction factor at any point (default is 100)

Definition at line 42 of file BernsteinCorrection.h.

◆ fMaxDegree

Int_t RooStats::BernsteinCorrection::fMaxDegree
private

maximum polynomial degree correction (default is 10)

Definition at line 41 of file BernsteinCorrection.h.

◆ fTolerance

double RooStats::BernsteinCorrection::fTolerance
private

probability to add an unnecessary term

Definition at line 43 of file BernsteinCorrection.h.

Libraries for RooStats::BernsteinCorrection:
[legend]

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