@@ -64,6 +64,10 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
6464 for (uint32_t i = 0 ; i < interpolation.size ; i++) { // TODO: Tune the zeroing size
6565 interpolation.hit [i].errorY = -1 ;
6666 }
67+ if (param.rec .tpc .rebuildTrackInFit ) {
68+ merger.TrackRebuildHelper ()[iTrk].highInclRowLow = 255 ;
69+ merger.TrackRebuildHelper ()[iTrk].highInclRowHigh = 255 ;
70+ }
6771 }
6872
6973 const int32_t nWays = param.rec .tpc .nWays ;
@@ -206,6 +210,28 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
206210 continue ;
207211 }
208212
213+ const float maxSinForUpdate = CAMath::Sin (70 .f * CAMath::Deg2Rad ());
214+ if (mNDF > 0 && CAMath::Abs (prop.GetSinPhi0 ()) >= maxSinForUpdate) {
215+ MarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
216+ nMissed2++;
217+ CADEBUG (printf (" --- break-sinphi\n " ));
218+ NTolerated++;
219+ const bool inward = clusters[0 ].row > clusters[maxN - 1 ].row ;
220+ const bool markHighIncl = (mP [2 ] > 0 ) ^ (mP [4 ] < 0 ) ^ inward ^ (iWay & 1 );
221+ if (param.rec .tpc .rebuildTrackInFit && markHighIncl) {
222+ if (inward ^ (iWay & 1 )) {
223+ if (merger.TrackRebuildHelper ()[iTrk].highInclRowLow == 255 ) {
224+ merger.TrackRebuildHelper ()[iTrk].highInclRowLow = cluster.row ;
225+ }
226+ } else {
227+ if (merger.TrackRebuildHelper ()[iTrk].highInclRowHigh == 255 ) {
228+ merger.TrackRebuildHelper ()[iTrk].highInclRowHigh = cluster.row ;
229+ }
230+ }
231+ }
232+ continue ;
233+ }
234+
209235 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);
210236 if (retValHit == 0 ) {
211237 DodEdx (dEdx, dEdxAlt, merger, finalFit, ihit, ihitMergeFirst, wayDirection, clusters, clusterState, zz, dEdxSubThresholdRow);
@@ -215,9 +241,6 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
215241 covYYUpd = mC [0 ];
216242 } else if (retValHit == 1 ) {
217243 break ;
218- } else if (retValHit == 2 ) {
219- NTolerated++;
220- continue ;
221244 }
222245
223246 lastUpdateRow = cluster.row ;
@@ -311,14 +334,6 @@ GPUdii() int32_t GPUTPCGMTrackParam::FitHit(GPUTPCGMMerger& GPUrestrict() merger
311334 const int32_t wayDirection = (iWay & 1 ) ? -1 : 1 ;
312335 const auto & cluster = clusters[ihit];
313336
314- const float maxSinForUpdate = CAMath::Sin (70 .f * CAMath::Deg2Rad ());
315- if (mNDF > 0 && CAMath::Abs (prop.GetSinPhi0 ()) >= maxSinForUpdate) {
316- MarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
317- nMissed2++;
318- CADEBUG (printf (" --- break-sinphi\n " ));
319- return 2 ; // Propagate failed or high incl angle
320- }
321-
322337 int32_t retValUpd = 0 , retValInt = 0 ;
323338 float threshold = 3 .f + (lastUpdateX >= 0 ? (CAMath::Abs (mX - lastUpdateX) / 2 ) : 0 .f );
324339 if (mNDF > (int32_t )param.rec .tpc .mergerNonInterpolateRejectMinNDF && (CAMath::Abs (yy - mP [0 ]) > threshold || CAMath::Abs (zz - mP [1 ]) > threshold)) {
0 commit comments