16card_name =
"HLFavtoryexample.rs"
17with open(card_name,
"w")
as f:
18 f.write(
"// The simplest card\n\n")
19 f.write(
"gauss = Gaussian(mes[5.20,5.30],mean[5.28,5.2,5.3],width[0.0027,0.001,1]);\n")
20 f.write(
"argus = ArgusBG(mes,5.291,argpar[-20,-100,-1]);\n")
21 f.write(
"sum = SUM(nsig[200,0,10000]*gauss,nbkg[800,0,10000]*argus);\n\n")
23hlf = ROOT.RooStats.HLFactory(
"HLFavtoryexample", card_name,
False)
33data = sumpdf.generate(mes, 2000)
41sumpdf.plotOn(mesframe)
42sumpdf.plotOn(mesframe, Components=argus, LineStyle=
"--")
44ROOT.gROOT.SetStyle(
"Plain")
49c.SaveAs(
"rs601_HLFactoryexample.png")