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))
79 const uint32_t mi =
hh[
i].detectorIndex();
81 bool innerB1 = mi < T::last_bpix1_detIndex;
82 bool isOuterLadder = idealConditions_ ?
true : 0 == (mi / 8) % 2;
83 auto mes = (!innerB1) || isOuterLadder ?
hh[
i].clusterSizeY() : -1;
88 const uint32_t mo =
hh[
o].detectorIndex();
89 auto so =
hh[
o].clusterSizeY();
92 auto dr =
hh[
i].rGlobal() -
hh[
o].rGlobal();
94 auto innerBarrel = mi < T::last_barrel_detIndex;
95 auto onlyBarrel = mo < T::last_barrel_detIndex;
97 if (not innerBarrel and not onlyBarrel)
99 auto dy = innerB1 ? T::maxDYsize12 : T::maxDYsize;
101 return onlyBarrel ? so > 0 &&
std::abs(so - mes) >
dy 102 : innerBarrel &&
std::abs(mes -
int(
std::abs(
dz / dr) * T::dzdrFact + 0.5
f)) > T::maxDYPred;
105 template <
typename TAcc>
106 ALPAKA_FN_ACC ALPAKA_FN_INLINE
bool __attribute__((always_inline))
108 const uint32_t mi =
hh[
i].detectorIndex();
109 bool innerB1orB2 = mi < T::last_bpix2_detIndex;
114 bool innerB1 = mi < T::last_bpix1_detIndex;
115 bool isOuterLadder = idealConditions_ ?
true : 0 == (mi / 8) % 2;
116 auto mes = (!innerB1) || isOuterLadder ?
hh[
i].clusterSizeY() : -1;
119 if (mes > 0 && mes < T::minYsizeB1)
121 bool innerB2 = (mi >= T::last_bpix1_detIndex) && (mi < T::last_bpix2_detIndex);
123 if (mes > 0 && mes < T::minYsizeB2)
130 template <
typename TrackerTraits,
typename TAcc>
131 ALPAKA_FN_ACC ALPAKA_FN_INLINE
void __attribute__((always_inline))
132 doubletsFromHisto(
const TAcc& acc,
157 uint32_t
const* __restrict__
offsets =
hh.hitsLayerStart().data();
166 auto&
ntot = alpaka::declareSharedVar<uint32_t, __COUNTER__>(acc);
180 alpaka::syncBlockThreads(acc);
200 auto hoff = PhiBinner::histOff(
outer);
217 auto mez =
hh[
i].zGlobal();
225 auto mep =
hh[
i].iphi();
226 auto mer =
hh[
i].rGlobal();
229 auto ptcut = [&](
int j, int16_t idphi) {
232 auto ro =
hh[
j].rGlobal();
234 return dphi * dphi * (r2t4 - ri * ro) > (ro - ri) * (ro - ri);
236 auto z0cutoff = [&](
int j) {
237 auto zo =
hh[
j].zGlobal();
238 auto ro =
hh[
j].rGlobal();
257 for (
auto kk = kl;
kk != khh; incr(
kk)) {
259 if (
kk != kl &&
kk != kh)
262 auto const* __restrict__
p =
phiBinner.begin(
kk + hoff);
264 auto const maxpIndex =
e -
p;
272 auto mo =
hh[oi].detectorIndex();
281 auto mop =
hh[oi].iphi();
309 if (tooMany > 0
or tot > 0)
310 printf(
"OuterHitOfCell for %d in layer %d/%d, %d,%d %d, %d %.3f %.3f %s\n",
320 tooMany > 0 ?
"FULL!!" :
"not full.");
327 #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]