99#include " RecoTracker/LSTCore/interface/MiniDoubletsSoA.h"
1010#include " RecoTracker/LSTCore/interface/PixelQuintupletsSoA.h"
1111#include " RecoTracker/LSTCore/interface/PixelTripletsSoA.h"
12+ #include " RecoTracker/LSTCore/interface/PixelSegmentsSoA.h"
1213#include " RecoTracker/LSTCore/interface/QuintupletsSoA.h"
1314#include " RecoTracker/LSTCore/interface/SegmentsSoA.h"
1415#include " RecoTracker/LSTCore/interface/TripletsSoA.h"
@@ -30,10 +31,10 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
3031 pixelQuintuplets.isDup ()[pixelQuintupletIndex] = true ;
3132 }
3233
33- ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelSegmentFromMemory (SegmentsPixel segmentsPixel ,
34+ ALPAKA_FN_ACC ALPAKA_FN_INLINE void rmPixelSegmentFromMemory (PixelSegments pixelSegments ,
3435 unsigned int pixelSegmentArrayIndex,
3536 bool secondpass = false ) {
36- segmentsPixel .isDup ()[pixelSegmentArrayIndex] |= 1 + secondpass;
37+ pixelSegments .isDup ()[pixelSegmentArrayIndex] |= 1 + secondpass;
3738 }
3839
3940 ALPAKA_FN_ACC ALPAKA_FN_INLINE int checkHitsT5 (unsigned int ix, unsigned int jx, QuintupletsConst quintuplets) {
@@ -321,7 +322,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
321322 ALPAKA_FN_ACC void operator ()(Acc2D const & acc,
322323 ModulesConst modules,
323324 SegmentsOccupancyConst segmentsOccupancy,
324- SegmentsPixel segmentsPixel ,
325+ PixelSegments pixelSegments ,
325326 bool secondpass) const {
326327 int pixelModuleIndex = modules.nLowerModules ();
327328 unsigned int nPixelSegments = segmentsOccupancy.nSegments ()[pixelModuleIndex];
@@ -330,29 +331,29 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
330331 nPixelSegments = n_max_pixel_segments_per_module;
331332
332333 for (unsigned int ix : cms::alpakatools::uniform_elements_y (acc, nPixelSegments)) {
333- if (secondpass && (!segmentsPixel .isQuad ()[ix] || (segmentsPixel .isDup ()[ix] & 1 )))
334+ if (secondpass && (!pixelSegments .isQuad ()[ix] || (pixelSegments .isDup ()[ix] & 1 )))
334335 continue ;
335336
336337 unsigned int phits1[Params_pLS::kHits ];
337- phits1[0 ] = segmentsPixel .pLSHitsIdxs ()[ix].x ;
338- phits1[1 ] = segmentsPixel .pLSHitsIdxs ()[ix].y ;
339- phits1[2 ] = segmentsPixel .pLSHitsIdxs ()[ix].z ;
340- phits1[3 ] = segmentsPixel .pLSHitsIdxs ()[ix].w ;
341- float eta_pix1 = segmentsPixel .eta ()[ix];
342- float phi_pix1 = segmentsPixel .phi ()[ix];
338+ phits1[0 ] = pixelSegments .pLSHitsIdxs ()[ix].x ;
339+ phits1[1 ] = pixelSegments .pLSHitsIdxs ()[ix].y ;
340+ phits1[2 ] = pixelSegments .pLSHitsIdxs ()[ix].z ;
341+ phits1[3 ] = pixelSegments .pLSHitsIdxs ()[ix].w ;
342+ float eta_pix1 = pixelSegments .eta ()[ix];
343+ float phi_pix1 = pixelSegments .phi ()[ix];
343344
344345 for (unsigned int jx : cms::alpakatools::uniform_elements_x (acc, ix + 1 , nPixelSegments)) {
345- float eta_pix2 = segmentsPixel .eta ()[jx];
346- float phi_pix2 = segmentsPixel .phi ()[jx];
346+ float eta_pix2 = pixelSegments .eta ()[jx];
347+ float phi_pix2 = pixelSegments .phi ()[jx];
347348
348349 if (alpaka::math::abs (acc, eta_pix2 - eta_pix1) > 0 .1f )
349350 continue ;
350351
351- if (secondpass && (!segmentsPixel .isQuad ()[jx] || (segmentsPixel .isDup ()[jx] & 1 )))
352+ if (secondpass && (!pixelSegments .isQuad ()[jx] || (pixelSegments .isDup ()[jx] & 1 )))
352353 continue ;
353354
354- int8_t quad_diff = segmentsPixel .isQuad ()[ix] - segmentsPixel .isQuad ()[jx];
355- float score_diff = segmentsPixel .score ()[ix] - segmentsPixel .score ()[jx];
355+ int8_t quad_diff = pixelSegments .isQuad ()[ix] - pixelSegments .isQuad ()[jx];
356+ float score_diff = pixelSegments .score ()[ix] - pixelSegments .score ()[jx];
356357 // Always keep quads over trips. If they are the same, we want the object with better score
357358 int idxToRemove;
358359 if (quad_diff > 0 )
@@ -367,10 +368,10 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
367368 idxToRemove = ix;
368369
369370 unsigned int phits2[Params_pLS::kHits ];
370- phits2[0 ] = segmentsPixel .pLSHitsIdxs ()[jx].x ;
371- phits2[1 ] = segmentsPixel .pLSHitsIdxs ()[jx].y ;
372- phits2[2 ] = segmentsPixel .pLSHitsIdxs ()[jx].z ;
373- phits2[3 ] = segmentsPixel .pLSHitsIdxs ()[jx].w ;
371+ phits2[0 ] = pixelSegments .pLSHitsIdxs ()[jx].x ;
372+ phits2[1 ] = pixelSegments .pLSHitsIdxs ()[jx].y ;
373+ phits2[2 ] = pixelSegments .pLSHitsIdxs ()[jx].z ;
374+ phits2[3 ] = pixelSegments .pLSHitsIdxs ()[jx].w ;
374375
375376 int npMatched = 0 ;
376377 for (int i = 0 ; i < Params_pLS::kHits ; i++) {
@@ -390,15 +391,15 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE::lst {
390391 }
391392 const int minNHitsForDup_pLS = 3 ;
392393 if (npMatched >= minNHitsForDup_pLS) {
393- rmPixelSegmentFromMemory (segmentsPixel , idxToRemove, secondpass);
394+ rmPixelSegmentFromMemory (pixelSegments , idxToRemove, secondpass);
394395 }
395396 if (secondpass) {
396397 float dEta = alpaka::math::abs (acc, eta_pix1 - eta_pix2);
397398 float dPhi = reco::deltaPhi (phi_pix1, phi_pix2);
398399
399400 float dR2 = dEta * dEta + dPhi * dPhi;
400401 if ((npMatched >= 1 ) || (dR2 < 1e-5f )) {
401- rmPixelSegmentFromMemory (segmentsPixel , idxToRemove, secondpass);
402+ rmPixelSegmentFromMemory (pixelSegments , idxToRemove, secondpass);
402403 }
403404 }
404405 }
0 commit comments