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
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23070/4477 |
A new Pull Request was created by @bsunanda for master. It involves the following packages: Geometry/HGCalCommonData @civanch, @Dr15Jones, @ianna, @mdhildreth, @cmsbuild, @kpedro88 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 is ready Comparison Summary:
|
@@ -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; |
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.
@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."
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.
@ianna I do not think that recommendation has universal agreement.
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.
I agree with Kevin
|
||
while (dodet) { | ||
const DDSolid & sol = fv.logicalPart().solid(); | ||
std::string name = sol.name(); |
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.
@bsunanda - please, use reference to avoid copying the string.
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.
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(); |
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.
@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); |
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.
@bsunanda - it looks like there should be a structure for parameters associated with one layer
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 part is a copy of the earlier method
|
||
DDsvalues_type sv(fv.mergedSpecifics()); | ||
php.cellThickness_ = DDVectorGetter::get("CellThickness"); | ||
for (double & k : php.cellThickness_) |
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.
@bsunanda - no need to reference a fundamental type
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.
removing this causes crash
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.
@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); |
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.
@bsunanda - please use M_PI, not CLHEP
#endif | ||
php.slopeTop_ = DDVectorGetter::get("SlopeTop"); | ||
php.zFront_ = DDVectorGetter::get("ZFront"); | ||
for (double & k : php.zFront_) |
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.
same comment applies here...
for (double & k : php.zFront_) | ||
k *= k_ScaleFromDDD; | ||
php.rMaxFront_ = DDVectorGetter::get("RMaxFront"); | ||
for (double & k : php.rMaxFront_) |
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.
same comment applies here...
<< php.rMaxFront_[k]; | ||
#endif | ||
php.zRanges_ = DDVectorGetter::get("ZRanges"); | ||
for (double & k : php.zRanges_) |
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.
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 |
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.
please, remove it
The code-checks are being triggered in jenkins. |
@cmsbuild Please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23070/4512 |
The tests are being triggered in jenkins. |
Pull request #23070 was updated. @civanch, @Dr15Jones, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please check and sign again. |
Comparison job queued. |
Comparison is ready @slava77 comparisons for the following workflows were not done due to missing matrix map:
Comparison Summary:
|
+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 |
Need changes in DetId format to accommodate