@@ -555,7 +555,7 @@ GPUd() int32_t GPUTPCGMMerger::RefitSectorTrack(GPUTPCGMSectorTrack& sectorTrack
555555 prop.SetMaterialTPC ();
556556 prop.SetMaxSinPhi (GPUCA_MAX_SIN_PHI);
557557 prop.SetSeedingErrors (true ); // Larger errors for seeds, better since we don't start with good hypothesis
558- prop.SetFitInProjections (false );
558+ prop.SetFitInProjections (true ); // TODO: Was false, consider reenabling after fitInProjection is fixed
559559 prop.SetPolynomialField (&Param ().polynomialField );
560560 GPUTPCGMTrackParam trk;
561561 trk.X () = inTrack->Param ().GetX ();
@@ -718,9 +718,6 @@ GPUd() void GPUTPCGMMerger::MergeSectorsPrepareStep2(int32_t nBlocks, int32_t nT
718718 } else if (iBorder == 3 ) { // transport to the middle of the sector and rotate vertically to the border on the right
719719 dAlpha = -dAlpha;
720720 x0 = GPUTPCGeometry::Row2X (63 );
721- } else if (iBorder == 4 ) { // transport to the middle of the sßector, w/o rotation
722- dAlpha = 0 ;
723- x0 = GPUTPCGeometry::Row2X (63 );
724721 }
725722
726723 const float maxSin = CAMath::Sin (60 .f / 180 .f * CAMath::Pi ());
@@ -783,14 +780,14 @@ GPUd() void GPUTPCGMMerger::MergeSectorsPrepareStep2(int32_t nBlocks, int32_t nT
783780}
784781
785782template <>
786- GPUd () void GPUTPCGMMerger::MergeBorderTracks<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, int32_t iSector1, GPUTPCGMBorderTrack* B1, int32_t N1, int32_t iSector2, GPUTPCGMBorderTrack* B2, int32_t N2, int32_t mergeMode)
783+ GPUd () void GPUTPCGMMerger::MergeBorderTracks<0>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, int32_t iSector1, const GPUTPCGMBorderTrack* B1, int32_t N1, int32_t iSector2, const GPUTPCGMBorderTrack* B2, int32_t N2, int32_t mergeMode)
787784{
788785 CADEBUG (GPUInfo (" \n MERGING Sectors %d %d NTracks %d %d CROSS %d" , iSector1, iSector2, N1, N2, mergeMode));
789786 GPUTPCGMBorderRange* range1 = mBorderRange [iSector1];
790787 GPUTPCGMBorderRange* range2 = mBorderRange [iSector2] + *GetConstantMem ()->tpcTrackers [iSector2].NTracks ();
791788 bool sameSector = (iSector1 == iSector2);
792789 for (int32_t itr = iBlock * nThreads + iThread; itr < N1; itr += nThreads * nBlocks) {
793- GPUTPCGMBorderTrack& b = B1[itr];
790+ const GPUTPCGMBorderTrack& b = B1[itr];
794791 float d = CAMath::Max (0 .5f , 3 .5f * CAMath::Sqrt (b.Cov ()[1 ]));
795792 if (CAMath::Abs (b.Par ()[4 ]) * Param ().qptB5Scaler >= 20 ) {
796793 d *= 2 ;
@@ -809,7 +806,7 @@ GPUd() void GPUTPCGMMerger::MergeBorderTracks<0>(int32_t nBlocks, int32_t nThrea
809806 }
810807 if (!sameSector) {
811808 for (int32_t itr = iBlock * nThreads + iThread; itr < N2; itr += nThreads * nBlocks) {
812- GPUTPCGMBorderTrack& b = B2[itr];
809+ const GPUTPCGMBorderTrack& b = B2[itr];
813810 float d = CAMath::Max (0 .5f , 3 .5f * CAMath::Sqrt (b.Cov ()[1 ]));
814811 if (CAMath::Abs (b.Par ()[4 ]) * Param ().qptB5Scaler >= 20 ) {
815812 d *= 2 ;
@@ -827,7 +824,7 @@ GPUd() void GPUTPCGMMerger::MergeBorderTracks<0>(int32_t nBlocks, int32_t nThrea
827824}
828825
829826template <>
830- GPUd () void GPUTPCGMMerger::MergeBorderTracks<1>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, int32_t iSector1, GPUTPCGMBorderTrack* B1, int32_t N1, int32_t iSector2, GPUTPCGMBorderTrack* B2, int32_t N2, int32_t mergeMode)
827+ GPUd () void GPUTPCGMMerger::MergeBorderTracks<1>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, int32_t iSector1, const GPUTPCGMBorderTrack* B1, int32_t N1, int32_t iSector2, const GPUTPCGMBorderTrack* B2, int32_t N2, int32_t mergeMode)
831828{
832829#if !defined(GPUCA_GPUCODE_COMPILEKERNELS)
833830 GPUTPCGMBorderRange* range1 = mBorderRange [iSector1];
@@ -860,7 +857,7 @@ GPUd() void GPUTPCGMMerger::MergeBorderTracks<3>(int32_t nBlocks, int32_t nThrea
860857}
861858
862859template <>
863- GPUd () void GPUTPCGMMerger::MergeBorderTracks<2>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, int32_t iSector1, GPUTPCGMBorderTrack* B1, int32_t N1, int32_t iSector2, GPUTPCGMBorderTrack* B2, int32_t N2, int32_t mergeMode)
860+ GPUd () void GPUTPCGMMerger::MergeBorderTracks<2>(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread, int32_t iSector1, const GPUTPCGMBorderTrack* B1, int32_t N1, int32_t iSector2, const GPUTPCGMBorderTrack* B2, int32_t N2, int32_t mergeMode)
864861{
865862 // int32_t statAll = 0, statMerged = 0;
866863 float factor2ys = Param ().rec .tpc .trackMergerFactor2YS ;
@@ -887,7 +884,7 @@ GPUd() void GPUTPCGMMerger::MergeBorderTracks<2>(int32_t nBlocks, int32_t nThrea
887884 i2++;
888885 }
889886
890- GPUTPCGMBorderTrack& b1 = B1[r1.fId ];
887+ const GPUTPCGMBorderTrack& b1 = B1[r1.fId ];
891888 if (b1.NClusters () < minNPartHits) {
892889 continue ;
893890 }
@@ -904,7 +901,7 @@ GPUd() void GPUTPCGMMerger::MergeBorderTracks<2>(int32_t nBlocks, int32_t nThrea
904901 }
905902 // do check
906903
907- GPUTPCGMBorderTrack& b2 = B2[r2.fId ];
904+ const GPUTPCGMBorderTrack& b2 = B2[r2.fId ];
908905#if defined(GPUCA_MERGER_BY_MC_LABEL) && !defined(GPUCA_GPUCODE)
909906 int64_t label1 = GetTrackLabel (b1);
910907 int64_t label2 = GetTrackLabel (b2);
@@ -1019,7 +1016,7 @@ GPUd() void GPUTPCGMMerger::MergeWithinSectorsPrepare(int32_t nBlocks, int32_t n
10191016 const float maxSin = CAMath::Sin (60 .f / 180 .f * CAMath::Pi ());
10201017
10211018 for (int32_t itr = iBlock * nThreads + iThread; itr < SectorTrackInfoLocalTotal (); itr += nThreads * nBlocks) {
1022- GPUTPCGMSectorTrack& track = mSectorTrackInfos [itr];
1019+ const GPUTPCGMSectorTrack& track = mSectorTrackInfos [itr];
10231020 int32_t iSector = track.Sector ();
10241021 GPUTPCGMBorderTrack b;
10251022 if (track.TransportToX (this , x0, Param ().bzCLight , b, maxSin)) {
0 commit comments