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 jet energy fractions after jet resolution smearing #27428
Conversation
The code-checks are being triggered in jenkins. |
aaef35e
to
bdcdbfb
Compare
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27428/10727
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27428/10728
|
A new Pull Request was created by @ahinzmann for master. It involves the following packages: DataFormats/PatCandidates @perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
The code-checks are being triggered in jenkins. |
In addition to the original problem, this solution also stores the smearing factor for bookkeeping in pat::Jets that contain JECs. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27428/10740
|
The best strategy will have to adhere to the no-change policy (the code running in production should not change physics results). |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
Is this particularly important for 10_2_X? |
+1
|
@santocch could you please review this PR? @ahinzmann for backports we need to be careful in not changing the existing miniAOD default behaviour, as @slava77 says |
I think that for 10_6_X we should still be OK as is. Not for 10_2_X. |
+1 |
merge |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will be automatically merged. |
PR description:
As currently implemented, jet resolution smearing breaks the jet energy fraction variables of pat::Jets.
This line of code changes the four-vector of a pat::Jet, but not the correction factors stored in the pat::Jet:
https://github.com/cms-sw/cmssw/blob/CMSSW_8_0_25/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h#L267
Jet energy fraction calculation relies on the fact that one can retried the raw jet energy with the stored correction factors:
https://github.com/cms-sw/cmssw/blob/master/DataFormats/PatCandidates/interface/Jet.h#L376
This fix to the scaleEnergy method adjusts the stored correction factors, to be able to retrieve the raw jet energy again.
Jet resolution smearing is run during MiniAOD production and also in this test:
https://github.com/cms-sw/cmssw/blob/master/PhysicsTools/PatAlgos/test/corMETFromMiniAOD.py
Small changes are expected in MET corrections and uncertainties related to jet resolution smearing in MiniAOD.
PR validation:
It was checked that jet energy fractions are the same before and after jet energy resolution smearing with this fix.