Display cut/Filter efficiencies with RDataFrame.
This tutorial shows how to get information about the efficiency of the filters applied
import ROOT
.Define("b2", "(int) rdfentry_ * rdfentry_").Snapshot(treeName, fileName)
fileName = 'df004_cutFlowReport_py.root'
treeName = 'myTree'
filtered2 =
d.Filter(
'0 == b2 % 2',
'Cut2')
print('Cut3 stats:')
print('All stats:')
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
ROOT's RDataFrame offers a modern, high-level interface for analysis of data stored in TTree ,...
Cut3 stats:
All stats:
Cut1 : pass=24 all=50 -- eff=48.00 % cumulative eff=48.00 %
Cut2 : pass=25 all=50 -- eff=50.00 % cumulative eff=50.00 %
Cut3 : pass=23 all=25 -- eff=92.00 % cumulative eff=46.00 %
- Date
- May 2017
- Author
- Danilo Piparo (CERN)
Definition in file df004_cutFlowReport.py.