ATLAS Offline Software
DataPrepEDM.h
Go to the documentation of this file.
1  /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4  #ifndef TRIGACCELEVENT_DATAPREPEDM_H
5  #define TRIGACCELEVENT_DATAPREPEDM_H
6  //GPU-accelerated data preparation
7 
8  static constexpr unsigned int MAX_NUMBER_BS_WORDS = 80000;
9  static constexpr unsigned int MAX_GANGED_PIXELS = 4000;
10  static constexpr unsigned int MAX_GANGED_PIXEL_PER_MODULE = 50;
11  static constexpr unsigned int MAX_PIX_BS_HEADERS = 2048;
12  static constexpr unsigned int MAX_PIX_HASH = 2048;
13  static constexpr unsigned int MAX_SCT_BS_HEADERS = 8500;
14  static constexpr unsigned int MAX_SCT_HASH = 8176;
15  static constexpr unsigned int MAX_BS_ROBF = 200;
16  static constexpr unsigned int MAX_ADJ_HIT_PAIRS = 1024;
17  static constexpr unsigned int SCT_MAX_SP_PER_MODULE = 256;
18  static constexpr unsigned int MAX_PHI_INDEX = 100;
19  static constexpr unsigned int MAX_RZ_INDEX = 300;
20  static constexpr unsigned int MAX_PIX_ROD_INDEX = 200;
21  static constexpr unsigned int MAX_PIX_LINK_INDEX = 8;
22  static constexpr unsigned int MAX_SCT_ROD_INDEX = 90;
23  static constexpr unsigned int MAX_SCT_LINK_INDEX = 96;
24 
25  typedef struct SctModuleGeoInfo {
26  char m_type;
27  float m_phiPitch;
29  float m_center[3];
30  float m_M[3][3];
31  //special meaning for endcap
33  float m_maxRadius;
34  float m_minRadius;
35 
37 
38  typedef struct PixelModuleGeoInfo {
39  char m_type;
40  char m_bLayer;
41  float m_phiPitch;
45  float m_center[3];
46  float m_M[3][3];
47  float m_halfWidth;
48  float m_halfLength;
50 
51  struct HashQuadruplet {
52  unsigned short x,y,z,w;
53  };
54 
55  typedef struct IdCablingInfo {
56  public:
57  HashQuadruplet m_pixelRodLinkHashTable[MAX_PIX_ROD_INDEX][MAX_PIX_LINK_INDEX];
58  unsigned short m_sctRodLinkHashTable[MAX_SCT_ROD_INDEX][MAX_SCT_LINK_INDEX];
59  uint16_t m_pixelModuleInfo[MAX_PIX_HASH];
60  uint16_t m_sctModuleInfo[MAX_SCT_HASH];
64 
65  struct myfloat2 {
66  float x,y;
67  };
68 
69  struct myint4 {
70  int x,y,z,w;
71  };
72 
73  struct myushort4 {
74  unsigned short x,y,z,w;
75  };
76 
77  struct myushort2 {
78  unsigned short x,y;
79  };
80 
81  typedef struct InputByteStreamData {
83  uint32_t m_rodIds[MAX_NUMBER_BS_WORDS];
84  uint32_t m_words[MAX_NUMBER_BS_WORDS];
85  float m_xBeamSpot;
86  float m_yBeamSpot;
88 
89 
90  typedef struct DecodedPixelModuleInfo {
94  short m_hashIds;
95  unsigned int m_nClusters;
96  unsigned int m_nGangedPixels;
98 
99  typedef struct DecodedPixelHitInfo {
100  unsigned int m_clusterIds;
101  unsigned short m_etaIndex;
102  unsigned short m_phiIndex;
103  unsigned int m_tot;
105 
106  typedef struct PixelSpacePointType {
107  float m_position[3];
108  unsigned short m_clusterIdx;
110 
111 
112  typedef struct DecodedPixelData {
113  public:
116 
117  int m_gangedPixelsStart;//initial value = m_nDataWords
118  int m_nPixels[MAX_PIX_BS_HEADERS];//number of decoded pixels (counting ganged) per module
119  int m_clusterStarts[MAX_PIX_BS_HEADERS];//for navigation through cluster and SP storage space
121  unsigned short m_moduleInfoWord[MAX_PIX_BS_HEADERS];
122  myfloat2 m_clusterPosition[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS];
123  unsigned short m_clusterId[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS];
124  DECODED_PIX_HIT_INFO m_hitInfo[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS];
125  myint4 m_decodedData[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS];
126 
127  PIXEL_SPACEPOINT_TYPE m_spacePoints[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS];
128 
129  int m_hashToIndex[MAX_PIX_HASH];
130 
132 
133  typedef struct DecodedSctHeaderInfo {
135  int m_rdoEnd;
136  short m_hashIds;
137  unsigned int m_nClusters;
139 
140  unsigned int m_nSP;
141  unsigned int m_spacePointsStart;
143 
144  typedef struct SctSpacePointStruct {
145  float m_position[3];
146  unsigned short m_clusterIdx[2];
148 
149  typedef struct DecodedSctData {
153  unsigned int m_nSpacePoints;
154 
156  unsigned short m_moduleInfoWord[MAX_SCT_BS_HEADERS];
157  unsigned short m_headerInfoIndices[MAX_SCT_HASH];//starts from 1 !!!
158  unsigned short m_phiModuleIndices[MAX_SCT_BS_HEADERS/2];
159  unsigned short m_clusterIds[MAX_NUMBER_BS_WORDS*2];
160  float m_clusterPosition[MAX_NUMBER_BS_WORDS*2];
161  SCT_SPACEPOINT_TYPE m_spacePoints[SCT_MAX_SP_PER_MODULE*MAX_SCT_BS_HEADERS/2];
162  myushort4 m_decodedData[MAX_NUMBER_BS_WORDS*2];
163  myushort2 m_clusterInfo[MAX_NUMBER_BS_WORDS*2];
164 
166  #endif
DecodedSctData::m_nHeaders
int m_nHeaders
Definition: DataPrepEDM.h:150
myushort2::y
unsigned short y
Definition: DataPrepEDM.h:78
DecodedPixelHitInfo
Definition: DataPrepEDM.h:99
SctModuleGeoInfo::m_lorentzShift
float m_lorentzShift
Definition: DataPrepEDM.h:28
DecodedSctData::m_nTrailers
int m_nTrailers
Definition: DataPrepEDM.h:151
DecodedSctData::m_nPhiModules
int m_nPhiModules
Definition: DataPrepEDM.h:152
InputByteStreamData::m_yBeamSpot
float m_yBeamSpot
Definition: DataPrepEDM.h:86
HashQuadruplet::w
unsigned short w
Definition: DataPrepEDM.h:52
myushort2
Definition: DataPrepEDM.h:77
DecodedPixelHitInfo::m_clusterIds
unsigned int m_clusterIds
Definition: DataPrepEDM.h:100
PixelSpacePointType::m_clusterIdx
unsigned short m_clusterIdx
Definition: DataPrepEDM.h:108
IdCablingInfo
Definition: DataPrepEDM.h:55
PixelSpacePointType
Definition: DataPrepEDM.h:106
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SctSpacePointStruct::m_clusterIdx
unsigned short m_clusterIdx[2]
Definition: DataPrepEDM.h:146
DecodedPixelModuleInfo::m_nGangedPixels
unsigned int m_nGangedPixels
Definition: DataPrepEDM.h:96
DecodedPixelData::m_nHeaders
int m_nHeaders
Definition: DataPrepEDM.h:114
myushort2::x
unsigned short x
Definition: DataPrepEDM.h:78
DecodedPixelModuleInfo::m_gangedStart
int m_gangedStart
Definition: DataPrepEDM.h:93
myushort4::x
unsigned short x
Definition: DataPrepEDM.h:74
myint4::z
int z
Definition: DataPrepEDM.h:70
SctSpacePointStruct
Definition: DataPrepEDM.h:144
DecodedSctData::m_headersInfo
DECODED_SCT_HEADER_INFO m_headersInfo[MAX_SCT_BS_HEADERS]
Definition: DataPrepEDM.h:155
SctModuleGeoInfo::m_minRadius
float m_minRadius
Definition: DataPrepEDM.h:34
myfloat2::y
float y
Definition: DataPrepEDM.h:66
DecodedSctData::m_clusterPosition
float m_clusterPosition[MAX_NUMBER_BS_WORDS *2]
Definition: DataPrepEDM.h:160
DecodedSctHeaderInfo
Definition: DataPrepEDM.h:133
PixelModuleGeoInfo::m_phiPitch
float m_phiPitch
Definition: DataPrepEDM.h:41
PixelModuleGeoInfo::m_type
char m_type
Definition: DataPrepEDM.h:39
DECODED_SCT_HEADER_INFO
struct DecodedSctHeaderInfo DECODED_SCT_HEADER_INFO
PixelModuleGeoInfo
Definition: DataPrepEDM.h:38
SctModuleGeoInfo
Definition: DataPrepEDM.h:25
DecodedPixelData::m_nTrailers
int m_nTrailers
Definition: DataPrepEDM.h:114
DecodedPixelModuleInfo::m_trailerPositions
int m_trailerPositions
Definition: DataPrepEDM.h:92
PixelModuleGeoInfo::m_bLayer
char m_bLayer
Definition: DataPrepEDM.h:40
IdCablingInfo::m_sctRodLinkHashTable
unsigned short m_sctRodLinkHashTable[MAX_SCT_ROD_INDEX][MAX_SCT_LINK_INDEX]
Definition: DataPrepEDM.h:58
DecodedSctData::m_clusterIds
unsigned short m_clusterIds[MAX_NUMBER_BS_WORDS *2]
Definition: DataPrepEDM.h:159
DecodedPixelData::m_modulesInfo
DECODED_PIX_MODULE_INFO m_modulesInfo[MAX_PIX_BS_HEADERS]
Definition: DataPrepEDM.h:120
DECODED_PIX_MODULE_INFO
struct DecodedPixelModuleInfo DECODED_PIX_MODULE_INFO
DecodedPixelModuleInfo
Definition: DataPrepEDM.h:90
IdCablingInfo::m_pixelModuleInfo
uint16_t m_pixelModuleInfo[MAX_PIX_HASH]
Definition: DataPrepEDM.h:59
PixelModuleGeoInfo::m_M
float m_M[3][3]
Definition: DataPrepEDM.h:46
DecodedSctHeaderInfo::m_hashIds
short m_hashIds
Definition: DataPrepEDM.h:136
DecodedPixelModuleInfo::m_headerPositions
int m_headerPositions
Definition: DataPrepEDM.h:91
DecodedSctHeaderInfo::m_nSP
unsigned int m_nSP
Definition: DataPrepEDM.h:140
DecodedSctHeaderInfo::m_headerPositions
int m_headerPositions
Definition: DataPrepEDM.h:134
DecodedPixelData::m_clusterStarts
int m_clusterStarts[MAX_PIX_BS_HEADERS]
Definition: DataPrepEDM.h:119
myint4::y
int y
Definition: DataPrepEDM.h:70
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
DECODED_SCT_DATA
struct DecodedSctData DECODED_SCT_DATA
DecodedPixelHitInfo::m_tot
unsigned int m_tot
Definition: DataPrepEDM.h:103
DecodedPixelData
Definition: DataPrepEDM.h:112
DecodedPixelModuleInfo::m_hashIds
short m_hashIds
Definition: DataPrepEDM.h:94
PixelSpacePointType::m_position
float m_position[3]
Definition: DataPrepEDM.h:107
DecodedPixelData::m_decodedData
myint4 m_decodedData[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS]
Definition: DataPrepEDM.h:125
SCT_MODULE_GEO_INFO
struct SctModuleGeoInfo SCT_MODULE_GEO_INFO
myushort4::z
unsigned short z
Definition: DataPrepEDM.h:74
DecodedSctData::m_phiModuleIndices
unsigned short m_phiModuleIndices[MAX_SCT_BS_HEADERS/2]
Definition: DataPrepEDM.h:158
DecodedPixelData::m_clusterId
unsigned short m_clusterId[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS]
Definition: DataPrepEDM.h:123
DecodedPixelData::m_moduleInfoWord
unsigned short m_moduleInfoWord[MAX_PIX_BS_HEADERS]
Definition: DataPrepEDM.h:121
DECODED_PIX_HIT_INFO
struct DecodedPixelHitInfo DECODED_PIX_HIT_INFO
ID_CABLING_INFO
struct IdCablingInfo ID_CABLING_INFO
InputByteStreamData::m_rodIds
uint32_t m_rodIds[MAX_NUMBER_BS_WORDS]
Definition: DataPrepEDM.h:83
InputByteStreamData::m_nDataWords
int m_nDataWords
Definition: DataPrepEDM.h:82
DecodedSctData::m_headerInfoIndices
unsigned short m_headerInfoIndices[MAX_SCT_HASH]
Definition: DataPrepEDM.h:157
myint4
Definition: DataPrepEDM.h:69
HashQuadruplet::z
unsigned short z
Definition: DataPrepEDM.h:52
PixelModuleGeoInfo::m_lorentzShift
float m_lorentzShift
Definition: DataPrepEDM.h:44
DecodedPixelHitInfo::m_etaIndex
unsigned short m_etaIndex
Definition: DataPrepEDM.h:101
DecodedPixelHitInfo::m_phiIndex
unsigned short m_phiIndex
Definition: DataPrepEDM.h:102
IdCablingInfo::m_pixelGeoArray
PIXEL_MODULE_GEO_INFO m_pixelGeoArray[MAX_PIX_HASH]
Definition: DataPrepEDM.h:61
IdCablingInfo::m_sctModuleInfo
uint16_t m_sctModuleInfo[MAX_SCT_HASH]
Definition: DataPrepEDM.h:60
DecodedSctHeaderInfo::m_nClusters
unsigned int m_nClusters
Definition: DataPrepEDM.h:137
DecodedPixelData::m_gangedPixelsStart
int m_gangedPixelsStart
Definition: DataPrepEDM.h:117
SctModuleGeoInfo::m_stripLength
float m_stripLength
Definition: DataPrepEDM.h:32
DecodedSctHeaderInfo::m_condensedMode
bool m_condensedMode
Definition: DataPrepEDM.h:138
INPUT_BYTESTREAM_DATA
struct InputByteStreamData INPUT_BYTESTREAM_DATA
HashQuadruplet::x
unsigned short x
Definition: DataPrepEDM.h:52
DecodedSctData::m_spacePoints
SCT_SPACEPOINT_TYPE m_spacePoints[SCT_MAX_SP_PER_MODULE *MAX_SCT_BS_HEADERS/2]
Definition: DataPrepEDM.h:161
myushort4::w
unsigned short w
Definition: DataPrepEDM.h:74
HashQuadruplet
Definition: DataPrepEDM.h:51
InputByteStreamData::m_words
uint32_t m_words[MAX_NUMBER_BS_WORDS]
Definition: DataPrepEDM.h:84
DecodedSctData::m_nSpacePoints
unsigned int m_nSpacePoints
Definition: DataPrepEDM.h:153
DecodedPixelData::m_spacePoints
PIXEL_SPACEPOINT_TYPE m_spacePoints[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS]
Definition: DataPrepEDM.h:127
PixelModuleGeoInfo::m_center
float m_center[3]
Definition: DataPrepEDM.h:45
DecodedPixelModuleInfo::m_nClusters
unsigned int m_nClusters
Definition: DataPrepEDM.h:95
PixelModuleGeoInfo::m_halfLength
float m_halfLength
Definition: DataPrepEDM.h:48
DecodedSctData
Definition: DataPrepEDM.h:149
SCT_SPACEPOINT_TYPE
struct SctSpacePointStruct SCT_SPACEPOINT_TYPE
SctModuleGeoInfo::m_type
char m_type
Definition: DataPrepEDM.h:26
HashQuadruplet::y
unsigned short y
Definition: DataPrepEDM.h:52
IdCablingInfo::m_sctGeoArray
SCT_MODULE_GEO_INFO m_sctGeoArray[MAX_SCT_HASH]
Definition: DataPrepEDM.h:62
InputByteStreamData
Definition: DataPrepEDM.h:81
myfloat2::x
float x
Definition: DataPrepEDM.h:66
DecodedSctHeaderInfo::m_spacePointsStart
unsigned int m_spacePointsStart
Definition: DataPrepEDM.h:141
DecodedSctData::m_moduleInfoWord
unsigned short m_moduleInfoWord[MAX_SCT_BS_HEADERS]
Definition: DataPrepEDM.h:156
PixelModuleGeoInfo::m_etaPitchLong
float m_etaPitchLong
Definition: DataPrepEDM.h:42
DecodedPixelData::m_nPixels
int m_nPixels[MAX_PIX_BS_HEADERS]
Definition: DataPrepEDM.h:118
SctSpacePointStruct::m_position
float m_position[3]
Definition: DataPrepEDM.h:145
DecodedSctHeaderInfo::m_rdoEnd
int m_rdoEnd
Definition: DataPrepEDM.h:135
myushort4::y
unsigned short y
Definition: DataPrepEDM.h:74
PIXEL_MODULE_GEO_INFO
struct PixelModuleGeoInfo PIXEL_MODULE_GEO_INFO
myfloat2
Definition: DataPrepEDM.h:65
SctModuleGeoInfo::m_M
float m_M[3][3]
Definition: DataPrepEDM.h:30
DecodedPixelData::m_nSpacePoints
int m_nSpacePoints
Definition: DataPrepEDM.h:115
SctModuleGeoInfo::m_center
float m_center[3]
Definition: DataPrepEDM.h:29
InputByteStreamData::m_xBeamSpot
float m_xBeamSpot
Definition: DataPrepEDM.h:85
myint4::w
int w
Definition: DataPrepEDM.h:70
PixelModuleGeoInfo::m_etaPitchNormal
float m_etaPitchNormal
Definition: DataPrepEDM.h:43
IdCablingInfo::m_pixelRodLinkHashTable
HashQuadruplet m_pixelRodLinkHashTable[MAX_PIX_ROD_INDEX][MAX_PIX_LINK_INDEX]
Definition: DataPrepEDM.h:57
DECODED_PIXEL_DATA
struct DecodedPixelData DECODED_PIXEL_DATA
DecodedPixelData::m_clusterPosition
myfloat2 m_clusterPosition[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS]
Definition: DataPrepEDM.h:122
SctModuleGeoInfo::m_maxRadius
float m_maxRadius
Definition: DataPrepEDM.h:33
myushort4
Definition: DataPrepEDM.h:73
PixelModuleGeoInfo::m_halfWidth
float m_halfWidth
Definition: DataPrepEDM.h:47
DecodedPixelData::m_hashToIndex
int m_hashToIndex[MAX_PIX_HASH]
Definition: DataPrepEDM.h:129
DecodedSctData::m_decodedData
myushort4 m_decodedData[MAX_NUMBER_BS_WORDS *2]
Definition: DataPrepEDM.h:162
DecodedSctData::m_clusterInfo
myushort2 m_clusterInfo[MAX_NUMBER_BS_WORDS *2]
Definition: DataPrepEDM.h:163
myint4::x
int x
Definition: DataPrepEDM.h:70
PIXEL_SPACEPOINT_TYPE
struct PixelSpacePointType PIXEL_SPACEPOINT_TYPE
DecodedPixelData::m_hitInfo
DECODED_PIX_HIT_INFO m_hitInfo[MAX_NUMBER_BS_WORDS+MAX_GANGED_PIXELS]
Definition: DataPrepEDM.h:124
SctModuleGeoInfo::m_phiPitch
float m_phiPitch
Definition: DataPrepEDM.h:27