Skip to content
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

Merged
merged 10 commits into from Jul 16, 2019

Conversation

ahinzmann
Copy link
Contributor

@ahinzmann ahinzmann commented Jul 2, 2019

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.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2019

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27428/10727

  • This PR adds an extra 28KB to repository

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27428/10728

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 2, 2019

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.
@gouskos, @hatakeyamak, @rovere, @cbernet, @gpetruc, @peruzzim this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 3, 2019

The code-checks are being triggered in jenkins.

@ahinzmann
Copy link
Contributor Author

In addition to the original problem, this solution also stores the smearing factor for bookkeeping in pat::Jets that contain JECs.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 3, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27428/10740

  • This PR adds an extra 32KB to repository

@slava77
Copy link
Contributor

slava77 commented Jul 12, 2019

What's the best strategy, to have analyzers use this bug-fix at least in analysis code in 10_2?

The best strategy will have to adhere to the no-change policy (the code running in production should not change physics results).
I'm not sure how this can be done in the context of coding in this PR.
For a backport there better be a config parameter to switch the behavior.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-1786a3/1441/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 77 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3081858
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3081535
  • DQMHistoTests: Total skipped: 322
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@slava77
Copy link
Contributor

slava77 commented Jul 12, 2019

What's the best strategy, to have analyzers use this bug-fix at least in analysis code in 10_2?

Is this particularly important for 10_2_X?

@slava77
Copy link
Contributor

slava77 commented Jul 12, 2019

+1

for #27428 56e606d

  • code changes are in line with the PR description and the follow up review. Changes are expected only in miniAOD MC workflows in smeared MET uncertainties/corrections
  • jenkins tests pass and comparisons with the baseline show differences only in 2017,2018 and phase-2 MC in the smeared MET uncertainties/corrections. The differences are typically only on single events (out of 10 tested, as in most of the workflows with MC); so, the other MCs are apparently just lucky to have no diff.

@fabiocos
Copy link
Contributor

@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

@slava77
Copy link
Contributor

slava77 commented Jul 15, 2019

@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.

@fabiocos
Copy link
Contributor

+1

@fabiocos
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 59942a0 into cms-sw:master Jul 16, 2019
@santocch
Copy link

+1

@cmsbuild
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants