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

fix definition override in RecoTrackerP5_cff.py #34332

Merged

Conversation

mmusich
Copy link
Contributor

@mmusich mmusich commented Jul 5, 2021

PR description:

PR #30947 appears to have broken a functionality used in the tracker alignment group.
The following code snippet:

import FWCore.ParameterSet.Config as cms
process = cms.Process("MuonTrackSplit")

import Alignment.CommonAlignment.tools.trackselectionRefitting as trackselRefit
process.seqTrackselRefit = trackselRefit.getSequence(process,
                                                     "ALCARECOTkAlCosmicsCTF0T",
                                                     isPVValidation = False, 
                                                     TTRHBuilder = "WithAngleAndTemplate",
                                                     usePixelQualityFlag=True,
                                                     openMassWindow = False,
                                                     cosmicsDecoMode = True,
                                                     cosmicsZeroTesla = False,
                                                     momentumConstraint = None,
                                                     cosmicTrackSplitting = True,
                                                     use_d0cut = False
                                                     )

currently results in:

ValueError: Trying to override definition of cosmicTrackSplitter while it is used by the task cosmictracksP5Task
 new object defined in: /tmp/musich/CMSSW_12_0_X_2021-07-05-1100/python/RecoTracker/FinalTrackSelectors/cosmicTrackSplitter_cfi.py
 existing object defined in: /tmp/musich/CMSSW_12_0_X_2021-07-05-1100/python/RecoTracker/Configuration/RecoTrackerP5_cff.py

This PR fixes the issue reported above.

PR validation:

Run the code snippet above successfully:

cmsRun testTrackRefiter.py

if this PR is a backport please specify the original PR and why you need to backport that PR:

Not a backport, but a backport will be needed.

cc:
@DaveBrun94

@cmsbuild cmsbuild added this to the CMSSW_12_0_X milestone Jul 5, 2021
@mmusich
Copy link
Contributor Author

mmusich commented Jul 5, 2021

type bug-fix

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 5, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-34332/23694

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 5, 2021

A new Pull Request was created by @mmusich (Marco Musich) for master.

It involves the following packages:

RecoTracker/Configuration
RecoTracker/FinalTrackSelectors

@perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @GiacomoSguazzoni, @JanFSchulte, @rovere, @VinInn, @ebrondol, @gpetruc, @mmusich, @mtosi, @dgulhan 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

@mmusich
Copy link
Contributor Author

mmusich commented Jul 5, 2021

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 5, 2021

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-8fd587/16469/summary.html
COMMIT: 773366f
CMSSW: CMSSW_12_0_X_2021-07-05-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/34332/16469/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: 38
  • DQMHistoTests: Total histograms compared: 2785924
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2785901
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 37 files compared)
  • Checked 160 log files, 37 edm output root files, 38 DQM output files
  • TriggerResults: no differences found

@perrotta
Copy link
Contributor

perrotta commented Jul 6, 2021

Thank you @mmusich for the fix. After #30947 there were indeed two instances of cosmicTrackSplitter with the same name, hence the error.
The original code before #30947 modified the configuration of cosmicTrackSplitter for the whole workflow; your fix, more cleanly, defines a new local module cosmicTrackSplitting, cloned from cosmicTrackSplitter, which is only used inside RecoTrackerP5_cff.py
I would say that your fix improves wrt the former original code, unless that cosmicTrackSplitter module had to be propagated modified as such in the other parts of that "P5" workflow: did you verify that it was not the case, and cosmicTrackSplitter is not intended to be used anywhere else, within that "P5" workflow, other than in RecoTrackerP5_cff.py?

@mmusich
Copy link
Contributor Author

mmusich commented Jul 6, 2021

@perrotta,

you verify that it was not the case, and cosmicTrackSplitter is not intended to be used anywhere else, within that "P5" workflow, other than in RecoTrackerP5_cff.py?

yes. There are only 4 total instances of cosmicTrackSplitter in cmssw see link, and in the other 2 places (which are not the definition in the RecoTracker.FinalTrackSelectors.cosmicTrackSplitter_cfi), the module configuration is used directly, so the previous (wrong) changes were not propagated.
Let me add that it would be great if this could be merged swiftly so that I can backport to the CRUZET data-taking release, because the tracker alignment workflow is currently broken.

@perrotta
Copy link
Contributor

perrotta commented Jul 6, 2021

+reconstruction

  • It fixes an error in the configuration of the cosmicTrackSplitter in RecoTrackerP5_cff.py
  • Jenkins tests pass and show no differences in the standard workflows, as it only affects a tracker alignment workflow to be used online (verified to get fixed, as reported in the PR description)

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 6, 2021

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 Jul 6, 2021

+1

@cmsbuild cmsbuild merged commit 7b1e169 into cms-sw:master Jul 6, 2021
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

4 participants