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-hgx109 Complete the geometry parameter part for new HGCal geometry #23070

Merged
merged 6 commits into from May 2, 2018

Conversation

bsunanda
Copy link
Contributor

Need changes in DetId format to accommodate

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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

It involves the following packages:

Geometry/HGCalCommonData
Geometry/HGCalGeometry

@civanch, @Dr15Jones, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please review it and eventually sign? Thanks.
@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 Apr 26, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/27668/console Started: 2018/04/26 18:57

@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-23070/27668/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 29
  • DQMHistoTests: Total histograms compared: 2495054
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2494877
  • DQMHistoTests: Total skipped: 176
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 28 files compared)
  • Checked 119 log files, 9 edm output root files, 29 DQM output files

@@ -16,6 +16,7 @@ class HGCalParameters {
public:

typedef std::vector<std::unordered_map<int32_t,int32_t> > layer_map;
typedef std::unordered_map<unsigned int, unsigned int> wafer_map;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - please, read Google advise on using unsigned integers https://google.github.io/styleguide/cppguide.html#Integer_Types:
"Try to avoid unsigned types (except for representing bitfields or modular arithmetic). Do not use an unsigned type merely to assert that a variable is non-negative."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ianna I do not think that recommendation has universal agreement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Kevin


while (dodet) {
const DDSolid & sol = fv.logicalPart().solid();
std::string name = sol.name();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - please, use reference to avoid copying the string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot use - because sol.name() is doing an operation ns+name()

const DDSolid & sol = fv.logicalPart().solid();
std::string name = sol.name();
// Layers first
std::vector<int> copy = fv.copyNumbers();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - Perhaps, it's possible to use fv.copyno() instead?

for (unsigned int i=0; i<layers.size(); ++i) {
for (auto & layer : layers) {
if (layer.first == (int)(i+1)) {
php.layerIndex_.emplace_back(i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - it looks like there should be a structure for parameters associated with one layer

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 part is a copy of the earlier method


DDsvalues_type sv(fv.mergedSpecifics());
php.cellThickness_ = DDVectorGetter::get("CellThickness");
for (double & k : php.cellThickness_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - no need to reference a fundamental type

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing this causes crash

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - you can cherry-pick my commit:
bsunanda@2054ca3

BTW, it does improve timing as well:

< Begin processing the 1st record. Run 1, Event 1, LumiSection 1 on stream 0 at 30-Apr-2018 10:25:04.268 CEST
< %MSG-i HGCalGeom:  HGCalParameterTester:testEE 30-Apr-2018 10:25:04 CEST  Run: 1 Event: 1
---
> Begin processing the 1st record. Run 1, Event 1, LumiSection 1 on stream 0 at 30-Apr-2018 10:26:57.447 CEST
> %MSG-i HGCalGeom:  HGCalParameterTester:testEE 30-Apr-2018 10:26:57 CEST  Run: 1 Event: 1
15c15
< %MSG-i HGCalGeom:  HGCalParameterTester:testEE 30-Apr-2018 10:25:04 CEST  Run: 1 Event: 1
---
> %MSG-i HGCalGeom:  HGCalParameterTester:testEE 30-Apr-2018 10:26:58 CEST  Run: 1 Event: 1
1063,1064c1063,1064
< Elapsed time: 0.660254 s
< %MSG-i HGCalGeom:  HGCalParameterTester:testHESil 30-Apr-2018 10:25:04 CEST  Run: 1 Event: 1
---
> Elapsed time: 0.654509 s
> %MSG-i HGCalGeom:  HGCalParameterTester:testHESil 30-Apr-2018 10:26:58 CEST  Run: 1 Event: 1
1067c1067
< %MSG-i HGCalGeom:  HGCalParameterTester:testHESil 30-Apr-2018 10:25:05 CEST  Run: 1 Event: 1
---
> %MSG-i HGCalGeom:  HGCalParameterTester:testHESil 30-Apr-2018 10:26:58 CEST  Run: 1 Event: 1
2145,2146c2145,2146
< Elapsed time: 0.521812 s
< %MSG-i HGCalGeom:  HGCalParameterTester:testHESci 30-Apr-2018 10:25:05 CEST  Run: 1 Event: 1
---
> Elapsed time: 0.519326 s
> %MSG-i HGCalGeom:  HGCalParameterTester:testHESci 30-Apr-2018 10:26:58 CEST  Run: 1 Event: 1
2149c2149
< %MSG-i HGCalGeom:  HGCalParameterTester:testHESci 30-Apr-2018 10:25:05 CEST  Run: 1 Event: 1
---
> %MSG-i HGCalGeom:  HGCalParameterTester:testHESci 30-Apr-2018 10:26:59 CEST  Run: 1 Event: 1
2220c2220
< Elapsed time: 0.518329 s
---
> Elapsed time: 0.515879 s

php.nPhiBinBH_ = dbl_to_int(DDVectorGetter::get("NPhiBinBH"));
php.dPhiEta_.clear();
for (auto const & nbin : php.nPhiBinBH_)
php.dPhiEta_.emplace_back(CLHEP::twopi/nbin);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bsunanda - please use M_PI, not CLHEP

#endif
php.slopeTop_ = DDVectorGetter::get("SlopeTop");
php.zFront_ = DDVectorGetter::get("ZFront");
for (double & k : php.zFront_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment applies here...

for (double & k : php.zFront_)
k *= k_ScaleFromDDD;
php.rMaxFront_ = DDVectorGetter::get("RMaxFront");
for (double & k : php.rMaxFront_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment applies here...

<< php.rMaxFront_[k];
#endif
php.zRanges_ = DDVectorGetter::get("ZRanges");
for (double & k : php.zRanges_)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment applies here...

@@ -7,7 +7,7 @@
#include "DataFormats/ForwardDetId/interface/HGCalDetId.h"
#include "DataFormats/ForwardDetId/interface/ForwardSubdetector.h"

//#define EDM_ML_DEBUG
#define EDM_ML_DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please, remove it

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@bsunanda
Copy link
Contributor Author

@cmsbuild Please test

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 30, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/27719/console Started: 2018/04/30 16:15
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/27722/console Started: 2018/04/30 17:46

@cmsbuild
Copy link
Contributor

Pull request #23070 was updated. @civanch, @Dr15Jones, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please check and sign again.

@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-23070/27722/summary.html

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /build/cmsbld/jenkins/workspace/compare-root-files-short-matrix/results/JR-comparison/PR-23070/250202.181_TTbar_13UP18+TTbar_13UP18+PREMIXUP18_PU25+DIGIPRMXLOCALUP18_PU25+RECOPRMXUP18_PU25+HARVESTUP18_PU25

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 29
  • DQMHistoTests: Total histograms compared: 2495096
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2494919
  • DQMHistoTests: Total skipped: 176
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 28 files compared)
  • Checked 119 log files, 9 edm output root files, 29 DQM output files

@bsunanda
Copy link
Contributor Author

bsunanda commented May 1, 2018

@ianna @kpedro88 Please approve this PR

@kpedro88
Copy link
Contributor

kpedro88 commented May 1, 2018

+1

@ianna
Copy link
Contributor

ianna commented May 1, 2018

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented May 1, 2018

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

fabiocos commented May 2, 2018

+1

@cmsbuild cmsbuild merged commit f22ef0a into cms-sw:master May 2, 2018
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

6 participants