Skip to content

Commit b5b6985

Browse files
committed
GPU TPC CF: Add option to select 1pad or 2pad edge flag definition
1 parent b5ab60d commit b5b6985

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

GPU/GPUTracking/Definitions/GPUSettingsList.h

+1
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ AddOptionRTC(cfInnerThreshold, uint8_t, 0, "", 0, "Cluster Finder extends cluste
128128
AddOptionRTC(cfMinSplitNum, uint8_t, 1, "", 0, "Minimum number of split charges in a cluster for the cluster to be marked as split")
129129
AddOptionRTC(cfNoiseSuppressionEpsilon, uint8_t, 10, "", 0, "Cluster Finder: Difference between peak and charge for the charge to count as a minima during noise suppression")
130130
AddOptionRTC(cfNoiseSuppressionEpsilonRelative, uint8_t, 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")
131+
AddOptionRTC(cfEdgeTwoPads, uint8_t, 1, "", 0, "Flag clusters with peak on the 2 pads closes to the sector edge as edge cluster")
131132
AddOptionRTC(nWays, uint8_t, 3, "", 0, "Do N fit passes in final fit of merger")
132133
AddOptionRTC(nWaysOuter, int8_t, 0, "", 0, "Store outer param")
133134
AddOptionRTC(trackFitRejectMode, int8_t, 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/ClusterAccumulator.cxx

+12-7
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,19 @@ GPUd() bool ClusterAccumulator::toNative(const ChargePos& pos, const Charge q, t
7979
{
8080
Pad pad = pos.pad();
8181

82-
bool isEdgeCluster = pad < 2 || pad >= param.tpcGeometry.NPads(pos.row()) - 2; // Geometrical edge check, peak within 2 pads of sector edge
83-
if (isEdgeCluster) {
84-
bool leftEdge = (pad < 2);
85-
if (leftEdge ? (pad == 1 && chargeMap[pos.delta({-1, 0})].unpack() < 1) : (pad == (param.tpcGeometry.NPads(pos.row()) - 2) && chargeMap[pos.delta({1, 0})].unpack() < 1)) {
86-
isEdgeCluster = false; // No edge cluster if peak is close to edge but no charge at the edge.
87-
} else if (leftEdge ? (pad < mPadMean) : (pad > mPadMean)) {
88-
mPadMean = pad; // Correct to peak position if COG is close to middle of pad than peak
82+
bool isEdgeCluster;
83+
if (param.rec.tpc.cfEdgeTwoPads) {
84+
isEdgeCluster= pad < 2 || pad >= param.tpcGeometry.NPads(pos.row()) - 2; // Geometrical edge check, peak within 2 pads of sector edge
85+
if (isEdgeCluster) {
86+
bool leftEdge = (pad < 2);
87+
if (leftEdge ? (pad == 1 && chargeMap[pos.delta({-1, 0})].unpack() < 1) : (pad == (param.tpcGeometry.NPads(pos.row()) - 2) && chargeMap[pos.delta({1, 0})].unpack() < 1)) {
88+
isEdgeCluster = false; // No edge cluster if peak is close to edge but no charge at the edge.
89+
} else if (leftEdge ? (pad < mPadMean) : (pad > mPadMean)) {
90+
mPadMean = pad; // Correct to peak position if COG is close to middle of pad than peak
91+
}
8992
}
93+
} else {
94+
isEdgeCluster = pad == 0 || pad == param.tpcGeometry.NPads(pos.row()) - 1;
9095
}
9196

9297
cn.qTot = CAMath::Float2UIntRn(mQtot);

0 commit comments

Comments
 (0)