12from __future__
import print_function
20tagCat = ROOT.RooCategory(
"tagCat",
"Tagging category")
21tagCat.defineType(
"Lepton")
22tagCat.defineType(
"Kaon")
23tagCat.defineType(
"NetTagger-1")
24tagCat.defineType(
"NetTagger-2")
31b0flav = ROOT.RooCategory(
"b0flav",
"B0 flavour eigenstate")
32b0flav.defineType(
"B0", -1)
33b0flav.defineType(
"B0bar", 1)
40x = ROOT.RooRealVar(
"x",
"x", 0, 10)
41data = ROOT.RooPolynomial(
"p",
"p", x).generate(
42 ROOT.RooArgSet(x, b0flav, tagCat), 10000)
48btable = data.table(b0flav)
53ttable = data.table(tagCat,
"x>8.23")
58bttable = data.table(ROOT.RooArgSet(tagCat, b0flav))
64print(
"Number of events with B0 flavor is ", nb0)
67fracLep = ttable.getFrac(
"Lepton")
68print(
"Fraction of events tagged with Lepton tag is ", fracLep)
74tagCat.setRange(
"good",
"Lepton,Kaon")
77tagCat.addToRange(
"soso",
"NetTagger-1")
78tagCat.addToRange(
"soso",
"NetTagger-2")
81goodData = data.reduce(ROOT.RooFit.CutRange(
"good"))
82goodData.table(tagCat).
Print(
"v")
void Print(std::ostream &os, const OptionType &opt)