1 #ifndef DataFormats_TrackSoA_interface_alpaka_TrackUtilities_h 2 #define DataFormats_TrackSoA_interface_alpaka_TrackUtilities_h 8 #include <alpaka/alpaka.hpp> 14 template <
typename TrackerTraits>
22 template <
typename V3,
typename M3,
typename V2,
typename M2>
25 tracks[
i].state() <<
cp.template cast<float>(), lp.template cast<float>();
28 auto cov =
tracks[
i].covariance();
31 cov(2) =
b *
float(ccov(0, 2));
34 cov(6) =
b *
float(ccov(1, 2));
36 cov(9) =
b *
b *
float(ccov(2, 2));
37 cov(11) = cov(10) = 0;
43 template <
typename V5,
typename M5>
48 tracks[
i].state() =
v.template cast<float>();
49 for (
int j = 0, ind = 0;
j < 5; ++
j)
50 for (
auto k =
j;
k < 5; ++
k)
51 tracks[
i].covariance()(ind++) = cov(
j,
k);
54 template <
typename V5,
typename M5>
59 v =
tracks[
i].state().template cast<typename V5::Scalar>();
60 for (
int j = 0, ind = 0;
j < 5; ++
j) {
61 cov(
j,
j) =
tracks[
i].covariance()(ind++);
62 for (
auto k =
j + 1;
k < 5; ++
k)
63 cov(
k,
j) = cov(
j,
k) =
tracks[
i].covariance()(ind++);
69 auto pdet =
tracks.detIndices().begin(
i);
71 auto ol = pixelTopology::getLayer<TrackerTraits>(*pdet);
72 for (; pdet <
tracks.detIndices().end(
i); ++pdet) {
73 auto il = pixelTopology::getLayer<TrackerTraits>(*pdet);
82 return tracks.detIndices().size(
i);
88 template <
typename TrackerTraits,
typename Enable =
void>
89 struct QualityCutsT {};
91 template <
typename TrackerTraits>
114 auto const &
region = (
nHits > 3) ? quadruplet : triplet;
120 auto roughLog = [](
float x) {
129 uint32_t
lsb = 1 < 21;
133 int ex =
int(z.i >> 2) - 127;
137 const float frac[4] = {0.160497f, 0.452172f, 0.694562f, 0.901964f};
144 #ifdef NTUPLE_FIT_DEBUG 153 template <
typename TrackerTraits>
178 #endif // DataFormats_TrackSoA_interface_alpaka_TrackUtilities_h ALPAKA_FN_ACC ALPAKA_FN_INLINE bool isHP(const TrackSoAConstView &tracks, int nHits, int it) const
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::ConstView TrackSoAConstView
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool strictCut(const TrackSoAConstView &tracks, int it) const
typename std::enable_if< std::is_base_of< Phase2, T >::value >::type isPhase2Topology
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::View TrackSoAView
ALPAKA_FN_HOST_ACC static ALPAKA_FN_INLINE constexpr void copyToDense(const TrackSoAConstView &tracks, V5 &v, M5 &cov, int32_t i)
ALPAKA_FN_HOST_ACC static ALPAKA_FN_INLINE constexpr void copyFromDense(TrackSoAView &tracks, V5 const &v, M5 const &cov, int32_t i)
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::View TrackSoAView
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::ConstView TrackSoAConstView
ALPAKA_FN_HOST_ACC static ALPAKA_FN_INLINE constexpr int computeNumberOfLayers(const TrackSoAConstView &tracks, int32_t i)
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float tip(ConstView const &tracks, int32_t i)
Abs< T >::type abs(const T &t)
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::View TrackSoAView
typename std::enable_if< std::is_base_of< Phase1, T >::value >::type isPhase1Topology
ALPAKA_FN_HOST_ACC static ALPAKA_FN_INLINE constexpr void copyFromCircle(TrackSoAView &tracks, V3 const &cp, M3 const &ccov, V2 const &lp, M2 const &lcov, float b, int32_t i)
typename TrackSoA< TrackerTraits >::hindex_type hindex_type
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool isHP(const TrackSoAConstView &tracks, int nHits, int it) const
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool strictCut(const TrackSoAConstView &tracks, int it) const
ALPAKA_FN_HOST_ACC static ALPAKA_FN_INLINE constexpr int nHits(const TrackSoAConstView &tracks, int i)
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::ConstView TrackSoAConstView