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., 1.)
24poly = ROOT.RooPolynomial(
"p",
"p", x, ROOT.RooArgList(p0))
27f = ROOT.RooRealVar(
"f",
"f", 0.5, 0., 1.)
28model = ROOT.RooAddPdf(
"model",
"model", ROOT.RooArgList(
29 gauss, poly), ROOT.RooArgList(f))
31data = model.generate(ROOT.RooArgSet(x), 10)
37ROOT.RooMsgService.instance().Print()
43ROOT.RooMsgService.instance().Print()
46ROOT.RooMsgService.instance().getStream(1).addTopic(ROOT.RooFit.Integration)
49igauss = gauss.createIntegral(ROOT.RooArgSet(x))
53ROOT.RooMsgService.instance().Print()
56ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Integration)
62ROOT.RooMsgService.instance().addStream(
66 ROOT.RooFit.ClassName(
"RooGaussian"))
69model.fitTo(data, ROOT.RooFit.Verbose(ROOT.kTRUE))
72ROOT.RooMsgService.instance().reset()
76ROOT.RooMsgService.instance().addStream(
80 ROOT.RooFit.OutputFile(
"rf506_debug.log"))
83model.fitTo(data, ROOT.RooFit.Verbose(ROOT.kTRUE))
86ROOT.RooMsgService.instance().reset()
92ROOT.RooMsgService.instance().addStream(
93 ROOT.RooFit.DEBUG, ROOT.RooFit.Topic(ROOT.RooFit.LinkStateMgmt))
94ROOT.RooMsgService.instance().Print(
"v")
97gprime = gauss.cloneTree()
101ROOT.RooMsgService.instance().reset()