Data and categories: working with ROOT.RooCategory objects to describe discrete variables
from __future__ import print_function
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(GNN_Data &d, std::string txt="")
RooCategory::tagCat = Lepton(idx = 0)
RooCategory::b0flav = B0(idx = -1)
Roo1DTable::b0flav = (B0=5058,B0bar=4942)
Table b0flav : pData
+-------+------+
| B0 | 5058 |
| B0bar | 4942 |
+-------+------+
Roo1DTable::tagCat = (Lepton=454,Kaon=450,NetTagger-1=432,NetTagger-2=429)
Table tagCat : pData(x>8.23)
+-------------+-----+
| Lepton | 454 |
| Kaon | 450 |
| NetTagger-1 | 432 |
| NetTagger-2 | 429 |
+-------------+-----+
Table (b0flav x tagCat) : pData
+---------------------+------+
| {B0;Lepton} | 1302 |
| {B0bar;Lepton} | 1192 |
| {B0;Kaon} | 1232 |
| {B0bar;Kaon} | 1314 |
| {B0;NetTagger-1} | 1242 |
| {B0bar;NetTagger-1} | 1208 |
| {B0;NetTagger-2} | 1282 |
| {B0bar;NetTagger-2} | 1228 |
+---------------------+------+
Number of events with B0 flavor is 5058.0
Fraction of events tagged with Lepton tag is 0.2572237960339943
Table tagCat : pData
+-------------+------+
| Lepton | 2494 |
| Kaon | 2546 |
| NetTagger-1 | 0 |
| NetTagger-2 | 0 |
+-------------+------+
- Date
- February 2018
- Authors
- Clemens Lange, Wouter Verkerke (C++ version)
Definition in file rf404_categories.py.