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

ME0MuonSelector cleanup pass #31190

Merged
merged 3 commits into from Sep 3, 2020
Merged

Conversation

davidlange6
Copy link
Contributor

The modules IB pointed out duplicated structs between MuonSelector and ME0MuonSelector. To avoid this, I added a namespace to the me0 set of functions for lack of better idea.

There were in addition #includes of plugin/*.cc files which have been cleaned up and rearranged to avoid duplicate plugin problems. There may be other issues not fixed by this PR.. [Perhaps #including cc files can be prevented by code checks...:)

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31190/17828

  • This PR adds an extra 40KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @davidlange6 (David Lange) for master.

It involves the following packages:

CommonTools/RecoAlgos
RecoMuon/MuonIdentification

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@rappoccio, @clelange, @jdolen, @makortel, @ahinzmann, @folguera, @riga, @abbiendi, @jhgoh, @echapon, @calderona, @HuguesBrun, @gkasieczka, @Fedespring, @hatakeyamak, @bellan, @trocino, @cericeci, @rociovilar this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@davidlange6
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.

@guitargeek
Copy link
Contributor

Hi @davidlange6, I have to mention something else related to this ME0MuonSelector.

It is used in CommonTools/RecoAlgos/plugins/ME0MuonTrackCollProducer.cc, which is used by CommonTools/RecoAlgos/python/me0Associator.py. This python file is in turn not used in production, there is only a test file in RecoMuon/MuonIdentification/test/testME0MuonAnalyzer_Example.py. Note this is again in the MuonIdentification package, just like the ME0MuonSelector that you change in this PR.

Therefore, we have a rather awkward dependency relation between be packages: CommonTools uses RecoMuon to define a plugin+configuration that is not common at all, and then the tests of this are again in RecoMuon.

Would you also think it's better to have everything in RecoMuon to avoid the dependency of CommonTools on reco? I think, CommonTools should ideally be higher up in the dependency hierarchy.

In practice, this suggestion implies to move:
CommonTools/RecoAlgos/plugins/ME0MuonTrackCollProducer.cc -> RecoMuon/MuonIdentification/plugins/ME0MuonTrackCollProducer.cc
CommonTools/RecoAlgos/python/me0Associator.py -> RecoMuon/MuonIdentification/python/me0Associator.py

@perrotta
Copy link
Contributor

By the way, something else that could be cleaned straightforwardly in this ME0MuonTrackCollProducer.cc is the following (just listing what jumps to the eyes as being obviously uselessly included):

  • Remove the duplicated
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
  • Remove the unneeded dependencies on
#include "DataFormats/MuonDetId/interface/CSCDetId.h"
#include "DataFormats/MuonDetId/interface/DTChamberId.h"
...
#include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h"
#include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h"
  • Remove the unneeded dependency on:
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
  • Remove the unneeded dependencies on
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"

as well as the commented out line

  //std::vector<double> findSimVtx(edm::Event& iEvent);

@perrotta
Copy link
Contributor

@Fedespring @cericeci : profiting of this PR, could you plese check if all those "ME0" muons stuffs are still needed at all in the standard workflows (or any other "local" one)? If not, this could be a good opportunity to start cleaning all them out

@davidlange6
Copy link
Contributor Author

Would you also think it's better to have everything in RecoMuon to avoid the dependency of CommonTools on reco? I think, CommonTools should ideally be higher up in the dependency hierarchy.

Clearly that would be an improvement, yes. [but I don't really follow the design logic (or why we would need a ME0 specific muon selector)] Probably best addressed by those responsible for muon selectors?

@davidlange6
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 24, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-1

Tested at: b6acc69

CMSSW: CMSSW_11_2_X_2020-08-23-2300
SCRAM_ARCH: slc7_amd64_gcc820
You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-6a2320/8874/summary.html

I found follow errors while testing this PR

Failed tests: Build

  • Build:

I found compilation error when building:

>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-23-2300/src/CommonTools/RecoAlgos/plugins/VertexRefSelector.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-23-2300/src/CommonTools/RecoAlgos/plugins/VertexSelector.cc
>> Building  edm plugin tmp/slc7_amd64_gcc820/src/CommonTools/RecoAlgos/plugins/CommonToolsRecoAlgos_plugins/libCommonToolsRecoAlgos_plugins.so
/cvmfs/cms-ib.cern.ch/nweek-02643/slc7_amd64_gcc820/external/gcc/8.2.0-bcolbf/bin/../lib/gcc/x86_64-unknown-linux-gnu/8.4.0/../../../../x86_64-unknown-linux-gnu/bin/ld: tmp/slc7_amd64_gcc820/src/CommonTools/RecoAlgos/plugins/CommonToolsRecoAlgos_plugins/ME0MuonTrackCollProducer.cc.o: in function `ME0MuonTrackCollProducer::produce(edm::Event&, edm::EventSetup const&)':
ME0MuonTrackCollProducer.cc:(.text+0x512): undefined reference to `muon::me0::isGoodMuon(reco::ME0Muon const&, muon::me0::SelectionType)'
collect2: error: ld returned 1 exit status
gmake: *** [tmp/slc7_amd64_gcc820/src/CommonTools/RecoAlgos/plugins/CommonToolsRecoAlgos_plugins/libCommonToolsRecoAlgos_plugins.so] Error 1
Leaving library rule at src/CommonTools/RecoAlgos/plugins
Entering library rule at CommonTools/RecoAlgos
>> Compiling  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-23-2300/src/CommonTools/RecoAlgos/src/ClusterStorer.cc
>> Compiling  /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_11_2_X_2020-08-23-2300/src/CommonTools/RecoAlgos/src/MassiveCandidateConverter.cc


@cmsbuild
Copy link
Contributor

Comparison not run due to Build errors (RelVals and Igprof tests were also skipped)

@davidlange6
Copy link
Contributor Author

davidlange6 commented Aug 24, 2020 via email

@davidlange6
Copy link
Contributor Author

davidlange6 commented Aug 24, 2020 via email

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 24, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 046da59
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-6a2320/8888/summary.html
CMSSW: CMSSW_11_2_X_2020-08-24-1100
SCRAM_ARCH: slc7_amd64_gcc820

@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-6a2320/8888/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2609656
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2609633
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

@perrotta
Copy link
Contributor

perrotta commented Sep 2, 2020

I don't think this simple PR should be delayed any further,
@trocino and Arnab Purohit (please provide the github name of Arnab, to be listed among the reco contacts), who are replacing @Fedespring and @cericeci, please virify independently from this PR if there is any ME0 related code that can be removed from the release, so that there will be no need to maintain it further in the future

@perrotta
Copy link
Contributor

perrotta commented Sep 2, 2020

+1

  • Technical
  • Jenkins tests pass
  • Further cleanings and rearrangements of the code were suggested in the thread: they can be implemented in a separate PR, or even not needed in case some useless code can be removed from the release (up to the muon POG reco contacts to verify it)

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 2, 2020

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

@qliphy
Copy link
Contributor

qliphy commented Sep 3, 2020

+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

6 participants