@@ -338,7 +338,8 @@ void TrackInterpolation::process()
338338 return ;
339339 }
340340 // set the input containers
341- mTPCTracksClusIdx = mRecoCont ->getTPCTracksClusterRefs ();
341+ mTPCTrackClusIdx = mRecoCont ->getTPCTracksClusterRefs ();
342+ mTPCShClassMap = mRecoCont ->clusterShMapTPC ;
342343 mTPCClusterIdxStruct = &mRecoCont ->getTPCClusters ();
343344 int nbOccTOT = o2::gpu::GPUO2InterfaceRefit::fillOccupancyMapGetSize (mNHBPerTF , mTPCParam .get ());
344345 o2::gpu::GPUO2InterfaceUtils::paramUseExternalOccupancyMap (mTPCParam .get (), mNHBPerTF , mRecoCont ->occupancyMapTPC .data (), nbOccTOT);
@@ -511,7 +512,9 @@ void TrackInterpolation::interpolateTrack(int iSeed)
511512 for (int iCl = trkTPC.getNClusterReferences (); iCl--;) {
512513 uint8_t sector, row;
513514 uint32_t clusterIndexInRow;
514- const auto & clTPC = trkTPC.getCluster (mTPCTracksClusIdx , iCl, *mTPCClusterIdxStruct , sector, row);
515+ trkTPC.getClusterReference (mTPCTrackClusIdx , iCl, sector, row, clusterIndexInRow);
516+ unsigned int absoluteIndex = mTPCClusterIdxStruct ->clusterOffset [sector][row] + clusterIndexInRow;
517+ const auto & clTPC = mTPCClusterIdxStruct ->clustersLinear [absoluteIndex];
515518 float clTPCX;
516519 std::array<float , 2 > clTPCYZ;
517520 mFastTransform ->TransformIdeal (sector, row, clTPC.getPad (), clTPC.getTime (), clTPCX, clTPCYZ[0 ], clTPCYZ[1 ], clusterTimeBinOffset);
@@ -520,6 +523,10 @@ void TrackInterpolation::interpolateTrack(int iSeed)
520523 mCache [row].clY = clTPCYZ[0 ];
521524 mCache [row].clZ = clTPCYZ[1 ];
522525 mCache [row].clAngle = o2::math_utils::sector2Angle (sector);
526+ mCache [row].clFlags = clTPC.getFlags ();
527+ if (mTPCShClassMap [absoluteIndex] & o2::gpu::GPUTPCGMMergedTrackHit::flagShared) {
528+ mCache [row].clFlags |= o2::gpu::GPUTPCGMMergedTrackHit::flagShared;
529+ }
523530 mCacheDEDX [row].first = std::min<uint16_t >(clTPC.getQtot (), UINT16_MAX );
524531 mCacheDEDX [row].second = clTPC.getQmax ();
525532 int imb = int (clTPC.getTime () * mNTPCOccBinLengthInv );
@@ -670,7 +677,7 @@ void TrackInterpolation::interpolateTrack(int iSeed)
670677 const auto z = mCache [iRow].z [Int];
671678 const auto snp = mCache [iRow].snp [Int];
672679 const auto sec = mCache [iRow].clSec ;
673- clusterResiduals.emplace_back (dY, dZ, y, z, snp, sec, deltaRow);
680+ clusterResiduals.emplace_back (dY, dZ, y, z, snp, sec, deltaRow, mCache [iRow]. clFlags );
674681
675682 deltaRow = 1 ;
676683 }
@@ -717,8 +724,9 @@ void TrackInterpolation::interpolateTrack(int iSeed)
717724 const auto y = clusterResiduals[iCl].y ;
718725 const auto z = clusterResiduals[iCl].z ;
719726 const auto sec = clusterResiduals[iCl].sec ;
727+ const short flags = clusterResiduals[iCl].flags ;
720728 if ((std::abs (dy) < param::MaxResid) && (std::abs (dz) < param::MaxResid) && (std::abs (y) < param::MaxY) && (std::abs (z) < param::MaxZ) && (std::abs (tgPhi) < param::MaxTgSlp)) {
721- mClRes .emplace_back (dy, dz, tgPhi, y, z, iRow, sec, - 1 , rej);
729+ mClRes .emplace_back (dy, dz, tgPhi, y, z, iRow, sec, flags , rej);
722730 mDetInfoRes .emplace_back ().setTPC (mCacheDEDX [iRow].first , mCacheDEDX [iRow].second ); // qtot, qmax
723731 ++nClValidated;
724732 } else {
@@ -983,7 +991,9 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
983991 for (int iCl = trkTPC.getNClusterReferences (); iCl--;) {
984992 uint8_t sector, row;
985993 uint32_t clusterIndexInRow;
986- const auto & cl = trkTPC.getCluster (mTPCTracksClusIdx , iCl, *mTPCClusterIdxStruct , sector, row);
994+ trkTPC.getClusterReference (mTPCTrackClusIdx , iCl, sector, row, clusterIndexInRow);
995+ unsigned int absoluteIndex = mTPCClusterIdxStruct ->clusterOffset [sector][row] + clusterIndexInRow;
996+ const auto & cl = mTPCClusterIdxStruct ->clustersLinear [absoluteIndex];
987997 if (clRowPrev == row) {
988998 // if there are split clusters we only take the first one on the pad row
989999 continue ;
@@ -1014,7 +1024,11 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
10141024 const auto tz = trkWork.getZ ();
10151025 const auto snp = trkWork.getSnp ();
10161026 const auto sec = sector;
1017- clusterResiduals.emplace_back (dY, dZ, ty, tz, snp, sec, row - rowPrev);
1027+ unsigned char flags = cl.getFlags ();
1028+ if (mTPCShClassMap [absoluteIndex] & o2::gpu::GPUTPCGMMergedTrackHit::flagShared) {
1029+ flags |= o2::gpu::GPUTPCGMMergedTrackHit::flagShared;
1030+ }
1031+ clusterResiduals.emplace_back (dY, dZ, ty, tz, snp, sec, row - rowPrev, flags);
10181032 mCacheDEDX [row].first = cl.getQtot ();
10191033 mCacheDEDX [row].second = cl.getQmax ();
10201034 rowPrev = row;
@@ -1061,8 +1075,9 @@ void TrackInterpolation::extrapolateTrack(int iSeed)
10611075 const auto dz = clusterResiduals[iCl].dz ;
10621076 const auto y = clusterResiduals[iCl].y ;
10631077 const auto z = clusterResiduals[iCl].z ;
1078+ const short flags = clusterResiduals[iCl].flags ;
10641079 if ((std::abs (dy) < param::MaxResid) && (std::abs (dz) < param::MaxResid) && (std::abs (y) < param::MaxY) && (std::abs (z) < param::MaxZ) && (std::abs (tgPhi) < param::MaxTgSlp)) {
1065- mClRes .emplace_back (dy, dz, tgPhi, y, z, iRow, clusterResiduals[iCl].sec , - 1 , rej);
1080+ mClRes .emplace_back (dy, dz, tgPhi, y, z, iRow, clusterResiduals[iCl].sec , flags , rej);
10661081 mDetInfoRes .emplace_back ().setTPC (mCacheDEDX [iRow].first , mCacheDEDX [iRow].second ); // qtot, qmax
10671082 ++nClValidated;
10681083 } else {
0 commit comments