Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GPU/GPUTracking/Definitions/GPUSettingsList.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ AddOptionRTC(cfInnerThreshold, uint8_t, 0, "", 0, "Cluster Finder extends cluste
AddOptionRTC(cfMinSplitNum, uint8_t, 1, "", 0, "Minimum number of split charges in a cluster for the cluster to be marked as split")
AddOptionRTC(cfNoiseSuppressionEpsilon, uint8_t, 10, "", 0, "Cluster Finder: Difference between peak and charge for the charge to count as a minima during noise suppression")
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")
AddOptionRTC(cfEdgeTwoPads, uint8_t, 1, "", 0, "Flag clusters with peak on the 2 pads closes to the sector edge as edge cluster")
AddOptionRTC(nWays, uint8_t, 3, "", 0, "Do N fit passes in final fit of merger")
AddOptionRTC(nWaysOuter, int8_t, 0, "", 0, "Store outer param")
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")
Expand Down
19 changes: 12 additions & 7 deletions GPU/GPUTracking/TPCClusterFinder/ClusterAccumulator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,19 @@ GPUd() bool ClusterAccumulator::toNative(const ChargePos& pos, const Charge q, t
{
Pad pad = pos.pad();

bool isEdgeCluster = pad < 2 || pad >= param.tpcGeometry.NPads(pos.row()) - 2; // Geometrical edge check, peak within 2 pads of sector edge
if (isEdgeCluster) {
bool leftEdge = (pad < 2);
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)) {
isEdgeCluster = false; // No edge cluster if peak is close to edge but no charge at the edge.
} else if (leftEdge ? (pad < mPadMean) : (pad > mPadMean)) {
mPadMean = pad; // Correct to peak position if COG is close to middle of pad than peak
bool isEdgeCluster;
if (param.rec.tpc.cfEdgeTwoPads) {
isEdgeCluster = pad < 2 || pad >= param.tpcGeometry.NPads(pos.row()) - 2; // Geometrical edge check, peak within 2 pads of sector edge
if (isEdgeCluster) {
bool leftEdge = (pad < 2);
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)) {
isEdgeCluster = false; // No edge cluster if peak is close to edge but no charge at the edge.
} else if (leftEdge ? (pad < mPadMean) : (pad > mPadMean)) {
mPadMean = pad; // Correct to peak position if COG is close to middle of pad than peak
}
}
} else {
isEdgeCluster = pad == 0 || pad == param.tpcGeometry.NPads(pos.row()) - 1;
}

cn.qTot = CAMath::Float2UIntRn(mQtot);
Expand Down