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

Migrate module config in RecoMuon to use automatically generated cfipython default #33563

Merged
merged 4 commits into from May 12, 2021

Conversation

jeongeun
Copy link
Contributor

@jeongeun jeongeun commented Apr 28, 2021

PR description:

Optimization of the python configurations: Improve maintainability by cleaning up the duplicated and cloning from the default/reference configurations.

In this PR, 5 files changed.

  • RecoMuon/L2MuonIsolationProducer
  • RecoMuon/L2MuonProducer
  • RecoMuon/L3MuonProducer
  • RecoMuon/MuonIsolation
  • RecoMuon/MuonSeedGenerator

(The previous PRs were PR#33207, PR#33307, PR#33352, PR#33543 )

  • commit 1 :
    Replace explicit configuration with a reference from cfipython/. (migrating EDProducer("type", .. -> typeDefault.clone())

  • commit 2 :
    Remove the type specifications already presented in cfipython/fillDescriptions reference for improved syntax safety.
    Remove the duplicated parameters that are exactly the same value in cfipython reference.

PR validation:

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

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33563/22346

  • 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/L2MuonIsolationProducer
RecoMuon/L2MuonProducer
RecoMuon/L3MuonProducer
RecoMuon/MuonIsolation
RecoMuon/MuonSeedGenerator

@perrotta, @cmsbuild, @slava77, @Martin-Grunewald, @fwyzard, @jpata can you please review it and eventually sign? Thanks.
@HuguesBrun, @bellan, @abbiendi, @Fedespring, @calderona, @sscruz, @jhgoh, @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

@perrotta
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b731ec/14666/summary.html
COMMIT: bbb17ba
CMSSW: CMSSW_12_0_X_2021-04-27-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/33563/14666/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: 3 differences found in the comparisons
  • DQMHistoTests: Total files compared: 38
  • DQMHistoTests: Total histograms compared: 2877605
  • DQMHistoTests: Total failures: 9
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2877573
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 37 files compared)
  • DQMHistoSizes: changed ( 312.0 ): 0.004 KiB MessageLogger/Warnings
  • Checked 160 log files, 37 edm output root files, 38 DQM output files
  • TriggerResults: no differences found

Copy link
Contributor

@perrotta perrotta left a comment

Choose a reason for hiding this comment

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

@ArnabPurohit @trocino please notice the following issues that emerged during the configuration clean up work carried on by Jeongeun. It is true that the actual configuration in L3Muons_cfi.py is never used anywhere (and this is probably why the configuration validation didn't catch them), but it is probably worth to have it fixed at some point.

L3TrajBuilderParameters = dict(
TrackerRecHitBuilder = 'WithTrackAngle',
MuonTrackingRegionBuilder = dict(
#Eta_fixed = cms.double(0.2), # please check, default type is cms.bool(True)
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a bug in the original config: as pointed out by @jeongeun this parameter was supposed to be a bool, while it was inserted as a double: as such the defalt Eta_fixed=cms.bool(True) is used instead.
Please check, and suggest a fix, if needed: otherwise the default true value will be retained

Copy link
Contributor

Choose a reason for hiding this comment

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

Eta_fixed=cms.bool(True) is indeed what is used in the configuration of this producer in the HLT and it should be fixed here to reflect hat.

Phi_fixed = cms.double(0.2),
DeltaR = cms.double(0.2),
EscapePt = cms.double(1.5),
#Phi_fixed = cms.double(0.2), # please check, default type is cms.bool(False)
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a bug in the original config: as pointed out by @jeongeun this parameter was supposed to be a bool, while it was inserted as a double: as such the defalt Eta_fixed=cms.bool(True) is used instead.
Please check, and suggest a fix, if needed: otherwise the default true value will be retained

Copy link
Contributor

Choose a reason for hiding this comment

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

Phi_fixed=cms.bool(True) is indeed what is used in the configuration of this producer in the HLT and it should be fixed here to reflect hat.

EscapePt = cms.double(1.5),
#Phi_fixed = cms.double(0.2), # please check, default type is cms.bool(False)
DeltaR = 0.2,
EscapePt = 1.5,
Copy link
Contributor

Choose a reason for hiding this comment

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

The EscapePt parameter doesn't seem to be used in L3MuonProducer, MuonTrackingRegionBuilder, or anywhere else in CMSSW. I wasn't even able to retrieve when it was needed last.
Can we clean up and remove it from all configurations?

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 it is safe to remove it, indeed.

@trocino
Copy link
Contributor

trocino commented Apr 28, 2021

Thanks JeongEun and Andrea for catching this. We will take a better look and get back to you — even though the situation seems quite clear. Let me add @khaosmos93 @JanFSchulte too, they probably know more about the actual configuration of these parameters in the HLT reconstruction.

),
WriteIsolatorFloat = cms.bool(False),
# OutputMuIsoDeposits = cms.bool(True),
Copy link
Contributor

Choose a reason for hiding this comment

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

OutputMuIsoDeposits is not even a parameter for L2MuonIsolationProducer: the commented out line can be removed

SeedPropagator = cms.string('SteppingHelixPropagatorL2Any'),
NavigationType = cms.string('Standard'),
DoBackwardFilter = cms.bool(True),
SeedPropagator = 'SteppingHelixPropagatorL2Any',
# where you want the seed (in,out)
Copy link
Contributor

Choose a reason for hiding this comment

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

If you keep the comment, you must also keep the corresponding line with SeedPosition

@@ -3,18 +3,15 @@
from RecoMuon.MuonSeedGenerator.ptSeedParameterization_cfi import *
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from RecoMuon.MuonSeedGenerator.ptSeedParameterization_cfi import *
from RecoMuon.MuonSeedGenerator.ptSeedParameterization_cfi import ptSeedParameterization

@@ -3,18 +3,15 @@
from RecoMuon.MuonSeedGenerator.ptSeedParameterization_cfi import *
from RecoMuon.MuonSeedGenerator.MuonSeedPtScale_cfi import *
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from RecoMuon.MuonSeedGenerator.MuonSeedPtScale_cfi import *
from RecoMuon.MuonSeedGenerator.MuonSeedPtScale_cfi import dphiScale

ptSeedParameterization,
dphiScale,
beamSpotTag = cms.InputTag("offlineBeamSpot"),
scaleDT = cms.bool(True),
CSCRecSegmentLabel = cms.InputTag("cscSegments"),
DTRecSegmentLabel = cms.InputTag("dt4DSegments"),
ME0RecSegmentLabel = cms.InputTag("me0Segments"),
EnableDTMeasurement = cms.bool(True),
Copy link
Contributor

Choose a reason for hiding this comment

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

The issue here is that the MuonSeedGenerator has desc.setAllowAnything() in its fillDescriptions method.
As such, only those three parameters which are removed here from the explicit config are defined, while there is no validation for all other ones.
For the moment I'd keep the explicit definition here (taking also into account that EnableME0Measurement is modified twice in the modifier's below), just removing the type specification.
Eventually, all parameters should be defined and validated inside the fillDescriptions method. of MuonSeedGenerator

@cmsbuild
Copy link
Contributor

cmsbuild commented May 4, 2021

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-33563/22462

  • This PR adds an extra 32KB to repository

@fwyzard
Copy link
Contributor

fwyzard commented May 11, 2021

looks good to me - but I can't say if @Martin-Grunewald would like to run some ConfDB-parsing test before signing for HLT.

@Martin-Grunewald
Copy link
Contributor

Ah no, this is fine with me...

@Martin-Grunewald
Copy link
Contributor

+1

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

@qliphy
Copy link
Contributor

qliphy commented May 12, 2021

+1

@Martin-Grunewald
Copy link
Contributor

This PR has entered 12_0_0_pre2 and crashes ConfDB parsing! I believe the problem is that:

  1. there is a fillDescriptions generated L2MuonProducer_cfi.py file, and an explicit L2MuonProducer_cfi.py file in the ../python directory.
  2. the latter file ../python/L2MuonProducer_cfi.py includes L2Muons_cff which includes L2Muons_cfi which includes L2MuonProducer_cfi which seems rather circular.

I believe that the problem should be fixed, or at least the cfi logic made consistent, by removing ../python/L2MuonProducer_cfi.py so that only the fillDescriptons one is used on import without any ambiguity.

@perrotta
Copy link
Contributor

perrotta commented Jun 3, 2021

Thank you @Martin-Grunewald for telling.
In fact, the explicit L2MuonProducer_cfi.py was pre-existent to this PR, and already deprecated since a while already: removing it is the simplest and cleanest way to cleanup the release and help the HLTparser to find the correct config
#33968 removes it

@Martin-Grunewald
Copy link
Contributor

Thanks a lot, Andrea!

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

9 participants