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
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30353/16374
|
A new Pull Request was created by @jeongeun (JeongEun Lee) for master. It involves the following packages: RecoMuon/TrackingTools @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild please test |
The tests are being triggered in jenkins.
|
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
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')), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try something similar to https://github.com/cms-sw/cmssw/pull/30353/files#diff-d58f48fc8f8fa553fd29f19cd15a5ea9R52 ?
clustersToSkip = cms.InputTag('conv2Clusters'), | ||
maxCand = 2 | ||
) | ||
clustersToSkip = cms.InputTag('conv2Clusters'), |
There was a problem hiding this comment.
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')) |
There was a problem hiding this comment.
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')) |
There was a problem hiding this comment.
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'), |
There was a problem hiding this comment.
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')) |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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
please test |
The tests are being triggered in jenkins.
|
+1 |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
beamhaloTrackCandidates.TransientInitialStateEstimatorParameters.propagatorOppositeTISE = 'BeamHaloPropagatorOpposite' | ||
beamhaloTrackCandidates.TrajectoryBuilderPSet.refToPSet_ = 'CkfTrajectoryBuilderBeamHalo' | ||
# clone the trajectory builder | ||
CkfTrajectoryBuilderBeamHalo = CkfTrajectoryBuilder.clone( |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 aclone
of it.Honestly, I'm not expert in python enough to fully understand the difference between them. In the original python code both
deepcopy
andclone
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 ofdeepcopy
is equivalent, or justified here.(Same for beamhaloTrackCandidates below)
@makortel @Dr15Jones
please advise if there is a substantive difference
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
overdeepcopy
.
Great! Thank you @Dr15Jones
+1
|
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) |
+1 |
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.
(previous RecoMuon updates can be found : PR#30270, PR#30271.)
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.