9 unsigned packedChip = ((
chip & 1) + 2 * (
chip > 1));
14 : nAFEBs_(
header.nLCTChipRead()), nTimeBins_(
header.NTBins()) {
18 for (
int afeb = 0; afeb <
nAFEBs_; ++afeb) {
19 for (
int tbin = 0; tbin <
nTimeBins_; ++tbin) {
20 for (
int layer = 1; layer <= 6; ++layer) {
21 for (
int halfLayer = 0; halfLayer < 2; ++halfLayer) {
33 : nAFEBs_(
header.nLCTChipRead()), nTimeBins_(
header.NTBins()) {
45 std::vector<CSCWireDigi> digis;
46 uint32_t tbinbits = 0;
47 uint16_t wireGroup = 0;
48 for (
int afeb = 0; afeb <
nAFEBs_; ++afeb) {
49 for (
int halfLayer = 0; halfLayer < 2; ++halfLayer) {
50 for (
int j = 0;
j < 8; ++
j) {
51 for (
int tbin = 0; tbin <
nTimeBins_; ++tbin) {
54 if (
frame.data() != 0) {
56 tbinbits = tbinbits + (1 << tbin);
61 wireGroup = (afeb * 16 + halfLayer * 8 +
j) + 1;
63 wireGroup = wireGroup | (wireGroupBX << 16);
65 LogTrace(
"CSCAnodeData|CSCRawToDigi") <<
"Layer " << layer <<
" " << digi;
66 digis.push_back(digi);
79 int alctBoard = (wireGroup - 1) / 16;
80 int localGroup = (wireGroup - 1) % 16;
86 edm::LogError(
"CSCAnodeData|CSCRawToDigi") <<
"Bad Wire Number for this digi.";
92 unsigned halfLayer = (localGroup > 7);
97 LogTrace(
"CSCAnodeData|CSCRawToDigi") <<
"warning: not saving anode data in bx " << bxn <<
": out of range ";
102 int i =
index(afeb, tbin, layer) + halfLayer;
104 frame.addHit(wireBit);
132 anodeData.
add(wireDigi, 1);
133 anodeData.
add(wireDigi, 6);
135 std::vector<CSCWireDigi> wires1 = anodeData.
wireDigis(1);
136 std::vector<CSCWireDigi> wires6 = anodeData.
wireDigis(6);
138 assert(wires1.size() == 1);
139 assert(wires6.size() == 1);
140 assert(wires1[0].getWireGroup() == 10);
141 assert(wires6[0].getWireGroup() == 10);