in case rootpy is used in sparsinator.py, it will sometimes change branch types depending on what is actually seen in the data.
For example, in BtagCSV data for one file nleps <= 1, so rootpy makes it a scalar instead of a 1-element vector, resulting in errors like
Var(name="leps_pdgId", nominal=Func("leps_pdgId", func=lambda ev: [int(ev.leps_pdgId[i]) for i in range(ev.nleps)])),
TypeError: 'float' object has no attribute '__getitem__'
We need to remove the rootpy dependency from that particular code and take care of array accessors such as
ev.jets_pt[:ev.njets]
[x] remove the rootpy dependency
[ ] use TreeCache similar to vhbb_utils.py (upcoming)
[ ] report the rootpy misbehaviour on their issues
in case rootpy is used in
sparsinator.py
, it will sometimes change branch types depending on what is actually seen in the data.For example, in BtagCSV data for one file
nleps <= 1
, so rootpy makes it a scalar instead of a 1-element vector, resulting in errors likeWe need to remove the rootpy dependency from that particular code and take care of array accessors such as