@@ -85,7 +85,8 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
8585 StoreOuter (&track.OuterParam (), prop.GetAlpha ());
8686 }
8787
88- int32_t resetT0 = initResetT0 ();
88+ int32_t resetT0 = CAMath::Max (10 , CAMath::Min<int32_t >(40 , 150 .f / CAMath::Abs (mP [4 ])));
89+ ;
8990 const bool refit = (nWays == 1 || iWay >= 1 );
9091 const bool finalOutInFit = iWay + 2 >= nWays;
9192 const bool finalFit = iWay == nWays - 1 ;
@@ -239,9 +240,15 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
239240 continue ;
240241 }
241242
242- 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, retryAttempt);
243+ 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, uncorrectedY, retryAttempt);
243244 if (retValHit == 0 ) {
244245 DodEdx (dEdx, dEdxAlt, merger, finalFit, ihit, ihitMergeFirst, wayDirection, clusters, clusterState, zz, dEdxSubThresholdRow);
246+ if (CAMath::Abs (mP [4 ]) * param.qptB5Scaler > 10 && --resetT0 <= 0 && CAMath::Abs (mP [2 ]) < 0 .15f && CAMath::Square (mP [0 ] - prop.Model ().Y ()) + CAMath::Square (mP [1 ] - prop.Model ().Z ()) > 1 ) {
247+ CADEBUG (printf (" Reinit linearization\n " ));
248+ prop.SetTrack (this , prop.GetAlpha ());
249+ resetT0 = 20 ;
250+ }
251+
245252 ihitStart = ihit;
246253 interpolatedStart = interpolationIndex;
247254 N++;
@@ -347,7 +354,7 @@ GPUdii() void GPUTPCGMTrackParam::HandleCrossCE(const GPUParam& GPUrestrict() pa
347354 }
348355}
349356
350- GPUdii () int32_t GPUTPCGMTrackParam::FitHit(GPUTPCGMMerger& GPUrestrict () merger, const int32_t iTrk, const GPUTPCGMMergedTrack& GPUrestrict() track, const float xx, const float yy, const float zz, const uint8_t clusterState, const float clAlpha, const int32_t iWay, const bool inFlyDirection, float& GPUrestrict() deltaZ, float& GPUrestrict() lastUpdateX, GPUTPCGMMergedTrackHit* GPUrestrict() clusters, GPUTPCGMPropagator& GPUrestrict() prop, gputpcgmmergertypes::InterpolationErrorHit& GPUrestrict() inter, GPUdEdx& GPUrestrict() dEdx, GPUdEdx& GPUrestrict() dEdxAlt, float& GPUrestrict() sumInvSqrtCharge, int32_t& GPUrestrict() nAvgCharge, const int32_t ihit, const int32_t ihitMergeFirst, const bool allowChangeClusters, const bool refit, const bool finalFit, int32_t& GPUrestrict() nMissed, int32_t& GPUrestrict() nMissed2, int32_t& GPUrestrict() resetT0, float uncorrectedY, bool retryAttempt)
357+ GPUdii () int32_t GPUTPCGMTrackParam::FitHit(GPUTPCGMMerger& GPUrestrict () merger, const int32_t iTrk, const GPUTPCGMMergedTrack& GPUrestrict() track, const float xx, const float yy, const float zz, const uint8_t clusterState, const float clAlpha, const int32_t iWay, const bool inFlyDirection, float& GPUrestrict() deltaZ, float& GPUrestrict() lastUpdateX, GPUTPCGMMergedTrackHit* GPUrestrict() clusters, GPUTPCGMPropagator& GPUrestrict() prop, gputpcgmmergertypes::InterpolationErrorHit& GPUrestrict() inter, GPUdEdx& GPUrestrict() dEdx, GPUdEdx& GPUrestrict() dEdxAlt, float& GPUrestrict() sumInvSqrtCharge, int32_t& GPUrestrict() nAvgCharge, const int32_t ihit, const int32_t ihitMergeFirst, const bool allowChangeClusters, const bool refit, const bool finalFit, int32_t& GPUrestrict() nMissed, int32_t& GPUrestrict() nMissed2, float uncorrectedY, bool retryAttempt)
351358{
352359 const GPUParam& GPUrestrict () param = merger.Param ();
353360 const int32_t nWays = param.rec .tpc .nWays ;
@@ -412,12 +419,6 @@ GPUdii() int32_t GPUTPCGMTrackParam::FitHit(GPUTPCGMMerger& GPUrestrict() merger
412419 lastUpdateX = mX ;
413420 nMissed = nMissed2 = 0 ;
414421 UnmarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
415- float dy = mP [0 ] - prop.Model ().Y ();
416- float dz = mP [1 ] - prop.Model ().Z ();
417- if (CAMath::Abs (mP [4 ]) * param.qptB5Scaler > 10 && --resetT0 <= 0 && CAMath::Abs (mP [2 ]) < 0 .15f && dy * dy + dz * dz > 1 ) {
418- CADEBUG (printf (" Reinit linearization\n " ));
419- prop.SetTrack (this , prop.GetAlpha ());
420- }
421422 return 0 ; // ok
422423 } else if (retValInt || retValUpd >= GPUTPCGMPropagator::updateErrorClusterRejected) { // cluster far away form the track
423424 if (retValInt || allowChangeClusters) {
0 commit comments