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

Muon FSR recovery for miniaod and nanoaod #28118

Merged
merged 9 commits into from Oct 10, 2019

Conversation

arizzi
Copy link
Contributor

@arizzi arizzi commented Oct 5, 2019

PR description:

This PR adds the producers for FSR recovery needed for next round of NanoAOD.
As the producer are generic enough to run also on top of MiniAOD they have been included as discussed with muon POG (https://its.cern.ch/jira/browse/CMSMUONS-300) outside the PhysicsTools/NanoAOD package

The nanoaod enabling code is not included in this PR and will be integrated once this enters cmssw.
A version of this PR with the nanoaod code (actually just some configuration) has been tested here:
cms-nanoAOD#413

PR validation:

Tests have been performed in the nanoaod PR linked above, no standard workflow is currently affected (inclusion during miniaod production step has not yet being discussed in XPOG)

@NTrevisani @jorieger @peruzzim

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28118/12143

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2019

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

It involves the following packages:

DataFormats/PatCandidates
MuonAnalysis/MuonAssociators

@perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks.
@gouskos, @calderona, @abbiendi, @jhgoh, @bellan, @HuguesBrun, @rovere, @hatakeyamak, @gpetruc, @battibass, @trocino, @peruzzim, @folguera, @cbernet 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

@peruzzim
Copy link
Contributor

peruzzim commented Oct 5, 2019

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/2803/console Started: 2019/10/06 00:08

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2019

-1

Tested at: 46f1bfa

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-33ee8e/2803/summary.html

I found follow errors while testing this PR

Failed tests: AddOn

  • AddOn:

I found errors in the following addon tests:

cmsDriver.py TTbar_13TeV_TuneCUETP8M1_cfi --conditions auto:run2_mc_l1stage1 --fast -n 100 --eventcontent AODSIM,DQM --relval 100000,1000 -s GEN,SIM,RECOBEFMIX,DIGI:pdigi_valid,L1,DIGI2RAW,L1Reco,RECO,EI,VALIDATION --customise=HLTrigger/Configuration/CustomConfigs.L1THLT --datatier GEN-SIM-DIGI-RECO,DQMIO --beamspot NominalCollision2015 --era Run2_25ns : FAILED - time: date Sun Oct 6 01:32:55 2019-date Sun Oct 6 01:28:03 2019 s - exit: 35584

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 5, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 6, 2019

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-33ee8e/2803/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2961049
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2960706
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2019

Pull request #28118 was updated. @perrotta, @cmsbuild, @santocch, @slava77 can you please check and sign again.

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2019

The tests are being triggered in jenkins.
Tested with other pull request(s) #28122
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/2859/console Started: 2019/10/09 23:22

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2019

+1
Tested at: 93a79e1
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ffc02d/2859/summary.html

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 9, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • No significant changes to the logs found
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 15 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2961053
  • DQMHistoTests: Total failures: 2
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2960710
  • DQMHistoTests: Total skipped: 341
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 1.285 KiB( 33 files compared)
  • DQMHistoSizes: changed ( 1325.7 ): 1.285 KiB Physics/NanoAODDQM
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@fabiocos
Copy link
Contributor

@slava77 your suggestion has been implemented, providing a successful run of the nanoAOD code (see #28122 and I did a private cross check). As you had already signed the PR and nothing apart your suggestion has been modified, I will consider this as ok and integrate it

@peruzzim @santocch FYI

@fabiocos
Copy link
Contributor

+1

@fabiocos
Copy link
Contributor

merge

@cmsbuild cmsbuild merged commit 52da0de into cms-sw:master Oct 10, 2019
@santocch
Copy link

+1

pat::PackedCandidateRef pfcandRef = pat::PackedCandidateRef(pfcands, iter_pf - pfcands->begin());

for (auto electrons_iter = electrons->begin(); electrons_iter != electrons->end(); ++electrons_iter) {
for (auto itr = electrons_iter->associatedPackedPFCandidates().begin();
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not work. associatedPackedPFCandidates() returns a temporary object

edm::RefVector<pat::PackedCandidateCollection> associatedPackedPFCandidates() const;

so the calls to electrons_iter->associatedPackedPFCandidates().begin() and electrons_iter->associatedPackedPFCandidates().begin() are actually returning iterators to two different containers (both of which are gone during the iteration of the loop).

This was found by the address sanitizer
https://cmssdt.cern.ch/SDT/cgi-bin/logreader/slc7_amd64_gcc820/CMSSW_11_0_ASAN_X_2019-10-18-2300/pyRelValMatrixLogs/run/250202.118_ProdTTbar_13_pmx25ns+ProdTTbar_13UP18+DIGIPRMXUP18_PROD_PU25+RECOPRMXUP18PROD_PU25+NANOEDMMC2018_PROD/step4_ProdTTbar_13_pmx25ns+ProdTTbar_13UP18+DIGIPRMXUP18_PROD_PU25+RECOPRMXUP18PROD_PU25+NANOEDMMC2018_PROD.log#/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shouldn't it loop forever then?

Copy link
Contributor

@Dr15Jones Dr15Jones Oct 20, 2019

Choose a reason for hiding this comment

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

It's actually undefined behavior. I'm guessing that the two temporaries just happen to be made at the same point on the stack. This causes a lucky accident that it just happens to work for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok then we may experience random crashes in large production.
@peruzzim I'm not sure if the nanov6 campaign was already submitted, but I'd suggest to fix this (just having a local copy of the vector)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think a possibly better solution would be to switch to using ranged for loop

for(auto const& cand: electrons_iter->associatedPackedPFCandidates()) {

The language guarantees that the temporary container returned from the call to electrons_iter->associatedPackedPFCandidates() will be kept around for the lifetime of the for loop.

Copy link
Contributor

Choose a reason for hiding this comment

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

implemented this solution in #28221

@jfernan2
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

Pull request #28118 was updated. @simonepigazzini, @vlimant can you please check and sign again.

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

8 participants