1 #ifndef RecoTracker_PixelSeeding_plugins_alpaka_CAPixelDoubletsAlgos_h 2 #define RecoTracker_PixelSeeding_plugins_alpaka_CAPixelDoubletsAlgos_h 10 #include <alpaka/alpaka.hpp> 30 template <
typename TrackerTraits>
32 template <
typename TrackerTraits>
34 template <
typename TrackerTraits>
36 template <
typename TrackerTraits>
38 template <
typename TrackerTraits>
40 template <
typename TrackerTraits>
43 template <
typename TrackerTraits>
46 using T = TrackerTraits;
56 const std::vector<int>& phiCutsV)
77 template <
typename TAcc>
78 ALPAKA_FN_ACC ALPAKA_FN_INLINE
bool __attribute__((always_inline))
80 const uint32_t mi =
hh[
i].detectorIndex();
82 bool innerB1 = mi < T::last_bpix1_detIndex;
83 bool isOuterLadder = idealConditions_ ?
true : 0 == (mi / 8) % 2;
84 auto mes = (!innerB1) || isOuterLadder ?
hh[
i].clusterSizeY() : -1;
89 const uint32_t mo =
hh[
o].detectorIndex();
90 auto so =
hh[
o].clusterSizeY();
93 auto dr =
hh[
i].rGlobal() -
hh[
o].rGlobal();
95 auto innerBarrel = mi < T::last_barrel_detIndex;
96 auto onlyBarrel = mo < T::last_barrel_detIndex;
98 if (not innerBarrel and not onlyBarrel)
100 auto dy = innerB1 ? T::maxDYsize12 : T::maxDYsize;
102 return onlyBarrel ? so > 0 &&
std::abs(so - mes) >
dy 103 : innerBarrel &&
std::abs(mes -
int(
std::abs(
dz / dr) * T::dzdrFact + 0.5
f)) > T::maxDYPred;
106 template <
typename TAcc>
107 ALPAKA_FN_ACC ALPAKA_FN_INLINE
bool __attribute__((always_inline))
109 const uint32_t mi =
hh[
i].detectorIndex();
110 bool innerB1orB2 = mi < T::last_bpix2_detIndex;
115 bool innerB1 = mi < T::last_bpix1_detIndex;
116 bool isOuterLadder = idealConditions_ ?
true : 0 == (mi / 8) % 2;
117 auto mes = (!innerB1) || isOuterLadder ?
hh[
i].clusterSizeY() : -1;
120 if (mes > 0 && mes < T::minYsizeB1)
122 bool innerB2 = (mi >= T::last_bpix1_detIndex) && (mi < T::last_bpix2_detIndex);
124 if (mes > 0 && mes < T::minYsizeB2)
131 template <
typename TrackerTraits,
typename TAcc>
132 ALPAKA_FN_ACC ALPAKA_FN_INLINE
void __attribute__((always_inline))
133 doubletsFromHisto(
const TAcc& acc,
158 uint32_t
const* __restrict__
offsets =
hh.hitsLayerStart().data();
167 auto&
ntot = alpaka::declareSharedVar<uint32_t, __COUNTER__>(acc);
181 alpaka::syncBlockThreads(acc);
201 auto hoff = PhiBinner::histOff(
outer);
218 auto mez =
hh[
i].zGlobal();
226 auto mep =
hh[
i].iphi();
227 auto mer =
hh[
i].rGlobal();
230 auto ptcut = [&](
int j, int16_t idphi) {
233 auto ro =
hh[
j].rGlobal();
235 return dphi * dphi * (r2t4 - ri * ro) > (ro - ri) * (ro - ri);
237 auto z0cutoff = [&](
int j) {
238 auto zo =
hh[
j].zGlobal();
239 auto ro =
hh[
j].rGlobal();
258 for (
auto kk = kl;
kk != khh; incr(
kk)) {
260 if (
kk != kl &&
kk != kh)
263 auto const* __restrict__
p =
phiBinner.begin(
kk + hoff);
265 auto const maxpIndex =
e -
p;
273 auto mo =
hh[oi].detectorIndex();
282 auto mop =
hh[oi].iphi();
310 if (tooMany > 0
or tot > 0)
311 printf(
"OuterHitOfCell for %d in layer %d/%d, %d,%d %d, %d %.3f %.3f %s\n",
321 tooMany > 0 ?
"FULL!!" :
"not full.");
328 #endif // RecoTracker_PixelSeeding_plugins_alpaka_CAPixelDoubletsAlgos_h auto const &__restrict__ phiBinner
typename TrackingRecHitSoA< TrackerTraits >::PhiBinner PhiBinner
auto & innerLayerCumulativeSize
uint32_t const *__restrict__ offsets
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t CellNeighborsVector< TrackerTraits > * cellNeighbors
T1 atomicSub(T1 *a, T2 b)
caStructures::CellNeighborsT< TrackerTraits > CellNeighbors
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > * cells
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > OuterHitOfCell< TrackerTraits > CellCutsT< TrackerTraits > const & cuts
CellCutsT(const bool doClusterCut, const bool doZ0Cut, const bool doPtCut, const bool idealConditions, const float z0Cut, const float ptCut, const std::vector< int > &phiCutsV)
HitsConstView< TrackerTraits > H
const uint32_t threadIdxLocalY(alpaka::getIdx< alpaka::Block, alpaka::Threads >(acc)[dimIndexY])
constexpr uint16_t last_barrel_layer
const uint32_t threadIdxLocalX(alpaka::getIdx< alpaka::Block, alpaka::Threads >(acc)[dimIndexX])
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
std::vector< Block > Blocks
Abs< T >::type abs(const T &t)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void __attribute__((always_inline)) doubletsFromHisto(const TAcc &acc
constexpr uint32_t dimIndexX
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > hh
caStructures::CellTracksVectorT< TrackerTraits > CellTracksVector
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t nPairs
typename CACellT< TrackerTraits >::HitsConstView HitsConstView
caStructures::CellNeighborsVectorT< TrackerTraits > CellNeighborsVector
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t maxNumOfDoublets
constexpr float short2phi(short x)
constexpr float minz[nPairs]
caStructures::OuterHitOfCellT< TrackerTraits > OuterHitOfCell
caStructures::CellTracksT< TrackerTraits > CellTracks
constexpr uint32_t dimIndexY
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t * nCells
constexpr uint16_t maxNumModules
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > * cellTracks
constexpr float maxz[nPairs]
ALPAKA_ASSERT_ACC(offsets)
TrackingRecHitSoAConstView< TrackerTraits > HitsConstView
T1 atomicAdd(T1 *a, T2 b)
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > OuterHitOfCell< TrackerTraits > isOuterHitOfCell
constexpr float maxr[nPairs]