19x = ROOT.RooRealVar(
"x",
"x", 0, 10)
23mean = ROOT.RooRealVar(
"mean",
"mean of gaussians", 5)
24sigma1 = ROOT.RooRealVar(
"sigma1",
"width of gaussians", 0.5)
25sigma2 = ROOT.RooRealVar(
"sigma2",
"width of gaussians", 1)
26sig1 = ROOT.RooGaussian(
"sig1",
"Signal component 1", x, mean, sigma1)
27sig2 = ROOT.RooGaussian(
"sig2",
"Signal component 2", x, mean, sigma2)
30sig1frac = ROOT.RooRealVar(
31 "sig1frac",
"fraction of component 1 in signal", 0.8, 0., 1.)
33 "sig",
"Signal", ROOT.RooArgList(sig1, sig2), ROOT.RooArgList(sig1frac))
36a0 = ROOT.RooRealVar(
"a0",
"a0", 0.5, 0., 1.)
37a1 = ROOT.RooRealVar(
"a1",
"a1", -0.2, 0., 1.)
38bkg1 = ROOT.RooChebychev(
"bkg1",
"Background 1",
39 x, ROOT.RooArgList(a0, a1))
42alpha = ROOT.RooRealVar(
"alpha",
"alpha", -1)
43bkg2 = ROOT.RooExponential(
"bkg2",
"Background 2", x, alpha)
46bkg1frac = ROOT.RooRealVar(
47 "sig1frac",
"fraction of component 1 in background", 0.2, 0., 1.)
49 "bkg",
"Signal", ROOT.RooArgList(bkg1, bkg2), ROOT.RooArgList(sig1frac))
52bkgfrac = ROOT.RooRealVar(
"bkgfrac",
"fraction of background", 0.5, 0., 1.)
53model = ROOT.RooAddPdf(
54 "model",
"g1+g2+a", ROOT.RooArgList(bkg, sig), ROOT.RooArgList(bkgfrac))
60params = model.getParameters(ROOT.RooArgSet(x))
63initParams = params.snapshot()
66data = model.generate(ROOT.RooArgSet(x), 1000)
77params.printLatex(ROOT.RooFit.Columns(2))
80params.printLatex(ROOT.RooFit.Sibling(initParams))
84params.printLatex(ROOT.RooFit.Sibling(initParams), ROOT.RooFit.Columns(2))
87params.printLatex(ROOT.RooFit.Sibling(initParams),
88 ROOT.RooFit.OutputFile(
"rf407_latextables.tex"))