@@ -874,22 +874,23 @@ GPUg() void dedupCellsKernel(
874874 const int ownedClustersCut,
875875 const float beamX,
876876 const float beamY,
877+ const float bz,
878+ const float curvatureScale,
877879 const float maxZ,
878880 const float minPt,
879881 int * cellAccepted)
880882{
881883 for (int i = blockIdx .x * blockDim .x + threadIdx .x ; i < nCells; i += blockDim .x * gridDim .x ) {
882884 const CellSeed& cell = cells[i];
883885 std::array<float , 3 > origin, direction;
884- if (!cell. getPxPyPzGlo ( direction)) {
886+ if (!getCellLineAtBeam (cell, beamX, beamY, bz, curvatureScale, origin, direction)) {
885887 cellAccepted[i] = 0 ;
886888 continue ;
887889 }
888890 const bool owned0 = static_cast <uint32_t >(clusterOwners[0 ][cell.getFirstClusterIndex ()]) == static_cast <uint32_t >(i);
889891 const bool owned1 = static_cast <uint32_t >(clusterOwners[1 ][cell.getSecondClusterIndex ()]) == static_cast <uint32_t >(i);
890892 const bool owned2 = static_cast <uint32_t >(clusterOwners[2 ][cell.getThirdClusterIndex ()]) == static_cast <uint32_t >(i);
891893 const bool keepCell = (static_cast <int >(owned0) + static_cast <int >(owned1) + static_cast <int >(owned2)) >= 3 - ownedClustersCut;
892- cell.getXYZGlo (origin);
893894 const float dx = origin[0 ] - beamX;
894895 const float dy = origin[1 ] - beamY;
895896 const float den = direction[0 ] * direction[0 ] + direction[1 ] * direction[1 ];
@@ -910,6 +911,8 @@ GPUg() void linearizeCellsKernel(
910911 int * lineRof,
911912 const float beamX,
912913 const float beamY,
914+ const float bz,
915+ const float curvatureScale,
913916 float * lineZs,
914917 o2::its::TimeEstBC* lineTimes,
915918 int * lineClusters, // 3 per line (L0,L1,L2 cluster ids), for the host-side MC label derivation
@@ -923,8 +926,7 @@ GPUg() void linearizeCellsKernel(
923926 }
924927 const CellSeed& cell = cells[i];
925928 std::array<float , 3 > origin, direction;
926- cell.getXYZGlo (origin);
927- cell.getPxPyPzGlo (direction);
929+ getCellLineAtBeam (cell, beamX, beamY, bz, curvatureScale, origin, direction); // accepted by dedupCellsKernel: succeeds
928930 lines[slot] = o2::its::Line{origin.data (), direction.data (), cell.getTimeStamp ()};
929931 lineRof[slot] = deviceUpperBound (rofFramesClustersL1, 0 , nRofsL1 + 1 , cell.getSecondClusterIndex ()) - 1 ;
930932 float zAtBeam;
@@ -1577,6 +1579,8 @@ void TrackingKernels<NLayers>::linearizeCellsToLinesHandler(const int nCells,
15771579 int * lineSlots, // nCells + 1 scratch: accept flags, scanned in place into slots
15781580 const float beamX,
15791581 const float beamY,
1582+ const float bz,
1583+ const float curvatureScale,
15801584 const float maxZ,
15811585 const float minPt,
15821586 float * linesZs,
@@ -1593,6 +1597,8 @@ void TrackingKernels<NLayers>::linearizeCellsToLinesHandler(const int nCells,
15931597 ownedClustersCut,
15941598 beamX,
15951599 beamY,
1600+ bz,
1601+ curvatureScale,
15961602 maxZ,
15971603 minPt,
15981604 lineSlots);
@@ -1608,6 +1614,8 @@ void TrackingKernels<NLayers>::linearizeCellsToLinesHandler(const int nCells,
16081614 lineRof,
16091615 beamX,
16101616 beamY,
1617+ bz,
1618+ curvatureScale,
16111619 linesZs,
16121620 lineTimes,
16131621 lineClusters,
0 commit comments