16w = ROOT.RooWorkspace(
"w")
30 w.factory(
"Gaussian::sig1(x[-10,10],mean[5,0,10],0.5)")
31 w.factory(
"Gaussian::sig2(x,mean,1)")
32 w.factory(
"Chebychev::bkg(x,{a0[0.5,0.,1],a1[-0.2,0.,1.]})")
33 w.factory(
"SUM::sig(sig1frac[0.8,0.,1.]*sig1,sig2)")
34 w.factory(
"SUM::model(bkgfrac[0.5,0.,1.]*bkg,sig)")
43 "SUM::model(bkgfrac[0.5,0.,1.]*Chebychev::bkg(x[-10,10],{a0[0.5,0.,1],a1[-0.2,0.,1.]}), "
44 "SUM(sig1frac[0.8,0.,1.]*Gaussian(x,mean[5,0,10],0.5), Gaussian(x,mean,1)))")
58data = w.pdf(
"model").generate(ROOT.RooArgSet(w.var(
"x")), 1000)
60getattr(w,
'import')(data, ROOT.RooFit.Rename(
"data"))
67k = ROOT.RooKeysPdf(
"k",
"k", x, data, ROOT.RooKeysPdf.NoMirror, 0.2)
68getattr(w,
'import')(k, ROOT.RooFit.RenameAllNodes(
"workspace"))