Data and categories: working with ROOT.RooCategory objects to describe discrete variables 
 
import ROOT
 
 
 
 
 
b0flav = 
ROOT.RooCategory(
"b0flav", 
"B0 flavour eigenstate", {
"B0": -1, 
"B0bar": 1})
 
 
 
 
 
 
 
 
print("Number of events with B0 flavor is ", nb0)
 
print("Fraction of events tagged with Lepton tag is ", fracLep)
 
 
 
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
void Print(Option_t *option="") const override
 
  RooCategory::tagCat = Lepton(idx = 0)
 
RooCategory::b0flav = B0(idx = -1)
 
Roo1DTable::b0flav = (B0=5040,B0bar=4960)
 
  Table b0flav : pData
  +-------+------+
  |    B0 | 5040 |
  | B0bar | 4960 |
  +-------+------+
 
Roo1DTable::tagCat = (Lepton=487,Kaon=433,NetTagger-1=439,NetTagger-2=406)
 
  Table tagCat : pData(x>8.23)
  +-------------+-----+
  |      Lepton | 487 |
  |        Kaon | 433 |
  | NetTagger-1 | 439 |
  | NetTagger-2 | 406 |
  +-------------+-----+
 
 
  Table (tagCat x b0flav) : pData
  +---------------------+------+
  |         {Lepton;B0} | 1281 |
  |           {Kaon;B0} | 1253 |
  |    {NetTagger-1;B0} | 1234 |
  |    {NetTagger-2;B0} | 1272 |
  |      {Lepton;B0bar} | 1269 |
  |        {Kaon;B0bar} | 1255 |
  | {NetTagger-1;B0bar} | 1219 |
  | {NetTagger-2;B0bar} | 1217 |
  +---------------------+------+
 
Number of events with B0 flavor is  5040.0
Fraction of events tagged with Lepton tag is  0.27592067988668556
 
  Table tagCat : pData
  +-------------+------+
  |      Lepton | 2550 |
  |        Kaon | 2508 |
  | NetTagger-1 |    0 |
  | NetTagger-2 |    0 |
  +-------------+------+
 
- Date
 - February 2018 
 
- Authors
 - Clemens Lange, Wouter Verkerke (C++ version) 
 
Definition in file rf404_categories.py.