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
Phase2-hgx207 Have uniform wafer type from HGCalDDDConst and reduce usage of magic numbers #27585
Conversation
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27585/10995
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27585/10996
|
A new Pull Request was created by @bsunanda for master. It involves the following packages: Geometry/HGCalCommonData @perrotta, @civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild Please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+upgrade |
@@ -1241,15 +1246,15 @@ std::pair<double, double> HGCalDDDConstants::waferPosition(int waferU, int wafer | |||
int HGCalDDDConstants::waferType(DetId const& id) const { |
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 return value of this function is the previous one minus 1. This is correctly propagated to the HGCalDigitizer, the only users of this method as far as I could tell: therefore the net effect is that no changes are expected. (OK!)
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 function has not changed at all except it uses enum values instead of numbers. The o/p is indeed unchanged
} | ||
return type; | ||
} | ||
|
||
int HGCalDDDConstants::waferType(int layer, int waferU, int waferV) const { | ||
int type(-1); | ||
int type(HGCSiliconDetId::HGCalCoarseThick); |
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.
Here your are changing the default value from "-1" to "2". Is that default value ever accessed? Was anything else modified in the rest of the code to take into account this change? (I couldn't easily find it...)
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.
-1 does not mean anything - it was used earlier so that all variables are initialized to some value. That default value is never accessed
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, thank you Sunanda. I just wanted to be sure that such a modified initialization default is never accessed, which is what I expected but not obvious from the code itself.
+1
|
+1 |
+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:
Have uniform wafer type definition from HGCalDDDConst and reduce usage of magic numbers
PR validation:
Use standard matrix for testing this
if this PR is a backport please specify the original PR:
Nothing special