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

drop type specs in RecoMuon and RecoTracker #30353

Merged
merged 2 commits into from Jun 25, 2020
Merged

Conversation

jeongeun
Copy link
Contributor

@jeongeun jeongeun commented Jun 24, 2020

PR description: Update the safer syntax for existing parameter

Instead of modifying parameters with full type specs, which can be interpreted as an insertion of a new parameter, it is a safer way to protect from parameter name mistakes and will also help in possible parameter migrations.
(The references were PR#29979, PR#30147.)

In this PR, 8 files updated.

  • RecoMuon/{TrackingTools} 2 files
    (previous RecoMuon updates can be found : PR#30270, PR#30271.)
  • RecoTracker/{CkfPattern} 3 files
  • RecoTracker/{ConversionSeedGenerators} 3 files

PR validation:

Event Content comparison check was also done and there is no change with these updates.
Tested in CMSSW_11_2_X, the basic test all passed in the CMSSW PR instructions.

@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-30353/16374

  • This PR adds an extra 20KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @jeongeun (JeongEun Lee) for master.

It involves the following packages:

RecoMuon/TrackingTools
RecoTracker/CkfPattern
RecoTracker/ConversionSeedGenerators

@perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks.
@felicepantaleo, @abbiendi, @echapon, @cericeci, @makortel, @JanFSchulte, @jhgoh, @HuguesBrun, @trocino, @rociovilar, @GiacomoSguazzoni, @rovere, @VinInn, @bellan, @mschrode, @ebrondol, @mtosi, @dgulhan, @Fedespring, @calderona, @gpetruc, @folguera this is something you requested to watch as well.
@silviodonato, @dpiparo you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented Jun 24, 2020

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 24, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 65bf9c0
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2ba2de/7304/summary.html
CMSSW: CMSSW_11_2_X_2020-06-23-2300
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-2ba2de/7304/summary.html

Comparison Summary:

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

maxLostHits = 1,
minimumNumberOfHits = 3,
minPt = 0.1
)

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
conv2CkfTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
trajectoryFilter = cms.PSet(refToPSet_ = cms.string('conv2CkfTrajectoryFilter')),
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

Copy link
Contributor Author

@jeongeun jeongeun Jun 24, 2020

Choose a reason for hiding this comment

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

Thank you @perrotta
I had already tried to drop this type in refToPSet_ in this ConversionStep(2)_cff.py file as you commented
but It turned out making a TypeError when 'cms.string' was removed.

File "/afs/cern.ch/work/j/jelee/ServiceWork/EventContent/CMSSW_11_2_X_2020-06-18-2300/python/RecoTracker/ConversionSeedGenerators/ConversionStep2_cff.py", line 208, in <module>
    trajectoryFilter = cms.PSet(refToPSet_ = 'conv2CkfTrajectoryFilter'),
.....
    raise TypeError(name+" does not already exist, so it can only be set to a CMS python configuration type")
TypeError: refToPSet_ does not already exist, so it can only be set to a CMS python configuration type

It also happened at the clustersToSkip and phase2clustersToSkip in below.
So I checked all TypeErrors and didn't drop these not existing types.

Copy link
Contributor

Choose a reason for hiding this comment

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

clustersToSkip = cms.InputTag('conv2Clusters'),
maxCand = 2
)
clustersToSkip = cms.InputTag('conv2Clusters'),
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped


# MAKING OF TRACK CANDIDATES
import RecoTracker.CkfPattern.CkfTrackCandidates_cfi
conv2TrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
src = cms.InputTag('photonConvTrajSeedFromQuadruplets:conv2SeedCandidates'),
src = 'photonConvTrajSeedFromQuadruplets:conv2SeedCandidates',
TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('conv2CkfTrajectoryBuilder'))
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

MaxChi2 = 30.0,
MaxDisplacement = 100,
MaxSagitta = -1.,
clusterChargeCut = cms.PSet(refToPSet_ = cms.string( 'SiStripClusterChargeCutTight'))
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

src = cms.InputTag('photonConvTrajSeedFromSingleLeg:convSeedCandidates'),
clustersToSkip = cms.InputTag('convClusters'),
src = 'photonConvTrajSeedFromSingleLeg:convSeedCandidates',
clustersToSkip = cms.InputTag('convClusters'),
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

src = cms.InputTag('photonConvTrajSeedFromSingleLeg:convSeedCandidates'),
clustersToSkip = cms.InputTag('convClusters'),
src = 'photonConvTrajSeedFromSingleLeg:convSeedCandidates',
clustersToSkip = cms.InputTag('convClusters'),
TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryBuilder'))
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

trackingPhase2PU140.toModify(convTrackCandidates,
clustersToSkip = None,
phase2clustersToSkip = cms.InputTag("convClusters")
phase2clustersToSkip = cms.InputTag('convClusters')
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

@@ -387,7 +390,7 @@
#conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
# TrackProducers = cms.VInputTag(cms.InputTag('convStepTracks')),
# hasSelector=cms.vint32(1),
# selectedTrackQuals = cms.VInputTag(cms.InputTag("convStepSelector","convStep")
# selectedTrackQuals = cms.VInputTag(cms.InputTag('convStepSelector','convStep')
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

@@ -404,8 +407,8 @@
# ),
# hasSelector=cms.vint32(1,1),
# selectedTrackQuals = cms.VInputTag(
Copy link
Contributor

Choose a reason for hiding this comment

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

This type can also get dropped

@cmsbuild
Copy link
Contributor

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

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 24, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 3d65f37
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-2ba2de/7327/summary.html
CMSSW: CMSSW_11_2_X_2020-06-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-2ba2de/7327/summary.html

Comparison Summary:

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

beamhaloTrackCandidates.TransientInitialStateEstimatorParameters.propagatorOppositeTISE = 'BeamHaloPropagatorOpposite'
beamhaloTrackCandidates.TrajectoryBuilderPSet.refToPSet_ = 'CkfTrajectoryBuilderBeamHalo'
# clone the trajectory builder
CkfTrajectoryBuilderBeamHalo = CkfTrajectoryBuilder.clone(
Copy link
Contributor

Choose a reason for hiding this comment

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

CkfTrajectoryBuilderBeamHalo was a deepcopy of CkfTrajectoryBuilder, and here it becomes a clone of it.

Honestly, I'm not expert in python enough to fully understand the difference between them. In the original python code both deepcopy and clone were used.

Also for my own understanding, I'd ask @davidlange6 and @slava77 whether they know about any possible difference between them, and if they think that using clone instead of deepcopy is equivalent, or justified here.

(Same for beamhaloTrackCandidates below)

Copy link
Contributor

Choose a reason for hiding this comment

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

CkfTrajectoryBuilderBeamHalo was a deepcopy of CkfTrajectoryBuilder, and here it becomes a clone of it.

Honestly, I'm not expert in python enough to fully understand the difference between them. In the original python code both deepcopy and clone were used.

Also for my own understanding, I'd ask @davidlange6 and @slava77 whether they know about any possible difference between them, and if they think that using clone instead of deepcopy is equivalent, or justified here.

(Same for beamhaloTrackCandidates below)

@makortel @Dr15Jones
please advise if there is a substantive difference

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we prefer clone over deepcopy.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we prefer clone over deepcopy.

Great! Thank you @Dr15Jones

@perrotta
Copy link
Contributor

+1

  • Type specification in cloned /modified python configs dropped as planned
  • Jenkins tests pass

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

@silviodonato
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

6 participants