From 1cbb2aa6f5f4cf25c7be430b7c7e216fd3f95563 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Thu, 31 Dec 2020 00:20:31 +0100 Subject: [PATCH] Clean up the pixel local reconstruction code (cms-patatrack#602) Address the pixel local reconstruction review comments: - remove obsolete comments; - consistently use named constants; - rename data members and methods to be more descriptive; - rename local variables according to the coding rules and for consistency with cms-sw#32591; - update transient dictionaries to match data types. --- .../plugins/gpuPixelDoubletsAlgos.h | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h b/RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h index d055c8b7cb867..5c0d5a252b684 100644 --- a/RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h +++ b/RecoPixelVertexing/PixelTriplets/plugins/gpuPixelDoubletsAlgos.h @@ -50,9 +50,9 @@ namespace gpuPixelDoublets { bool isOuterLadder = ideal_cond; - using Hist = TrackingRecHit2DSOAView::Hist; + using PhiBinner = TrackingRecHit2DSOAView::PhiBinner; - auto const& __restrict__ hist = hh.phiBinner(); + auto const& __restrict__ phiBinner = hh.phiBinner(); uint32_t const* __restrict__ offsets = hh.hitsLayerStart(); assert(offsets); @@ -93,7 +93,7 @@ namespace gpuPixelDoublets { uint8_t outer = layerPairs[2 * pairLayerId + 1]; assert(outer > inner); - auto hoff = Hist::histOff(outer); + auto hoff = PhiBinner::histOff(outer); auto i = (0 == pairLayerId) ? j : j - innerLayerCumulativeSize[pairLayerId - 1]; i += offsets[inner]; @@ -175,10 +175,10 @@ namespace gpuPixelDoublets { auto iphicut = phicuts[pairLayerId]; - auto kl = Hist::bin(int16_t(mep - iphicut)); - auto kh = Hist::bin(int16_t(mep + iphicut)); - auto incr = [](auto& k) { return k = (k + 1) % Hist::nbins(); }; - // bool piWrap = std::abs(kh-kl) > Hist::nbins()/2; + auto kl = PhiBinner::bin(int16_t(mep - iphicut)); + auto kh = PhiBinner::bin(int16_t(mep + iphicut)); + auto incr = [](auto& k) { return k = (k + 1) % PhiBinner::nbins(); }; + // bool piWrap = std::abs(kh-kl) > PhiBinner::nbins()/2; #ifdef GPU_DEBUG int tot = 0; @@ -191,10 +191,10 @@ namespace gpuPixelDoublets { for (auto kk = kl; kk != khh; incr(kk)) { #ifdef GPU_DEBUG if (kk != kl && kk != kh) - nmin += hist.size(kk + hoff); + nmin += phiBinner.size(kk + hoff); #endif - auto const* __restrict__ p = hist.begin(kk + hoff); - auto const* __restrict__ e = hist.end(kk + hoff); + auto const* __restrict__ p = phiBinner.begin(kk + hoff); + auto const* __restrict__ e = phiBinner.end(kk + hoff); p += first; for (; p < e; p += stride) { auto oi = __ldg(p);