Skip to content

Commit

Permalink
Merge pull request #41905 from felicepantaleo/fixCLUE_DataHazard
Browse files Browse the repository at this point in the history
Fix CLUE3D data hazard
  • Loading branch information
cmsbuild authored Jun 13, 2023
2 parents 50b381e + 492128b commit a906ada
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RecoHGCal/TICL/plugins/PatternRecognitionbyCLUE3D.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ void PatternRecognitionbyCLUE3D<TILES>::calculateLocalDensity(
const int etaWindow = 2;
const int phiWindow = 2;
int etaBinMin = std::max(tileOnLayer.etaBin(clustersOnLayer.eta[i]) - etaWindow, 0);
int etaBinMax = std::min(tileOnLayer.etaBin(clustersOnLayer.eta[i]) + etaWindow, nEtaBin);
int etaBinMax = std::min(tileOnLayer.etaBin(clustersOnLayer.eta[i]) + etaWindow, nEtaBin - 1);
int phiBinMin = tileOnLayer.phiBin(clustersOnLayer.phi[i]) - phiWindow;
int phiBinMax = tileOnLayer.phiBin(clustersOnLayer.phi[i]) + phiWindow;
if (PatternRecognitionAlgoBaseT<TILES>::algo_verbosity_ > VerbosityLevel::Advanced) {
Expand Down Expand Up @@ -686,7 +686,7 @@ void PatternRecognitionbyCLUE3D<TILES>::calculateDistanceToHigher(
int etaWindow = 1;
int phiWindow = 1;
int etaBinMin = std::max(tileOnLayer.etaBin(clustersOnLayer.eta[i]) - etaWindow, 0);
int etaBinMax = std::min(tileOnLayer.etaBin(clustersOnLayer.eta[i]) + etaWindow, nEtaBin);
int etaBinMax = std::min(tileOnLayer.etaBin(clustersOnLayer.eta[i]) + etaWindow, nEtaBin - 1);
int phiBinMin = tileOnLayer.phiBin(clustersOnLayer.phi[i]) - phiWindow;
int phiBinMax = tileOnLayer.phiBin(clustersOnLayer.phi[i]) + phiWindow;
for (int ieta = etaBinMin; ieta <= etaBinMax; ++ieta) {
Expand Down

0 comments on commit a906ada

Please sign in to comment.