diff --git a/roofit/roostats/src/BayesianCalculator.cxx b/roofit/roostats/src/BayesianCalculator.cxx index 86a869072acf17ab8fd4c01101f829ce11e4b93d..7e434cb6abde204608faead6177df03cd6c328fb 100644 --- a/roofit/roostats/src/BayesianCalculator.cxx +++ b/roofit/roostats/src/BayesianCalculator.cxx @@ -40,6 +40,7 @@ BayesianCalculator::BayesianCalculator() : fPdf(0), fPriorPOI(0), fProductPdf (0), fLogLike(0), fLikelihood (0), fIntegratedLikelihood (0), fPosteriorPdf(0), + fInterval(0), fSize(0.05) { // default constructor @@ -57,6 +58,7 @@ BayesianCalculator::BayesianCalculator( /* const char* name, const char* title, fPOI(POI), fPriorPOI(&priorPOI), fProductPdf (0), fLogLike(0), fLikelihood (0), fIntegratedLikelihood (0), fPosteriorPdf(0), + fInterval(0), fSize(0.05) { // constructor @@ -69,6 +71,7 @@ BayesianCalculator::BayesianCalculator( RooAbsData& data, fPdf(model.GetPdf()), fPriorPOI( model.GetPriorPdf()), fProductPdf (0), fLogLike(0), fLikelihood (0), fIntegratedLikelihood (0), fPosteriorPdf(0), + fInterval(0), fSize(0.05) { // constructor from Model Config diff --git a/tutorials/roostats/rs701_BayesianCalculator.C b/tutorials/roostats/rs701_BayesianCalculator.C index 41579b449e5d54430492b9c06d37134694fd9660..edc6085eb55d97829c0e74d53145a555a37d3c04 100644 --- a/tutorials/roostats/rs701_BayesianCalculator.C +++ b/tutorials/roostats/rs701_BayesianCalculator.C @@ -24,10 +24,10 @@ using namespace RooStats; void rs701_BayesianCalculator() { -/* + RooWorkspace* w = new RooWorkspace("w",true); - w->factory("SUM::pdf(s[0,15]*Uniform(x[0,1]),b[0.001,0,2]*Uniform(x))"); - w->factory("Gaussian::prior_b(b,0.001,1)"); + w->factory("SUM::pdf(s[0,15]*Uniform(x[0,1]),b[1,0,2]*Uniform(x))"); + w->factory("Gaussian::prior_b(b,1,1)"); w->factory("PROD::model(pdf,prior_b)"); RooAbsPdf* model = w->pdf("model"); // pdf*priorNuisance const RooArgSet nuisanceParameters(*(w->var("b"))); @@ -46,7 +46,7 @@ void rs701_BayesianCalculator() std::cout << "90% CL interval: [ " << interval->LowerLimit() << " - " << interval->UpperLimit() << " ] or 95% CL limits\n"; RooPlot * plot = bcalc.GetPosteriorPlot(); plot->Draw(); -*/ + // observe one event while expecting one background event -> the 95% CL upper limit on s is 4.10 // observe one event while expecting zero background event -> the 95% CL upper limit on s is 4.74