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

Modernized some modules in RecoBTag #35018

Merged
merged 4 commits into from Aug 27, 2021

Conversation

Dr15Jones
Copy link
Contributor

@Dr15Jones Dr15Jones commented Aug 25, 2021

PR description:

  • now uses esConsumes
  • consolidated .h files into .cc
  • added fillDescriptions
  • switched from ::stream to ::global modules
  • various code modernizations

PR validation:

Code compiles. Non of these changes are meant to change the behavior of the modules.

resolves cms-sw/framework-team#247

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35018/24872

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

  • RecoBTag/PixelCluster (reconstruction)
  • RecoBTag/SoftLepton (reconstruction)

@jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@JyothsnaKomaragiri, @emilbols, @demuller, @andrzejnovak, @AlexDeMoor 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

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-afe11b/18034/summary.html
COMMIT: 5b1ca8e
CMSSW: CMSSW_12_1_X_2021-08-25-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35018/18034/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-afe11b/18034/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-afe11b/18034/git-merge-result

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: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3000324
  • 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


if (PVCollection->empty() and not theJetCollection.empty() and not theGEDGsfElectronCollection.empty()) {
//we would need to access a vertex from the collection but there isn't one.
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

I expect an event.emplace should still happen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following the logic done on line '49-50' in the old code

if (!PVCollection.isValid())
return;

I can push an empty container if you'd prefer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just for some context, I added that condition check because in the original code if that condition was meet the algorithm would dereference a nullptr for the vertex and pass it to a function expecting a const &.


// Declare and open Vertex collection
edm::Handle<reco::VertexCollection> theVertexCollection;
iEvent.getByToken(vertexToken, theVertexCollection);
edm::Handle<reco::VertexCollection> theVertexCollection = iEvent.getHandle(vertexToken);
if (!theVertexCollection.isValid() || theVertexCollection->empty())
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

event put/emplace is missing here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

again, that is the logic which was there before this change. I can change it if you wish.

Copy link
Contributor

Choose a reason for hiding this comment

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

again, that is the logic which was there before this change. I can change it if you wish.

since this PR has fairly extensive changes, it would be nice to include this one as well.
(The other producers in this PR apparently produce a product per ::produce call already)
Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am making the change so the module always pushes a container. That being said, if one of these conditions fails it will now be pretty hard to find the problem as it will just appear to be OK. Previously, if this failed later modules trying to access it would likely throw an exception.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35018/24891

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

Pull request #35018 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-afe11b/18064/summary.html
COMMIT: cb85cb1
CMSSW: CMSSW_12_1_X_2021-08-25-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/35018/18064/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

@slava77
Copy link
Contributor

slava77 commented Aug 26, 2021

+reconstruction

for #35018 cb85cb1

  • code changes are technical, in line with the PR description and the follow up review
  • jenkins tests pass and comparisons with the baseline show no 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)

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 310e644 into cms-sw:master Aug 27, 2021
@Dr15Jones Dr15Jones deleted the esConsumesRecoBTag branch September 9, 2021 17:48
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.

Migrate BTag modules to esConsumes
4 participants