15def fill_tree(treeName, fileName):
16 tdf = ROOT.ROOT.RDataFrame(50)
17 tdf.Define(
"b1",
"(double) tdfentry_")\
18 .Define(
"b2",
"(int) tdfentry_ * tdfentry_").Snapshot(treeName, fileName)
21fileName =
'df004_cutFlowReport_py.root'
23fill_tree(treeName, fileName)
27RDF = ROOT.ROOT.RDataFrame
28d = RDF(treeName, fileName)
33filtered1 = d.Filter(
'b1 > 25',
'Cut1')
34filtered2 = d.Filter(
'0 == b2 % 2',
'Cut2')
36augmented1 = filtered2.Define(
'b3',
'b1 / b2')
37filtered3 = augmented1.Filter(
'b3 < .5',
'Cut3')
50allCutsReport = d.Report()