37 assert(iphi_ > 0 && iphi_ <= 360);
39 int ism = (iphi_ - 1) / 20 + 1;
70 assert(idcc >= 10 && idcc <= 45);
91 std::pair<EBLocalCoord, EBLocalCoord> ixy = localCoord(
ieta,
iphi);
92 return lm_channel(ixy.first / 5, ixy.second / 5);
96 std::pair<EBLocalCoord, EBLocalCoord> ixy = localCoord(
ieta,
iphi);
97 return tt_channel(ixy.first / 5, ixy.second / 5);
101 std::pair<EBLocalCoord, EBLocalCoord> ixy = localCoord(
ieta,
iphi);
102 return crystal_channel(ixy.first, ixy.second);
107 return (ilmmod % 2 == 0) ? 1 : 0;
114 int ilmr = 1 + 2 * (
ism - 1) + iside;
130 assert(iphi_ > 0 && iphi_ <= 360);
134 int iy = (iphi_ - 1) % 20;
139 return std::pair<EBLocalCoord, EBLocalCoord>(
ix,
iy);
143 assert(icr >= 1 && icr <= 1700);
144 int ix = (icr - 1) / 20;
145 int iy = 19 - (icr - 1) % 20;
146 return std::pair<EBLocalCoord, EBLocalCoord>(
ix,
iy);
170 return std::pair<EBGlobalCoord, EBGlobalCoord>(
ieta,
iphi);
186 float phi = 1 + y + 20 * (
ism - 1);
188 return std::pair<float, float>(
eta, phi);
193 assert(icr >= 1 && icr <= 1700);
195 int ix = (icr - 1) / 20;
196 int iy = 19 - (icr - 1) % 20;
198 return globalCoord(
ism,
ix,
iy);
202 static const int idx_[] = {
204 1, 2, 2, 2, 2, 4, 4, 4, 4,
205 6, 6, 6, 6, 8, 8, 8, 8,
206 1, 2, 2, 2, 2, 4, 4, 4, 4,
207 6, 6, 6, 6, 8, 8, 8, 8,
208 1, 3, 3, 3, 3, 5, 5, 5, 5,
209 7, 7, 7, 7, 9, 9, 9, 9,
210 1, 3, 3, 3, 3, 5, 5, 5, 5,
211 7, 7, 7, 7, 9, 9, 9, 9
215 int iym, ixm, il, ic,
ii;
223 if (ii < 0 || ii > (
int)(
sizeof(idx_) /
sizeof(
int))) {
230 static const int idx_[] = {
232 1, 1, 1, 2, 2, 1, 1, 2, 2,
233 1, 1, 2, 2, 1, 1, 2, 2,
234 1, 1, 1, 2, 2, 1, 1, 2, 2,
235 1, 1, 2, 2, 1, 1, 2, 2,
236 1, 1, 1, 2, 2, 1, 1, 2, 2,
237 1, 1, 2, 2, 1, 1, 2, 2,
238 1, 1, 1, 2, 2, 1, 1, 2, 2,
239 1, 1, 2, 2, 1, 1, 2, 2
243 int iym, ixm, il, ic,
ii;
251 if (ii < 0 || ii > (
int)(
sizeof(idx_) /
sizeof(
int))) {
258 static const int idx_[] = {
260 1, 3, 5, 7, 9, 11, 13, 15, 17,
261 19, 21, 23, 25, 27, 29, 31, 33,
262 1, 3, 5, 7, 9, 11, 13, 15, 17,
263 19, 21, 23, 25, 27, 29, 31, 33,
264 2, 4, 6, 8, 10, 12, 14, 16, 18,
265 20, 22, 24, 26, 28, 30, 32, 34,
266 2, 4, 6, 8, 10, 12, 14, 16, 18,
267 20, 22, 24, 26, 28, 30, 32, 34
271 int iym, ixm, il, ic,
ii;
279 if (ii < 0 || ii > (
int)(
sizeof(idx_) /
sizeof(
int))) {
286 static const int idx_[] = {
288 1, 2, 2, 4, 4, 6, 6, 8, 8,
289 10, 10, 12, 12, 14, 14, 16, 16,
290 1, 2, 2, 4, 4, 6, 6, 8, 8,
291 10, 10, 12, 12, 14, 14, 16, 16,
292 1, 3, 3, 5, 5, 7, 7, 9, 9,
293 11, 11, 13, 13, 15, 15, 17, 17,
294 1, 3, 3, 5, 5, 7, 7, 9, 9,
295 11, 11, 13, 13, 15, 15, 17, 17
299 int iym, ixm, il, ic,
ii;
307 if (ii < 0 || ii > (
int)(
sizeof(idx_) /
sizeof(
int))) {
314 int itt = 4 * iX + 4 - iY;
321 int icr = 20 *
ix + 19 -
iy + 1;
329 int itt = tt_channel(iX, iY);
330 int type = tt_type(iX, iY);
332 int iVFE =
ix % 5 + 1;
333 int islot =
iy % 5 + 1;
336 int icr = 5 * (iVFE - 1) + (islot - 1);
341 icr += 25 * (itt - 1);
348 if (
type == iSuperModule) {
350 }
else if (
type == iLMRegion) {
351 ism_ = (
num - 1) / 2 + 1;
376 if (
type == iSuperModule) {
388 }
else if (
type == iLMRegion) {
391 iside = (
num - 1) % 2;
396 ix[0] = ixmin + 5 - 0.5;
397 iy[0] = iymin + 10 - 0.5;
398 ix[1] = ixmin + 5 - 0.5;
403 iy[3] = iymin + 10 - 0.5;
412 ix[2] = ixmin + 5 - 0.5;
414 ix[3] = ixmin + 5 - 0.5;
415 iy[3] = iymax - 10 + 0.5;
417 iy[4] = iymax - 10 + 0.5;
426 for (
int ii = 0;
ii <
n;
ii++) {
427 std::pair<float, float>
xy = globalCoord(
ism,
ix[
ii],
iy[
ii]);
444 return new TGraph(
n,
ix,
iy);
450 return std::pair<int, int>(0, 5);
452 return std::pair<int, int>(1, 6);
454 return std::pair<int, int>(1, 6);
456 return std::pair<int, int>(2, 7);
458 return std::pair<int, int>(2, 7);
460 return std::pair<int, int>(3, 8);
462 return std::pair<int, int>(3, 8);
464 return std::pair<int, int>(4, 9);
466 return std::pair<int, int>(4, 9);
470 return std::pair<int, int>(-1, -1);
475 int idcc = dccAndSide_.first;
476 return std::pair<int, int>(idcc, idcc);
481 int iside = dccAndSide_.second;
482 std::vector<int> vec;
483 for (
int ilmmod = 1; ilmmod <= 9; ilmmod++) {
484 if ((ilmmod + iside) % 2 == 1)
485 vec.push_back(ilmmod);
527 std::vector<int> vec;
static XYCoord localCoord(int icr)
static int smFromDcc(int idcc)
static std::vector< int > apdRefChannels(int ilmmod)
static TString smName(int ism)
ALPAKA_FN_ACC int dcc(int ieta, int iphi)
ALPAKA_FN_ACC int lmmod(int ieta, int iphi)
static int crystal(EBGlobalCoord ieta, EBGlobalCoord iphi)
static int crystal_channel(EBLocalCoord ix, EBLocalCoord iy)
static int tt_type(EBTTLocalCoord iX, EBTTLocalCoord iY)
ALPAKA_FN_ACC int side(int ieta, int iphi)
static int lmr(EBGlobalCoord ieta, EBGlobalCoord iphi)
static std::pair< int, int > pn(int ilmmod)
static int lm_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static int electronic_channel(EBLocalCoord ix, EBLocalCoord iy)
static EtaPhiCoord globalCoord(int ism, EBLocalCoord ix, EBLocalCoord iy)
static TGraph * getGraphBoundary(int type, int num, bool global=false)
static std::pair< int, int > dccAndSide(int ilmr)
static int apdRefTower(int ilmmod)
static int lv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static int lmmod(EBGlobalCoord ieta, EBGlobalCoord iphi)
static std::pair< int, int > memFromLmr(int ilmr)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
static int side(EBGlobalCoord ieta, EBGlobalCoord iphi)
static int tt_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
static int hv_channel(EBTTLocalCoord iX, EBTTLocalCoord iY)
ALPAKA_FN_ACC int dccFromSm(int ism)
ALPAKA_FN_ACC int sm(int ieta, int iphi)
static int barrel(EBGlobalCoord ieta, EBGlobalCoord iphi)
static int sm(EBGlobalCoord ieta, EBGlobalCoord iphi)
ALPAKA_FN_ACC int lm_channel(int iX, int iY)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)
static int dcc(EBGlobalCoord ieta, EBGlobalCoord iphi)
int ism(int ieta, int iphi)
static int dccFromSm(int ism)
static int tt(EBGlobalCoord ieta, EBGlobalCoord iphi)
static std::vector< int > lmmodFromLmr(int ilmr)