You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
I'm trying to get set up to run on CMS' nanoAOD format using uproot and the one main obstacle I'm facing is so-called jagged arrays.
For example, let's say I'm looking at a variable number of jets per event. I found that numpy has some related functionality to "reduce"
groups of entries in an array (reduceat, where I would just
need to feed in content, starts, stops for jagged arrays to get what I want. However, it seems that reduceat does not handle events with
0 jets (i.e., start = stop for that event) from this issue which still has not been resolved.
Of course, I could always just loop through in python, but that gets to be pretty slow. A couple of concrete examples of what I might want to do:
sum up the pT for jets with pT larger than x for each event
(more convoluted) for each electron, the index into the jets collection is stored, and I want to follow it to match a jet to each electron (and then divide the pTs, say)
Now I'm wondering if you can offer advice on how to easily (and quickly) handle these jagged arrays. Or maybe I'm missing some feature of uproot that handles this already...