15from __future__
import print_function
23tagCat = ROOT.RooCategory(
"tagCat",
"Tagging category")
24tagCat.defineType(
"Lepton")
25tagCat.defineType(
"Kaon")
26tagCat.defineType(
"NetTagger-1")
27tagCat.defineType(
"NetTagger-2")
34b0flav = ROOT.RooCategory(
"b0flav",
"B0 flavour eigenstate")
35b0flav.defineType(
"B0", -1)
36b0flav.defineType(
"B0bar", 1)
43x = ROOT.RooRealVar(
"x",
"x", 0, 10)
44data = ROOT.RooPolynomial(
"p",
"p", x).generate(
45 ROOT.RooArgSet(x, b0flav, tagCat), 10000)
51btable = data.table(b0flav)
56ttable = data.table(tagCat,
"x>8.23")
61bttable = data.table(ROOT.RooArgSet(tagCat, b0flav))
67print(
"Number of events with B0 flavor is ", nb0)
70fracLep = ttable.getFrac(
"Lepton")
71print(
"Fraction of events tagged with Lepton tag is ", fracLep)
77tagCat.setRange(
"good",
"Lepton,Kaon")
80tagCat.addToRange(
"soso",
"NetTagger-1")
81tagCat.addToRange(
"soso",
"NetTagger-2")
84goodData = data.reduce(ROOT.RooFit.CutRange(
"good"))
85goodData.table(tagCat).
Print(
"v")
void Print(std::ostream &os, const OptionType &opt)