23m = ROOT.RooRealVar(
"m",
"m", 5.20, 5.30)
26m0 = ROOT.RooRealVar(
"m0",
"m0", 5.291, 5.20, 5.30)
27k = ROOT.RooRealVar(
"k",
"k", -30, -50, -10)
30argus = ROOT.RooArgusBG(
"argus",
"argus", m, m0, k)
33data = argus.generate({m}, 1000)
38frame1 = m.frame(Bins=40, Title=
"Argus model and data")
55argus.fitTo(data, PrintEvalErrors=10)
69argus.fitTo(data, PrintEvalErrors=0, EvalErrorWall=
False)
75nll = argus.createNLL(data)
82frame2 = m0.frame(Range=(5.288, 5.293), Title=
"-log(L) scan vs m0, regions masked")
83nll.plotOn(frame2, ShiftToZero=
True, PrintEvalErrors=-1, EvalErrorValue=(nll.getVal() + 10), LineColor=
"r")
87c = ROOT.TCanvas(
"rf606_nllerrorhandling",
"rf606_nllerrorhandling", 1200, 400)
90ROOT.gPad.SetLeftMargin(0.15)
91frame1.GetYaxis().SetTitleOffset(1.4)
94ROOT.gPad.SetLeftMargin(0.15)
95frame2.GetYaxis().SetTitleOffset(1.4)
98c.SaveAs(
"rf606_nllerrorhandling.png")