Skip to content
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

Merged
merged 3 commits into from Jul 25, 2019

Conversation

bsunanda
Copy link
Contributor

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

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

-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)

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27585/10996

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @bsunanda for master.

It involves the following packages:

Geometry/HGCalCommonData
RecoLocalCalo/HGCalRecAlgos
SimCalorimetry/HGCalSimProducers

@perrotta, @civanch, @Dr15Jones, @cvuosalo, @ianna, @mdhildreth, @cmsbuild, @kpedro88, @slava77 can you please review it and eventually sign? Thanks.
@edjtscott, @vandreev11, @sethzenz, @makortel, @felicepantaleo, @rovere, @lgray, @cseez, @pfs, @deguio, @argiro, @kpedro88 this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@bsunanda
Copy link
Contributor Author

@cmsbuild Please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 22, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/1589/console Started: 2019/07/23 01:52

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-5848a9/1597/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 2628546
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2628228
  • DQMHistoTests: Total skipped: 317
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@kpedro88
Copy link
Contributor

+upgrade

@@ -1241,15 +1246,15 @@ std::pair<double, double> HGCalDDDConstants::waferPosition(int waferU, int wafer
int HGCalDDDConstants::waferType(DetId const& id) const {
Copy link
Contributor

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!)

Copy link
Contributor Author

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);
Copy link
Contributor

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...)

Copy link
Contributor Author

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

Copy link
Contributor

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.

@perrotta
Copy link
Contributor

+1

  • Centralized enum values replace previous hardcoded numbers, with the same meaning
  • Jenkins tests pass and show no difference with respect to the baseline, as it should

@cvuosalo
Copy link
Contributor

+1

@civanch
Copy link
Contributor

civanch commented Jul 24, 2019

+1

@cmsbuild
Copy link
Contributor

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)

@fabiocos
Copy link
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants