121 int hbhecrate_loc[
NHBHECR] = {0, 1, 4, 5, 10, 11, 14, 15, 17};
124 int fedhbhenum_loc[
NHBHECR][2] = {
125 {702, 703}, {704, 705}, {700, 701}, {706, 707}, {716, 717}, {708, 709}, {714, 715}, {710, 711}, {712, 713}};
128 int ihslot_loc[
NHSETS] = {2, 5, 13, 16};
131 int ihbhephis_loc[
NHBHECR] = {11, 19, 3, 27, 67, 35, 59, 43, 51};
135 {{5, 1}, {1, 1}, {9, 1}},
136 {{11, 1}, {7, 1}, {3, 1}},
137 {{5, 1}, {1, 1}, {9, 1}},
138 {{10, 1}, {6, 1}, {2, 1}},
139 {{8, 1}, {4, 1}, {12, 1}},
140 {{10, 1}, {6, 1}, {2, 1}},
141 {{8, 1}, {4, 1}, {12, 1}}},
142 {{{11, 1}, {7, 1}, {3, 1}},
143 {{5, 1}, {1, 1}, {9, 1}},
144 {{11, 1}, {7, 1}, {3, 1}},
145 {{5, 1}, {1, 1}, {9, 1}},
146 {{10, 1}, {6, 1}, {2, 1}},
147 {{8, 1}, {4, 1}, {12, 1}},
148 {{10, 1}, {6, 1}, {2, 1}},
149 {{8, 1}, {4, 1}, {12, 1}}}},
150 {{{{16, 2}, {15, 2}, {14, 1}},
151 {{15, 1}, {13, 1}, {16, 1}},
152 {{16, 2}, {15, 2}, {14, 1}},
153 {{15, 1}, {13, 1}, {16, 1}},
154 {{17, 1}, {16, 3}, {26, 1}},
155 {{18, 1}, {18, 2}, {26, 2}},
156 {{17, 1}, {16, 3}, {25, 1}},
157 {{18, 1}, {18, 2}, {25, 2}}},
158 {{{16, 2}, {15, 2}, {14, 1}},
159 {{15, 1}, {13, 1}, {16, 1}},
160 {{16, 2}, {15, 2}, {14, 1}},
161 {{15, 1}, {13, 1}, {16, 1}},
162 {{17, 1}, {16, 3}, {25, 1}},
163 {{18, 1}, {18, 2}, {25, 2}},
164 {{17, 1}, {16, 3}, {26, 1}},
165 {{18, 1}, {18, 2}, {26, 2}}}},
166 {{{{28, 1}, {28, 2}, {29, 1}},
167 {{28, 3}, {24, 2}, {24, 1}},
168 {{27, 1}, {27, 2}, {29, 2}},
169 {{27, 3}, {23, 2}, {23, 1}},
170 {{19, 2}, {20, 1}, {22, 2}},
171 {{19, 1}, {20, 2}, {22, 1}},
172 {{19, 2}, {20, 1}, {21, 2}},
173 {{19, 1}, {20, 2}, {21, 1}}},
174 {{{27, 1}, {27, 2}, {29, 2}},
175 {{27, 3}, {23, 2}, {23, 1}},
176 {{28, 1}, {28, 2}, {29, 1}},
177 {{28, 3}, {24, 2}, {24, 1}},
178 {{19, 2}, {20, 1}, {21, 2}},
179 {{19, 1}, {20, 2}, {21, 1}},
180 {{19, 2}, {20, 1}, {22, 2}},
181 {{19, 1}, {20, 2}, {22, 1}}}}};
187 {{{6, 1}, {7, 1}, {6, 2}, {7, 2}, {4, 1}, {5, 1}, {4, 2}, {5, 2}},
188 {{6, 3}, {7, 3}, {6, 4}, {7, 4}, {4, 3}, {5, 3}, {4, 4}, {5, 4}}},
189 {{{2, 1}, {3, 1}, {2, 2}, {3, 2}, {2, 1}, {3, 1}, {2, 2}, {3, 2}},
190 {{2, 3}, {3, 3}, {2, 4}, {3, 4}, {2, 3}, {3, 3}, {2, 4}, {3, 4}}},
191 {{{4, 1}, {5, 1}, {4, 2}, {5, 2}, {6, 1}, {7, 1}, {6, 2}, {7, 2}},
192 {{4, 3}, {5, 3}, {4, 4}, {5, 4}, {6, 3}, {7, 3}, {6, 4}, {7, 4}}}
199 {{18, 17, 3, 2}, {13, 3, 17, 7}, {14, 1, 19, 6}},
200 {{19, 2, 18, 1}, {15, 7, 13, 5}, {17, 19, 1, 3}},
201 {{9, 4, 16, 11}, {5, 8, 12, 15}, {2, 13, 7, 18}},
202 {{12, 11, 9, 8}, {7, 15, 5, 13}, {16, 6, 14, 4}},
203 {{8, 5, 15, 12}, {4, 9, 11, 16}, {1, 14, 6, 19}},
204 {{6, 16, 4, 14}, {3, 18, 2, 17}, {11, 12, 8, 9}}
210 {{12, 12, 12, 12}, {16, 7, 16, 7}, {7, 16, 7, 16}},
211 {{11, 11, 11, 11}, {19, 3, 19, 3}, {3, 19, 3, 19}},
212 {{15, 15, 6, 6}, {2, 18, 2, 18}, {6, 6, 15, 15}},
213 {{5, 14, 5, 14}, {14, 5, 14, 5}, {18, 2, 18, 2}},
214 {{17, 1, 17, 1}, {9, 9, 9, 9}, {1, 17, 1, 17}},
215 {{13, 4, 13, 4}, {8, 8, 8, 8}, {4, 13, 4, 13}}
223 const char* S_slbin_odd_loc[] = {
"A1",
"B0",
"B1",
"A0",
"A1",
"B0",
"B1",
"A0"};
224 for (
int gg = 0; gg < 8; gg++) {
227 const char* S_slbin_even_loc[] = {
"C1",
"D0",
"D1",
"C0",
"C1",
"D0",
"D1",
"C0"};
228 for (
int gg = 0; gg < 8; gg++) {
231 const char* rct_rackHBHE_loc[] = {
"S2E01-RH",
249 for (
int gg = 0; gg < 18; gg++) {
253 int slb_table_loc[29] = {1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
254 1, 1, 2, 2, 3, 3, 1, 1,
255 2, 2, 3, 3, 4, 4, 4, 4, 4};
256 memcpy(
slb_table, slb_table_loc,
sizeof(
int) * 29);
259 char tempbuff[30]{0};
262 stringstream mystream;
277 iside =
is < NHSETS / 2 ? -1 : 1;
289 idcc =
is < NHSETS / 2 ? 1 : 2;
329 mystream << tempbuff;
330 rbx = mystream.str();
360 mystream << tempbuff;
361 slnam = mystream.str();
384 mystream << tempbuff;
392 for (
i = 0;
i < 18;
i++) {
393 if (
iphi <
i * 4 + 3) {
409 }
else if (
crazy == 0) {
421 slbin = mystream.str();
461 HBHEHFEntries.push_back(hbeflmapentry);
462 LinearIndex2Entry.at(hbeflmapentry.getLinearIndex()) =
466 unsigned int denseId;
469 HbHash2Entry.at(denseId) = HBHEHFEntries.size();
473 HeHash2Entry.at(denseId) = HBHEHFEntries.size();
477 HfHash2Entry.at(denseId) = HBHEHFEntries.size();
518 int hfcrate_loc[
NHFCR] = {2, 9, 12};
521 int fedhfnum_loc[
NHFCR][2] = {{718, 719}, {720, 721}, {722, 723}};
524 int ihfphis_loc[
NHFCR] = {3, 27, 51};
527 int ihfetadepth_loc[
NTOPBOT][
NFBR][
NFCH][2] = {{{{33, 1}, {31, 1}, {29, 1}},
528 {{32, 1}, {30, 1}, {34, 1}},
529 {{33, 2}, {31, 2}, {29, 2}},
530 {{32, 2}, {30, 2}, {34, 2}},
531 {{34, 2}, {32, 2}, {30, 2}},
532 {{31, 2}, {29, 2}, {33, 2}},
533 {{34, 1}, {32, 1}, {30, 1}},
534 {{31, 1}, {29, 1}, {33, 1}}},
535 {{{41, 1}, {37, 1}, {35, 1}},
536 {{38, 1}, {36, 1}, {39, 1}},
537 {{41, 2}, {37, 2}, {35, 2}},
538 {{38, 2}, {36, 2}, {39, 2}},
539 {{40, 2}, {38, 2}, {36, 2}},
540 {{37, 2}, {35, 2}, {39, 2}},
541 {{40, 1}, {38, 1}, {36, 1}},
542 {{37, 1}, {35, 1}, {39, 1}}}};
543 memcpy(
ihfetadepth, ihfetadepth_loc,
sizeof(
int) * NTOPBOT * NFBR * NFCH * 2);
546 {{{1, 2}, {2, 2}, {3, 2}, {4, 2}, {1, 3}, {2, 3}, {3, 3}, {4, 3}},
547 {{5, 2}, {6, 2}, {7, 2}, {8, 2}, {5, 3}, {6, 3}, {7, 3}, {8, 3}}},
548 {{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {1, 2}, {2, 2}, {3, 2}, {4, 2}},
549 {{5, 1}, {6, 1}, {7, 1}, {8, 1}, {5, 2}, {6, 2}, {7, 2}, {8, 2}}},
550 {{{1, 3}, {2, 3}, {3, 3}, {4, 3}, {1, 1}, {2, 1}, {3, 1}, {4, 1}},
551 {{5, 3}, {6, 3}, {7, 3}, {8, 3}, {5, 1}, {6, 1}, {7, 1}, {8, 1}}}
553 memcpy(
irm_rmfiHF, irm_rmfiHF_loc,
sizeof(
int) * NHTRS * NTOPBOT * NFBR * 2);
556 const char* S_slbin_7_loc[] = {
"A0",
"A1",
"B0",
"B1"};
557 for (
int gg = 0; gg < 4; gg++) {
560 const char* S_slbin_3_loc[] = {
"C0",
"C1",
"D0",
"D1"};
561 for (
int gg = 0; gg < 4; gg++) {
564 const char* rct_rackHF_loc[] = {
"S2E01-FH",
582 for (
int gg = 0; gg < 18; gg++) {
593 for (ih = 0; ih <
NHTRS; ih++) {
601 iside =
is < NHSETS / 2 ? -1 : 1;
610 : (
ihfphis[
ic] + (
is % 2) * 12 + ih * 4 + (
ifb / 4) * 2 - 1) % 72 + 1;
612 idcc =
is < NHSETS / 2 ? 1 : 2;
628 else if (
iphi % 4 == 1)
630 else if (
iphi % 4 == 3)
633 edm::LogInfo(
"HcalLogicalMapGenerator") <<
"Even iphi in HFM" << endl;
642 irm = ((
iphi + 1) / 2) % 36 + 1;
657 snprintf(tempbuff,
sizeof tempbuff,
"%s%c%2.2i",
det.c_str(),
sidesign,
hfphi);
658 mystream << tempbuff;
659 rbx = mystream.str();
666 iqie = (irm_fi - 1) / 2 + 1;
677 phideg = phideg + 72;
678 phideg = (phideg / 4) * 20 + 10;
679 irctcra = ((89 - phideg + 720) % 360) / 40;
689 snprintf(tempbuff,
sizeof tempbuff,
"SLB_H_%3.3d%c%2.2d", phideg,
S_side,
etaslb);
690 mystream << tempbuff;
691 slnam = mystream.str();
695 mystream << tempbuff;
701 int phibin = (
iphi + 1) % 8;
702 int etabin = (
ieta - 29) / 3;
712 slbin = mystream.str();
750 HBHEHFEntries.push_back(hbeflmapentry);
751 LinearIndex2Entry.at(hbeflmapentry.getLinearIndex()) =
755 unsigned int denseId;
758 HbHash2Entry.at(denseId) = HBHEHFEntries.size();
762 HeHash2Entry.at(denseId) = HBHEHFEntries.size();
766 HfHash2Entry.at(denseId) = HBHEHFEntries.size();
static uint32_t makeEntryNumber(bool, int, int)
int fedhbhenum[NHBHECR][2]
unsigned int detId2denseIdHF(const DetId &id) const
return a linear packed id from HF
unsigned int detId2denseIdHB(const DetId &id) const
return a linear packed id from HB
int irm_rmfiHBHE[NHTRS][NTOPBOT][NFBR][2]
const char * S_slbin_7[4]
const char * rct_rackHF[18]
const char * S_slbin_even[8]
const char * rct_rackHBHE[18]
int ipixelHE[NRMFIBR][NFCH][NRMSLOT]
const char * S_slbin_3[4]
Log< level::Info, false > LogInfo
const char * S_slbin_odd[8]
int ihfetadepth[NTOPBOT][NFBR][NFCH][2]
int irm_rmfiHF[NHTRS][NTOPBOT][NFBR][2]
int ipixelHB[NRMFIBR][NFCH][NRMSLOT]
unsigned int detId2denseIdHE(const DetId &id) const
return a linear packed id from HE
int ihbheetadepth[NHTRS][NTOPBOT][NFBR][NFCH][2]
void ConstructTriggerTower(const HcalTopology *topo, std::vector< HTLogicalMapEntry > &, int i_side, int i_eta, int i_phi, int i_dphi, int i_depth, std::string i_det, int i_wedge, int i_rm, int i_pixel, int i_qie, int i_adc, int i_rm_fi, int i_fi_ch, int i_crate, int i_htr, std::string i_fpga, int i_htr_fi, int i_spigot, int i_slb, std::string i_slbin, std::string i_slbin2, std::string i_slnam, int i_rctcra, int i_rctcar, int i_rctcon, std::string i_rctnam, int i_fed)
int iadcquiHBHE[NRMFIBR][NFCH][2]