17x = ROOT.RooRealVar(
"x",
"x", -10, 10)
18m = ROOT.RooRealVar(
"m",
"m", 0, -10, 10)
19s = ROOT.RooRealVar(
"s",
"s", 1, -10, 10)
20gauss = ROOT.RooGaussian(
"g",
"g", x, m, s)
23p0 = ROOT.RooRealVar(
"p0",
"p0", 0.01, 0.0, 1.0)
24poly = ROOT.RooPolynomial(
"p",
"p", x, [p0])
27f = ROOT.RooRealVar(
"f",
"f", 0.5, 0.0, 1.0)
28model = ROOT.RooAddPdf(
"model",
"model", [gauss, poly], [f])
30data = model.generate({x}, 10)
36ROOT.RooMsgService.instance().Print()
42ROOT.RooMsgService.instance().Print()
45ROOT.RooMsgService.instance().getStream(1).addTopic(ROOT.RooFit.Integration)
48igauss = gauss.createIntegral({x})
52ROOT.RooMsgService.instance().Print()
55ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Integration)
61ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.Tracing, ClassName=
"RooGaussian")
64model.fitTo(data, Verbose=
True)
67ROOT.RooMsgService.instance().reset()
71ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.Tracing, OutputFile=
"rf506_debug.log")
74model.fitTo(data, Verbose=
True)
77ROOT.RooMsgService.instance().reset()
83ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.LinkStateMgmt)
84ROOT.RooMsgService.instance().Print(
"v")
87gprime = gauss.cloneTree()
91ROOT.RooMsgService.instance().reset()