1 #ifndef RecoTracker_PixelSeeding_plugins_alpaka_CAFishbone_h 2 #define RecoTracker_PixelSeeding_plugins_alpaka_CAFishbone_h 10 #include <alpaka/alpaka.hpp> 23 template <
typename TrackerTraits>
25 template <
typename TrackerTraits>
27 template <
typename TrackerTraits>
29 template <
typename TrackerTraits>
31 template <
typename TrackerTraits>
33 template <
typename TrackerTraits>
36 template <
typename TrackerTraits>
39 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
43 uint32_t
const* __restrict__
nCells,
51 if (
nHits <= layer2Offset)
56 float x[maxCellsPerHit], y[maxCellsPerHit], z[maxCellsPerHit],
n[maxCellsPerHit];
57 uint32_t
cc[maxCellsPerHit];
58 uint16_t
d[maxCellsPerHit];
59 uint8_t
l[maxCellsPerHit];
64 auto size = vc.size();
70 auto xo =
c0.outer_x(
hh);
71 auto yo =
c0.outer_y(
hh);
72 auto zo =
c0.outer_z(
hh);
74 for (int32_t ic = 0; ic < size; ++ic) {
75 auto& ci =
cells[vc[ic]];
81 l[sg] = ci.layerPairId();
82 d[sg] = ci.inner_detIndex(
hh);
83 x[sg] = ci.inner_x(
hh) - xo;
84 y[sg] = ci.inner_y(
hh) - yo;
85 z[sg] = ci.inner_z(
hh) - zo;
86 n[sg] =
x[sg] *
x[sg] + y[sg] * y[sg] + z[sg] * z[sg];
95 for (
auto jc = ic + 1; (
int)jc < sg; ++jc) {
99 auto cos12 =
x[ic] *
x[jc] + y[ic] * y[jc] + z[ic] * z[jc];
101 if (
d[ic] !=
d[jc] && cos12 * cos12 >= 0.99999
f * (
n[ic] *
n[jc])) {
104 bool sameLayer =
l[ic] ==
l[jc];
108 ci.setFishbone(acc, cj.inner_hit_id(), cj.inner_z(
hh),
hh);
118 cj.setFishbone(acc, ci.inner_hit_id(), ci.inner_z(
hh),
hh);
131 #endif // RecoTracker_PixelSeeding_plugins_alpaka_CAFishbone_h
uint32_t cc[maxCellsPerHit]
GPUCACellT< TrackerTraits > uint32_t const *__restrict__ OuterHitOfCell< TrackerTraits > const isOuterHitOfCellWrap
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > * cells
ALPAKA_FN_ACC void operator()(TAcc const &acc, HitsConstView< TrackerTraits > hh, CACellT< TrackerTraits > *cells, uint32_t const *__restrict__ nCells, OuterHitOfCell< TrackerTraits > const *isOuterHitOfCellWrap, int32_t nHits, bool checkTrack) const
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t CellNeighborsVector< TrackerTraits > CellTracksVector< TrackerTraits > HitsConstView< TrackerTraits > hh
typename CACellT< TrackerTraits >::HitsConstView HitsConstView
ALPAKA_FN_ACC ALPAKA_FN_INLINE void uint32_t const uint32_t CACellT< TrackerTraits > uint32_t * nCells
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
TrackingRecHitSoAConstView< TrackerTraits > HitsConstView
GPUCACellT< TrackerTraits > uint32_t const *__restrict__ OuterHitOfCell< TrackerTraits > const int32_t bool checkTrack
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