1 #ifndef CUDADataFormats_Track_PixelTrackUtilities_h 2 #define CUDADataFormats_Track_PixelTrackUtilities_h 17 return static_cast<Quality>(qp);
22 template <
typename TrackerTraits>
24 static constexpr int32_t
S = TrackerTraits::maxNumberOfTuples;
25 static constexpr int32_t
H = TrackerTraits::avgHitsPerTrack;
51 template <
typename TrackerTraits>
76 return tracks[
i].nLayers() == 3;
79 template <
typename V3,
typename M3,
typename V2,
typename M2>
82 tracks[
i].state() <<
cp.template cast<float>(), lp.template cast<float>();
85 auto cov =
tracks[
i].covariance();
88 cov(2) =
b *
float(ccov(0, 2));
91 cov(6) =
b *
float(ccov(1, 2));
93 cov(9) =
b *
b *
float(ccov(2, 2));
94 cov(11) = cov(10) = 0;
100 template <
typename V5,
typename M5>
105 tracks[
i].state() =
v.template cast<float>();
106 for (
int j = 0, ind = 0;
j < 5; ++
j)
107 for (
auto k =
j;
k < 5; ++
k)
108 tracks[
i].covariance()(ind++) = cov(
j,
k);
111 template <
typename V5,
typename M5>
116 v =
tracks[
i].state().template cast<typename V5::Scalar>();
117 for (
int j = 0, ind = 0;
j < 5; ++
j) {
118 cov(
j,
j) =
tracks[
i].covariance()(ind++);
119 for (
auto k =
j + 1;
k < 5; ++
k)
120 cov(
k,
j) = cov(
j,
k) =
tracks[
i].covariance()(ind++);
125 auto pdet =
tracks.detIndices().begin(
i);
127 auto ol = pixelTopology::getLayer<TrackerTraits>(*pdet);
128 for (; pdet <
tracks.detIndices().end(
i); ++pdet) {
129 auto il = pixelTopology::getLayer<TrackerTraits>(*pdet);
138 return tracks.detIndices().size(
i);
144 template <
typename TrackerTraits,
typename Enable =
void>
147 template <
typename TrackerTraits>
172 auto const &
region = (
nHits > 3) ? quadruplet : triplet;
178 auto roughLog = [](
float x) {
187 uint32_t
lsb = 1 < 21;
191 int ex =
int(z.i >> 2) - 127;
195 const float frac[4] = {0.160497f, 0.452172f, 0.694562f, 0.901964f};
202 #ifdef NTUPLE_FIT_DEBUG 211 template <
typename TrackerTraits>
233 template <
typename TrackerTraits>
235 template <
typename TrackerTraits>
237 template <
typename TrackerTraits>
static constexpr __host__ __device__ void copyToDense(const TrackSoAConstView &tracks, V5 &v, M5 &cov, int32_t i)
static constexpr __host__ __device__ float tip(const TrackSoAConstView &tracks, int32_t i)
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::ConstView TrackSoAConstView
Quality qualityByName(std::string const &name)
static constexpr __host__ __device__ float zip(const TrackSoAConstView &tracks, int32_t i)
static constexpr int32_t H
typename TrackSoA< TrackerTraits >::template TrackSoALayout<> TrackLayout
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float zip(ConstView const &tracks, int32_t i)
Eigen::Matrix< float, 5, 1 > Vector5f
typename std::enable_if< std::is_base_of< Phase2, T >::value >::type isPhase2Topology
const std::string qualityName[qualitySize]
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::View TrackSoAView
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::View TrackSoAView
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::ConstView TrackSoAConstView
static constexpr __host__ __device__ float phi(const TrackSoAConstView &tracks, int32_t i)
#define GENERATE_SOA_LAYOUT(CLASS,...)
#define SOA_SCALAR(TYPE, NAME)
static constexpr __host__ __device__ int computeNumberOfLayers(const TrackSoAConstView &tracks, int32_t i)
constexpr uint32_t qualitySize
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
static __host__ __device__ float charge(const TrackSoAConstView &tracks, int32_t i)
static constexpr __host__ __device__ int nHits(const TrackSoAConstView &tracks, int i)
typename TrackSoA< TrackerTraits >::hindex_type hindex_type
static constexpr __host__ __device__ bool isTriplet(const TrackSoAConstView &tracks, int i)
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::View TrackSoAView
static constexpr __host__ __device__ void copyFromCircle(TrackSoAView &tracks, V3 const &cp, M3 const &ccov, V2 const &lp, M2 const &lcov, float b, int32_t i)
#define SOA_EIGEN_COLUMN(TYPE, NAME)
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::ConstView TrackSoAConstView
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
Eigen::Matrix< float, 15, 1 > Vector15f
#define SOA_COLUMN(TYPE, NAME)
static constexpr __host__ __device__ void copyFromDense(TrackSoAView &tracks, V5 const &v, M5 const &cov, int32_t i)
typename TrackSoA< TrackerTraits >::template TrackSoALayout<>::ConstView TrackSoAConstView