Fix NanoAOD reference attributes to and from jets
Fixes #23 (closed)
Short version: things like
jet = t.Jet["nominal"][0] # or any other jet
jet.muon1 # equivalent of t.Muons[jet.muonIdx1]
needed special treatment with jet "variations", so this was a regression from !8 (merged) .
I added simple tests that try to access such objects (which would have caught this, but these do not check correctness yet).
Warning: references into jet collections (e.g. electron.jet
, muon.jet
) take the original jet with the corresponding index (which is not necessarily the same as the "nominal" one in case the JEC is reapplied, because these are sorted by the corrected PT).