1 #ifndef RecoTracker_PixelSeeding_plugins_alpaka_CAPixelDoubletsAlgos_h 2 #define RecoTracker_PixelSeeding_plugins_alpaka_CAPixelDoubletsAlgos_h 10 #include <alpaka/alpaka.hpp> 29 template <
typename TrackerTraits>
31 template <
typename TrackerTraits>
33 template <
typename TrackerTraits>
35 template <
typename TrackerTraits>
37 template <
typename TrackerTraits>
39 template <
typename TrackerTraits>
42 template <
typename TrackerTraits>
45 using T = TrackerTraits;
55 const std::vector<int>& phiCutsV)
76 template <
typename TAcc>
77 ALPAKA_FN_ACC ALPAKA_FN_INLINE
bool __attribute__((always_inline)) zSizeCut(
const TAcc& acc,
81 const uint32_t mi =
hh[
i].detectorIndex();
83 bool innerB1 = mi < T::last_bpix1_detIndex;
84 bool isOuterLadder = idealConditions_ ?
true : 0 == (mi / 8) % 2;
85 auto mes = (!innerB1) || isOuterLadder ?
hh[
i].clusterSizeY() : -1;
90 const uint32_t mo =
hh[
o].detectorIndex();
91 auto so =
hh[
o].clusterSizeY();
94 auto dr =
hh[
i].rGlobal() -
hh[
o].rGlobal();
96 auto innerBarrel = mi < T::last_barrel_detIndex;
97 auto onlyBarrel = mo < T::last_barrel_detIndex;
99 if (not innerBarrel and not onlyBarrel)
101 auto dy = innerB1 ? T::maxDYsize12 : T::maxDYsize;
103 return onlyBarrel ? so > 0 &&
std::abs(so - mes) >
dy 104 : innerBarrel &&
std::abs(mes -
int(
std::abs(
dz / dr) * T::dzdrFact + 0.5
f)) > T::maxDYPred;
107 template <
typename TAcc>
108 ALPAKA_FN_ACC ALPAKA_FN_INLINE
bool __attribute__((always_inline)) clusterCut(
const TAcc& acc,
111 const uint32_t mi =
hh[
i].detectorIndex();
112 bool innerB1orB2 = mi < T::last_bpix2_detIndex;
117 bool innerB1 = mi < T::last_bpix1_detIndex;
118 bool isOuterLadder = idealConditions_ ?
true : 0 == (mi / 8) % 2;
119 auto mes = (!innerB1) || isOuterLadder ?
hh[
i].clusterSizeY() : -1;
122 if (mes > 0 && mes < T::minYsizeB1)
124 bool innerB2 = (mi >= T::last_bpix1_detIndex) && (mi < T::last_bpix2_detIndex);
126 if (mes > 0 && mes < T::minYsizeB2)
133 template <
typename TrackerTraits,
typename TAcc>
134 ALPAKA_FN_ACC ALPAKA_FN_INLINE
void __attribute__((always_inline)) doubletsFromHisto(
160 uint32_t
const* __restrict__
offsets =
hh.hitsLayerStart().data();
169 auto&
ntot = alpaka::declareSharedVar<uint32_t, __COUNTER__>(acc);
183 alpaka::syncBlockThreads(acc);
203 auto hoff = PhiBinner::histOff(
outer);
220 auto mez =
hh[
i].zGlobal();
228 auto mep =
hh[
i].iphi();
229 auto mer =
hh[
i].rGlobal();
232 auto ptcut = [&](
int j, int16_t idphi) {
235 auto ro =
hh[
j].rGlobal();
237 return dphi * dphi * (r2t4 - ri * ro) > (ro - ri) * (ro - ri);
239 auto z0cutoff = [&](
int j) {
240 auto zo =
hh[
j].zGlobal();
241 auto ro =
hh[
j].rGlobal();
260 for (
auto kk = kl;
kk != khh; incr(
kk)) {
262 if (
kk != kl &&
kk != kh)
265 auto const* __restrict__
p =
phiBinner.begin(
kk + hoff);
267 auto const maxpIndex =
e -
p;
275 auto mo =
hh[oi].detectorIndex();
284 auto mop =
hh[oi].iphi();
312 if (tooMany > 0
or tot > 0)
313 printf(
"OuterHitOfCell for %d in layer %d/%d, %d,%d %d, %d %.3f %.3f %s\n",
323 tooMany > 0 ?
"FULL!!" :
"not full.");
330 #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]