CMS 3D CMS Logo

TrackingRecHitsUtilities.h
Go to the documentation of this file.
1 #ifndef CUDADataFormats_RecHits_TrackingRecHitsUtilities_h
2 #define CUDADataFormats_RecHits_TrackingRecHitsUtilities_h
3 
4 #include <Eigen/Dense>
10 #include "SiPixelHitStatus.h"
11 
12 template <typename TrackerTraits>
14  using hindex_type = typename TrackerTraits::hindex_type;
15  using PhiBinner = cms::cuda::HistoContainer<int16_t,
16  256,
17  -1,
18  8 * sizeof(int16_t),
20  TrackerTraits::numberOfLayers>; //28 for phase2 geometry
21 
25 
26  using HitLayerStartArray = std::array<hindex_type, TrackerTraits::numberOfLayers + 1>;
27  using HitModuleStartArray = std::array<hindex_type, TrackerTraits::numberOfModules + 1>;
28 
29  //Is it better to have two split?
31  SOA_COLUMN(float, xLocal),
32  SOA_COLUMN(float, yLocal),
33  SOA_COLUMN(float, xerrLocal),
34  SOA_COLUMN(float, yerrLocal),
35  SOA_COLUMN(float, xGlobal),
36  SOA_COLUMN(float, yGlobal),
37  SOA_COLUMN(float, zGlobal),
38  SOA_COLUMN(float, rGlobal),
39  SOA_COLUMN(int16_t, iphi),
40  SOA_COLUMN(SiPixelHitStatusAndCharge, chargeAndStatus),
41  SOA_COLUMN(int16_t, clusterSizeX),
42  SOA_COLUMN(int16_t, clusterSizeY),
43  SOA_COLUMN(uint16_t, detectorIndex),
44 
45  SOA_SCALAR(uint32_t, nHits),
46  SOA_SCALAR(int32_t, offsetBPIX2),
47  //These above could be separated in a specific
48  //layout since they don't depends on the template
49  //for the moment I'm keeping them here
50  SOA_COLUMN(PhiBinnerStorageType, phiBinnerStorage),
51  SOA_SCALAR(HitModuleStartArray, hitsModuleStart),
52  SOA_SCALAR(HitLayerStartArray, hitsLayerStart),
53  SOA_SCALAR(ParamsOnGPU, cpeParams),
54  SOA_SCALAR(AverageGeometry, averageGeometry),
56 };
57 
58 template <typename TrackerTraits>
59 using TrackingRecHitLayout = typename TrackingRecHitSoA<TrackerTraits>::template TrackingRecHitSoALayout<>;
60 template <typename TrackerTraits>
62 template <typename TrackerTraits>
64  typename TrackingRecHitSoA<TrackerTraits>::template TrackingRecHitSoALayout<>::ConstView;
65 
66 #endif
typename TrackingRecHitSoA< TrackerTraits >::template TrackingRecHitSoALayout<> TrackingRecHitLayout
std::array< hindex_type, TrackerTraits::numberOfModules+1 > HitModuleStartArray
typename PhiBinner::index_type PhiBinnerStorageType
constexpr uint32_t numberOfLayers
#define GENERATE_SOA_LAYOUT(CLASS,...)
Definition: SoALayout.h:426
#define SOA_SCALAR(TYPE, NAME)
Definition: SoACommon.h:553
typename Base::index_type index_type
auto const &__restrict__ phiBinner
typename TrackerTraits::hindex_type hindex_type
typename TrackingRecHitSoA< TrackerTraits >::template TrackingRecHitSoALayout<>::ConstView TrackingRecHitSoAConstView
std::array< hindex_type, TrackerTraits::numberOfLayers+1 > HitLayerStartArray
typename TrackingRecHitSoA< TrackerTraits >::template TrackingRecHitSoALayout<>::View TrackingRecHitSoAView
TupleMultiplicity< TrackerTraits > const *__restrict__ uint32_t nHits
#define SOA_COLUMN(TYPE, NAME)
Definition: SoACommon.h:554