@@ -86,7 +86,8 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
8686 StoreOuter (&track.OuterParam (), prop.GetAlpha ());
8787 }
8888
89- int32_t resetT0 = initResetT0 ();
89+ int32_t resetT0 = CAMath::Max (10 , CAMath::Min<int32_t >(40 , 150 .f / CAMath::Abs (mP [4 ])));
90+ ;
9091 const bool refit = (nWays == 1 || iWay >= 1 );
9192 const bool finalOutInFit = iWay + 2 >= nWays;
9293 const bool finalFit = iWay == nWays - 1 ;
@@ -240,9 +241,15 @@ GPUd() bool GPUTPCGMTrackParam::Fit(GPUTPCGMMerger& GPUrestrict() merger, int32_
240241 continue ;
241242 }
242243
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, resetT0, uncorrectedY, retryAttempt);
244+ 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);
244245 if (retValHit == 0 ) {
245246 DodEdx (dEdx, dEdxAlt, merger, finalFit, ihit, ihitMergeFirst, wayDirection, clusters, clusterState, zz, dEdxSubThresholdRow);
247+ 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 ) {
248+ CADEBUG (printf (" Reinit linearization\n " ));
249+ prop.SetTrack (this , prop.GetAlpha ());
250+ resetT0 = 20 ;
251+ }
252+
246253 ihitStart = ihit;
247254 interpolatedStart = interpolationIndex;
248255 N++;
@@ -348,7 +355,7 @@ GPUdii() void GPUTPCGMTrackParam::HandleCrossCE(const GPUParam& GPUrestrict() pa
348355 }
349356}
350357
351- 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)
358+ 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)
352359{
353360 const GPUParam& GPUrestrict () param = merger.Param ();
354361 const int32_t nWays = param.rec .tpc .nWays ;
@@ -413,12 +420,6 @@ GPUdii() int32_t GPUTPCGMTrackParam::FitHit(GPUTPCGMMerger& GPUrestrict() merger
413420 lastUpdateX = mX ;
414421 nMissed = nMissed2 = 0 ;
415422 UnmarkClusters (clusters, ihitMergeFirst, ihit, wayDirection, GPUTPCGMMergedTrackHit::flagHighIncl);
416- float dy = mP [0 ] - prop.Model ().Y ();
417- float dz = mP [1 ] - prop.Model ().Z ();
418- if (CAMath::Abs (mP [4 ]) * param.qptB5Scaler > 10 && --resetT0 <= 0 && CAMath::Abs (mP [2 ]) < 0 .15f && dy * dy + dz * dz > 1 ) {
419- CADEBUG (printf (" Reinit linearization\n " ));
420- prop.SetTrack (this , prop.GetAlpha ());
421- }
422423 return 0 ; // ok
423424 } else if (retValInt || retValUpd >= GPUTPCGMPropagator::updateErrorClusterRejected) { // cluster far away form the track
424425 if (retValInt || allowChangeClusters) {
0 commit comments