18x = ROOT.RooRealVar(
"x",
"x", -10, 10)
19m = ROOT.RooRealVar(
"m",
"m", 0, -10, 10)
20s = ROOT.RooRealVar(
"s",
"s", 1, -10, 10)
21gauss = ROOT.RooGaussian(
"g",
"g", x, m, s)
24p0 = ROOT.RooRealVar(
"p0",
"p0", 0.01, 0.0, 1.0)
25poly = ROOT.RooPolynomial(
"p",
"p", x, [p0])
28f = ROOT.RooRealVar(
"f",
"f", 0.5, 0.0, 1.0)
29model = ROOT.RooAddPdf(
"model",
"model", [gauss, poly], [f])
31data = model.generate({x}, 10)
37ROOT.RooMsgService.instance().
Print()
43ROOT.RooMsgService.instance().
Print()
46ROOT.RooMsgService.instance().getStream(1).addTopic(ROOT.RooFit.Integration)
49igauss = gauss.createIntegral({x})
53ROOT.RooMsgService.instance().
Print()
56ROOT.RooMsgService.instance().getStream(1).removeTopic(ROOT.RooFit.Integration)
62ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.Tracing, ClassName=
"RooGaussian")
65model.fitTo(data, Verbose=
True)
68ROOT.RooMsgService.instance().reset()
72ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.Tracing, OutputFile=
"rf506_debug.log")
75model.fitTo(data, Verbose=
True)
78ROOT.RooMsgService.instance().reset()
84ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.LinkStateMgmt)
85ROOT.RooMsgService.instance().
Print(
"v")
88gprime = gauss.cloneTree()
92ROOT.RooMsgService.instance().reset()
void Print(GNN_Data &d, std::string txt="")