Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPC Tracking: Workaround for 0-cluster tracks #5097

Merged
merged 1 commit into from
Dec 25, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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