-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Implement fillDescriptions() for producers in RecoParticleFlow/PFSimProducer #32342
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32342/20171
|
A new Pull Request was created by @guitargeek (Jonas Rembser) for master. It involves the following packages: RecoParticleFlow/Configuration @perrotta, @jpata, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins.
|
+1 |
Comparison is ready Comparison Summary:
|
Thanks. Just adding @kdlong here, as he is looking over various truth definitions for PF. |
|
||
#include <memory> | ||
|
||
class ConvBremSeedProducer : public edm::EDProducer { |
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 have the impression that this module is obsolete, and it could even be remved from CMSSW: if so, maybe better doing it now, and avoid uselessly spending time in maintaining it in the future.
Otherwise, since you already spent some time in updating it, you could also do a little step forward and make it a stream module, instead of a legacy one.
void ConvBremSeedProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | ||
// convBremSeeds | ||
edm::ParameterSetDescription desc; | ||
desc.add<edm::InputTag>("stereorecHits", edm::InputTag("gsStripRecHits", "stereoRecHit")); |
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 parameter does not seem to be needed: remove
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" | ||
#include "FWCore/Utilities/interface/isFinite.h" |
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.
not needed
@@ -92,11 +167,9 @@ PFSimParticleProducer::PFSimParticleProducer(const edm::ParameterSet& iConfig) { | |||
|
|||
particleFilter_ = iConfig.getParameter<ParameterSet>("ParticleFilter"); | |||
|
|||
mySimEvent = new FSimEvent(particleFilter_); | |||
mySimEvent = std::make_unique<FSimEvent>(particleFilter_); |
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.
Since you are on it, please also remove the (commented out) lines 201-204 below
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" | ||
#include "FWCore/Utilities/interface/isFinite.h" |
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.
not used
desc.add<edm::InputTag>("gsfTrackSrc", {"electronGsfTracks"}); | ||
|
||
// if useTiming_ | ||
desc.add<edm::InputTag>("trackTimeValueMap", {}); |
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.
The logic of the code as it is now assumes that the bool useTiming_
is true
if conf.existsAs<edm::InputTag>("trackTimeValueMap")
, and false
otherwise.
But if you define "trackTimeValueMap" in the fillDescriptions method, then useTiming_
can never be false
.
This doesn't get exposed now because this simPFProducer module is only used in Phase2 with Timing, and therefore there is no current use case for useTiming_
being false
. However, this is a bug that must be fixed.
There are probably several ways out, but I think that the easiest and cleanest way for doing it is simply addOptional
all these paramaters, without providing here any initialization value. As such those parameters will only get inserted by the modifier in RecoParticleFlow/Configuration/python/RecoParticleFlow_cff.py, and will not be present in unmodified configurations.
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.
Thanks a lot, I didn't know about addOptional
!
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32342/20255
|
please test |
+1 |
Comparison results are now available Comparison Summary:
|
+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, @qliphy (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Implement fillDescriptions() for producers in RecoParticleFlow/PFSimProducer to address issue #29449 and merge
.h
files with.cc
files in RecoParticleFlow/PFSimProducer/plugins.PR validation:
CMSSW compiles, local matrix tests pass.
if this PR is a backport please specify the original PR and why you need to backport that PR:
No backport intended.