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-hgx124 Split the SD for HGCal for silicon and scintillators #23772
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23772/5451 |
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. |
double dx = std::abs(xx-hgpar_->waferPosX_[k]); | ||
double dy = std::abs(yy-hgpar_->waferPosY_[k]); | ||
if (dx <= rmax_ && dy <= hexside_) { | ||
if ((dy <= 0.5*hexside_) || (dx*tan30deg_ <= (hexside_-dy))) { |
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 two if statements could be combined
<< rr-zz/std::sinh(hgpar_->etaMinBH_+ieta*cell) | ||
<< ":" << zz/std::sinh(hgpar_->etaMinBH_+(ieta-1)*cell)-rr; | ||
#endif | ||
return ((dist > rr*dphi) ? rr*dphi : dist); |
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.
return std::min(rr*dphi,dist);
@@ -1067,6 +1148,30 @@ bool HGCalDDDConstants::waferInLayerTest(int wafer, int lay, bool full) const { | |||
return in; | |||
} | |||
|
|||
bool HGCalDDDConstants::waferGlobal2Local(double& xx, double& yy, int& wafer, | |||
int& celltyp) const { | |||
std::cout << xx <<":" << yy << ":" << wafer << ":" << celltyp << ":" << hgpar_ << "\n"; |
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.
remove cout
std::cout << xx <<":" << yy << ":" << wafer << ":" << celltyp << ":" << hgpar_ << "\n"; | ||
int sizew = (int)(hgpar_->waferPosX_.size()); | ||
wafer = sizew; | ||
for (int k=0; k<sizew; ++k) { |
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 looks similar to the loop in distFromEdgeHex()
; can it be put in a common function?
SimG4CMS/Calo/src/HGCScintSD.cc
Outdated
<< " top Level " << levelT1_ << ":" << levelT2_; | ||
#endif | ||
|
||
numberingScheme_ = new HGCalNumberingScheme(*hgcons_,mydet_,nameX_); |
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 looks like a potential memory leak, use a smart pointer (also fix it in other HGCal SD classes)
SimG4CMS/Calo/src/HGCalSD.cc
Outdated
numberingScheme_ = new HGCalNumberingScheme(*hgcons,mydet_,nameX_); | ||
if (rejectMB_ && (!isScint_)) | ||
mouseBite_ = new HGCMouseBite(*hgcons,angles_,mouseBiteCut_,waferRot_); | ||
numberingScheme_ = new HGCalNumberingScheme(*hgcons_,mydet_,nameX_); |
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.
smart pointers here as well
-1 Tested at: ec638ad You can see the results of the tests here: I found follow errors while testing this PR Failed tests: RelVals
The relvals timed out after 2 hours. |
Comparison not run due to runTheMatrix errors (RelVals and Igprof tests were also skipped) |
The tests are being triggered in jenkins. |
Pull request #23772 was updated. @civanch, @Dr15Jones, @ianna, @mdhildreth, @cmsbuild, @kpedro88 can you please check and sign again. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@@ -242,10 +243,88 @@ double HGCalDDDConstants::cellSizeHex(int type) const { | |||
return cell; | |||
} | |||
|
|||
double HGCalDDDConstants::distFromEdgeHex(double x, double y, double z) 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.
@bsunanda - please, add a comment what is calculated here. Is the point(x,y) inside of the polygon?
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 takes longer for me to check the code without comment on what it suppose to do.
Hi Ianna
This is for a point inside the volume. I shall add a comment for the next version which is under preparation right now. Could this PR be merged as it is now. That will help in the progress of the next PR. Best regards
Sunanda
________________________________
From: Ianna Osborne [notifications@github.com]
Sent: 11 July 2018 16:46
To: cms-sw/cmssw
Cc: Sunanda Banerjee; Mention
Subject: Re: [cms-sw/cmssw] Phase2-hgx124 Split the SD for HGCal for silicon and scintillators (#23772)
@ianna requested changes on this pull request.
________________________________
In Geometry/HGCalCommonData/src/HGCalDDDConstants.cc<#23772 (comment)>:
@@ -242,10 +243,88 @@ double HGCalDDDConstants::cellSizeHex(int type) const {
return cell;
}
+double HGCalDDDConstants::distFromEdgeHex(double x, double y, double z) const {
@bsunanda<https://github.com/bsunanda> - please, add a comment what is calculated here. Is the point(x,y) inside of the polygon?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#23772 (review)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AEzMuowUP_8z70RJqJkm7iWLpbrjqjIDks5uFg_GgaJpZM4VJeLT>.
|
+upgrade |
+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 it affects only Phase2, g4SimHits is changed only for SD of HGCal. |
Allow fiducial volume cuts in silicon and scintillator detectors of HGCal