Skip to content

Commit f28e5f0

Browse files
committed
TPC Tracking: Workaround for 0-cluster tracks
1 parent 74ef1a9 commit f28e5f0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Detectors/TPC/reconstruction/src/GPUCATracking.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ int GPUCATracking::runTracking(GPUO2InterfaceIOPtrs* data, GPUInterfaceOutputs*
164164
for (char cside = 0; cside < 2; cside++) {
165165
for (int i = 0; i < nTracks; i++) {
166166
if (tracks[i].OK() && tracks[i].CSide() == cside) {
167+
bool hasCl = false;
168+
for (int j = 0; j < tracks[i].NClusters(); j++) {
169+
if (!((trackClusters[tracks[i].FirstClusterRef() + j].state & flagsReject) || (ptrs.mergedTrackHitAttachment[trackClusters[tracks[i].FirstClusterRef() + j].num] & flagsRequired) != flagsRequired)) {
170+
hasCl = true;
171+
break;
172+
}
173+
}
174+
if (!hasCl) {
175+
continue;
176+
}
167177
trackSort[tmp++] = {i, tracks[i].GetParam().GetTZOffset()};
168178
auto ncl = tracks[i].NClusters();
169179
clBuff += ncl + (ncl + 1) / 2; // actual N clusters to store will be less

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ GPUd() bool GPUTPCGMTrackParam::Fit(const GPUTPCGMMerger* GPUrestrict() merger,
329329
if (!(N + NTolerated >= GPUCA_TRACKLET_SELECTOR_MIN_HITS(mP[4]) && 2 * NTolerated <= CAMath::Max(10, N) && CheckNumericalQuality(covYYUpd))) {
330330
return (false); // TODO: NTolerated should never become that large, check what is going wrong!
331331
}
332+
// TODO: we have looping tracks here with 0 accepted clusters in the primary leg. In that case we should refit the track using only the primary leg.
332333

333334
if (dEdxOut) {
334335
dEdx.computedEdx(*dEdxOut, param);

0 commit comments

Comments
 (0)