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

use esConsumes in PhysicsTools/PatAlgos modules #34997

Merged
merged 3 commits into from Aug 27, 2021

Conversation

Dr15Jones
Copy link
Contributor

@Dr15Jones Dr15Jones commented Aug 24, 2021

PR description:

Converted all modules to use missing esConsumes.

PR validation:

Code compiles.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-34997/24852

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

  • PhysicsTools/PatAlgos (reconstruction)
  • RecoEgamma/EgammaTools (reconstruction)

@jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@rappoccio, @gouskos, @jainshilpi, @schoef, @emilbols, @mbluj, @demuller, @varuns23, @seemasharmafnal, @mmarionncern, @ahinzmann, @lgray, @jdolen, @Sam-Harper, @jdamgov, @nhanvtran, @gkasieczka, @hatakeyamak, @andrzejnovak, @clelange, @AlexDeMoor, @swozniewski, @JyothsnaKomaragiri, @sobhatta, @afiqaize, @gpetruc, @mariadalfonso, @ram1123 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

@Dr15Jones
Copy link
Contributor Author

please test

@makortel
Copy link
Contributor

makortel commented Aug 24, 2021

  • JME::JetResolution::get
  • JME::JetResolutionScaleFactor::get

Given that these functions do not seem to provide anything beyond EventSetup::getData() (except hiding the Record type, but that is needed for the ESGetToken anyway)

const JetResolution JetResolution::get(const edm::EventSetup& setup, const std::string& label) {
edm::ESHandle<JetResolutionObject> handle;
setup.get<JetResolutionRcd>().get(label, handle);
return *handle;
}

I have elsewhere just replaced their use with direct use of EventSetup::getData() in the calling code.

@Dr15Jones
Copy link
Contributor Author

I have elsewhere just replaced their use with direct use of EventSetup::getData() in the calling code.

That is what I was thinking, but I figured I'd want to do it systematically and then remove the interface.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-6dbb72/18002/summary.html
COMMIT: d4863ee
CMSSW: CMSSW_12_1_X_2021-08-24-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/34997/18002/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: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 39
  • DQMHistoTests: Total histograms compared: 3000352
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3000330
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 38 files compared)
  • Checked 165 log files, 37 edm output root files, 39 DQM output files
  • TriggerResults: no differences found

@Dr15Jones
Copy link
Contributor Author

I should have looked closer, TrackDetectorAssociator was already updated for esConsumes.

Instead, just get data directly from the EventSetup using the
proper esConsumes.
@Dr15Jones
Copy link
Contributor Author

I went ahead and removed the JetResolution*::get calls.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-34997/24859

@cmsbuild
Copy link
Contributor

Pull request #34997 was updated. @jpata, @cmsbuild, @slava77 can you please check and sign again.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-6dbb72/18009/summary.html
COMMIT: b7f0296
CMSSW: CMSSW_12_1_X_2021-08-24-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/34997/18009/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: 39
  • DQMHistoTests: Total histograms compared: 3000352
  • DQMHistoTests: Total failures: 5
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3000324
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 38 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 165 log files, 37 edm output root files, 39 DQM output files
  • TriggerResults: no differences found

@slava77
Copy link
Contributor

slava77 commented Aug 26, 2021

+reconstruction

for #34997 b7f0296

  • code changes are technical, in line with the PR title
  • jenkins tests pass and comparisons with the baseline show no relevant differences

@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 (and backports should be raised in the release meeting by the corresponding L2)

void pat::PATJetSlimmer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) {
using namespace edm;
using namespace std;

if (modifyJet_)
jetModifier_->setEventContent(iSetup);
Copy link
Contributor

Choose a reason for hiding this comment

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

It was evidently done on purpose, and therefore I can imagine the answer: but is it really convenient calling this method once per event, instead of once per LuminosityBlock

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The transition for the get call is set at compile time in the call to esConsumes. Making helper classes (which can be used by multiple modules) have different consumes for different modules is pretty annoying and error prone. Plus, getting data from the EventSetup is VERY fast (and so we recommend always getting it in the transition it is used as long as no further big computation is done with it).

@perrotta
Copy link
Contributor

+1

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

5 participants