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

Add possibility to apply latest MET Phi corrections during MiniAOD processing #38461

Conversation

michaelwassmer
Copy link
Contributor

@michaelwassmer michaelwassmer commented Jun 22, 2022

PR description:

This PR is intended to allow the application of the latest MET Phi corrections when running over MiniAOD. The MET Phi corrections are intended to mitigate the observed azimuthal angle modulation of missing transverse momentum (MET). The corrections were derived by @lathomas and can be found at the following link: https://lathomas.web.cern.ch/lathomas/METStuff/XYCorrections/
This PR is just the CMSSW implementation of those corrections using an already existing module with some adaptions.
The effect of the PR can be seen in more detail in the following two presentations, which were given in the MET meeting:

  1. https://indico.cern.ch/event/1153621/contributions/4849172/attachments/2431720/4164278/presentation.pdf
  2. https://indico.cern.ch/event/1166184/contributions/4897784/attachments/2453553/4204792/presentation.pdf

Important: The PR is designed such that it shouldn't affect the default/current behavior at all.
For the PR to actually do something, the newly added 'campaign' and 'era' input arguments of the MET tool need to be explicitly used. This is actually one thing, where the input of experts would be greatly appreciated. It would probably be preferred to automatically retrieve the campaign and era, but at the moment I'm not sure how this could be achieved.

Changes:

  1. JetMETCorrections/Type1MET/plugins/MultShiftMETcorrInputProducer.cc
  • Added possibility to also use the total number of primary vertices as the variable the Phi corrections depend on
  • Removed the PF candidate loop if the corrections are done as a function of a variable which doesn't use the PF candidates
  1. Added several python configuration files containing the MET Phi corrections
  2. PhysicsTools/PatUtils/python/patPFMETCorrections_cff.py
  • Added the corrections from the configuration files as objects to be able to use them
  1. PhysicsTools/PatUtils/python/tools/runMETCorrectionsAndUncertainties.py
  • Allow to use the new corrections in the MET module if the newly added 'era' and 'campaign' input arguments are explicitly used
  • The default behavior should stay untouched for now

PR validation:

Successfully performed code-checks and code-format.
Besides some file read/open errors, the runTheMatrix.py -l limited -i all command also seemed to work successfully.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-38461/30671

  • This PR adds an extra 44KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @michaelwassmer for master.

It involves the following packages:

  • JetMETCorrections/Type1MET (reconstruction)
  • PhysicsTools/PatUtils (reconstruction)

@jpata, @cmsbuild, @clacaputo can you please review it and eventually sign? Thanks.
@AlexDeMoor, @rappoccio, @gouskos, @jdolen, @ahinzmann, @schoef, @mmarionncern, @jdamgov, @JyothsnaKomaragiri, @nhanvtran, @gkasieczka, @clelange, @emilbols, @hatakeyamak, @gpetruc, @andrzejnovak, @demuller, @mariadalfonso, @seemasharmafnal this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@michaelwassmer michaelwassmer marked this pull request as ready for review June 22, 2022 10:18
@jpata
Copy link
Contributor

jpata commented Jun 22, 2022

@cmsbuild please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ebeba3/25695/summary.html
COMMIT: 3421775
CMSSW: CMSSW_12_5_X_2022-06-22-1100/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/38461/25695/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3659099
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3659069
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 49 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

Copy link
Contributor

@jpata jpata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually one thing, where the input of experts would be greatly appreciated. It would probably be preferred to automatically retrieve the campaign and era, but at the moment I'm not sure how this could be achieved.

Don't we usually configure this on the fly with the era-dependent toModify operations?

run2_muon_2016.toModify( process.patMuons, effectiveAreaVec = [0.0735,0.0619,0.0465,0.0433,0.0577])

}

getattr(process, "patPFMetTxyCorr"+postfix).parameters = xyTags[corScheme+"_25ns"]
print("DEBUG ",campaign,datamc,era)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unintentionally left in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I forgot that line. I just removed it and updated the PR.
Regarding the modifiers, are they also capable of differentiating between 'suberas' e.g. 2018B and 2018C? The corrections also differ between the these suberas.

@jpata
Copy link
Contributor

jpata commented Jun 28, 2022

Having a centrally available correction (option 2) would be preferred to a custom MiniAOD recipe.

@tvami
Copy link
Contributor

tvami commented Jun 28, 2022

@michaelwassmer let me understand the final goal here, is this supposed to be backported to 10_6_X so it's used for UL ?

@michaelwassmer
Copy link
Contributor Author

@michaelwassmer let me understand the final goal here, is this supposed to be backported to 10_6_X so it's used for UL ?

This could be one use case to have phi corrected MET in the next MiniAOD interation out of the box. However, I asked the JME/MET conveners to join on Friday so we have their perspective as well.

@jpata
Copy link
Contributor

jpata commented Jul 4, 2022

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 4, 2022

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ebeba3/25964/summary.html
COMMIT: cf9bcca
CMSSW: CMSSW_12_5_X_2022-07-03-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/38461/25964/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3654771
  • DQMHistoTests: Total failures: 14
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3654735
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 49 files compared)
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@jpata
Copy link
Contributor

jpata commented Jul 7, 2022

+reconstruction

  • possibility to enable MET phi corrections in private MINIAOD production
  • not enabled by default
  • a follow-up for enabling this via the global tag is necessary

@tvami
Copy link
Contributor

tvami commented Jul 7, 2022

@jpata I think your own hold is still at place :)

@clacaputo
Copy link
Contributor

Can hold be removed only by the person that triggers it?

@perrotta
Copy link
Contributor

unhold

@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 now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

Can hold be removed only by the person that triggers it?

I was able to unhold, as I understanf this was a reco request

@qliphy
Copy link
Contributor

qliphy commented Jul 16, 2022

please test
to refresh the results

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ebeba3/26281/summary.html
COMMIT: cf9bcca
CMSSW: CMSSW_12_5_X_2022-07-15-2300/el8_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/38461/26281/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 50
  • DQMHistoTests: Total histograms compared: 3654053
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3654023
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 49 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 208 log files, 45 edm output root files, 50 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor

+1

  • Intended for private analyses and productions

@cmsbuild cmsbuild merged commit 8ab252c into cms-sw:master Jul 16, 2022
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

7 participants