@@ -263,7 +263,7 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger* GPUrestrict() merger, int32_
263263
264264 if (dy * dy < sy2 && dz * dz < sz2) {
265265 float err2YA, err2ZA;
266- const ClusterNative& GPUrestrict () cl = merger-> GetConstantMem ()->ioPtrs .clustersNative ->clustersLinear [idOffset + ids[ih]];
266+ const ClusterNative& GPUrestrict () cl = merger -> GetConstantMem ()->ioPtrs .clustersNative ->clustersLinear [idOffset + ids[ih]];
267267 const auto clflags = cl.getFlags () & GPUTPCGMMergedTrackHit::clustererAndSharedFlags;
268268 const float time = cl.getTime ();
269269 const float invSqrtCharge = CAMath::InvSqrt (cl.qMax );
@@ -297,15 +297,22 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger* GPUrestrict() merger, int32_
297297 }
298298 }
299299 }
300- CADEBUG (const auto * dbgCand = &merger->ClusterCandidates ()[(iTrk * GPUCA_ROW_COUNT + cluster.row ) * param.rec .tpc .rebuildTrackInFitClusterCandidates ]; for (int dbgi = 0 ; dbgi < nCandidates; dbgi++) { if (dbgCand[dbgi].id > 1 ) printf (" iTrk %d Row %d Hit %d Candidate %d hit %d err %f\n " , iTrk, (int )cluster.row , cluster.num , dbgi, dbgCand[dbgi].id - 2 , dbgCand[dbgi].error ); else break ; }});
301- }
302- if (nCandidates == 0 ) {
303- merger->ClusterCandidates ()[(iTrk * GPUCA_ROW_COUNT + cluster.row ) * param.rec .tpc .rebuildTrackInFitClusterCandidates + 0 ].id = 1 ;
304- }
300+ CADEBUG (const auto * dbgCand = &merger->ClusterCandidates ()[(iTrk * GPUCA_ROW_COUNT + cluster.row ) * param.rec .tpc .rebuildTrackInFitClusterCandidates ]; for (int dbgi = 0 ; dbgi < nCandidates; dbgi++) {
301+ if (dbgCand[dbgi].id > 1 )
302+ printf (" iTrk %d Row %d Hit %d Candidate %d hit %d err %f\n " , iTrk, (int )cluster.row , cluster.num , dbgi, dbgCand[dbgi].id - 2 , dbgCand[dbgi].error );
303+ else
304+ break ; }
305+ });
306+ }
307+ if (nCandidates == 0 ) {
308+ merger->ClusterCandidates ()[(iTrk * GPUCA_ROW_COUNT + cluster.row ) * param.rec .tpc .rebuildTrackInFitClusterCandidates + 0 ].id = 1 ;
305309 }
306- } else if (allowChangeClusters) {
307- uncorrectedY = AttachClusters (merger, cluster.sector , cluster.row , iTrk, track.Leg () == 0 , prop);
308310 }
311+ }
312+ else if (allowChangeClusters)
313+ {
314+ uncorrectedY = AttachClusters (merger, cluster.sector , cluster.row , iTrk, track.Leg () == 0 , prop);
315+ }
309316
310317 const bool sinPhiErr = mNDF > 0 && CAMath::Abs (prop.GetSinPhi0 ()) >= maxSinForUpdate;
311318 if (mNDF >= 0 && (mC [0 ] > param.rec .tpc .trackFitCovLimit || mC [2 ] > param.rec .tpc .trackFitCovLimit )) {
@@ -423,11 +430,11 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger* GPUrestrict() merger, int32_
423430 } else {
424431 break ; // bad chi2 for the whole track, stop the fit
425432 }
426- }
427- if (finalOutInFit && !(param.rec .tpc .disableRefitAttachment & 4 ) && lastRow != 255 && lastSector != 255 ) {
428- StoreLoopPropagation (merger, lastSector, lastRow, iTrk, lastRow > clusters[(iWay & 1 ) ? (maxN - 1 ) : 0 ].row , prop.GetAlpha ());
429- CADEBUG (printf (" \t\t STORING %d lastRow %d row %d out %d\n " , iTrk, (int )lastRow, (int )clusters[(iWay & 1 ) ? (maxN - 1 ) : 0 ].row , lastRow > clusters[(iWay & 1 ) ? (maxN - 1 ) : 0 ].row ));
430- }
433+ }
434+ if (finalOutInFit && !(param.rec .tpc .disableRefitAttachment & 4 ) && lastRow != 255 && lastSector != 255 ) {
435+ StoreLoopPropagation (merger, lastSector, lastRow, iTrk, lastRow > clusters[(iWay & 1 ) ? (maxN - 1 ) : 0 ].row , prop.GetAlpha ());
436+ CADEBUG (printf (" \t\t STORING %d lastRow %d row %d out %d\n " , iTrk, (int )lastRow, (int )clusters[(iWay & 1 ) ? (maxN - 1 ) : 0 ].row , lastRow > clusters[(iWay & 1 ) ? (maxN - 1 ) : 0 ].row ));
437+ }
431438 if (!(iWay & 1 ) && !finalFit && !track.CCE () && !track.Looper ()) {
432439 deltaZ = ShiftZ (clusters, merger, maxN);
433440 } else {
0 commit comments