Skip to content

Commit

Permalink
TPC Tracking: Workaround for 0-cluster tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr committed Dec 25, 2020
1 parent 1e6f07a commit bba5063
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Detectors/TPC/reconstruction/src/GPUCATracking.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ int GPUCATracking::runTracking(GPUO2InterfaceIOPtrs* data, GPUInterfaceOutputs*
for (char cside = 0; cside < 2; cside++) {
for (int i = 0; i < nTracks; i++) {
if (tracks[i].OK() && tracks[i].CSide() == cside) {
bool hasCl = false;
for (int j = 0; j < tracks[i].NClusters(); j++) {
if (!((trackClusters[tracks[i].FirstClusterRef() + j].state & flagsReject) || (ptrs.mergedTrackHitAttachment[trackClusters[tracks[i].FirstClusterRef() + j].num] & flagsRequired) != flagsRequired)) {
hasCl = true;
break;
}
}
if (!hasCl) {
continue;
}
trackSort[tmp++] = {i, tracks[i].GetParam().GetTZOffset()};
auto ncl = tracks[i].NClusters();
clBuff += ncl + (ncl + 1) / 2; // actual N clusters to store will be less
Expand Down
1 change: 1 addition & 0 deletions GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ GPUd() bool GPUTPCGMTrackParam::Fit(const GPUTPCGMMerger* GPUrestrict() merger,
if (!(N + NTolerated >= GPUCA_TRACKLET_SELECTOR_MIN_HITS(mP[4]) && 2 * NTolerated <= CAMath::Max(10, N) && CheckNumericalQuality(covYYUpd))) {
return (false); // TODO: NTolerated should never become that large, check what is going wrong!
}
// 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.

if (dEdxOut) {
dEdx.computedEdx(*dEdxOut, param);
Expand Down

0 comments on commit bba5063

Please sign in to comment.