-
Notifications
You must be signed in to change notification settings - Fork 241
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
AttributeError, 'jet' has no attribute 'mcJet' #640
Comments
Can we just apply matchJets() to all jets (as was done before), it's good to have this information for jets below threshold too.
|
...or set mcJet to None for all jets, or use getattr with default in smearJets... matching takes time, so avoiding running it for low pt jets makes sense... |
..or even smear only jets above cut ... |
I don't think it's correct to smear only the jets above the cut, as you'll loose jets that get smeared down (if you re-cut on the pt afterwards) but not gain jets that get smeared up. IMHO the previous implementation, matching for all jets, made more sense, maybe @mmasciov can explain why the change. If there's a good reason for the change, then in case smearing is applied one should first match on all jets, then smear, and then re-match. |
We did this for two reasons:
I think a way to fix this is to add an option to the module: |
The matching is done with matchObjectCollection2, which does the uniqueness On Thu, May 26, 2016 at 6:09 PM, mmasciov [email protected] wrote:
|
The
AttributeError
occurs at L449 in the methodsmearJets()
because some jets don't have the attributemcJet
.The attribute 'mcJet' is attached to jet at L443 in the method
matchJets()
.At L169,
matchJets()
called with only selected jets but, at L171,smearJets()
is called with all jets.Therefore, some jets don't have
mcJet
and causes theAttributeError
.The text was updated successfully, but these errors were encountered: