Skip to content
Snippets Groups Projects

sts::Hitfinder: Replace asserts with monitor struct.

Merged Felix Weiglhofer requested to merge fweig/cbmroot:algo-sts-add-monitor into master
3 files
+ 62
14
Compare changes
  • Side-by-side
  • Inline

Files

@@ -102,8 +102,6 @@ XPU_D void sts::Hitfinder::CalculateChannelOffsets(FindClusters::context& ctx, C
channelOffsets[i] = pos + 1;
}
}
XPU_ASSERT(digis[pos].GetChannel()
<= digis[pos + 1].GetChannel()); //channel are supposed to be sorted increasingly
}
for (int c = digis[nDigis - 1].GetChannel() + 1; c < nChannels; c++) {
@@ -438,9 +436,6 @@ XPU_D void sts::Hitfinder::CreateClusterFromConnectorsN(int iModule, CbmStsDigi*
// Correction for corrupt clusters
if (x < cProps.chanF || x > cProps.chanL) { x = cProps.xSum / qSum; }
XPU_ASSERT(x >= cProps.chanF && x <= cProps.chanL);
XPU_ASSERT(nDigis > 2);
if (IsBackside(iModule)) { x += nChannels; }
sts::Cluster cls {
@@ -792,8 +787,12 @@ XPU_D void sts::Hitfinder::CreateHit(int iModule, float xLocal, float yLocal, fl
int idx = xpu::atomic_add(&nHitsPerModule[iModule], 1);
assert(size_t(idx) < maxHitsPerModule);
if (size_t(idx) < maxHitsPerModule) { hitsPerModule[iModule * maxHitsPerModule + idx] = hit; }
if (size_t(idx) >= maxHitsPerModule) {
xpu::atomic_add(&monitor->fNumHitBucketOverflow, 1);
return;
}
hitsPerModule[iModule * maxHitsPerModule + idx] = hit;
}
XPU_D float sts::Hitfinder::LandauWidth(float charge) const
Loading