CUDADataFormats
TrackingRecHit
interface
TrackingRecHit2DSOAView.h
Go to the documentation of this file.
1
#ifndef CUDADataFormats_TrackingRecHit_interface_TrackingRecHit2DSOAView_h
2
#define CUDADataFormats_TrackingRecHit_interface_TrackingRecHit2DSOAView_h
3
4
#include <cuda_runtime.h>
5
6
#include "
CUDADataFormats/SiPixelCluster/interface/gpuClusteringConstants.h
"
7
#include "
HeterogeneousCore/CUDAUtilities/interface/HistoContainer.h
"
8
#include "
HeterogeneousCore/CUDAUtilities/interface/cudaCompat.h
"
9
#include "
Geometry/TrackerGeometryBuilder/interface/phase1PixelTopology.h
"
10
11
namespace
pixelCPEforGPU
{
12
struct
ParamsOnGPU
;
13
}
14
15
class
TrackingRecHit2DSOAView
{
16
public
:
17
static
constexpr uint32_t
maxHits
() {
return
gpuClustering::maxNumClusters
; }
18
using
hindex_type
= uint32_t;
// if above is <=2^32
19
20
using
PhiBinner
=
21
cms::cuda::HistoContainer
<int16_t, 128,
gpuClustering::maxNumClusters
, 8 *
sizeof
(int16_t),
hindex_type
, 10>;
22
23
using
AverageGeometry
=
phase1PixelTopology::AverageGeometry
;
24
25
template
<
typename
>
26
friend
class
TrackingRecHit2DHeterogeneous
;
27
28
__device__
__forceinline__
uint32_t
nHits
()
const
{
return
m_nHits
; }
29
30
__device__
__forceinline__
float
& xLocal(
int
i
) {
return
m_xl
[
i
]; }
31
__device__
__forceinline__
float
xLocal(
int
i
)
const
{
return
__ldg
(
m_xl
+
i
); }
32
__device__
__forceinline__
float
& yLocal(
int
i
) {
return
m_yl
[
i
]; }
33
__device__
__forceinline__
float
yLocal(
int
i
)
const
{
return
__ldg
(
m_yl
+
i
); }
34
35
__device__
__forceinline__
float
& xerrLocal(
int
i
) {
return
m_xerr
[
i
]; }
36
__device__
__forceinline__
float
xerrLocal(
int
i
)
const
{
return
__ldg
(
m_xerr
+
i
); }
37
__device__
__forceinline__
float
& yerrLocal(
int
i
) {
return
m_yerr
[
i
]; }
38
__device__
__forceinline__
float
yerrLocal(
int
i
)
const
{
return
__ldg
(
m_yerr
+
i
); }
39
40
__device__
__forceinline__
float
& xGlobal(
int
i
) {
return
m_xg
[
i
]; }
41
__device__
__forceinline__
float
xGlobal(
int
i
)
const
{
return
__ldg
(
m_xg
+
i
); }
42
__device__
__forceinline__
float
& yGlobal(
int
i
) {
return
m_yg
[
i
]; }
43
__device__
__forceinline__
float
yGlobal(
int
i
)
const
{
return
__ldg
(
m_yg
+
i
); }
44
__device__
__forceinline__
float
& zGlobal(
int
i
) {
return
m_zg
[
i
]; }
45
__device__
__forceinline__
float
zGlobal(
int
i
)
const
{
return
__ldg
(
m_zg
+
i
); }
46
__device__
__forceinline__
float
& rGlobal(
int
i
) {
return
m_rg
[
i
]; }
47
__device__
__forceinline__
float
rGlobal(
int
i
)
const
{
return
__ldg
(
m_rg
+
i
); }
48
49
__device__
__forceinline__
int16_t&
iphi
(
int
i
) {
return
m_iphi
[
i
]; }
50
__device__
__forceinline__
int16_t
iphi
(
int
i
)
const
{
return
__ldg
(
m_iphi
+
i
); }
51
52
__device__
__forceinline__
int32_t&
charge
(
int
i
) {
return
m_charge
[
i
]; }
53
__device__
__forceinline__
int32_t
charge
(
int
i
)
const
{
return
__ldg
(
m_charge
+
i
); }
54
__device__
__forceinline__
int16_t& clusterSizeX(
int
i
) {
return
m_xsize
[
i
]; }
55
__device__
__forceinline__
int16_t clusterSizeX(
int
i
)
const
{
return
__ldg
(
m_xsize
+
i
); }
56
__device__
__forceinline__
int16_t& clusterSizeY(
int
i
) {
return
m_ysize
[
i
]; }
57
__device__
__forceinline__
int16_t clusterSizeY(
int
i
)
const
{
return
__ldg
(
m_ysize
+
i
); }
58
__device__
__forceinline__
uint16_t& detectorIndex(
int
i
) {
return
m_detInd
[
i
]; }
59
__device__
__forceinline__
uint16_t detectorIndex(
int
i
)
const
{
return
__ldg
(
m_detInd
+
i
); }
60
61
__device__
__forceinline__
pixelCPEforGPU::ParamsOnGPU
const
& cpeParams()
const
{
return
*
m_cpeParams
; }
62
63
__device__
__forceinline__
uint32_t
hitsModuleStart
(
int
i
)
const
{
return
__ldg
(
m_hitsModuleStart
+
i
); }
64
65
__device__
__forceinline__
uint32_t*
hitsLayerStart
() {
return
m_hitsLayerStart
; }
66
__device__
__forceinline__
uint32_t
const
*
hitsLayerStart
()
const
{
return
m_hitsLayerStart
; }
67
68
__device__
__forceinline__
PhiBinner
&
phiBinner
() {
return
*
m_phiBinner
; }
69
__device__
__forceinline__
PhiBinner
const
&
phiBinner
()
const
{
return
*
m_phiBinner
; }
70
71
__device__
__forceinline__
AverageGeometry
& averageGeometry() {
return
*
m_averageGeometry
; }
72
__device__
__forceinline__
AverageGeometry
const
& averageGeometry()
const
{
return
*
m_averageGeometry
; }
73
74
private
:
75
// local coord
76
float
*
m_xl
, *
m_yl
;
77
float
*
m_xerr
, *
m_yerr
;
78
79
// global coord
80
float
*
m_xg
, *
m_yg
, *
m_zg
, *
m_rg
;
81
int16_t*
m_iphi
;
82
83
// cluster properties
84
int32_t*
m_charge
;
85
int16_t*
m_xsize
;
86
int16_t*
m_ysize
;
87
uint16_t*
m_detInd
;
88
89
// supporting objects
90
// m_averageGeometry is corrected for beam spot, not sure where to host it otherwise
91
AverageGeometry
*
m_averageGeometry
;
// owned by TrackingRecHit2DHeterogeneous
92
pixelCPEforGPU::ParamsOnGPU
const
*
m_cpeParams
;
// forwarded from setup, NOT owned
93
uint32_t
const
*
m_hitsModuleStart
;
// forwarded from clusters
94
95
uint32_t*
m_hitsLayerStart
;
96
97
PhiBinner
*
m_phiBinner
;
98
99
uint32_t
m_nHits
;
100
};
101
102
#endif // CUDADataFormats_TrackingRecHit_interface_TrackingRecHit2DSOAView_h
TrackingRecHit2DSOAView::m_iphi
int16_t * m_iphi
Definition:
TrackingRecHit2DSOAView.h:81
TrackingRecHit2DSOAView::m_yg
float * m_yg
Definition:
TrackingRecHit2DSOAView.h:80
TrackingRecHit2DSOAView::m_hitsLayerStart
uint32_t * m_hitsLayerStart
Definition:
TrackingRecHit2DSOAView.h:95
TrackingRecHit2DSOAView::m_xerr
float * m_xerr
Definition:
TrackingRecHit2DSOAView.h:77
mps_fire.i
i
Definition:
mps_fire.py:428
gpuClustering::maxNumClusters
constexpr uint32_t maxNumClusters
Definition:
gpuClusteringConstants.h:31
TrackingRecHit2DHeterogeneous
Definition:
TrackingRecHit2DHeterogeneous.h:8
TrackingRecHit2DSOAView::m_xl
float * m_xl
Definition:
TrackingRecHit2DSOAView.h:76
TrackingRecHit2DSOAView::hindex_type
uint32_t hindex_type
Definition:
TrackingRecHit2DSOAView.h:18
TrackingRecHit2DSOAView::m_nHits
uint32_t m_nHits
Definition:
TrackingRecHit2DSOAView.h:99
pixelCPEforGPU
Definition:
TrackingRecHit2DSOAView.h:11
TrackingRecHit2DSOAView
Definition:
TrackingRecHit2DSOAView.h:15
TrackingRecHit2DHeterogeneous::hitsLayerStart
auto hitsLayerStart()
Definition:
TrackingRecHit2DHeterogeneous.h:35
LEDCalibrationChannels.iphi
iphi
Definition:
LEDCalibrationChannels.py:64
TrackingRecHit2DSOAView::m_charge
int32_t * m_charge
Definition:
TrackingRecHit2DSOAView.h:84
nHits
const caConstants::TupleMultiplicity *__restrict__ const HitsOnGPU *__restrict__ double *__restrict__ float *__restrict__ double *__restrict__ uint32_t nHits
Definition:
BrokenLineFitOnGPU.h:27
TrackingRecHit2DSOAView::m_ysize
int16_t * m_ysize
Definition:
TrackingRecHit2DSOAView.h:86
TrackingRecHit2DSOAView::maxHits
static constexpr uint32_t maxHits()
Definition:
TrackingRecHit2DSOAView.h:17
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition:
ALCARECOTkAlJpsiMuMu_cff.py:47
TrackingRecHit2DSOAView::m_averageGeometry
AverageGeometry * m_averageGeometry
Definition:
TrackingRecHit2DSOAView.h:91
TrackingRecHit2DHeterogeneous::hitsModuleStart
auto hitsModuleStart() const
Definition:
TrackingRecHit2DHeterogeneous.h:34
gpuClusteringConstants.h
TrackingRecHit2DSOAView::m_cpeParams
pixelCPEforGPU::ParamsOnGPU const * m_cpeParams
Definition:
TrackingRecHit2DSOAView.h:92
TrackingRecHit2DSOAView::m_yerr
float * m_yerr
Definition:
TrackingRecHit2DSOAView.h:77
__device__
#define __device__
Definition:
SiPixelGainForHLTonGPU.h:15
gpuPixelDoublets::phiBinner
auto const &__restrict__ phiBinner
Definition:
gpuPixelDoubletsAlgos.h:55
__forceinline__
#define __forceinline__
Definition:
cudaCompat.h:22
phase1PixelTopology::AverageGeometry
Definition:
phase1PixelTopology.h:161
TrackingRecHit2DSOAView::m_phiBinner
PhiBinner * m_phiBinner
Definition:
TrackingRecHit2DSOAView.h:97
HistoContainer.h
pixelCPEforGPU::ParamsOnGPU
Definition:
pixelCPEforGPU.h:54
TrackingRecHit2DSOAView::m_yl
float * m_yl
Definition:
TrackingRecHit2DSOAView.h:76
cudaCompat.h
TrackingRecHit2DSOAView::m_xg
float * m_xg
Definition:
TrackingRecHit2DSOAView.h:80
TrackingRecHit2DSOAView::m_xsize
int16_t * m_xsize
Definition:
TrackingRecHit2DSOAView.h:85
cms::cuda::HistoContainer
Definition:
HistoContainer.h:152
cms::cudacompat::__ldg
T __ldg(T const *x)
Definition:
cudaCompat.h:82
TrackingRecHit2DSOAView::m_detInd
uint16_t * m_detInd
Definition:
TrackingRecHit2DSOAView.h:87
phase1PixelTopology.h
TrackingRecHit2DSOAView::m_hitsModuleStart
uint32_t const * m_hitsModuleStart
Definition:
TrackingRecHit2DSOAView.h:93
TrackingRecHit2DSOAView::m_rg
float * m_rg
Definition:
TrackingRecHit2DSOAView.h:80
TrackingRecHit2DSOAView::m_zg
float * m_zg
Definition:
TrackingRecHit2DSOAView.h:80
Generated for CMSSW Reference Manual by
1.8.16