-
Notifications
You must be signed in to change notification settings - Fork 128
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
fix: add zero photon charge and fix their cutBased id #1092
Conversation
Will add a test soon! |
I think this is also worth backporting to 0.7 |
@nsmith- I think it's no longer a bitmap and the documentation is just very bad. In [53]: ak.sum(events.Photon.cutBased & (1 << 2) != 0).compute()
Out[53]: 0
In [54]: ak.sum(events.Photon.isTight).compute()
Out[54]: 0 This is also the distribution of the cutbased id values in those files: |
I don't know if this is the best way to initialize the cutbased attributes in the Photon class. Please let me know about requested changes. The downside with my implementation is that the Another thing I thought of is to start with
by default and if edit: I actually did it like that in my commit below. |
This adds a zero Photon charge like we do with mass so that operations like diphoton invariant mass
(photon1 + photon2).mass
don't run intoAlso fixes the cutBased ID of photons since it was changed in later NanoAOD versions and it is not caught by tests.