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

RooHistError is a 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.
 
virtual TClassIsA () const
 
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 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 char * DeclFileName ()
 
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 57 of file RooHistError.cxx.

Member Function Documentation

◆ Class()

static TClass * RooHistError::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

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

◆ Class_Version()

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

Definition at line 134 of file RooHistError.h.

◆ 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.

◆ DeclFileName()

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

Definition at line 134 of file RooHistError.h.

◆ 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 131 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 194 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 261 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 77 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 100 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 47 of file RooHistError.cxx.

◆ IsA()

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

Definition at line 134 of file RooHistError.h.

◆ 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 311 of file RooHistError.cxx.

◆ Streamer()

virtual void RooHistError::Streamer ( TBuffer )
virtual

◆ StreamerNVirtual()

void RooHistError::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 134 of file RooHistError.h.

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: