11 if (linkNo >= 0 && linkNo < 6)
13 else if (linkNo >= 8 && linkNo < 14)
15 else if (linkNo >= 16 && linkNo < 22)
17 else if (linkNo >= 22 && linkNo < 28)
19 else if ((linkNo >= 28 && linkNo < 30) || (linkNo >= 32 && linkNo < 36))
36 unsigned int ownLinks[] = {4, 5, 12, 13, 20, 21, 22, 23, 28, 29};
40 for (
int i = 0;
i < 10;
i++) {
41 if (
block.header().getID() / 2 == ownLinks[
i])
48 unsigned int blockId =
block.header().getID();
49 LogDebug(
"L1T") <<
"Block ID: " << blockId <<
" size: " <<
block.header().getSize();
62 (
bool)((
block.header().getFlags() >> 1) & 0x01);
65 block.getBxBlocks((
unsigned int)6,
true);
68 block.getBxBlocks((
unsigned int)6,
false);
70 for (
const auto& ibx : bxBlocks)
72 int bxNum = ibx.header().getBx();
73 uint32_t inputWords[ibx.getSize()];
80 for (
unsigned int iw = 0; iw < ibx.getSize(); iw++)
81 inputWords[iw] = (ibx.payload())[iw];
83 int wheel, sector, trTag;
85 sector =
block.amc().getBoardID() - 1;
88 if (sector < 0 || sector > 11) {
90 <<
"Sector found out of range so it will be calculated by the slot number";
91 if (
block.amc().getAMCNumber() % 2 != 0)
92 sector =
block.amc().getAMCNumber() / 2;
94 sector = 6 + (
block.amc().getAMCNumber() / 2 - 1);
97 int mbPhi[4], mbPhiB[4], mbQual[4], mbBxC[4], mbRPC[4];
100 for (
int iw = 0; iw < 4; iw++)
102 if (((inputWords[iw] & 0xfffffff) == 0) || (inputWords[iw] == 0x505050bc))
104 else if ((inputWords[iw] != 0x505050bc) && (inputWords[iw + 2] == 0x505050bc))
107 if (((inputWords[iw] >> 11) & 0x1) == 1)
108 mbPhi[iw] = (inputWords[iw] & 0x7FF) - 2048;
110 mbPhi[iw] = (inputWords[iw] & 0xFFF);
112 if (((inputWords[iw] >> 21) & 0x1) == 1)
113 mbPhiB[iw] = ((inputWords[iw] >> 12) & 0x1FF) - 512;
115 mbPhiB[iw] = (inputWords[iw] >> 12) & 0x3FF;
117 mbQual[iw] = (inputWords[iw] >> 22) & 0x7;
118 mbRPC[iw] = (inputWords[iw] >> 26) & 0
x1;
119 mbBxC[iw] = (inputWords[iw] >> 30) & 0x3;
126 bxNum,
wheel, sector, iw + 1, mbPhi[iw], mbPhiB[iw], mbQual[iw], trTag, mbBxC[iw], mbRPC[iw]));
132 for (
int i = 0;
i < 3;
i++)
135 for (
int j = 0;
j < 7;
j++) {
136 etaHits[
i][
j] = (inputWords[4] >> (
i * 7 +
j)) & 0x1;
137 if (etaHits[
i][
j] != 0)
143 for (
int i = 0;
i < 3;
i++) {
155 linkAndQual_.
linkNo = blockId / 2;
156 std::copy(&etaHits[0][0], &etaHits[0][0] + 3 * 7, &linkAndQual_.
hits[0][0]);