Skip to content

Commit

Permalink
fastjet only slice jet_pmus if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed Nov 25, 2023
1 parent f9d54d0 commit d30c5da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphicle/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def fastjet_clusters(
jets = sequence.inclusive_jets(pt_cut)
jet_pmus = gcl.MomentumArray(jets.to_numpy())
pt_descend_idxs = np.argsort(jet_pmus.pt)[::-1].tolist()
jet_pmus = jet_pmus[pt_descend_idxs]
jet_idxs_ = sequence.constituent_index(pt_cut)[pt_descend_idxs]
if eta_cut is not None:
if eta_cut < 0.0:
raise ValueError("eta_cut must be non-negative.")
jet_pmus = jet_pmus[pt_descend_idxs]
jet_idxs_ = jet_idxs_[np.abs(jet_pmus.eta) < eta_cut]
jet_idxs_ = jet_idxs_[:top_k]
jet_idxs = jet_idxs_.to_list()
Expand Down

0 comments on commit d30c5da

Please sign in to comment.