@@ -65,6 +65,10 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
6565 for (uint32_t i = 0 ; i < interpolation.size ; i++) { // TODO: Tune the zeroing size
6666 interpolation.hit [i].errorY = -1 ;
6767 }
68+ if (param.rec .tpc .rebuildTrackInFit ) {
69+ merger.TrackRebuildHelper ()[iTrk].highInclRowLow = 255 ;
70+ merger.TrackRebuildHelper ()[iTrk].highInclRowHigh = 255 ;
71+ }
6872 }
6973
7074 const int32_t nWays = param.rec .tpc .nWays ;
@@ -207,6 +211,28 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
207211 continue ;
208212 }
209213
214+ const float maxSinForUpdate = CAMath::Sin (70 .f * CAMath::Deg2Rad ());
215+ if (mNDF > 0 && CAMath::Abs (prop.GetSinPhi0 ()) >= maxSinForUpdate) {
216+ MarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
217+ nMissed2++;
218+ CADEBUG (printf (" --- break-sinphi\n " ));
219+ NTolerated++;
220+ const bool inward = clusters[0 ].row > clusters[maxN - 1 ].row ;
221+ const bool markHighIncl = (mP [2 ] > 0 ) ^ (mP [4 ] < 0 ) ^ inward ^ (iWay & 1 );
222+ if (param.rec .tpc .rebuildTrackInFit && markHighIncl) {
223+ if (inward ^ (iWay & 1 )) {
224+ if (merger.TrackRebuildHelper ()[iTrk].highInclRowLow == 255 ) {
225+ merger.TrackRebuildHelper ()[iTrk].highInclRowLow = cluster.row ;
226+ }
227+ } else {
228+ if (merger.TrackRebuildHelper ()[iTrk].highInclRowHigh == 255 ) {
229+ merger.TrackRebuildHelper ()[iTrk].highInclRowHigh = cluster.row ;
230+ }
231+ }
232+ }
233+ continue ;
234+ }
235+
210236 int32_t retValHit = FitHit (merger, iTrk, track, xx, yy, zz, clusterState, clAlpha, iWay, inFlyDirection, deltaZ, lastUpdateX, clusters, prop, inter, dEdx, dEdxAlt, sumInvSqrtCharge, nAvgCharge, ihit, ihitMergeFirst, allowChangeClusters, refit, finalFit, nMissed, nMissed2, resetT0, uncorrectedY);
211237 if (retValHit == 0 ) {
212238 DodEdx (dEdx, dEdxAlt, merger, finalFit, ihit, ihitMergeFirst, wayDirection, clusters, clusterState, zz, dEdxSubThresholdRow);
@@ -216,9 +242,6 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
216242 covYYUpd = mC [0 ];
217243 } else if (retValHit == 1 ) {
218244 break ;
219- } else if (retValHit == 2 ) {
220- NTolerated++;
221- continue ;
222245 }
223246
224247 lastUpdateRow = cluster.row ;
@@ -312,14 +335,6 @@ GPUdii() int32_t GPUTPCGMTrackParam::FitHit(GPUTPCGMMerger& GPUrestrict() merger
312335 const int32_t wayDirection = (iWay & 1 ) ? -1 : 1 ;
313336 const auto & cluster = clusters[ihit];
314337
315- const float maxSinForUpdate = CAMath::Sin (70 .f * CAMath::Deg2Rad ());
316- if (mNDF > 0 && CAMath::Abs (prop.GetSinPhi0 ()) >= maxSinForUpdate) {
317- MarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
318- nMissed2++;
319- CADEBUG (printf (" --- break-sinphi\n " ));
320- return 2 ; // Propagate failed or high incl angle
321- }
322-
323338 int32_t retValUpd = 0 , retValInt = 0 ;
324339 float threshold = 3 .f + (lastUpdateX >= 0 ? (CAMath::Abs (mX - lastUpdateX) / 2 ) : 0 .f );
325340 if (mNDF > (int32_t )param.rec .tpc .mergerNonInterpolateRejectMinNDF && (CAMath::Abs (yy - mP [0 ]) > threshold || CAMath::Abs (zz - mP [1 ]) > threshold)) {
0 commit comments