18x = ROOT.RooRealVar(
"x",
"x", 0, 10)
22mean = ROOT.RooRealVar(
"mean",
"mean of gaussians", 5)
23sigma1 = ROOT.RooRealVar(
"sigma1",
"width of gaussians", 0.5)
24sigma2 = ROOT.RooRealVar(
"sigma2",
"width of gaussians", 1)
25sig1 = ROOT.RooGaussian(
"sig1",
"Signal component 1", x, mean, sigma1)
26sig2 = ROOT.RooGaussian(
"sig2",
"Signal component 2", x, mean, sigma2)
29sig1frac = ROOT.RooRealVar(
"sig1frac",
"fraction of component 1 in signal", 0.8, 0.0, 1.0)
30sig = ROOT.RooAddPdf(
"sig",
"Signal", [sig1, sig2], [sig1frac])
33a0 = ROOT.RooRealVar(
"a0",
"a0", 0.5, 0.0, 1.0)
34a1 = ROOT.RooRealVar(
"a1",
"a1", -0.2, 0.0, 1.0)
35bkg1 = ROOT.RooChebychev(
"bkg1",
"Background 1", x, [a0, a1])
38alpha = ROOT.RooRealVar(
"alpha",
"alpha", -1)
39bkg2 = ROOT.RooExponential(
"bkg2",
"Background 2", x, alpha)
42bkg1frac = ROOT.RooRealVar(
"bkg1frac",
"fraction of component 1 in background", 0.2, 0.0, 1.0)
43bkg = ROOT.RooAddPdf(
"bkg",
"Signal", [bkg1, bkg2], [bkg1frac])
46bkgfrac = ROOT.RooRealVar(
"bkgfrac",
"fraction of background", 0.5, 0.0, 1.0)
47model = ROOT.RooAddPdf(
"model",
"g1+g2+a", [bkg, sig], [bkgfrac])
56model.printCompactTree(
"",
"rf206_asciitree.txt")
62model.graphVizTree(
"rf206_model.dot")