@@ -70,6 +70,10 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
7070 for (uint32_t i = 0 ; i < interpolation.size ; i++) { // TODO: Tune the zeroing size
7171 interpolation.hit [i].errorY = -1 ;
7272 }
73+ if (param.rec .tpc .rebuildTrackInFit ) {
74+ merger.TrackRebuildHelper ()[iTrk].highInclRowLow = 255 ;
75+ merger.TrackRebuildHelper ()[iTrk].highInclRowHigh = 255 ;
76+ }
7377 }
7478
7579 const int32_t nWays = param.rec .tpc .nWays ;
@@ -212,6 +216,28 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
212216 continue ;
213217 }
214218
219+ const float maxSinForUpdate = CAMath::Sin (70 .f * CAMath::Deg2Rad ());
220+ if (mNDF > 0 && CAMath::Abs (prop.GetSinPhi0 ()) >= maxSinForUpdate) {
221+ MarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
222+ nMissed2++;
223+ CADEBUG (printf (" --- break-sinphi\n " ));
224+ NTolerated++;
225+ const bool inward = clusters[0 ].row > clusters[maxN - 1 ].row ;
226+ const bool markHighIncl = (mP [2 ] > 0 ) ^ (mP [4 ] < 0 ) ^ inward ^ (iWay & 1 );
227+ if (param.rec .tpc .rebuildTrackInFit && markHighIncl) {
228+ if (inward ^ (iWay & 1 )) {
229+ if (merger.TrackRebuildHelper ()[iTrk].highInclRowLow == 255 ) {
230+ merger.TrackRebuildHelper ()[iTrk].highInclRowLow = cluster.row ;
231+ }
232+ } else {
233+ if (merger.TrackRebuildHelper ()[iTrk].highInclRowHigh == 255 ) {
234+ merger.TrackRebuildHelper ()[iTrk].highInclRowHigh = cluster.row ;
235+ }
236+ }
237+ }
238+ continue ;
239+ }
240+
215241 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);
216242 if (retValHit == 0 ) {
217243 DodEdx (dEdx, dEdxAlt, merger, finalFit, ihit, ihitMergeFirst, wayDirection, clusters, clusterState, zz, dEdxSubThresholdRow);
@@ -221,9 +247,6 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
221247 covYYUpd = mC [0 ];
222248 } else if (retValHit == 1 ) {
223249 break ;
224- } else if (retValHit == 2 ) {
225- NTolerated++;
226- continue ;
227250 }
228251
229252 lastUpdateRow = cluster.row ;
@@ -317,14 +340,6 @@ GPUdii() int32_t GPUTPCGMTrackParam::FitHit(GPUTPCGMMerger& GPUrestrict() merger
317340 const int32_t wayDirection = (iWay & 1 ) ? -1 : 1 ;
318341 const auto & cluster = clusters[ihit];
319342
320- const float maxSinForUpdate = CAMath::Sin (70 .f * CAMath::Deg2Rad ());
321- if (mNDF > 0 && CAMath::Abs (prop.GetSinPhi0 ()) >= maxSinForUpdate) {
322- MarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
323- nMissed2++;
324- CADEBUG (printf (" --- break-sinphi\n " ));
325- return 2 ; // Propagate failed or high incl angle
326- }
327-
328343 int32_t retValUpd = 0 , retValInt = 0 ;
329344 float threshold = 3 .f + (lastUpdateX >= 0 ? (CAMath::Abs (mX - lastUpdateX) / 2 ) : 0 .f );
330345 if (mNDF > (int32_t )param.rec .tpc .mergerNonInterpolateRejectMinNDF && (CAMath::Abs (yy - mP [0 ]) > threshold || CAMath::Abs (zz - mP [1 ]) > threshold)) {
0 commit comments