-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Updating fillDescriptions in RecoBTag packages #49274
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
base: master
Are you sure you want to change the base?
Conversation
|
cms-bot internal usage |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49274/46632 Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49274/46633 |
|
A new Pull Request was created by @soureek for master. It involves the following packages:
@cmsbuild, @jfernan2, @mandrenguyen, @srimanob can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
|
||
| #include "FWCore/Framework/interface/MakerMacros.h" | ||
| void BTagSkimMC::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | ||
| edm::ParameterSetDescription desc; |
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.
Sorry, but what's the point of this?
This does not provide any validation nor defaults for any of the actual configuration parameters?
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.
@mmusich These are primarily helper classes or EDFilters. So they do not require anything specific validation or defaults.
All the EDProducers, EDAnalyzers, ESProducers under RecoBTag have the necessary detailed fillDescriptions provided already.
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.
cmssw/RecoBTag/Skimming/src/BTagSkimMC.cc
Lines 14 to 17 in 830e13c
| verbose = p.getUntrackedParameter<bool>("verbose", false); | |
| pthatMin = p.getParameter<double>("pthat_min"); | |
| pthatMax = p.getParameter<double>("pthat_max"); | |
| process_ = p.getParameter<string>("mcProcess"); |
This specific class has configurable parameters. I am sure others do elsewhere
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.
@mmusich I've changed most of them to UntrackedParameter except for the InputTags so that the default values are set in the constructor itself. The relevant python cfi files are modified accordingly.
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 is exactly the opposite of what should have been done.
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.
In my limited experience, I don't remember encountering issues regarding time or memory consumption with Untracked parameters.
Can you please elaborate may be with some reference @mmusich ?
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.
@soureek the problem is not about time or memory performance.
It's jut that I don't see the what's the advantage of the approach you propose:
- the
tracked-ness of a given parameter is what makes it visible in the event provenance. Generally parameters that influence the physics performance are tracked, while those that don't are not. Have you checked if all the parameters changed here have influence on the reconstruction performance? - making them
untrackedstill doesn't not solve the problem that when providing afillDescriptionsmethod, one is supposed to support configuration validation (and defaults) for all the configurable parameters (see cmssw code rule 6.14 at https://cms-sw.github.io/cms_coding_rules.html#6--packaging-rules-1)
These are primarily helper classes or
EDFilters. So they do not require anything specific validation or defaults.
All theEDProducers,EDAnalyzers,ESProducersunderRecoBTaghave the necessary detailedfillDescriptionsprovided already.
that is indeed the case, because previously these have been adapted as part of a bigger issue to support them (see #47275 and pull requests mentioned therein).
IMHO the right course of action is to create fillDescriptions for the ancillary helper classes (providing validation and defaults for their configurable parameters) and then use those methods to populate in turn the fillDescriptions of the plugins that used them (suggested reading: https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideConfigurationValidationAndHelp#A_Plugin_Module_Using_Another_He).
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.
@mmusich Thanks for the detailed explanation. I have a better understanding of the issue now. I will make a fresh PR based on the ☝️ comments. You can close this one without merging if that's suitable.
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49274/46636 Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49274/46637 |
|
Pull request #49274 was updated. @cmsbuild, @jfernan2, @mandrenguyen, @srimanob can you please check and sign again. |
PR description:
Updating
fillDescriptionsforRecoBTag/BTagToolsandRecoBTag/Skimmingfollowing issue #29265Local compilation successful without any warnings.