import ROOT
tagCat = ROOT.RooCategory("tagCat", "Tagging category")
tagCat.defineType("Lepton")
tagCat.defineType("Kaon")
tagCat.defineType("NetTagger-1")
tagCat.defineType("NetTagger-2")
tagCat.Print()
b0flav = ROOT.RooCategory("b0flav", "B0 flavour eigenstate")
b0flav.defineType("B0", -1)
b0flav.defineType("B0bar", 1)
b0flav.Print()
x = ROOT.RooRealVar("x", "x", 0, 10)
p = ROOT.RooPolynomial("p", "p", x)
data = p.generate(ROOT.RooArgSet(x, b0flav, tagCat), 10000)
tcatType = ROOT.RooMappedCategory(
"tcatType", "tagCat type", tagCat, "Cut based")
tcatType.map("Lepton", "Cut based")
tcatType.map("Kaon", "Cut based")
tcatType.map("NetTagger*", "Neural Network")
mtable = data.table(tcatType)
mtable.Print("v")
b0Xtcat = ROOT.RooSuperCategory(
"b0Xtcat", "b0flav X tagCat", ROOT.RooArgSet(b0flav, tagCat))
stable = data.table(b0Xtcat)
stable.Print("v")
b0Xtcat.setLabel("{B0bar;Lepton}")
b0Xttype = ROOT.RooMultiCategory(
"b0Xttype", "b0flav X tagType", ROOT.RooArgSet(b0flav, tcatType))
xtable = data.table(b0Xttype)
xtable.Print("v")