Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooHistError Class Reference

Singleton class used to calculate the error bars for each bin of a RooHist object.

Errors are calculated by integrating a specified area of a Poisson or Binomail error distribution.

Definition at line 25 of file RooHistError.h.

Classes

class  BinomialSumAsym
 
class  BinomialSumEff
 
class  PoissonSum
 

Public Member Functions

virtual ~RooHistError ()
 
bool getBinomialIntervalAsym (Int_t n, Int_t m, double &a1, double &a2, double nSigma=1) const
 Return 'nSigma' binomial confidence interval for (n,m).
 
bool getBinomialIntervalEff (Int_t n, Int_t m, double &a1, double &a2, double nSigma=1) const
 Return 'nSigma' binomial confidence interval for (n,m).
 
bool getInterval (const RooAbsFunc *Qu, const RooAbsFunc *Ql, double pointEstimate, double stepSize, double &lo, double &hi, double nSigma) const
 Calculate a confidence interval using the cumulative functions provided.
 
bool getPoissonInterval (Int_t n, double &mu1, double &mu2, double nSigma=1) const
 Return a confidence interval for the expected number of events given n observed (unweighted) events.
 

Static Public Member Functions

static RooAbsFunccreateBinomialSum (Int_t n, Int_t m, bool eff)
 Create and return a BinomialSum function binding.
 
static RooAbsFunccreatePoissonSum (Int_t n)
 Create and return a PoissonSum function binding.
 
static const RooHistErrorinstance ()
 Return a reference to a singleton object that is created the first time this method is called.
 

Private Member Functions

 RooHistError ()
 Construct our singleton object.
 
bool getPoissonIntervalCalc (Int_t n, double &mu1, double &mu2, double nSigma=1) const
 Calculate a confidence interval for the expected number of events given n observed (unweighted) events.
 
double seek (const RooAbsFunc &f, double startAt, double step, double value) const
 Scan f(x)-value until it changes sign.
 

Private Attributes

double _poissonHiLUT [1000]
 
double _poissonLoLUT [1000]
 

#include <RooHistError.h>

Constructor & Destructor Documentation

◆ ~RooHistError()

virtual RooHistError::~RooHistError ( )
inlinevirtual

Definition at line 28 of file RooHistError.h.

◆ RooHistError()

RooHistError::RooHistError ( )
private

Construct our singleton object.

Definition at line 53 of file RooHistError.cxx.

Member Function Documentation

◆ createBinomialSum()

RooAbsFunc * RooHistError::createBinomialSum ( Int_t  n,
Int_t  m,
bool  eff 
)
static

Create and return a BinomialSum function binding.

Definition at line 341 of file RooHistError.cxx.

◆ createPoissonSum()

RooAbsFunc * RooHistError::createPoissonSum ( Int_t  n)
static

Create and return a PoissonSum function binding.

Definition at line 332 of file RooHistError.cxx.

◆ getBinomialIntervalAsym()

bool RooHistError::getBinomialIntervalAsym ( Int_t  n,
Int_t  m,
double asym1,
double asym2,
double  nSigma = 1 
) const

Return 'nSigma' binomial confidence interval for (n,m).

The result is return in asym1 and asym2. If the return values is false and error occurred.

Definition at line 127 of file RooHistError.cxx.

◆ getBinomialIntervalEff()

bool RooHistError::getBinomialIntervalEff ( Int_t  n,
Int_t  m,
double asym1,
double asym2,
double  nSigma = 1 
) const

Return 'nSigma' binomial confidence interval for (n,m).

The result is return in asym1 and asym2. If the return values is false and error occurred.

Definition at line 190 of file RooHistError.cxx.

◆ getInterval()

bool RooHistError::getInterval ( const RooAbsFunc Qu,
const RooAbsFunc Ql,
double  pointEstimate,
double  stepSize,
double lo,
double hi,
double  nSigma 
) const

Calculate a confidence interval using the cumulative functions provided.

The interval will be "central" when both cumulative functions are provided, unless this would exclude the pointEstimate, in which case a one-sided interval pinned at the point estimate is returned instead.

Definition at line 257 of file RooHistError.cxx.

◆ getPoissonInterval()

bool RooHistError::getPoissonInterval ( Int_t  n,
double mu1,
double mu2,
double  nSigma = 1 
) const

Return a confidence interval for the expected number of events given n observed (unweighted) events.

The interval will contain the same probability as nSigma of a Gaussian. Uses a central interval unless this does not enclose the point estimate n (ie, for small n) in which case the interval is adjusted to start at n. This method uses a lookup table to return precalculated results for n<1000

Definition at line 73 of file RooHistError.cxx.

◆ getPoissonIntervalCalc()

bool RooHistError::getPoissonIntervalCalc ( Int_t  n,
double mu1,
double mu2,
double  nSigma = 1 
) const
private

Calculate a confidence interval for the expected number of events given n observed (unweighted) events.

The interval will contain the same probability as nSigma of a Gaussian. Uses a central interval unless this does not enclose the point estimate n (ie, for small n) in which case the interval is adjusted to start at n.

Definition at line 96 of file RooHistError.cxx.

◆ instance()

const RooHistError & RooHistError::instance ( )
static

Return a reference to a singleton object that is created the first time this method is called.

Only one object will be constructed per ROOT session.

Definition at line 43 of file RooHistError.cxx.

◆ seek()

double RooHistError::seek ( const RooAbsFunc f,
double  startAt,
double  step,
double  value 
) const
private

Scan f(x)-value until it changes sign.

Start at the specified point and take constant steps of the specified size. Give up after 1000 steps.

Definition at line 309 of file RooHistError.cxx.

Member Data Documentation

◆ _poissonHiLUT

double RooHistError::_poissonHiLUT[1000]
private

Definition at line 44 of file RooHistError.h.

◆ _poissonLoLUT

double RooHistError::_poissonLoLUT[1000]
private

Definition at line 43 of file RooHistError.h.

Libraries for RooHistError:

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