ROOT 6.13/01 Reference Guide |
This class computes confidence intervals for the rate of a Poisson process in the presence of uncertain background and/or efficiency.
The treatment and the resulting limits are fully frequentist. The limit calculations make use of the profile likelihood method.
For a full list of methods and their syntax, and build instructions, consult the header file TRolke.h.
Examples/tutorials are found in the separate file Rolke.C
The signal is always assumed to be Poisson, with the following combinations of models of background and detection efficiency:
If unsure, first consider model 3, 4 or 5.
1: SetPoissonBkgBinomEff(x,y,z,tau,m)
when the background is simultaneously measured from sidebands (or MC), and the signal efficiency was determined from Monte Carlo
2: SetPoissonBkgGaussEff(x,y,em,sde,tau)
when the background is simultaneously measured from sidebands (or MC), and the efficiency is modeled as Gaussian
3: SetGaussBkgGaussEff(x,bm,em,sde,sdb)
when background and efficiency can both be modeled as Gaussian.
4: SetPoissonBkgKnownEff(x,y,tau,e)
when the background is simultaneously measured from sidebands (or MC).
5: SetGaussBkgKnownEff(x,bm,sdb,e)
when background is Gaussian
6: SetKnownBkgBinomEff(x,z,b,m)
when signal efficiency was determined from Monte Carlo
7: SetKnownBkgGaussEff(x,em,sde,b)
when background is known and efficiency Gaussian
#### For all models:
Efficiency (e or em) is the detection probability for signal. A low efficiency hence generally means weaker limits. If the efficiency of an experiment (with analysis cuts) is dealt with elsewhere, em or e can be set to one.
#### For Poisson background measurements (sideband or MC):
#### For Gaussian efficiency or background:
If the efficiency scale of dealt with elsewhere, set em to 1 and sde to the relative uncertainty.
#### For Binomial signal efficiency:
#### For the case of known background expectation or known efficiency:
The confidence level (CL) is set either at construction time or with either of SetCL or SetCLSigmas
The TRolke method is very similar to the one used in MINUIT (MINOS).
Two options are offered to deal with cases where the maximum likelihood estimate (MLE) is not in the physical region. Version "bounded likelihood" is the one used by MINOS if bounds for the physical region are chosen. Unbounded likelihood (the default) allows the MLE to be in the unphysical region. It has however better coverage. For more details consult the reference (see below).
For a description of the method and its properties:
W.Rolke, A. Lopez, J. Conrad and Fred James "Limits and Confidence Intervals in presence of nuisance parameters" http://lanl.arxiv.org/abs/physics/0403059 Nucl.Instrum.Meth.A551:493-503,2005
Public Member Functions | |
TRolke (Double_t CL=0.9, Option_t *option="") | |
Constructor with optional Confidence Level argument. More... | |
virtual | ~TRolke () |
Destructor. More... | |
Double_t | CalculateInterval (Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, Int_t m) |
bool | GetBounding () const |
Double_t | GetCL () const |
bool | GetCriticalNumber (Int_t &ncrit, Int_t maxtry=-1) |
get the value of x corresponding to rejection of the null hypothesis. More... | |
bool | GetLimits (Double_t &low, Double_t &high) |
Calculate and get the upper and lower limits for the pre-specified model. More... | |
bool | GetLimitsML (Double_t &low, Double_t &high, Int_t &out_x) |
get the upper and lower limits for the most likely outcome. More... | |
bool | GetLimitsQuantile (Double_t &low, Double_t &high, Int_t &out_x, Double_t integral=0.5) |
get the upper and lower limits for the outcome corresponding to a given quantile. More... | |
Double_t | GetLowerLimit () |
Calculate and get lower limit for the pre-specified model. More... | |
bool | GetSensitivity (Double_t &low, Double_t &high, Double_t pPrecision=0.00001) |
get the upper and lower average limits based on the specified model. More... | |
Double_t | GetUpperLimit () |
Calculate and get upper limit for the pre-specified model. More... | |
void | Print (Option_t *) const |
Dump internals. Print members. More... | |
void | SetBounding (const bool bnd) |
void | SetCL (Double_t CL) |
void | SetCLSigmas (Double_t CLsigmas) |
void | SetGaussBkgGaussEff (Int_t x, Double_t bm, Double_t em, Double_t sde, Double_t sdb) |
Model 3: Background - Gaussian, Efficiency - Gaussian (x,bm,em,sde,sdb) More... | |
void | SetGaussBkgKnownEff (Int_t x, Double_t bm, Double_t sdb, Double_t e) |
Model 5: Background - Gaussian, Efficiency - known (x,bm,sdb,e. More... | |
void | SetKnownBkgBinomEff (Int_t x, Int_t z, Int_t m, Double_t b) |
Model 6: Background - known, Efficiency - Binomial (x,z,m,b) More... | |
void | SetKnownBkgGaussEff (Int_t x, Double_t em, Double_t sde, Double_t b) |
Model 7: Background - known, Efficiency - Gaussian (x,em,sde,b) More... | |
void | SetPoissonBkgBinomEff (Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m) |
Model 1: Background - Poisson, Efficiency - Binomial. More... | |
void | SetPoissonBkgGaussEff (Int_t x, Int_t y, Double_t em, Double_t tau, Double_t sde) |
Model 2: Background - Poisson, Efficiency - Gaussian. More... | |
void | SetPoissonBkgKnownEff (Int_t x, Int_t y, Double_t tau, Double_t e) |
Model 4: Background - Poisson, Efficiency - known (x,y,tau,e) More... | |
void | SetSwitch (bool bnd) |
Deprecated name for SetBounding. More... | |
Private Member Functions | |
Double_t | ComputeInterval (Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, Int_t m) |
ComputeInterval, the internals. More... | |
Double_t | EvalLikeMod1 (Double_t mu, Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m, Int_t what) |
Calculates the Profile Likelihood for MODEL 1: Poisson background/ Binomial Efficiency. More... | |
Double_t | EvalLikeMod2 (Double_t mu, Int_t x, Int_t y, Double_t em, Double_t sde, Double_t tau, Int_t what) |
Calculates the Profile Likelihood for MODEL 2: Poisson background/ Gauss Efficiency. More... | |
Double_t | EvalLikeMod3 (Double_t mu, Int_t x, Double_t bm, Double_t em, Double_t sde, Double_t sdb, Int_t what) |
Calculates the Profile Likelihood for MODEL 3: Gauss background/ Gauss Efficiency. More... | |
Double_t | EvalLikeMod4 (Double_t mu, Int_t x, Int_t y, Double_t tau, Int_t what) |
Calculates the Profile Likelihood for MODEL 4: Poiss background/Efficiency known. More... | |
Double_t | EvalLikeMod5 (Double_t mu, Int_t x, Double_t bm, Double_t sdb, Int_t what) |
Calculates the Profile Likelihood for MODEL 5: Gauss background/Efficiency known. More... | |
Double_t | EvalLikeMod6 (Double_t mu, Int_t x, Int_t z, Double_t b, Int_t m, Int_t what) |
Calculates the Profile Likelihood for MODEL 6: Background known/Efficiency binomial. More... | |
Double_t | EvalLikeMod7 (Double_t mu, Int_t x, Double_t em, Double_t sde, Double_t b, Int_t what) |
Calculates the Profile Likelihood for MODEL 7: background known/Efficiency Gauss. More... | |
Double_t | GetBackground () |
Return a simple background value (estimate/truth) given the pre-specified model. More... | |
Double_t | Interval (Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, Int_t m) |
Internal helper function 'Interval'. More... | |
Double_t | LikeGradMod1 (Double_t e, Double_t mu, Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m) |
Gradient model likelihood. More... | |
Double_t | Likelihood (Double_t mu, Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, Int_t m, Int_t what) |
Internal helper function Chooses between the different profile likelihood functions to use for the different models. More... | |
Double_t | LikeMod1 (Double_t mu, Double_t b, Double_t e, Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m) |
Profile Likelihood function for MODEL 1: Poisson background/ Binomial Efficiency. More... | |
Double_t | LikeMod2 (Double_t mu, Double_t b, Double_t e, Int_t x, Int_t y, Double_t em, Double_t tau, Double_t v) |
Profile Likelihood function for MODEL 2: Poisson background/Gauss Efficiency. More... | |
Double_t | LikeMod3 (Double_t mu, Double_t b, Double_t e, Int_t x, Double_t bm, Double_t em, Double_t u, Double_t v) |
Profile Likelihood function for MODEL 3: Gauss background/Gauss Efficiency. More... | |
Double_t | LikeMod4 (Double_t mu, Double_t b, Int_t x, Int_t y, Double_t tau) |
Profile Likelihood function for MODEL 4: Poiss background/Efficiency known. More... | |
Double_t | LikeMod5 (Double_t mu, Double_t b, Int_t x, Double_t bm, Double_t u) |
Profile Likelihood function for MODEL 5: Gauss background/Efficiency known. More... | |
Double_t | LikeMod6 (Double_t mu, Double_t b, Double_t e, Int_t x, Int_t z, Int_t m) |
Profile Likelihood function for MODEL 6: background known/ Efficiency binomial. More... | |
Double_t | LikeMod7 (Double_t mu, Double_t b, Double_t e, Int_t x, Double_t em, Double_t v) |
Profile Likelihood function for MODEL 6: background known/ Efficiency gaussian. More... | |
Double_t | LogFactorial (Int_t n) |
LogFactorial function (use the logGamma function via the relation Gamma(n+1) = n! More... | |
void | ProfLikeMod1 (Double_t mu, Double_t &b, Double_t &e, Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m) |
Helper for calculation of estimates of efficiency and background for model 1. More... | |
void | SetModelParameters (Int_t x, Int_t y, Int_t z, Double_t bm, Double_t em, Double_t e, Int_t mid, Double_t sde, Double_t sdb, Double_t tau, Double_t b, Int_t m) |
void | SetModelParameters () |
Static Private Member Functions | |
static Double_t | EvalMonomial (Double_t x, const Int_t coef[], Int_t N) |
Evaluate mononomial. More... | |
static Double_t | EvalPolynomial (Double_t x, const Int_t coef[], Int_t N) |
Evaluate polynomial. More... | |
Private Attributes | |
Double_t | f_b |
Double_t | f_bm |
Double_t | f_e |
Double_t | f_em |
Int_t | f_m |
Int_t | f_mid |
Double_t | f_sdb |
Double_t | f_sde |
Double_t | f_tau |
Int_t | f_x |
Int_t | f_y |
Int_t | f_z |
bool | fBounding |
Double_t | fCL |
Double_t | fLowerLimit |
Int_t | fNumWarningsDeprecated1 |
Int_t | fNumWarningsDeprecated2 |
Double_t | fUpperLimit |
#include <TRolke.h>
TRolke::TRolke | ( | Double_t | CL = 0.9 , |
Option_t * | option = "" |
||
) |
Constructor with optional Confidence Level argument.
'option' is not used.
Definition at line 175 of file TRolke.cxx.
|
virtual |
Destructor.
Definition at line 189 of file TRolke.cxx.
Double_t TRolke::CalculateInterval | ( | Int_t | x, |
Int_t | y, | ||
Int_t | z, | ||
Double_t | bm, | ||
Double_t | em, | ||
Double_t | e, | ||
Int_t | mid, | ||
Double_t | sde, | ||
Double_t | sdb, | ||
Double_t | tau, | ||
Double_t | b, | ||
Int_t | m | ||
) |
|
private |
ComputeInterval, the internals.
Definition at line 713 of file TRolke.cxx.
|
private |
Calculates the Profile Likelihood for MODEL 1: Poisson background/ Binomial Efficiency.
Definition at line 967 of file TRolke.cxx.
|
private |
Calculates the Profile Likelihood for MODEL 2: Poisson background/ Gauss Efficiency.
Definition at line 1081 of file TRolke.cxx.
|
private |
Calculates the Profile Likelihood for MODEL 3: Gauss background/ Gauss Efficiency.
Definition at line 1148 of file TRolke.cxx.
|
private |
Calculates the Profile Likelihood for MODEL 4: Poiss background/Efficiency known.
Definition at line 1216 of file TRolke.cxx.
|
private |
Calculates the Profile Likelihood for MODEL 5: Gauss background/Efficiency known.
Definition at line 1262 of file TRolke.cxx.
|
private |
Calculates the Profile Likelihood for MODEL 6: Background known/Efficiency binomial.
Definition at line 1306 of file TRolke.cxx.
|
private |
Calculates the Profile Likelihood for MODEL 7: background known/Efficiency Gauss.
Definition at line 1365 of file TRolke.cxx.
|
staticprivate |
Evaluate mononomial.
Definition at line 1429 of file TRolke.cxx.
|
staticprivate |
Evaluate polynomial.
Definition at line 1412 of file TRolke.cxx.
|
private |
Return a simple background value (estimate/truth) given the pre-specified model.
Definition at line 417 of file TRolke.cxx.
bool TRolke::GetCriticalNumber | ( | Int_t & | ncrit, |
Int_t | maxtry = -1 |
||
) |
get the value of x corresponding to rejection of the null hypothesis.
This means a lower limit >0 with the pre-specified Confidence Level. Optionally give maxtry; the maximum value of x to try. Of not, or if maxtry<0 an automatic mode is used.
Definition at line 546 of file TRolke.cxx.
bool TRolke::GetLimits | ( | Double_t & | low, |
Double_t & | high | ||
) |
Calculate and get the upper and lower limits for the pre-specified model.
Definition at line 373 of file TRolke.cxx.
bool TRolke::GetLimitsML | ( | Double_t & | low, |
Double_t & | high, | ||
Int_t & | out_x | ||
) |
get the upper and lower limits for the most likely outcome.
The returned out_x is the corresponding value of x No uncertainties are considered for the Poisson weights when finding ML.
Definition at line 511 of file TRolke.cxx.
bool TRolke::GetLimitsQuantile | ( | Double_t & | low, |
Double_t & | high, | ||
Int_t & | out_x, | ||
Double_t | integral = 0.5 |
||
) |
get the upper and lower limits for the outcome corresponding to a given quantile.
For integral=0.5 this gives the median limits in repeated experiments. The returned out_x is the corresponding (e.g. median) value of x. No uncertainties are considered for the Poisson weights when calculating the Poisson integral.
Definition at line 481 of file TRolke.cxx.
Double_t TRolke::GetLowerLimit | ( | void | ) |
Calculate and get lower limit for the pre-specified model.
Definition at line 407 of file TRolke.cxx.
bool TRolke::GetSensitivity | ( | Double_t & | low, |
Double_t & | high, | ||
Double_t | pPrecision = 0.00001 |
||
) |
get the upper and lower average limits based on the specified model.
No uncertainties are considered for the Poisson weights in the averaging sum
Definition at line 446 of file TRolke.cxx.
Double_t TRolke::GetUpperLimit | ( | void | ) |
Calculate and get upper limit for the pre-specified model.
Definition at line 397 of file TRolke.cxx.
|
private |
Internal helper function 'Interval'.
Definition at line 754 of file TRolke.cxx.
|
private |
Gradient model likelihood.
Definition at line 1062 of file TRolke.cxx.
|
private |
Internal helper function Chooses between the different profile likelihood functions to use for the different models.
Returns evaluation of the profile likelihood functions.
Definition at line 933 of file TRolke.cxx.
|
private |
Profile Likelihood function for MODEL 1: Poisson background/ Binomial Efficiency.
Definition at line 1003 of file TRolke.cxx.
|
private |
Profile Likelihood function for MODEL 2: Poisson background/Gauss Efficiency.
Definition at line 1126 of file TRolke.cxx.
|
private |
Profile Likelihood function for MODEL 3: Gauss background/Gauss Efficiency.
Definition at line 1194 of file TRolke.cxx.
|
private |
Profile Likelihood function for MODEL 4: Poiss background/Efficiency known.
Definition at line 1242 of file TRolke.cxx.
|
private |
Profile Likelihood function for MODEL 5: Gauss background/Efficiency known.
Definition at line 1287 of file TRolke.cxx.
|
private |
Profile Likelihood function for MODEL 6: background known/ Efficiency binomial.
Definition at line 1342 of file TRolke.cxx.
|
private |
Profile Likelihood function for MODEL 6: background known/ Efficiency gaussian.
Definition at line 1397 of file TRolke.cxx.
|
private |
LogFactorial function (use the logGamma function via the relation Gamma(n+1) = n!
Definition at line 1448 of file TRolke.cxx.
void TRolke::Print | ( | Option_t * | ) | const |
Dump internals. Print members.
Definition at line 593 of file TRolke.cxx.
|
private |
Helper for calculation of estimates of efficiency and background for model 1.
Definition at line 1029 of file TRolke.cxx.
void TRolke::SetGaussBkgGaussEff | ( | Int_t | x, |
Double_t | bm, | ||
Double_t | em, | ||
Double_t | sde, | ||
Double_t | sdb | ||
) |
Model 3: Background - Gaussian, Efficiency - Gaussian (x,bm,em,sde,sdb)
Definition at line 252 of file TRolke.cxx.
void TRolke::SetGaussBkgKnownEff | ( | Int_t | x, |
Double_t | bm, | ||
Double_t | sdb, | ||
Double_t | e | ||
) |
Model 5: Background - Gaussian, Efficiency - known (x,bm,sdb,e.
Definition at line 302 of file TRolke.cxx.
void TRolke::SetKnownBkgBinomEff | ( | Int_t | x, |
Int_t | z, | ||
Int_t | m, | ||
Double_t | b | ||
) |
Model 6: Background - known, Efficiency - Binomial (x,z,m,b)
Definition at line 327 of file TRolke.cxx.
void TRolke::SetKnownBkgGaussEff | ( | Int_t | x, |
Double_t | em, | ||
Double_t | sde, | ||
Double_t | b | ||
) |
Model 7: Background - known, Efficiency - Gaussian (x,em,sde,b)
Definition at line 352 of file TRolke.cxx.
|
private |
Definition at line 675 of file TRolke.cxx.
|
private |
Definition at line 691 of file TRolke.cxx.
void TRolke::SetPoissonBkgBinomEff | ( | Int_t | x, |
Int_t | y, | ||
Int_t | z, | ||
Double_t | tau, | ||
Int_t | m | ||
) |
Model 1: Background - Poisson, Efficiency - Binomial.
Definition at line 201 of file TRolke.cxx.
void TRolke::SetPoissonBkgGaussEff | ( | Int_t | x, |
Int_t | y, | ||
Double_t | em, | ||
Double_t | tau, | ||
Double_t | sde | ||
) |
Model 2: Background - Poisson, Efficiency - Gaussian.
Definition at line 226 of file TRolke.cxx.
void TRolke::SetPoissonBkgKnownEff | ( | Int_t | x, |
Int_t | y, | ||
Double_t | tau, | ||
Double_t | e | ||
) |
Model 4: Background - Poisson, Efficiency - known (x,y,tau,e)
Definition at line 277 of file TRolke.cxx.
void TRolke::SetSwitch | ( | bool | bnd | ) |
Deprecated name for SetBounding.
Definition at line 579 of file TRolke.cxx.