File indexing completed on 2024-07-18 00:47:47
0001 #ifndef DataFormats_TrackingRecHitSoA_interface_TrackingRecHitsSoA_h
0002 #define DataFormats_TrackingRecHitSoA_interface_TrackingRecHitsSoA_h
0003
0004 #include <Eigen/Dense>
0005
0006 #include "DataFormats/SoATemplate/interface/SoALayout.h"
0007 #include "DataFormats/TrackingRecHitSoA/interface/SiPixelHitStatus.h"
0008 #include "Geometry/CommonTopologies/interface/SimplePixelTopology.h"
0009 #include "HeterogeneousCore/AlpakaInterface/interface/HistoContainer.h"
0010
0011 template <typename TrackerTraits>
0012 struct TrackingRecHitSoA {
0013 using hindex_type = typename TrackerTraits::hindex_type;
0014 using PhiBinner = cms::alpakatools::HistoContainer<int16_t,
0015 256,
0016 -1,
0017 8 * sizeof(int16_t),
0018 hindex_type,
0019 TrackerTraits::numberOfLayers>;
0020 using PhiBinnerView = typename PhiBinner::View;
0021 using PhiBinnerStorageType = typename PhiBinner::index_type;
0022 using AverageGeometry = pixelTopology::AverageGeometryT<TrackerTraits>;
0023 using HitLayerStartArray = std::array<hindex_type, TrackerTraits::numberOfLayers + 1>;
0024 using HitModuleStartArray = std::array<hindex_type, TrackerTraits::numberOfModules + 1>;
0025
0026 GENERATE_SOA_LAYOUT(Layout,
0027 SOA_COLUMN(float, xLocal),
0028 SOA_COLUMN(float, yLocal),
0029 SOA_COLUMN(float, xerrLocal),
0030 SOA_COLUMN(float, yerrLocal),
0031 SOA_COLUMN(float, xGlobal),
0032 SOA_COLUMN(float, yGlobal),
0033 SOA_COLUMN(float, zGlobal),
0034 SOA_COLUMN(float, rGlobal),
0035 SOA_COLUMN(int16_t, iphi),
0036 SOA_COLUMN(SiPixelHitStatusAndCharge, chargeAndStatus),
0037 SOA_COLUMN(int16_t, clusterSizeX),
0038 SOA_COLUMN(int16_t, clusterSizeY),
0039 SOA_COLUMN(uint16_t, detectorIndex),
0040 SOA_SCALAR(int32_t, offsetBPIX2),
0041 SOA_COLUMN(PhiBinnerStorageType, phiBinnerStorage),
0042 SOA_SCALAR(HitModuleStartArray, hitsModuleStart),
0043 SOA_SCALAR(HitLayerStartArray, hitsLayerStart),
0044 SOA_SCALAR(AverageGeometry, averageGeometry),
0045 SOA_SCALAR(PhiBinner, phiBinner));
0046 };
0047
0048 template <typename TrackerTraits>
0049 using TrackingRecHitLayout = typename TrackingRecHitSoA<TrackerTraits>::template Layout<>;
0050 template <typename TrackerTraits>
0051 using TrackingRecHitSoAView = typename TrackingRecHitSoA<TrackerTraits>::template Layout<>::View;
0052 template <typename TrackerTraits>
0053 using TrackingRecHitSoAConstView = typename TrackingRecHitSoA<TrackerTraits>::template Layout<>::ConstView;
0054
0055 #endif