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

Layer Clustering for HGCal Scintillator #27485

Merged
merged 18 commits into from Aug 2, 2019

Conversation

jingyucms
Copy link
Contributor

@jingyucms jingyucms commented Jul 11, 2019

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:

@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-27485/10819

  • This PR adds an extra 44KB to repository

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-27485/10820

  • This PR adds an extra 84KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27485/11246

  • This PR adds an extra 96KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2019

Pull request #27485 was updated. @perrotta, @cmsbuild, @kpedro88, @slava77 can you please check and sign again.

@kpedro88
Copy link
Contributor

kpedro88 commented Aug 1, 2019

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/1781/console Started: 2019/08/01 20:04

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 1, 2019

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

Comparison Summary:

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

@slava77
Copy link
Contributor

slava77 commented Aug 1, 2019

+1

for #27485 223cb8c

Copy link
Contributor

@kpedro88 kpedro88 left a 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;
Copy link
Contributor

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

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

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

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

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

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

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

@kpedro88
Copy link
Contributor

kpedro88 commented Aug 2, 2019

+upgrade
a few minor simplifications can be addressed in a followup PR

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 2, 2019

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)

@kpedro88
Copy link
Contributor

kpedro88 commented Aug 2, 2019

+1

@cmsbuild cmsbuild merged commit d50e504 into cms-sw:master Aug 2, 2019
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

8 participants