Make collection indices public, and a few related fixes
Closes https://gitlab.cern.ch/cp3-cms/bamboo/issues/61
As discussed in https://gitlab.cern.ch/cp3-cms/bamboo/issues/61 the idxs
attribute of a collection (selection, slice etc.), with the indices in the original collection stored on NanoAOD, is now public.
This also fixes the two bugs reported there: one where a loop index was wrongly detected as a dependency to capture, if not part of an expression op.map(whatever, lambda obj: obj.idx)
, and one with redefining columns for a skim that are already defined for other reasons (e.g. the indices, after storing the number of passing objects).
Also included: a small fix for op.rng_min_element_by
and op.rng_max_element_by
for collections that also change proxies (i.e. other than the original, selections and slices) - I don't know of situations where this causes problems, but it might.
And finally two small changes to make SliceProxy
a bit more flexible, such that a decorated tree can be constructed with a slice (these are the last changes to shared code from https://gitlab.cern.ch/cp3-cms/bamboo/-/merge_requests/26, so I'll clean up the git history there).