diff --git a/graphicle/select.py b/graphicle/select.py index 1d21292..77868da 100644 --- a/graphicle/select.py +++ b/graphicle/select.py @@ -125,9 +125,10 @@ def fastjet_clusters( sequence = fastjet.ClusterSequence(pmu_ak, jetdef) jets = sequence.inclusive_jets() jet_pmus = gcl.MomentumArray(jets.to_numpy()) + num_jets = len(jet_pmus) pt_descend_idxs = np.argsort(jet_pmus.pt)[::-1].tolist() jet_pmus = jet_pmus[pt_descend_idxs] - cuts = np.ones(len(pt_descend_idxs), dtype=np.bool_) + cuts = np.ones(num_jets, dtype=np.bool_) if pt_cut is not None: cuts = jet_pmus.pt > pt_cut if eta_cut is not None: