1 #ifndef DataFormats_Track_interface_alpaka_TrackUtilities_h 2 #define DataFormats_Track_interface_alpaka_TrackUtilities_h 9 template <
typename TrackerTraits>
17 template <
typename V3,
typename M3,
typename V2,
typename M2>
20 tracks[
i].state() <<
cp.template cast<float>(), lp.template cast<float>();
23 auto cov =
tracks[
i].covariance();
26 cov(2) =
b *
float(ccov(0, 2));
29 cov(6) =
b *
float(ccov(1, 2));
31 cov(9) =
b *
b *
float(ccov(2, 2));
32 cov(11) = cov(10) = 0;
38 template <
typename V5,
typename M5>
43 tracks[
i].state() =
v.template cast<float>();
44 for (
int j = 0, ind = 0;
j < 5; ++
j)
45 for (
auto k =
j;
k < 5; ++
k)
46 tracks[
i].covariance()(ind++) = cov(
j,
k);
49 template <
typename V5,
typename M5>
54 v =
tracks[
i].state().template cast<typename V5::Scalar>();
55 for (
int j = 0, ind = 0;
j < 5; ++
j) {
56 cov(
j,
j) =
tracks[
i].covariance()(ind++);
57 for (
auto k =
j + 1;
k < 5; ++
k)
58 cov(
k,
j) = cov(
j,
k) =
tracks[
i].covariance()(ind++);
64 auto pdet =
tracks.detIndices().begin(
i);
66 auto ol = pixelTopology::getLayer<TrackerTraits>(*pdet);
67 for (; pdet <
tracks.detIndices().end(
i); ++pdet) {
68 auto il = pixelTopology::getLayer<TrackerTraits>(*pdet);
77 return tracks.detIndices().size(
i);
83 template <
typename TrackerTraits,
typename Enable =
void>
84 struct QualityCutsT {};
86 template <
typename TrackerTraits>
109 auto const &
region = (
nHits > 3) ? quadruplet : triplet;
115 auto roughLog = [](
float x) {
124 uint32_t
lsb = 1 < 21;
128 int ex =
int(z.i >> 2) - 127;
132 const float frac[4] = {0.160497f, 0.452172f, 0.694562f, 0.901964f};
139 #ifdef NTUPLE_FIT_DEBUG 148 template <
typename TrackerTraits>
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