Skip to content

Commit 2bdeefe

Browse files
committed
Fix bad PhiBins pick
1 parent 3bc9c9e commit 2bdeefe

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -529,18 +529,18 @@ GPUg() void computeLayerTrackletsMultiROFKernel(
529529
continue;
530530
}
531531
for (int iPhiCount{0}; iPhiCount < phiBinsNum; iPhiCount++) {
532-
int iPhiBin = (selectedBinsRect.y + iPhiCount) % PhiBins;
532+
int iPhiBin = (selectedBinsRect.y + iPhiCount) % phiBins;
533533
const int firstBinIndex{utils->getBinIndex(selectedBinsRect.x, iPhiBin)};
534534
const int maxBinIndex{firstBinIndex + selectedBinsRect.z - selectedBinsRect.x + 1};
535535
const int firstRowClusterIndex = indexTables[layerIndex + 1][(rof1 - startROF) * tableSize + firstBinIndex];
536536
const int maxRowClusterIndex = indexTables[layerIndex + 1][(rof1 - startROF) * tableSize + maxBinIndex];
537-
if (currentClusterIndex == 0 && layerIndex == 1 && rof0 == 81 && threadIdx.x == 0) {
538-
printf("GPU: rof0: %d rof1: %d nclus0: %d nclus1: %d vertId: %d fbi: %d, mbi: %d, frci: %d, mrci: %d \n", rof0, rof1, clustersCurrentLayer.size(), clustersNextLayer.size(), iV, firstBinIndex, maxBinIndex, firstRowClusterIndex, maxRowClusterIndex);
539-
}
537+
// if (currentClusterIndex == 0 && layerIndex == 1 && rof0 == 81 && threadIdx.x == 0) {
538+
// printf("GPU: pb: %d ipc: %d ipb: %d sbr.x: %d sbr.y: %d sbr.z: %d sbr.w: %d fbi: %d, mbi: %d, frci: %d, mrci: %d \n", phiBins, iPhiCount, iPhiBin, selectedBinsRect.x, selectedBinsRect.y, selectedBinsRect.z, selectedBinsRect.w, firstBinIndex, maxBinIndex, firstRowClusterIndex, maxRowClusterIndex);
539+
// }
540540
for (int iNextCluster{firstRowClusterIndex}; iNextCluster < maxRowClusterIndex; ++iNextCluster) {
541-
if (currentClusterIndex == 0 && layerIndex == 1 && rof0 == 81 && threadIdx.x == 0) {
542-
printf("\ttesting clId: %d ...\n", iNextCluster);
543-
}
541+
// if (currentClusterIndex == 0 && layerIndex == 1 && rof0 == 81 && threadIdx.x == 0) {
542+
// printf("\ttesting clId: %d ...\n", iNextCluster);
543+
// }
544544
if (iNextCluster >= clustersNextLayer.size()) {
545545
break;
546546
}
@@ -782,7 +782,7 @@ void computeTrackletsInROFsHandler(const IndexTableUtils* utils,
782782
gpuCheckError(cudaDeviceSynchronize());
783783
// gpu::printMatrixRow<<<1, 1>>>(iLayer, trackletsLUTs, nClusters[iLayer]);
784784
}
785-
// gpu::printTrackletsLUTPerROF<<<1, 1>>>(1, ROFClusters, trackletsLUTs);
785+
gpu::printTrackletsLUTPerROF<<<1, 1>>>(1, ROFClusters, trackletsLUTs);
786786
}
787787

788788
void countCellsHandler(

Detectors/ITSMFT/ITS/tracking/src/TrackerTraits.cxx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ void TrackerTraits::computeLayerTracklets(const int iteration, int iROFslice, in
128128
if (layer1.empty()) {
129129
continue;
130130
}
131-
132131
for (int iPhiCount{0}; iPhiCount < phiBinsNum; iPhiCount++) {
133132
int iPhiBin = (selectedBinsRect.y + iPhiCount) % mTrkParams[iteration].PhiBins;
134133
const int firstBinIndex{tf->mIndexTableUtils.getBinIndex(selectedBinsRect.x, iPhiBin)};
@@ -145,13 +144,7 @@ void TrackerTraits::computeLayerTracklets(const int iteration, int iROFslice, in
145144
}
146145
const int firstRowClusterIndex = tf->getIndexTable(rof1, iLayer + 1)[firstBinIndex];
147146
const int maxRowClusterIndex = tf->getIndexTable(rof1, iLayer + 1)[maxBinIndex];
148-
if (iCluster == 0 && iLayer == 1 && rof0 == 81) {
149-
printf("CPU: rof0: %d rof1: %d nclus0: %d nclus1: %d vertId: %d fbi: %d, mbi: %d, frci: %d, mrci: %d \n", rof0, rof1, layer0.size(), layer1.size(), iV, firstBinIndex, maxBinIndex, firstRowClusterIndex, maxRowClusterIndex);
150-
}
151147
for (int iNextCluster{firstRowClusterIndex}; iNextCluster < maxRowClusterIndex; ++iNextCluster) {
152-
if (iCluster == 0 && iLayer == 1 && rof0 == 81) {
153-
printf("\ttesting clId: %d ...\n", iNextCluster);
154-
}
155148
if (iNextCluster >= (int)layer1.size()) {
156149
break;
157150
}

0 commit comments

Comments
 (0)