29 w1->factory(
"Poisson::px(x[150,0,500],sum::splusb(s[0,0,100],b[100,0,300]))");
30 w1->factory(
"Poisson::py(y[100,0,500],prod::taub(tau[1.],b))");
31 w1->factory(
"Uniform::prior_b(b)");
35 w1->factory(
"PROJ::averagedModel(PROD::foo(px|b,py,prior_b),b)");
39 w1->pdf(
"averagedModel")->plotOn(frame);
48 w1->var(
"y")->setVal(100);
49 w1->var(
"x")->setVal(150);
50 std::unique_ptr<RooAbsReal>
cdf{
w1->pdf(
"averagedModel")->createCdf(*
w1->var(
"x"))};
53 cout <<
"Hybrid p-value = " <<
cdf->getVal() << endl;
57 double Z_Bi = NumberCountingUtils::BinomialWithTauObsZ(150, 100, 1);
58 std::cout <<
"Z_Bi significance estimation: " <<
Z_Bi << std::endl;
Plot frame and a container for graphics objects within that frame.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
Persistable container for RooFit projects.
RooCmdArg LineColor(TColorNumber color)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
Namespace for the RooStats classes.
double PValueToSignificance(double pvalue)
returns one-sided significance corresponding to a p-value