Bayesian calculator: basic example
Bayesian Result using a Flat prior
0.9% CL central interval: [ 0.506059550587157 - 6.893261312862925 ] or 0.95% CL limits
Bayesian Result using a 1/sqrt(s) prior
0.9% CL central interval: [ 0.07462937796837046 - 5.854245082523729 ] or 0.95% CL limits
import ROOT
useBkg = True
confLevel = 0.90
w.factory(
"SUM::pdf(s[0.001,15]*Uniform(x[0,1]),b[1,0,2]*Uniform(x))")
model =
w.factory(
"PROD::model(pdf,prior_b)")
POI = w["s"]
priorPOI2 =
w.factory(
"GenericPdf::priorPOI2('1/sqrt(@0)',s)")
nuisPar = 0
if useBkg:
nuisPar = nuisanceParameters
else:
w["b"].setVal(0)
size = 1.0 - confLevel
print("\nBayesian Result using a Flat prior ")
print(
"{}% CL central interval: [ {} - {} ] or {}% CL limits\n".
format(
)
)
print("\nBayesian Result using a 1/sqrt(s) prior ")
print(
"{}% CL central interval: [ {} - {} ] or {}% CL limits\n".
format(
)
)
del bcalc, bcalc2
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 Atom_t Time_t format
- Date
- July 2022
- Authors
- Artem Busorgin, Gregory Schott (C++ version)
Definition in file rs701_BayesianCalculator.py.