Provide convenient interface to define cuts via python
While the TQFolder syntax offers many possibilities they are not always obvious. We should therefore provide an interface to define cuts/cut hierarchies via some python plugin similar to observable snippets, for example.
One idea for this would be to write a wrapper class that is essentially a TQFolder but has some added convenience methods that make creation of the cut graph more intuitive, e.g.:
baseCut.addCut(name="CutFoo",cut="foo > 25000.", weight="fooWeight", title="Low Foo Veto")\
.addCut(name="CutBar", cut="bar< 55000.")\
.addCut(...)
where addCut(...)
would return the specified cut, similar to define
and filter
in RDataFrame allowing for the here shown concatenation of cuts.
Additionally we'd of course need to provide a getCut(name)
and getBaseCut()
to get an arbitrary cut and hook into that one again.