1 #ifndef RecoTracker_PixelSeeding_plugins_alpaka_CAFishbone_h 2 #define RecoTracker_PixelSeeding_plugins_alpaka_CAFishbone_h 10 #include <alpaka/alpaka.hpp> 22 template <
typename TrackerTraits>
24 template <
typename TrackerTraits>
26 template <
typename TrackerTraits>
28 template <
typename TrackerTraits>
30 template <
typename TrackerTraits>
32 template <
typename TrackerTraits>
35 template <
typename TrackerTraits>
38 template <
typename TAcc,
typename = std::enable_if_t<alpaka::isAccelerator<TAcc>>>
42 uint32_t
const* __restrict__
nCells,
50 if (
nHits <= layer2Offset)
55 float x[maxCellsPerHit], y[maxCellsPerHit], z[maxCellsPerHit],
n[maxCellsPerHit];
56 uint32_t
cc[maxCellsPerHit];
57 uint16_t
d[maxCellsPerHit];
58 uint8_t
l[maxCellsPerHit];
63 auto size = vc.size();
69 auto xo =
c0.outer_x(
hh);
70 auto yo =
c0.outer_y(
hh);
71 auto zo =
c0.outer_z(
hh);
73 for (int32_t ic = 0; ic < size; ++ic) {
74 auto& ci =
cells[vc[ic]];
80 l[sg] = ci.layerPairId();
81 d[sg] = ci.inner_detIndex(
hh);
82 x[sg] = ci.inner_x(
hh) - xo;
83 y[sg] = ci.inner_y(
hh) - yo;
84 z[sg] = ci.inner_z(
hh) - zo;
85 n[sg] =
x[sg] *
x[sg] + y[sg] * y[sg] + z[sg] * z[sg];
94 for (
auto jc = ic + 1; (
int)jc < sg; ++jc) {
98 auto cos12 =
x[ic] *
x[jc] + y[ic] * y[jc] + z[ic] * z[jc];
100 if (
d[ic] !=
d[jc] && cos12 * cos12 >= 0.99999
f * (
n[ic] *
n[jc])) {
103 bool sameLayer =
l[ic] ==
l[jc];
107 ci.setFishbone(acc, cj.inner_hit_id(), cj.inner_z(
hh),
hh);
117 cj.setFishbone(acc, ci.inner_hit_id(), ci.inner_z(
hh),
hh);
130 #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