13 def fill_tree(treeName, fileName):
14 tdf = ROOT.ROOT.RDataFrame(50)
15 tdf.Define(
"b1",
"(double) tdfentry_")\
16 .Define(
"b2",
"(int) tdfentry_ * tdfentry_").Snapshot(treeName, fileName)
19 fileName =
'df004_cutFlowReport_py.root' 21 fill_tree(treeName, fileName)
25 RDF = ROOT.ROOT.RDataFrame
26 d = RDF(treeName, fileName)
31 filtered1 = d.Filter(
'b1 > 25',
'Cut1')
32 filtered2 = d.Filter(
'0 == b2 % 2',
'Cut2')
34 augmented1 = filtered2.Define(
'b3',
'b1 / b2')
35 filtered3 = augmented1.Filter(
'b3 < .5',
'Cut3')
48 allCutsReport = d.Report()