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
Some RecoParticleFlow/PFProducer cleanup #26190
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26190/8785
|
A new Pull Request was created by @guitargeek (Jonas Rembser) for master. It involves the following packages: EgammaAnalysis/ElectronTools @cmsbuild, @perrotta, @santocch, @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. |
Comparison job queued. |
while (phi>pi) phi -= pi2; | ||
while (phi<-pi) phi += pi2; | ||
return phi; | ||
} |
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 redundant, see
cmssw/DataFormats/Math/interface/normalizedPhi.h
Lines 6 to 9 in c24591c
// return a value of phi into interval [-pi,+pi] | |
template<typename T> | |
constexpr | |
T normalizedPhi(T phi) { return reco::reduceRange(phi);} |
cmssw/DataFormats/Math/interface/deltaPhi.h
Lines 13 to 20 in c24591c
// reduce to [-pi,pi] | |
template<typename T> | |
constexpr T reduceRange(T x) { | |
constexpr T o2pi = 1./(2.*M_PI); | |
if (std::abs(x) <= T(M_PI)) return x; | |
T n = std::round(x*o2pi); | |
return x - n*T(2.*M_PI); | |
} |
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! I was sure that it must have existed somewhere, just didn't know where.
Comparison is ready Comparison Summary:
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26190/8880
|
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
setCristalPhiEtaMaxSize(0.2); | ||
setPhiOffset(0.32); | ||
cristalPhiEtaMaxSize_ = 0.2; | ||
phiOffset_ = 0.32; |
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.
these should be moved to the member initializer list before the constructor body
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.
That did not work: I think it's because these are members of the base class and not this one. These values could be maybe passed to the constructor of the base class, but then the base constructor would have to be changed, as well as the signature of the corresponding factory and other code. I don't think all of that should be changed in a cleanup PR.
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.
ok, thanks for checking.
+1 for #26190 2529ef9
|
+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:
Going over the RecoParticleFlow/PFProducer and making some changes that should make the particle flow code easier to grasp:
EgammaElectronAlgos
. The implementation there has been moved toEgammaCoreTools
such that it can also be used by the particle flow code without introducing a further package dependence. Maybe another location would be more adequate?PR validation:
CMSSW compiles and local matrix tests pass.