Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions roofit/xroofit/test/xroofit_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import ROOT

ROOT.gROOT.SetBatch(True)

class XRooFitTests(unittest.TestCase):

Expand Down Expand Up @@ -45,11 +46,11 @@ def test_oneChannelLimit(self):
# add the obsData to the channel
sr.datasets().Add(obsData)

# example of accessing expected yields in bins with propagated errors
# example of accessing expected yields in bins with propagated errors
w.poi()["mu"].setVal(0)
self.assertAlmostEqual(w["pdfs/simPdf/SR"].GetContent(), bkg.Integral())
self.assertAlmostEqual(w["pdfs/simPdf/SR"].GetError(), abs(bkg_vary1.Integral()-bkg.Integral()) )
# accessing a single sample expected yield
# accessing a single sample expected yield
w.poi()["mu"].setVal(0.5)
self.assertAlmostEqual(w["pdfs/simPdf/SR/sig"].GetContent(), sig.Integral()*w.poi()["mu"].getVal())
self.assertAlmostEqual(w["pdfs/simPdf/SR/sig"].GetError(), 0.) # no uncert was added to the signal
Expand Down
Loading