ROOT 6.12/07 Reference Guide |
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_t | getBinomialIntervalAsym (Int_t n, Int_t m, Double_t &a1, Double_t &a2, Double_t nSigma=1) const |
Return 'nSigma' binomial confidence interval for (n,m). More... | |
Bool_t | getBinomialIntervalEff (Int_t n, Int_t m, Double_t &a1, Double_t &a2, Double_t nSigma=1) const |
Return 'nSigma' binomial confidence interval for (n,m). More... | |
Bool_t | getInterval (const RooAbsFunc *Qu, const RooAbsFunc *Ql, Double_t pointEstimate, Double_t stepSize, Double_t &lo, Double_t &hi, Double_t nSigma) const |
Calculate a confidence interval using the cumulative functions provided. More... | |
Bool_t | getPoissonInterval (Int_t n, Double_t &mu1, Double_t &mu2, Double_t nSigma=1) const |
Return a confidence interval for the expected number of events given n observed (unweighted) events. More... | |
Static Public Member Functions | |
static RooAbsFunc * | createBinomialSum (Int_t n, Int_t m, Bool_t eff) |
Create and return a BinomialSum function binding. More... | |
static RooAbsFunc * | createPoissonSum (Int_t n) |
Create and return a PoissonSum function binding. More... | |
static const RooHistError & | instance () |
Return a reference to a singleton object that is created the first time this method is called. More... | |
Private Member Functions | |
RooHistError () | |
Construct our singleton object. More... | |
Bool_t | getPoissonIntervalCalc (Int_t n, Double_t &mu1, Double_t &mu2, Double_t nSigma=1) const |
Calculate a confidence interval for the expected number of events given n observed (unweighted) events. More... | |
Double_t | seek (const RooAbsFunc &f, Double_t startAt, Double_t step, Double_t value) const |
Scan f(x)-value until it changes sign. More... | |
Private Attributes | |
Double_t | _poissonHiLUT [1000] |
Double_t | _poissonLoLUT [1000] |
#include <RooHistError.h>
|
inlinevirtual |
Definition at line 28 of file RooHistError.h.
|
private |
Construct our singleton object.
Definition at line 59 of file RooHistError.cxx.
|
static |
Create and return a BinomialSum function binding.
Definition at line 343 of file RooHistError.cxx.
|
static |
Create and return a PoissonSum function binding.
Definition at line 334 of file RooHistError.cxx.
Bool_t RooHistError::getBinomialIntervalAsym | ( | Int_t | n, |
Int_t | m, | ||
Double_t & | asym1, | ||
Double_t & | asym2, | ||
Double_t | nSigma = 1 |
||
) | const |
Return 'nSigma' binomial confidence interval for (n,m).
The result is return in asym1 and asym2. If the return values is kFALSE and error occurred.
Definition at line 133 of file RooHistError.cxx.
Bool_t RooHistError::getBinomialIntervalEff | ( | Int_t | n, |
Int_t | m, | ||
Double_t & | asym1, | ||
Double_t & | asym2, | ||
Double_t | nSigma = 1 |
||
) | const |
Return 'nSigma' binomial confidence interval for (n,m).
The result is return in asym1 and asym2. If the return values is kFALSE and error occurred.
Definition at line 196 of file RooHistError.cxx.
Bool_t RooHistError::getInterval | ( | const RooAbsFunc * | Qu, |
const RooAbsFunc * | Ql, | ||
Double_t | pointEstimate, | ||
Double_t | stepSize, | ||
Double_t & | lo, | ||
Double_t & | hi, | ||
Double_t | 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 263 of file RooHistError.cxx.
Bool_t RooHistError::getPoissonInterval | ( | Int_t | n, |
Double_t & | mu1, | ||
Double_t & | mu2, | ||
Double_t | 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 79 of file RooHistError.cxx.
|
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 102 of file RooHistError.cxx.
|
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 49 of file RooHistError.cxx.
|
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 313 of file RooHistError.cxx.
|
private |
Definition at line 44 of file RooHistError.h.
|
private |
Definition at line 43 of file RooHistError.h.