-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Simplify inheritance hirachy of EcalClusterFunctions #28332
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28332/12593
|
A new Pull Request was created by @guitargeek (Jonas Rembser) for master. It involves the following packages: RecoEcal/EgammaCoreTools @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
I assumed the idea was to maybe have at some point separate factories for alternative functions that serve the same purpose, like crack correction or energy correction, is that correct? But since these don't exist, this inheritances were just complicated boilerplate at this point. |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
is this inheritance needed at all? |
@@ -13,25 +21,75 @@ | |||
#include "Geometry/Records/interface/CaloGeometryRecord.h" | |||
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" | |||
#include "Geometry/CaloGeometry/interface/TruncatedPyramid.h" | |||
|
|||
//////From DummyHepMCAnalyzer.cc: | |||
#include "FWCore/Framework/interface/EDAnalyzer.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.
Is this include needed?
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h" | ||
#include "FWCore/Framework/interface/ESHandle.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.
Duplicate
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/Framework/interface/ESHandle.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.
Duplicate
@@ -13,32 +19,92 @@ | |||
#include "Geometry/Records/interface/CaloGeometryRecord.h" | |||
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" | |||
#include "Geometry/CaloGeometry/interface/TruncatedPyramid.h" | |||
|
|||
//////From DummyHepMCAnalyzer.cc: | |||
#include "FWCore/Framework/interface/EDAnalyzer.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.
Is this needed?
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "RecoEcal/EgammaCoreTools/interface/EcalClusterFunctionBaseClass.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.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.
Duplicate
#include "CondFormats/EcalObjects/interface/EcalClusterEnergyUncertaintyParameters.h" | ||
#include "DataFormats/EgammaReco/interface/BasicCluster.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.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.
Duplicate
@@ -13,19 +19,70 @@ | |||
#include "Geometry/Records/interface/CaloGeometryRecord.h" | |||
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h" | |||
#include "Geometry/CaloGeometry/interface/TruncatedPyramid.h" | |||
|
|||
//////From DummyHepMCAnalyzer.cc: | |||
#include "FWCore/Framework/interface/EDAnalyzer.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.
Is this include needed?
#include "CondFormats/EcalObjects/interface/EcalClusterLocalContCorrParameters.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "DataFormats/EgammaReco/interface/BasicCluster.h" | ||
#include "FWCore/Framework/interface/EventSetup.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.
Duplicate
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "DataFormats/EgammaReco/interface/BasicCluster.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.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.
Duplicate
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "CondFormats/EcalObjects/interface/EcalClusterLocalContCorrParameters.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "DataFormats/EgammaReco/interface/BasicCluster.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.
Duplicate
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-28332/12639
|
@VinInn Right now it is technically used because many plugins in Egamma use the |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready 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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
On my egamma refactors, I frequently encounter these plugins inheriting from
EcalClusterFunctionBaseClass
and it's always a bit complicated to understand what is going on.For every plugin (let's say the
EcalClusterCrackCorrection
, there is another intermediate class defined (EcalClusterCrackCorrectionBaseClass
) which is private to the plugins directory and is only used such that theEcalClusterCrackCorrection
can inherit from it. This pattern is repeated for all the plugins. I would suggest to simplify this by having the plugins all inherit fromEcalClusterFunctionBaseClass
directly. Like this, theRecoEcal/EgammaCoreTools/plugins
directory looks radically simpler and it would really help for understanding the code and future refactors. For example, one can now just dogit grep EcalClusterFunctionBaseClass
to find all the plugins that inherit from it. This PR doesn't make any actual changes to the code, it just reshuffles some lines.PR validation:
CMSSW complies and local matrix tests pass.
if this PR is a backport please specify the original PR:
No backport intended.