114 int hbhecrate_loc[
NHBHECR] = {0, 1, 4, 5, 10, 11, 14, 15, 17};
117 int fedhbhenum_loc[
NHBHECR][2] = {
118 {702, 703}, {704, 705}, {700, 701}, {706, 707}, {716, 717}, {708, 709}, {714, 715}, {710, 711}, {712, 713}};
121 int ihslot_loc[
NHSETS] = {2, 5, 13, 16};
124 int ihbhephis_loc[
NHBHECR] = {11, 19, 3, 27, 67, 35, 59, 43, 51};
128 {{5, 1}, {1, 1}, {9, 1}},
129 {{11, 1}, {7, 1}, {3, 1}},
130 {{5, 1}, {1, 1}, {9, 1}},
131 {{10, 1}, {6, 1}, {2, 1}},
132 {{8, 1}, {4, 1}, {12, 1}},
133 {{10, 1}, {6, 1}, {2, 1}},
134 {{8, 1}, {4, 1}, {12, 1}}},
135 {{{11, 1}, {7, 1}, {3, 1}},
136 {{5, 1}, {1, 1}, {9, 1}},
137 {{11, 1}, {7, 1}, {3, 1}},
138 {{5, 1}, {1, 1}, {9, 1}},
139 {{10, 1}, {6, 1}, {2, 1}},
140 {{8, 1}, {4, 1}, {12, 1}},
141 {{10, 1}, {6, 1}, {2, 1}},
142 {{8, 1}, {4, 1}, {12, 1}}}},
143 {{{{16, 2}, {15, 2}, {14, 1}},
144 {{15, 1}, {13, 1}, {16, 1}},
145 {{16, 2}, {15, 2}, {14, 1}},
146 {{15, 1}, {13, 1}, {16, 1}},
147 {{17, 1}, {16, 3}, {26, 1}},
148 {{18, 1}, {18, 2}, {26, 2}},
149 {{17, 1}, {16, 3}, {25, 1}},
150 {{18, 1}, {18, 2}, {25, 2}}},
151 {{{16, 2}, {15, 2}, {14, 1}},
152 {{15, 1}, {13, 1}, {16, 1}},
153 {{16, 2}, {15, 2}, {14, 1}},
154 {{15, 1}, {13, 1}, {16, 1}},
155 {{17, 1}, {16, 3}, {25, 1}},
156 {{18, 1}, {18, 2}, {25, 2}},
157 {{17, 1}, {16, 3}, {26, 1}},
158 {{18, 1}, {18, 2}, {26, 2}}}},
159 {{{{28, 1}, {28, 2}, {29, 1}},
160 {{28, 3}, {24, 2}, {24, 1}},
161 {{27, 1}, {27, 2}, {29, 2}},
162 {{27, 3}, {23, 2}, {23, 1}},
163 {{19, 2}, {20, 1}, {22, 2}},
164 {{19, 1}, {20, 2}, {22, 1}},
165 {{19, 2}, {20, 1}, {21, 2}},
166 {{19, 1}, {20, 2}, {21, 1}}},
167 {{{27, 1}, {27, 2}, {29, 2}},
168 {{27, 3}, {23, 2}, {23, 1}},
169 {{28, 1}, {28, 2}, {29, 1}},
170 {{28, 3}, {24, 2}, {24, 1}},
171 {{19, 2}, {20, 1}, {21, 2}},
172 {{19, 1}, {20, 2}, {21, 1}},
173 {{19, 2}, {20, 1}, {22, 2}},
174 {{19, 1}, {20, 2}, {22, 1}}}}};
180 {{{6, 1}, {7, 1}, {6, 2}, {7, 2}, {4, 1}, {5, 1}, {4, 2}, {5, 2}},
181 {{6, 3}, {7, 3}, {6, 4}, {7, 4}, {4, 3}, {5, 3}, {4, 4}, {5, 4}}},
182 {{{2, 1}, {3, 1}, {2, 2}, {3, 2}, {2, 1}, {3, 1}, {2, 2}, {3, 2}},
183 {{2, 3}, {3, 3}, {2, 4}, {3, 4}, {2, 3}, {3, 3}, {2, 4}, {3, 4}}},
184 {{{4, 1}, {5, 1}, {4, 2}, {5, 2}, {6, 1}, {7, 1}, {6, 2}, {7, 2}},
185 {{4, 3}, {5, 3}, {4, 4}, {5, 4}, {6, 3}, {7, 3}, {6, 4}, {7, 4}}}
192 {{18, 17, 3, 2}, {13, 3, 17, 7}, {14, 1, 19, 6}},
193 {{19, 2, 18, 1}, {15, 7, 13, 5}, {17, 19, 1, 3}},
194 {{9, 4, 16, 11}, {5, 8, 12, 15}, {2, 13, 7, 18}},
195 {{12, 11, 9, 8}, {7, 15, 5, 13}, {16, 6, 14, 4}},
196 {{8, 5, 15, 12}, {4, 9, 11, 16}, {1, 14, 6, 19}},
197 {{6, 16, 4, 14}, {3, 18, 2, 17}, {11, 12, 8, 9}}
203 {{12, 12, 12, 12}, {16, 7, 16, 7}, {7, 16, 7, 16}},
204 {{11, 11, 11, 11}, {19, 3, 19, 3}, {3, 19, 3, 19}},
205 {{15, 15, 6, 6}, {2, 18, 2, 18}, {6, 6, 15, 15}},
206 {{5, 14, 5, 14}, {14, 5, 14, 5}, {18, 2, 18, 2}},
207 {{17, 1, 17, 1}, {9, 9, 9, 9}, {1, 17, 1, 17}},
208 {{13, 4, 13, 4}, {8, 8, 8, 8}, {4, 13, 4, 13}}
216 const char* S_slbin_odd_loc[] = {
"A1",
"B0",
"B1",
"A0",
"A1",
"B0",
"B1",
"A0"};
217 for (
int gg = 0; gg < 8; gg++) {
220 const char* S_slbin_even_loc[] = {
"C1",
"D0",
"D1",
"C0",
"C1",
"D0",
"D1",
"C0"};
221 for (
int gg = 0; gg < 8; gg++) {
224 const char* rct_rackHBHE_loc[] = {
"S2E01-RH",
242 for (
int gg = 0; gg < 18; gg++) {
246 int slb_table_loc[29] = {1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
247 1, 1, 2, 2, 3, 3, 1, 1,
248 2, 2, 3, 3, 4, 4, 4, 4, 4};
249 memcpy(
slb_table, slb_table_loc,
sizeof(
int) * 29);
252 char tempbuff[30]{0};
255 stringstream mystream;
270 iside =
is < NHSETS / 2 ? -1 : 1;
282 idcc =
is < NHSETS / 2 ? 1 : 2;
322 mystream << tempbuff;
323 rbx = mystream.str();
353 mystream << tempbuff;
354 slnam = mystream.str();
377 mystream << tempbuff;
385 for (
i = 0;
i < 18;
i++) {
386 if (
iphi <
i * 4 + 3) {
402 }
else if (
crazy == 0) {
414 slbin = mystream.str();
454 HBHEHFEntries.push_back(hbeflmapentry);
455 LinearIndex2Entry.at(hbeflmapentry.getLinearIndex()) =
459 unsigned int denseId;
462 HbHash2Entry.at(denseId) = HBHEHFEntries.size();
466 HeHash2Entry.at(denseId) = HBHEHFEntries.size();
470 HfHash2Entry.at(denseId) = HBHEHFEntries.size();
511 int hfcrate_loc[
NHFCR] = {2, 9, 12};
514 int fedhfnum_loc[
NHFCR][2] = {{718, 719}, {720, 721}, {722, 723}};
517 int ihfphis_loc[
NHFCR] = {3, 27, 51};
520 int ihfetadepth_loc[
NTOPBOT][
NFBR][
NFCH][2] = {{{{33, 1}, {31, 1}, {29, 1}},
521 {{32, 1}, {30, 1}, {34, 1}},
522 {{33, 2}, {31, 2}, {29, 2}},
523 {{32, 2}, {30, 2}, {34, 2}},
524 {{34, 2}, {32, 2}, {30, 2}},
525 {{31, 2}, {29, 2}, {33, 2}},
526 {{34, 1}, {32, 1}, {30, 1}},
527 {{31, 1}, {29, 1}, {33, 1}}},
528 {{{41, 1}, {37, 1}, {35, 1}},
529 {{38, 1}, {36, 1}, {39, 1}},
530 {{41, 2}, {37, 2}, {35, 2}},
531 {{38, 2}, {36, 2}, {39, 2}},
532 {{40, 2}, {38, 2}, {36, 2}},
533 {{37, 2}, {35, 2}, {39, 2}},
534 {{40, 1}, {38, 1}, {36, 1}},
535 {{37, 1}, {35, 1}, {39, 1}}}};
536 memcpy(
ihfetadepth, ihfetadepth_loc,
sizeof(
int) * NTOPBOT * NFBR * NFCH * 2);
539 {{{1, 2}, {2, 2}, {3, 2}, {4, 2}, {1, 3}, {2, 3}, {3, 3}, {4, 3}},
540 {{5, 2}, {6, 2}, {7, 2}, {8, 2}, {5, 3}, {6, 3}, {7, 3}, {8, 3}}},
541 {{{1, 1}, {2, 1}, {3, 1}, {4, 1}, {1, 2}, {2, 2}, {3, 2}, {4, 2}},
542 {{5, 1}, {6, 1}, {7, 1}, {8, 1}, {5, 2}, {6, 2}, {7, 2}, {8, 2}}},
543 {{{1, 3}, {2, 3}, {3, 3}, {4, 3}, {1, 1}, {2, 1}, {3, 1}, {4, 1}},
544 {{5, 3}, {6, 3}, {7, 3}, {8, 3}, {5, 1}, {6, 1}, {7, 1}, {8, 1}}}
546 memcpy(
irm_rmfiHF, irm_rmfiHF_loc,
sizeof(
int) * NHTRS * NTOPBOT * NFBR * 2);
549 const char* S_slbin_7_loc[] = {
"A0",
"A1",
"B0",
"B1"};
550 for (
int gg = 0; gg < 4; gg++) {
553 const char* S_slbin_3_loc[] = {
"C0",
"C1",
"D0",
"D1"};
554 for (
int gg = 0; gg < 4; gg++) {
557 const char* rct_rackHF_loc[] = {
"S2E01-FH",
575 for (
int gg = 0; gg < 18; gg++) {
586 for (ih = 0; ih <
NHTRS; ih++) {
594 iside =
is < NHSETS / 2 ? -1 : 1;
603 : (
ihfphis[
ic] + (
is % 2) * 12 + ih * 4 + (
ifb / 4) * 2 - 1) % 72 + 1;
605 idcc =
is < NHSETS / 2 ? 1 : 2;
621 else if (
iphi % 4 == 1)
623 else if (
iphi % 4 == 3)
626 edm::LogInfo(
"HcalLogicalMapGenerator") <<
"Even iphi in HFM" << endl;
635 irm = ((
iphi + 1) / 2) % 36 + 1;
650 snprintf(tempbuff,
sizeof tempbuff,
"%s%c%2.2i",
det.c_str(),
sidesign,
hfphi);
651 mystream << tempbuff;
652 rbx = mystream.str();
659 iqie = (irm_fi - 1) / 2 + 1;
670 phideg = phideg + 72;
671 phideg = (phideg / 4) * 20 + 10;
672 irctcra = ((89 - phideg + 720) % 360) / 40;
682 snprintf(tempbuff,
sizeof tempbuff,
"SLB_H_%3.3d%c%2.2d", phideg,
S_side,
etaslb);
683 mystream << tempbuff;
684 slnam = mystream.str();
688 mystream << tempbuff;
694 int phibin = (
iphi + 1) % 8;
695 int etabin = (
ieta - 29) / 3;
705 slbin = mystream.str();
743 HBHEHFEntries.push_back(hbeflmapentry);
744 LinearIndex2Entry.at(hbeflmapentry.getLinearIndex()) =
748 unsigned int denseId;
751 HbHash2Entry.at(denseId) = HBHEHFEntries.size();
755 HeHash2Entry.at(denseId) = HBHEHFEntries.size();
759 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]
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]