181   fNumWarningsDeprecated1(0),
 
  182   fNumWarningsDeprecated2(0)
 
 
  377      std::cerr << 
"TRolke - Error: Model id "<< 
f_mid<<std::endl;
 
  379         std::cerr << 
"TRolke - Please specify a model with e.g. 'SetGaussBkgGaussEff' (read the docs in Rolke.cxx )"<<std::endl;
 
  384   ComputeInterval(
f_x, 
f_y, 
f_z, 
f_bm, 
f_em, 
f_e, 
f_mid, 
f_sde, 
f_sdb, 
f_tau, 
f_b, 
f_m);
 
  390      std::cerr << 
"TRolke - Warning: no limits found" <<std::endl;
 
 
  436         std::cerr << 
"TRolke::GetBackground(): Model NR: " <<
 
  437         f_mid << 
" unknown"<<std::endl;
 
 
  457      ComputeInterval(
loop_x, 
f_y, 
f_z, 
f_bm, 
f_em, 
f_e, 
f_mid, 
f_sde, 
f_sdb, 
f_tau, 
f_b, 
f_m);
 
 
  500   ComputeInterval(
loop_x, 
f_y, 
f_z, 
f_bm, 
f_em, 
f_e, 
f_mid, 
f_sde, 
f_sdb, 
f_tau, 
f_b, 
f_m);
 
 
  528      std::cout << 
"internal error finding maximum of distribution" << std::endl;
 
  534   ComputeInterval(
loop_x, 
f_y, 
f_z, 
f_bm, 
f_em, 
f_e, 
f_mid, 
f_sde, 
f_sdb, 
f_tau, 
f_b, 
f_m);
 
 
  559      ComputeInterval(
rolke_x, 
f_y, 
f_z, 
f_bm, 
f_em, 
f_e, 
f_mid, 
f_sde, 
f_sdb, 
f_tau, 
f_b, 
f_m);
 
  568     std::cerr << 
"TRolke GetCriticalNumber : Error: problem finding rolke inverse. Specify a larger maxtry value. maxtry was: " << 
maxj << 
". highest x considered was j "<< 
j<< std::endl;
 
 
  582      std::cerr << 
"*******************************************" <<std::endl;
 
  583      std::cerr << 
"TRolke - Warning: 'SetSwitch' is deprecated and may be removed from future releases:" <<std::endl;
 
  584      std::cerr << 
" - Use 'SetBounding' instead "<<std::endl;
 
  585      std::cerr << 
"*******************************************" <<std::endl;
 
 
  595   std::cout << 
"*******************************************" <<std::endl;
 
  596   std::cout << 
"* TRolke::Print() - dump of internals:                " <<std::endl;
 
  597   std::cout << 
"*"<<std::endl;
 
  598   std::cout << 
"* model id, mid = "<<
f_mid <<std::endl;
 
  599   std::cout << 
"*"<<std::endl;
 
  600   std::cout << 
"*             x = "<<
f_x   <<std::endl;
 
  601   std::cout << 
"*            bm = "<<
f_bm  <<std::endl;
 
  602   std::cout << 
"*            em = "<<
f_em  <<std::endl;
 
  603   std::cout << 
"*           sde = "<<
f_sde <<std::endl;
 
  604   std::cout << 
"*           sdb = "<<
f_sdb <<std::endl;
 
  605   std::cout << 
"*             y = "<<
f_y   <<std::endl;
 
  606   std::cout << 
"*           tau = "<<
f_tau <<std::endl;
 
  607   std::cout << 
"*             e = "<<
f_e   <<std::endl;
 
  608   std::cout << 
"*             b = "<<
f_b   <<std::endl;
 
  609   std::cout << 
"*             m = "<<
f_m   <<std::endl;
 
  610   std::cout << 
"*             z = "<<
f_z   <<std::endl;
 
  611   std::cout << 
"*"<<std::endl;
 
  612   std::cout << 
"*            CL = "<<
fCL <<std::endl;
 
  613   std::cout << 
"*      Bounding = "<<
fBounding <<std::endl;
 
  614   std::cout << 
"*"<<std::endl;
 
  615   std::cout << 
"* calculated on demand only:"<<std::endl;
 
  616   std::cout << 
"*   fUpperLimit = "<<
fUpperLimit<<std::endl;
 
  617   std::cout << 
"*   fLowerLimit = "<<
fLowerLimit<<std::endl;
 
  618   std::cout << 
"*******************************************" <<std::endl;
 
 
  638Double_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){
 
  640      std::cerr << 
"*******************************************" <<std::endl;
 
  641      std::cerr << 
"TRolke - Warning: 'CalculateInterval' is deprecated and may be removed from future releases:" <<std::endl;
 
  642      std::cerr << 
" - Use e.g. 'SetGaussBkgGaussEff' and 'GetLimits' instead (read the docs in Rolke.cxx )"<<std::endl;
 
  643      std::cerr << 
"*******************************************" <<std::endl;
 
  659   return ComputeInterval(
f_x, 
f_y, 
f_z, 
f_bm, 
f_em, 
f_e, 
f_mid, 
f_sde, 
f_sdb, 
f_tau, 
f_b, 
f_m);
 
 
  676void TRolke::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)
 
 
  695   SetModelParameters(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
 
 
  714Double_t TRolke::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)
 
  720   limit[1] = 
Interval(
x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  732         limit[1] = 
Interval(
trial_x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  733         if (limit[1] > 0) 
done = 1;
 
 
  755Double_t TRolke::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)
 
  759   Double_t slope, 
fmid, low, 
flow, high, 
fhigh, 
test, 
ftest, mu0, 
maximum, 
target, 
l, 
f0;
 
  766   if ((
mid == 3) || (
mid == 5)) {
 
  767      if (
bm == 0) 
bm = 0.00001;
 
  770   if ((
mid == 6) || (
mid == 7)) {
 
  771      if (
bm == 0) 
bm = 0.00001;
 
  774   if ((
mid <= 2) || (
mid == 4)) 
bp = 1;
 
  777   if (
bp == 1 && 
x == 0 && 
bm > 0) {
 
  778      for (i = 0; i < 2; i++) {
 
  780         tempxy[i] = 
Interval(
x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  786      if (limits[1] < 0) limits[1] = 0.0;
 
  790   if (
bp != 1 && 
x == 0) {
 
  792      for (i = 0; i < 2; i++) {
 
  794         tempxy[i] = 
Interval(
x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  799      if (limits[1] < 0) limits[1] = 0.0;
 
  803   if (
bp != 1  && 
bm == 0) {
 
  804      for (i = 0; i < 2; i++) {
 
  806         limits[1] = 
Interval(
x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  811      if (limits[1] < 0) limits[1] = 0;
 
  815   if (
x == 0 && 
bm == 0) {
 
  818      limits[1] = 
Interval(
x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  822      limits[1] = 
Interval(
x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  826      limits[1] = 
Interval(
x, 
y, z, 
bm, 
em, 
e, 
mid, 
sde, 
sdb, tau, 
b, 
m);
 
  828      if (limits[1] < 0) limits[1] = 0;
 
  832   mu0 = 
Likelihood(0, 
x, 
y, z, 
bm, 
em, 
mid, 
sde, 
sdb, tau, 
b, 
m, 1);
 
  833   maximum = 
Likelihood(0, 
x, 
y, z, 
bm, 
em, 
mid, 
sde, 
sdb, tau, 
b, 
m, 2);
 
  835   f0 = 
Likelihood(
test, 
x, 
y, z, 
bm, 
em, 
mid, 
sde, 
sdb, tau, 
b, 
m, 3);
 
  853      for (i = 0; i < 
maxiter; i++) {
 
  855         if (
l < 0.2) 
l = 0.2;
 
  856         if (
l > 0.8) 
l = 0.8;
 
  857         med = 
l * low + (1 - 
l) * high;
 
  862         fmid = 
Likelihood(
med, 
x, 
y, z, 
bm, 
em, 
mid, 
sde, 
sdb, tau, 
b, 
m, 3);
 
  870         if ((high - low) < 
acc*high) 
break;
 
  884   ftest = 
Likelihood(
test, 
x, 
y, z, 
bm, 
em, 
mid, 
sde, 
sdb, tau, 
b, 
m, 3);
 
  891      fhigh = 
Likelihood(high, 
x, 
y, z, 
bm, 
em, 
mid, 
sde, 
sdb, tau, 
b, 
m, 3);
 
  894   for (i = 0; i < 
maxiter; i++) {
 
  896      if (
l < 0.2) 
l = 0.2;
 
  897      if (
l > 0.8) 
l = 0.8;
 
  898      med  = 
l * low + (1. - 
l) * high;
 
  899      fmid = 
Likelihood(
med, 
x, 
y, z, 
bm, 
em, 
mid, 
sde, 
sdb, tau, 
b, 
m, 3);
 
  909      if (high - low < 
acc*high) 
break;
 
  917   if ((
mid == 4) || (
mid == 5)) {
 
 
  934Double_t TRolke::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)
 
  952         std::cerr << 
"TRolke::Likelihood(...): Model NR: " <<
 
  953         f_mid << 
" unknown"<<std::endl;
 
 
  974      f = (
x - 
y / tau) / 
zm;
 
  978      mu = (
x - 
y / tau) / 
zm;
 
 
 1041      med = (low + high) / 2.;
 
 1045      if (high < 0.5) 
acc = 0.00001 * high;
 
 1046      else           acc = 0.00001 * (1 - high);
 
 1048      if ((high - low) < 
acc*high) 
break;
 
 
 1066   eta = 
static_cast<double>(z) / 
e - 
static_cast<double>(
m - z) / (1.0 - 
e);
 
 1067   etaprime = (-1) * (
static_cast<double>(
m - z) / ((1.0 - 
e) * (1.0 - 
e)) + 
static_cast<double>(z) / (
e * 
e));
 
 
 1089      f = (
x - 
y / tau) / 
em;
 
 1093      mu = (
x - 
y / tau) / 
em;
 
 1106         coef[2] = mu * mu * 
v - 2 * 
em * mu - mu * mu * 
v * tau;
 
 1107         coef[1] = (- 
x) * mu * 
v - mu * mu * mu * 
v * 
v * tau - mu * mu * 
v * 
em + 
em * mu * mu * 
v * tau + 
em * 
em * mu - 
y * mu * 
v;
 
 1108         coef[0] = 
x * mu * mu * 
v * 
v * tau + 
x * 
em * mu * 
v - 
y * mu * mu * 
v * 
v + 
y * 
em * mu * 
v;
 
 1114         if ( 
v > 0) 
b = 
y / (tau + (
em - 
e) / mu / 
v);
 
 
 1178            temp[0] = mu * mu * 
v + 
u;
 
 1179            temp[1] = mu * mu * mu * 
v * 
v + mu * 
v * 
u - mu * mu * 
v * 
em + mu * 
v * 
bm - 2 * 
u * 
em;
 
 1180            temp[2] = mu * mu * 
v * 
v * 
bm - mu * 
v * 
u * 
em - mu * 
v * 
bm * 
em + 
u * 
em * 
em - mu * mu * 
v * 
v * 
x;
 
 1181            e = (-temp[1] + 
TMath::Sqrt(temp[1] * temp[1] - 4 * temp[0] * temp[2])) / 2 / temp[0];
 
 
 1221   if (
what == 1) 
f = 
x - 
y / tau;
 
 1232         Double_t b = (
x + 
y - (1 + tau) * mu + sqrt((
x + 
y - (1 + tau) * mu) * (
x + 
y - (1 + tau) * mu) + 4 * (1 + tau) * 
y * mu)) / 2 / (1 + tau);
 
 
 1328         coef[2] = mu * 
b - mu * 
x - mu * mu - mu * 
m;
 
 1329         coef[1] = mu * 
x - mu * 
b + mu * z - 
m * 
b;
 
 
 1386         e = (-(mu * 
em - 
b - mu * mu * 
v) - 
TMath::Sqrt((mu * 
em - 
b - mu * mu * 
v) * (mu * 
em - 
b - mu * mu * 
v) + 4 * mu * (
x * mu * 
v - mu * 
b * 
v + 
b * 
em))) / (- mu) / 2;
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
 
<div class="legacybox"><h2>Legacy Code</h2> TRolke is a legacy interface: there will be no bug fixes ...
 
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.
 
void SetGaussBkgKnownEff(Int_t x, Double_t bm, Double_t sdb, Double_t e)
Model 5: Background - Gaussian, Efficiency - known (x,bm,sdb,e.
 
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'.
 
bool GetLimitsML(Double_t &low, Double_t &high, Int_t &out_x)
get the upper and lower limits for the most likely outcome.
 
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.
 
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.
 
bool GetCriticalNumber(Int_t &ncrit, Int_t maxtry=-1)
get the value of x corresponding to rejection of the null hypothesis.
 
static Double_t EvalPolynomial(Double_t x, const Int_t coef[], Int_t N)
Evaluate polynomial.
 
void Print(Option_t *) const override
Dump internals. Print members.
 
void SetKnownBkgBinomEff(Int_t x, Int_t z, Int_t m, Double_t b)
Model 6: Background - known, Efficiency - Binomial (x,z,m,b)
 
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 di...
 
Int_t fNumWarningsDeprecated1
 
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.
 
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.
 
void SetPoissonBkgKnownEff(Int_t x, Int_t y, Double_t tau, Double_t e)
Model 4: Background - Poisson, Efficiency - known (x,y,tau,e)
 
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.
 
Double_t GetUpperLimit()
Calculate and get upper limit for the pre-specified model.
 
void SetBounding(const bool bnd)
 
void SetKnownBkgGaussEff(Int_t x, Double_t em, Double_t sde, Double_t b)
Model 7: Background - known, Efficiency - Gaussian (x,em,sde,b)
 
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)
 
void SetPoissonBkgGaussEff(Int_t x, Int_t y, Double_t em, Double_t tau, Double_t sde)
Model 2: Background - Poisson, Efficiency - Gaussian.
 
static Double_t EvalMonomial(Double_t x, const Int_t coef[], Int_t N)
Evaluate mononomial.
 
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.
 
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.
 
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.
 
TRolke(Double_t CL=0.9, Option_t *option="")
Constructor with optional Confidence Level argument.
 
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.
 
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.
 
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.
 
void SetSwitch(bool bnd)
Deprecated name for SetBounding.
 
void SetModelParameters()
 
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.
 
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)
Deprecated and error prone model selection interface.
 
bool GetLimits(Double_t &low, Double_t &high)
Calculate and get the upper and lower limits for the pre-specified model.
 
void SetPoissonBkgBinomEff(Int_t x, Int_t y, Int_t z, Double_t tau, Int_t m)
Model 1: Background - Poisson, Efficiency - Binomial.
 
Double_t LogFactorial(Int_t n)
LogFactorial function (use the logGamma function via the relation Gamma(n+1) = n!
 
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.
 
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.
 
Double_t GetLowerLimit()
Calculate and get lower limit for the pre-specified model.
 
Int_t fNumWarningsDeprecated2
 
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.
 
Double_t GetBackground()
Return a simple background value (estimate/truth) given the pre-specified model.
 
~TRolke() override
Destructor.
 
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.
 
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.
 
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.
 
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
 
Double_t PoissonI(Double_t x, Double_t par)
Computes the Discrete Poisson distribution function for (x,par).
 
Double_t Log(Double_t x)
Returns the natural logarithm of x.
 
Double_t Sqrt(Double_t x)
Returns the square root of x.
 
Double_t LnGamma(Double_t z)
Computation of ln[gamma(z)] for all z.
 
Bool_t RootsCubic(const Double_t coef[4], Double_t &a, Double_t &b, Double_t &c)
Calculates roots of polynomial of 3rd order a*x^3 + b*x^2 + c*x + d, where.
 
Double_t ChisquareQuantile(Double_t p, Double_t ndf)
Evaluate the quantiles of the chi-squared probability distribution function.