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
Layer Clustering for HGCal Scintillator #27485
Conversation
The code-checks are being triggered in jenkins. |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27485/10819
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-27485/10820
|
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27485/11246
|
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1
|
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.
A few followup comments after the changes from the reco review. These will not affect the results of the PR in any way, so they can be implemented in a followup PR.
@@ -409,6 +410,18 @@ bool RecHitTools::isHalfCell(const DetId& id) const { | |||
return ishalf; | |||
} | |||
|
|||
bool RecHitTools::isSilicon(const DetId& id) const { | |||
bool issilicon = false; |
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 can all be simplified to:
return (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi);
|
||
bool RecHitTools::isOnlySilicon(const unsigned int layer) const { | ||
bool isonlysilicon = (layer % bhLastLayer_) < bhOffset_; | ||
return isonlysilicon; |
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.
simplify:
return (layer % bhLastLayer_) < bhOffset_;
int getGlobalBin(float x, float y) const { return getXBin(x) + getYBin(y) * hgcaltilesconstants::nColumns; } | ||
|
||
int getGlobalBinByBin(int xBin, int yBin) const { return xBin + yBin * hgcaltilesconstants::nColumns; } | ||
|
||
int getGlobalBinEtaPhi(float eta, float phi) const { | ||
return hgcaltilesconstants::nColumns * hgcaltilesconstants::nRows + getEtaBin(eta) + |
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.
to reduce duplication slightly:
return getGlobalBinByBinEtaPhi(getEtaBin(eta),getPhiBin(phi));
auto& cellsOnLayer = cells_[layerId]; | ||
unsigned int numberOfCells = cellsOnLayer.detid.size(); | ||
bool isOnlySi(false); |
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.
simplify:
bool isOnlySi(rhtools_.isOnlySilicon(layerId));
for (unsigned int j = 0; j < binSize; j++) { | ||
unsigned int otherId = lt[binId][j]; | ||
bool otherSi = isOnlySi || cellsOnLayer.isSi[otherId]; | ||
if (otherSi) { //silicon cells cannot talk to scintillator cells |
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.
simplify:
if (otherSi and distance(i, otherId, layerId, false) < delta) {
and put the comment on the previous line
|
||
for (unsigned int j = 0; j < binSize; j++) { | ||
unsigned int otherId = lt[binId][j]; | ||
if (!cellsOnLayer.isSi[otherId]) { //scintillator cells cannot talk to silicon cells |
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.
simplify:
if (!cellsOnLayer.isSi[otherId] and distance(i, otherId, layerId, true) < delta) {
and put the comment on the previous line
auto& cellsOnLayer = cells_[layerId]; | ||
unsigned int numberOfCells = cellsOnLayer.detid.size(); | ||
bool isOnlySi(false); |
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.
simplify:
bool isOnlySi(rhtools_.isOnlySilicon(layerId));
+upgrade |
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:
This PR modifies the CLUE algorithm for the scintillator section of the HGCal. It basically changes the distance calculation from x-y space to eta-phi space for the scintillator. This is motivated by the fact that the scintillator cells are uniform in eta-phi rather than x-y. The implementation has been presented in the following HGCal DPG meetings:
@rovere @felicepantaleo
PR validation:
The PR was validated locally and passes:
scram build code-checks
scram b runtests
runTheMatrix.py -l limited -i all --ibeos
if this PR is a backport please specify the original PR: No.
Before submitting your pull requests, make sure you followed this checklist: