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. | |
Static Public Member Functions | |
static RooAbsFunc * | createBinomialSum (Int_t n, Int_t m, bool eff) |
Create and return a BinomialSum function binding. | |
static RooAbsFunc * | createPoissonSum (Int_t n) |
Create and return a PoissonSum function binding. | |
static const RooHistError & | instance () |
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>
|
inlinevirtual |
Definition at line 28 of file RooHistError.h.
|
private |
Construct our singleton object.
Definition at line 53 of file RooHistError.cxx.
|
static |
Create and return a BinomialSum function binding.
Definition at line 337 of file RooHistError.cxx.
|
static |
Create and return a PoissonSum function binding.
Definition at line 328 of file RooHistError.cxx.
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.
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.
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.
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.
|
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.
|
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.
|
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 307 of file RooHistError.cxx.
|
private |
Definition at line 44 of file RooHistError.h.
|
private |
Definition at line 43 of file RooHistError.h.