@@ -237,7 +237,7 @@ int64_t GPUTPCGMMerger::GetTrackLabelA(const S& trk) const
237237 int32_t nClusters = 0 ;
238238 if constexpr (std::is_same_v<S, GPUTPCGMBorderTrack&>) {
239239 sectorTrack = &mSectorTrackInfos [trk.TrackID ()];
240- nClusters = (* sectorTrack->OrigTrack ()). NHits ();
240+ nClusters = sectorTrack->OrigTrack ()-> NHits ();
241241 } else {
242242 nClusters = trk.NClusters ();
243243 }
@@ -246,7 +246,7 @@ int64_t GPUTPCGMMerger::GetTrackLabelA(const S& trk) const
246246 int32_t id;
247247 if constexpr (std::is_same_v<S, GPUTPCGMBorderTrack&>) {
248248 const GPUTPCTracker& tracker = GetConstantMem ()->tpcTrackers [sectorTrack->Sector ()];
249- const GPUTPCHitId& ic = tracker.TrackHits ()[(* sectorTrack->OrigTrack ()). FirstHitID () + i];
249+ const GPUTPCHitId& ic = tracker.TrackHits ()[sectorTrack->OrigTrack ()-> FirstHitID () + i];
250250 id = tracker.Data ().ClusterDataIndex (tracker.Data ().Row (ic.RowIndex ()), ic.HitIndex ()) + GetConstantMem ()->ioPtrs .clustersNative ->clusterOffset [sectorTrack->Sector ()][0 ];
251251 } else {
252252 id = mClusters [trk.FirstClusterRef () + i].num ;
@@ -497,15 +497,14 @@ GPUd() int32_t GPUTPCGMMerger::RefitSectorTrack(GPUTPCGMSectorTrack& sectorTrack
497497 prop.SetFitInProjections (false );
498498 prop.SetPolynomialField (&Param ().polynomialField );
499499 GPUTPCGMTrackParam trk;
500- MemLayout::wrapper<GPUTPCTrackSkeleton, MemLayout::const_reference> inTrack_cref = *inTrack;
501- trk.X () = inTrack_cref.Param ().GetX ();
502- trk.Y () = inTrack_cref.Param ().GetY ();
503- trk.Z () = inTrack_cref.Param ().GetZ ();
504- trk.SinPhi () = inTrack_cref.Param ().GetSinPhi ();
505- trk.DzDs () = inTrack_cref.Param ().GetDzDs ();
506- trk.QPt () = inTrack_cref.Param ().GetQPt ();
507- trk.TZOffset () = Param ().par .earlyTpcTransform ? inTrack_cref.Param ().GetZOffset () : GetConstantMem ()->calibObjects .fastTransformHelper ->getCorrMap ()->convZOffsetToVertexTime (sector, inTrack_cref.Param ().GetZOffset (), Param ().continuousMaxTimeBin );
508- trk.ShiftZ (this , sector, sectorTrack.ClusterZT0 (), sectorTrack.ClusterZTN (), inTrack_cref.Param ().GetX (), inTrack_cref.Param ().GetX ()); // We do not store the inner / outer cluster X, so we just use the track X instead
500+ trk.X () = inTrack->Param ().GetX ();
501+ trk.Y () = inTrack->Param ().GetY ();
502+ trk.Z () = inTrack->Param ().GetZ ();
503+ trk.SinPhi () = inTrack->Param ().GetSinPhi ();
504+ trk.DzDs () = inTrack->Param ().GetDzDs ();
505+ trk.QPt () = inTrack->Param ().GetQPt ();
506+ trk.TZOffset () = Param ().par .earlyTpcTransform ? inTrack->Param ().GetZOffset () : GetConstantMem ()->calibObjects .fastTransformHelper ->getCorrMap ()->convZOffsetToVertexTime (sector, inTrack->Param ().GetZOffset (), Param ().continuousMaxTimeBin );
507+ trk.ShiftZ (this , sector, sectorTrack.ClusterZT0 (), sectorTrack.ClusterZTN (), inTrack->Param ().GetX (), inTrack->Param ().GetX ()); // We do not store the inner / outer cluster X, so we just use the track X instead
509508 sectorTrack.SetX2 (0 .f );
510509 for (int32_t way = 0 ; way < 2 ; way++) {
511510 if (way) {
@@ -514,14 +513,14 @@ GPUd() int32_t GPUTPCGMMerger::RefitSectorTrack(GPUTPCGMSectorTrack& sectorTrack
514513 }
515514 trk.ResetCovariance ();
516515 prop.SetTrack (&trk, alpha);
517- int32_t start = way ? inTrack_cref. NHits () - 1 : 0 ;
518- int32_t end = way ? 0 : (inTrack_cref. NHits () - 1 );
516+ int32_t start = way ? inTrack-> NHits () - 1 : 0 ;
517+ int32_t end = way ? 0 : (inTrack-> NHits () - 1 );
519518 int32_t incr = way ? -1 : 1 ;
520519 for (int32_t i = start; i != end; i += incr) {
521520 float x, y, z;
522521 int32_t row, flags;
523522 const GPUTPCTracker& tracker = GetConstantMem ()->tpcTrackers [sector];
524- const GPUTPCHitId& ic = tracker.TrackHits ()[inTrack_cref. FirstHitID () + i];
523+ const GPUTPCHitId& ic = tracker.TrackHits ()[inTrack-> FirstHitID () + i];
525524 int32_t clusterIndex = tracker.Data ().ClusterDataIndex (tracker.Data ().Row (ic.RowIndex ()), ic.HitIndex ());
526525 row = ic.RowIndex ();
527526 const ClusterNative& cl = GetConstantMem ()->ioPtrs .clustersNative ->clustersLinear [GetConstantMem ()->ioPtrs .clustersNative ->clusterOffset [sector][0 ] + clusterIndex];
@@ -553,10 +552,9 @@ GPUd() int32_t GPUTPCGMMerger::RefitSectorTrack(GPUTPCGMSectorTrack& sectorTrack
553552
554553GPUd () void GPUTPCGMMerger::SetTrackClusterZT(GPUTPCGMSectorTrack& track, int32_t iSector, MemLayout::wrapper<GPUTPCTrackSkeleton, MemLayout::const_pointer> sectorTr)
555554{
556- MemLayout::wrapper<GPUTPCTrackSkeleton, MemLayout::const_reference> sectorTr_cref = *sectorTr;
557555 const GPUTPCTracker& trk = GetConstantMem ()->tpcTrackers [iSector];
558- const GPUTPCHitId& ic1 = trk.TrackHits ()[sectorTr_cref. FirstHitID ()];
559- const GPUTPCHitId& ic2 = trk.TrackHits ()[sectorTr_cref. FirstHitID () + sectorTr_cref. NHits () - 1 ];
556+ const GPUTPCHitId& ic1 = trk.TrackHits ()[sectorTr-> FirstHitID ()];
557+ const GPUTPCHitId& ic2 = trk.TrackHits ()[sectorTr-> FirstHitID () + sectorTr-> NHits () - 1 ];
560558 int32_t clusterIndex1 = trk.Data ().ClusterDataIndex (trk.Data ().Row (ic1.RowIndex ()), ic1.HitIndex ());
561559 int32_t clusterIndex2 = trk.Data ().ClusterDataIndex (trk.Data ().Row (ic2.RowIndex ()), ic2.HitIndex ());
562560 if (Param ().par .earlyTpcTransform ) {
@@ -576,13 +574,12 @@ GPUd() void GPUTPCGMMerger::UnpackSectorGlobal(int32_t nBlocks, int32_t nThreads
576574{
577575 const GPUTPCTracker& trk = GetConstantMem ()->tpcTrackers [iSector];
578576 float alpha = Param ().Alpha (iSector);
579- // GPUTPCTrackSkeleton<MemLayout::const_pointer> sectorTr = mMemory->firstExtrapolatedTracks[iSector];
580577 MemLayout::wrapper<GPUTPCTrackSkeleton, MemLayout::const_pointer> sectorTr = mMemory ->firstExtrapolatedTracks [iSector];
581578 uint32_t nLocalTracks = trk.CommonMemory ()->nLocalTracks ;
582579 uint32_t nTracks = *trk.NTracks ();
583580 for (uint32_t itr = nLocalTracks + iBlock * nThreads + iThread; itr < nTracks; itr += nBlocks * nThreads) {
584581 sectorTr = &trk.Tracks ()[itr];
585- int32_t localId = mTrackIDs [((* sectorTr). LocalTrackId () >> 24 ) * mNMaxSingleSectorTracks + ((* sectorTr). LocalTrackId () & 0xFFFFFF )];
582+ int32_t localId = mTrackIDs [(sectorTr-> LocalTrackId () >> 24 ) * mNMaxSingleSectorTracks + (sectorTr-> LocalTrackId () & 0xFFFFFF )];
586583 if (localId == -1 ) {
587584 continue ;
588585 }
@@ -614,9 +611,10 @@ GPUd() void GPUTPCGMMerger::RefitSectorTracks(int32_t nBlocks, int32_t nThreads,
614611 uint32_t nLocalTracks = trk.CommonMemory ()->nLocalTracks ;
615612
616613 float alpha = Param ().Alpha (iSector);
614+ MemLayout::wrapper<GPUTPCTrackSkeleton, MemLayout::const_pointer> sectorTr;
617615
618616 for (uint32_t itr = iBlock * nThreads + iThread; itr < nLocalTracks; itr += nBlocks * nThreads) {
619- MemLayout::wrapper<GPUTPCTrackSkeleton, MemLayout::const_pointer> sectorTr = &trk.Tracks ()[itr];
617+ sectorTr = &trk.Tracks ()[itr];
620618 GPUTPCGMSectorTrack track;
621619 SetTrackClusterZT (track, iSector, sectorTr);
622620 if (Param ().rec .tpc .mergerCovSource == 0 ) {
@@ -644,7 +642,7 @@ GPUd() void GPUTPCGMMerger::RefitSectorTracks(int32_t nBlocks, int32_t nThreads,
644642 track.SetExtrapolatedTrackId (0 , -1 );
645643 track.SetExtrapolatedTrackId (1 , -1 );
646644 uint32_t myTrack = CAMath::AtomicAdd (&mMemory ->nUnpackedTracks , 1u );
647- mTrackIDs [iSector * mNMaxSingleSectorTracks + (* sectorTr). LocalTrackId ()] = myTrack;
645+ mTrackIDs [iSector * mNMaxSingleSectorTracks + sectorTr-> LocalTrackId ()] = myTrack;
648646 mSectorTrackInfos [myTrack] = track;
649647 }
650648}
@@ -1605,7 +1603,7 @@ GPUd() void GPUTPCGMMerger::CollectMergedTracks(int32_t nBlocks, int32_t nThread
16051603 trackCluster* c2 = trackClusters + nHits + nTrackHits - 1 ;
16061604 for (int32_t i = 0 ; i < nTrackHits; i++, c2--) {
16071605 const GPUTPCTracker& trk = GetConstantMem ()->tpcTrackers [t->Sector ()];
1608- const GPUTPCHitId& ic = trk.TrackHits ()[(* t->OrigTrack ()). FirstHitID () + i];
1606+ const GPUTPCHitId& ic = trk.TrackHits ()[t->OrigTrack ()-> FirstHitID () + i];
16091607 uint32_t id = trk.Data ().ClusterDataIndex (trk.Data ().Row (ic.RowIndex ()), ic.HitIndex ()) + GetConstantMem ()->ioPtrs .clustersNative ->clusterOffset [t->Sector ()][0 ];
16101608 *c2 = trackCluster{id, (uint8_t )ic.RowIndex (), t->Sector (), t->Leg ()};
16111609 }
@@ -1659,9 +1657,9 @@ GPUd() void GPUTPCGMMerger::CollectMergedTracks(int32_t nBlocks, int32_t nThread
16591657 if (trackParts[i]->Leg () != baseLeg) {
16601658 break ;
16611659 }
1662- if ((* trackParts[i]->OrigTrack ()). NHits () > length) {
1660+ if (trackParts[i]->OrigTrack ()-> NHits () > length) {
16631661 iLongest = i;
1664- length = (* trackParts[i]->OrigTrack ()). NHits ();
1662+ length = trackParts[i]->OrigTrack ()-> NHits ();
16651663 }
16661664 }
16671665 bool outwards;
0 commit comments