Skip to content

Commit 978eb74

Browse files
committed
GPU TPC CF: Fix rounding error in qMax cut
1 parent 07cdaf8 commit 978eb74

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

GPU/GPUTracking/TPCClusterFinder/ClusterAccumulator.cxx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,7 @@ GPUd() bool ClusterAccumulator::toNative(const ChargePos& pos, const Charge q, t
9898
if (cn.qTot <= param.rec.tpc.cfQTotCutoff) {
9999
return false;
100100
}
101-
cn.qMax = q;
102-
if (cn.qMax <= param.rec.tpc.cfQMaxCutoff) {
103-
return false;
104-
}
101+
cn.qMax = q; // cfQMaxCutoff check already done at PeakFinder level
105102
if (mTimeMean < param.rec.tpc.clustersShiftTimebinsClusterizer) {
106103
return false;
107104
}

GPU/GPUTracking/TPCClusterFinder/GPUTPCCFPeakFinder.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ GPUdii() bool GPUTPCCFPeakFinder::isPeak(
4242
{
4343
uint16_t ll = get_local_id(0);
4444

45-
bool belowThreshold = (q <= calib.tpc.cfQMaxCutoff);
45+
bool belowThreshold = (uint32_t)q <= calib.tpc.cfQMaxCutoff;
4646

4747
uint16_t lookForPeaks;
4848
uint16_t partId = CfUtils::partition<SCRATCH_PAD_WORK_GROUP_SIZE>(

0 commit comments

Comments
 (0)