Skip to content

Commit ec4bdb1

Browse files
committed
TPC Clusterizer: Add relative noise suppression epsilon
1 parent 10a22e0 commit ec4bdb1

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ AddOptionRTC(cfQTotCutoff, unsigned char, 5, "", 0, "Cluster Finder rejects clus
5656
AddOptionRTC(cfInnerThreshold, unsigned char, 0, "", 0, "Cluster Finder extends cluster if inner charge above this threshold")
5757
AddOptionRTC(cfMinSplitNum, unsigned char, 1, "", 0, "Minimum number of split charges in a cluster for the cluster to be marked as split")
5858
AddOptionRTC(cfNoiseSuppressionEpsilon, unsigned char, 10, "", 0, "Cluster Finder: Difference between peak and charge for the charge to count as a minima during noise suppression")
59+
AddOptionRTC(cfNoiseSuppressionEpsilonRelative, unsigned char, 76, "", 0, "Cluster Finder: Difference between peak and charge for the charge to count as a minima during noise suppression, relative as fraction of 255")
5960
AddOptionRTC(nWays, char, 3, "", 0, "Do N fit passes in final fit of merger")
6061
AddOptionRTC(nWaysOuter, char, 0, "", 0, "Store outer param")
6162
AddOptionRTC(trackFitRejectMode, char, 5, "", 0, "0: no limit on rejection or missed hits, >0: break after n rejected hits, <0: reject at max -n hits")

GPU/GPUTracking/TPCClusterFinder/GPUTPCCFNoiseSuppression.cxx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,17 @@ GPUd() void GPUTPCCFNoiseSuppression::updatePeaksImpl(int nBlocks, int nThreads,
9595
}
9696

9797
GPUdi() void GPUTPCCFNoiseSuppression::checkForMinima(
98-
float q,
99-
float epsilon,
98+
const float q,
99+
const float epsilon,
100+
const float epsilonRelative,
100101
PackedCharge other,
101102
int pos,
102103
ulong* minimas,
103104
ulong* bigger)
104105
{
105106
float r = other.unpack();
106107

107-
ulong isMinima = (q - r > epsilon);
108+
ulong isMinima = (q - r > epsilon) && (float)CAMath::Abs(q - r) / (float)CAMath::Max(q, r) > epsilonRelative; // TODO: Can we assume q > r and get rid of Max/Abs?
108109
*minimas |= (isMinima << pos);
109110

110111
ulong lq = (r > q);
@@ -118,14 +119,15 @@ GPUdi() void GPUTPCCFNoiseSuppression::findMinima(
118119
int pos,
119120
const float q,
120121
const float epsilon,
122+
const float epsilonRelative,
121123
ulong* minimas,
122124
ulong* bigger)
123125
{
124126
GPUCA_UNROLL(U(), U())
125127
for (int i = 0; i < N; i++, pos++) {
126128
PackedCharge other = buf[N * ll + i];
127129

128-
checkForMinima(q, epsilon, other, pos, minimas, bigger);
130+
checkForMinima(q, epsilon, epsilonRelative, other, pos, minimas, bigger);
129131
}
130132
}
131133

@@ -209,6 +211,7 @@ GPUd() void GPUTPCCFNoiseSuppression::findMinimaAndPeaks(
209211
16,
210212
q,
211213
calibration.tpc.cfNoiseSuppressionEpsilon,
214+
calibration.tpc.cfNoiseSuppressionEpsilonRelative / 255.,
212215
minimas,
213216
bigger);
214217

@@ -231,6 +234,7 @@ GPUd() void GPUTPCCFNoiseSuppression::findMinimaAndPeaks(
231234
0,
232235
q,
233236
calibration.tpc.cfNoiseSuppressionEpsilon,
237+
calibration.tpc.cfNoiseSuppressionEpsilonRelative / 255.,
234238
minimas,
235239
bigger);
236240
}
@@ -254,6 +258,7 @@ GPUd() void GPUTPCCFNoiseSuppression::findMinimaAndPeaks(
254258
18,
255259
q,
256260
calibration.tpc.cfNoiseSuppressionEpsilon,
261+
calibration.tpc.cfNoiseSuppressionEpsilonRelative / 255.,
257262
minimas,
258263
bigger);
259264
}
@@ -278,6 +283,7 @@ GPUd() void GPUTPCCFNoiseSuppression::findMinimaAndPeaks(
278283
0,
279284
q,
280285
calibration.tpc.cfNoiseSuppressionEpsilon,
286+
calibration.tpc.cfNoiseSuppressionEpsilonRelative / 255.,
281287
minimas,
282288
bigger);
283289
}
@@ -301,6 +307,7 @@ GPUd() void GPUTPCCFNoiseSuppression::findMinimaAndPeaks(
301307
18,
302308
q,
303309
calibration.tpc.cfNoiseSuppressionEpsilon,
310+
calibration.tpc.cfNoiseSuppressionEpsilonRelative / 255.,
304311
minimas,
305312
bigger);
306313
}

GPU/GPUTracking/TPCClusterFinder/GPUTPCCFNoiseSuppression.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class GPUTPCCFNoiseSuppression : public GPUKernelTemplate
6161

6262
static GPUd() void updatePeaksImpl(int, int, int, int, const ChargePos*, const uchar*, const uint, Array2D<uchar>&);
6363

64-
static GPUdi() void checkForMinima(float, float, PackedCharge, int, ulong*, ulong*);
64+
static GPUdi() void checkForMinima(const float, const float, const float, PackedCharge, int, ulong*, ulong*);
6565

66-
static GPUdi() void findMinima(const PackedCharge*, const ushort, const int, int, const float, const float, ulong*, ulong*);
66+
static GPUdi() void findMinima(const PackedCharge*, const ushort, const int, int, const float, const float, const float, ulong*, ulong*);
6767

6868
static GPUdi() void findPeaks(const uchar*, const ushort, const int, int, ulong*);
6969

0 commit comments

Comments
 (0)