10 ALPAKA_FN_ACC ALPAKA_FN_INLINE
bool positiveZ(uint32_t
id) {
return id & 0x10000; }
12 ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t
ietaAbs(uint32_t
id) {
return (
id >> 9) & 0x7F; }
14 ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t
iphi(uint32_t
id) {
return id & 0x1FF; }
40 static const int idx_[] = {
43 1, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8,
44 1, 2, 2, 2, 2, 4, 4, 4, 4, 6, 6, 6, 6, 8, 8, 8, 8,
45 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9,
46 1, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9
53 int const il = iym - iY + 1;
55 int const ii = il * ixm + ic;
56 if (ii < 0 || ii > (
int)(
sizeof(idx_) /
sizeof(
int))) {
94 return (ilmmod % 2 == 0) ? 1 : 0;
119 int const ism = idcc - 9;
123 return (1 + 2 * (
ism - 1) + iside);
128 ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t
ix(uint32_t
id) {
return (
id >> 7) & 0x7F; }
130 ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t
iy(uint32_t
id) {
return id & 0x7F; }
132 ALPAKA_FN_ACC ALPAKA_FN_INLINE
bool positiveZ(uint32_t
id) {
return id & 0x4000; }
135 ALPAKA_STATIC_ACC_MEM_CONSTANT
const unsigned short kxf[] = {
136 41, 51, 41, 51, 41, 51, 36, 51, 36, 51, 26, 51, 26, 51, 26, 51, 21, 51, 21, 51, 21, 51, 21, 51, 21,
137 51, 16, 51, 16, 51, 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, 9, 51, 9, 51, 9, 51, 9, 51, 9, 51,
138 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 4, 51, 4, 51, 4,
139 51, 4, 51, 4, 56, 1, 58, 1, 59, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62,
140 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 61, 1, 61, 1, 60, 1, 59, 1, 58, 4, 56, 4, 51, 4,
141 51, 4, 51, 4, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51, 6, 51,
142 9, 51, 9, 51, 9, 51, 9, 51, 9, 51, 14, 51, 14, 51, 14, 51, 14, 51, 14, 51, 16, 51, 16, 51, 21,
143 51, 21, 51, 21, 51, 21, 51, 21, 51, 26, 51, 26, 51, 26, 51, 36, 51, 36, 51, 41, 51, 41, 51, 41, 51};
145 ALPAKA_STATIC_ACC_MEM_CONSTANT
const unsigned short kdi[] = {
146 0, 10, 20, 30, 40, 50, 60, 75, 90, 105, 120, 145, 170, 195, 220, 245, 270,
147 300, 330, 360, 390, 420, 450, 480, 510, 540, 570, 605, 640, 675, 710, 747, 784, 821,
148 858, 895, 932, 969, 1006, 1043, 1080, 1122, 1164, 1206, 1248, 1290, 1332, 1374, 1416, 1458, 1500,
149 1545, 1590, 1635, 1680, 1725, 1770, 1815, 1860, 1905, 1950, 1995, 2040, 2085, 2130, 2175, 2220, 2265,
150 2310, 2355, 2400, 2447, 2494, 2541, 2588, 2635, 2682, 2729, 2776, 2818, 2860, 2903, 2946, 2988, 3030,
151 3071, 3112, 3152, 3192, 3232, 3272, 3311, 3350, 3389, 3428, 3467, 3506, 3545, 3584, 3623, 3662, 3701,
152 3740, 3779, 3818, 3857, 3896, 3935, 3974, 4013, 4052, 4092, 4132, 4172, 4212, 4253, 4294, 4336, 4378,
153 4421, 4464, 4506, 4548, 4595, 4642, 4689, 4736, 4783, 4830, 4877, 4924, 4969, 5014, 5059, 5104, 5149,
154 5194, 5239, 5284, 5329, 5374, 5419, 5464, 5509, 5554, 5599, 5644, 5689, 5734, 5779, 5824, 5866, 5908,
155 5950, 5992, 6034, 6076, 6118, 6160, 6202, 6244, 6281, 6318, 6355, 6392, 6429, 6466, 6503, 6540, 6577,
156 6614, 6649, 6684, 6719, 6754, 6784, 6814, 6844, 6874, 6904, 6934, 6964, 6994, 7024, 7054, 7079, 7104,
157 7129, 7154, 7179, 7204, 7219, 7234, 7249, 7264, 7274, 7284, 7294, 7304, 7314};
160 bool const near = iX >= 11;
161 bool const far = !near;
162 bool const top = iY >= 11;
163 bool const bot = !top;
178 ALPAKA_FN_ACC
int sector(
int iX,
int iY) {
186 static const int idx_[] = {
189 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
190 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
191 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 8, 0, 0, 0,
192 0, 0, 2, 2, 2, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 8, 8, 8, 0, 0,
193 0, 2, 2, 2, 2, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 8, 8, 8, 8, 0,
194 0, 2, 2, 2, 2, 2, 1, 1, 1, 1, 9, 9, 9, 9, 8, 8, 8, 8, 8, 0,
195 0, 2, 2, 2, 2, 2, 2, 1, 1, 1, 9, 9, 9, 8, 8, 8, 8, 8, 8, 0,
196 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8,
197 3, 3, 2, 2, 2, 2, 2, 2, 2, 0, 0, 8, 8, 8, 8, 8, 8, 8, 7, 7,
198 3, 3, 3, 3, 3, 3, 3, 2, 0, 0, 0, 0, 8, 7, 7, 7, 7, 7, 7, 7,
199 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7,
200 3, 3, 3, 3, 3, 3, 3, 4, 4, 0, 0, 6, 6, 7, 7, 7, 7, 7, 7, 7,
201 3, 3, 3, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7,
202 0, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 0,
203 0, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 0,
204 0, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 0,
205 0, 0, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 0, 0,
206 0, 0, 0, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 0, 0, 0,
207 0, 0, 0, 0, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 0, 0, 0, 0,
208 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0
215 int const il = iym - iY;
216 int const ic = iX - 1;
217 int const ii = il * ixm + ic;
219 if (ii < 0 || ii > (
int)(
sizeof(idx_) /
sizeof(
int)) || idx_[
ii] == 0) {
230 const uint32_t jx(
ix(
id));
231 const uint32_t jd(2 * (
iy(
id) - 1) + (jx - 1) / 50);
244 uint32_t
const iX = (
ix(
id) - 1) / 5 + 1;
245 uint32_t
const iY = (
iy(
id) - 1) / 5 + 1;
255 int const isect =
sector(iX, iY);
265 else if (ilmr == 8 && iquad == 4)
ALPAKA_FN_ACC int32_t laserMonitoringRegionEE(uint32_t id)
ALPAKA_FN_ACC int dcc(int ieta, int iphi)
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool positiveZ(uint32_t id)
ALPAKA_FN_ACC int lmmod(int ieta, int iphi)
ALPAKA_FN_ACC int side(int ieta, int iphi)
ALPAKA_FN_ACC int localCoord_x(int ieta)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iphi(uint32_t id)
ALPAKA_FN_ACC uint32_t hashedIndexEB(uint32_t id)
ALPAKA_FN_ACC int localCoord_y(int ieta, int iphi)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ietaAbs(uint32_t id)
ALPAKA_FN_ACC int32_t laserMonitoringRegionEB(uint32_t id)
ALPAKA_FN_ACC int sector(int iX, int iY)
ALPAKA_FN_ACC uint32_t hashedIndexEE(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE bool positiveZ(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
static const int MAX_IPHI
ALPAKA_FN_ACC int dccFromSm(int ism)
static const int MAX_IETA
ALPAKA_STATIC_ACC_MEM_CONSTANT const unsigned short kdi[]
ALPAKA_FN_ACC int sm(int ieta, int iphi)
ALPAKA_FN_ACC int quadrant(int iX, int iY)
ALPAKA_FN_ACC int lm_channel(int iX, int iY)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
int ism(int ieta, int iphi)
ALPAKA_STATIC_ACC_MEM_CONSTANT const unsigned short kxf[]