-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Applying a Cut Using ak.mask() Causes Issue with FastJet ClusterSequence #998
Comments
Hey @cmoore24-24 , there is a known issue (whose fix I have been postponing each week since July... 🥲) with the way the offsets are handled in fastjet and I have seen it causing issues with masking. See: scikit-hep/fastjet#238 (comment) |
Also, I suppose you are including the line: |
Hi @chrispap95, apologies for the delay. I haven't come across
Is there another vector attribute I should be using? |
@cmoore24-24 you need to do that for scikit-hep vector!!! import vector
vector.register_awkward() Nanoevents vector embeds the behaviors in the objects themselves, somewhat different semantics. |
Ah, okay, thanks! Haven't seen that before but I've included it now, but no change in the behavior of |
Hello @lgray and maybe @chrispap95,
This is a bug that seems to be stuck between Coffea, Awkward, and FastJet. As in the title, using
ak.mask
to apply a cut, a lasmaller = ak.mask(bigger, cut)
rather than something likesmaller = bigger[cut]
prevents FastJet from being able to build a cluster sequence. For reference, here are the relevant package versions:To Reproduce
Reproduction can be done with any PFNano file opened with NanoEventsFactory and
schemaclass=PFNanoAODSchema
.The cluster sequence should fail, with the following error:
Expected behavior
When the cut is done with
smaller = bigger[cut]
, the ClusterSequence is fine and produces<fastjet._pyjet.DaskAwkwardClusterSequence at 0x7f88d4091670>
The text was updated successfully, but these errors were encountered: