5 const std::vector<std::pair<unsigned, unsigned> >
6 run3_pattern_lookup_tbl = {{0, 0}, {0, 1}, {0, 2}, {0, 3}, {0, 4},
7 {0, 0}, {0, 1}, {0, 2}, {0, 3}, {0, 4}, {1, 0}, {1, 1}, {1, 2}, {1, 3},
8 {1, 4}, {2, 0}, {2, 1}, {2, 2}, {2, 3}, {2, 4}, {3, 0}, {3, 1}, {3, 2},
9 {3, 3}, {3, 4}, {4, 0}, {4, 1}, {4, 2}, {4, 3}, {4, 4}};
11 const unsigned run2_pattern_lookup_tbl[2][16] = {{10, 10, 10, 8, 8, 8, 6, 6, 6, 4, 4, 4, 2, 2, 2, 2},
12 {10, 10, 10, 9, 9, 9, 7, 7, 7, 5, 5, 5, 3, 3, 3, 3}};
16 bits.nHeaderFrames = 42;
17 bits.e0bline = 0x6E0B;
18 bits.b0cline = 0xDB0C;
19 bits.firmRevCode = 0x001;
28 bits.l1aNumber = dmbHeader.
l1a();
29 bits.bxnCount = dmbHeader.
bxn();
34 std::vector<CSCCLCTDigi>
result;
35 unsigned halfstrip =
bits.clct0_key_low + (
bits.clct0_key_high << 7);
36 unsigned strip = halfstrip % 32;
37 unsigned cfeb = halfstrip / 32;
38 unsigned pattern =
bits.clct0_shape;
39 unsigned bend = pattern & 0x1;
42 bits.clct0_valid,
bits.clct0_quality, pattern, 1, bend, strip, cfeb,
bits.clct_bxn, 1,
bits.bxnPreTrigger);
44 halfstrip =
bits.clct1_key_low + (
bits.clct1_key_high << 7);
45 strip = halfstrip % 32;
46 cfeb = halfstrip / 32;
47 pattern =
bits.clct1_shape;
51 bits.clct1_valid,
bits.clct1_quality, pattern, 1, bend, strip, cfeb,
bits.clct_bxn, 2,
bits.bxnPreTrigger);
52 result.push_back(digi0);
53 result.push_back(digi1);
59 std::vector<CSCCorrelatedLCTDigi>
result;
60 unsigned strip =
bits.MPC_Muon0_clct_key_halfstrip;
61 unsigned slope = (
bits.MPC_Muon0_clct_bend_low & 0x7) | (
bits.MPC_Muon0_clct_bend_bit4 << 3);
62 unsigned hmt =
bits.MPC_Muon_HMT_bit0 | (
bits.MPC_Muon_HMT_high << 1);
63 unsigned clct_pattern_id =
bits.MPC_Muon_clct_pattern_low | (
bits.MPC_Muon_clct_pattern_bit5 << 4);
67 unsigned run3_pattern = run3_pattern_pair.second & 0x7;
70 bits.MPC_Muon0_lct_vpf,
71 bits.MPC_Muon0_lct_quality,
72 bits.MPC_Muon0_alct_key_wire,
75 bits.MPC_Muon0_clct_LR,
76 bits.MPC_Muon_alct_bxn,
78 bits.MPC_Muon0_clct_bx0,
82 bits.MPC_Muon0_clct_QuarterStrip,
83 bits.MPC_Muon0_clct_EighthStrip,
87 result.push_back(digi);
89 strip =
bits.MPC_Muon1_clct_key_halfstrip;
90 slope = (
bits.MPC_Muon1_clct_bend_low & 0x7) | (
bits.MPC_Muon1_clct_bend_bit4 << 3);
92 run3_pattern = run3_pattern_pair.first & 0x7;
94 bits.MPC_Muon1_lct_vpf,
95 bits.MPC_Muon1_lct_quality,
96 bits.MPC_Muon1_alct_key_wire,
99 bits.MPC_Muon1_clct_LR,
100 bits.MPC_Muon_alct_bxn,
102 bits.MPC_Muon1_clct_bx0,
106 bits.MPC_Muon1_clct_QuarterStrip,
107 bits.MPC_Muon1_clct_EighthStrip,
111 result.push_back(digi);
116 unsigned hmt_bits =
bits.MPC_Muon_HMT_bit0 | (
bits.MPC_Muon_HMT_high << 1);
123 throw cms::Exception(
"In CSC TMBHeaderFormat 2007, ALCTs belong in ALCT header");
127 throw cms::Exception(
"In CSC TMBHeaderFormat 2007, ALCTs belong in ALCT header");
135 bits.clct0_shape = pattern;
137 bits.clct0_key_low = halfStrip & (0x7F);
139 bits.clct0_key_high = (halfStrip >> 7) & (0x1);
149 bits.clct1_shape = pattern;
151 bits.clct1_key_low = halfStrip & (0x7F);
153 bits.clct1_key_high = (halfStrip >> 7) & (0x1);
162 bits.MPC_Muon0_clct_key_halfstrip = digi.
getStrip(2) & 0xFF;
169 bits.MPC_Muon_clct_pattern_low = run3_pattern & 0xF;
170 bits.MPC_Muon_clct_pattern_bit5 = (run3_pattern >> 4) & 0x1;
172 bits.MPC_Muon0_clct_bend_bit4 = (digi.
getSlope() >> 3) & 0x1;
175 bits.MPC_Muon_HMT_high = (digi.
getHMT() >> 1) & 0x7;
183 bits.MPC_Muon1_clct_key_halfstrip = digi.
getStrip(2) & 0xFF;
191 uint16_t clct_pattern_id =
bits.MPC_Muon_clct_pattern_low | (
bits.MPC_Muon_clct_pattern_bit5 << 4);
193 clct_pattern_id = (clct_pattern_id + (run3_pattern + 1) * 5) % 30;
194 bits.MPC_Muon_clct_pattern_low = clct_pattern_id & 0xF;
195 bits.MPC_Muon_clct_pattern_bit5 = (clct_pattern_id >> 4) & 0x1;
198 bits.MPC_Muon1_clct_bend_bit4 = (digi.
getSlope() >> 3) & 0x1;
201 bits.MPC_Muon_HMT_high = (digi.
getHMT() >> 1) & 0x7;
208 bits.MPC_Muon_HMT_bit0 = hmt_bits & 0x1;
209 bits.MPC_Muon_HMT_high = (hmt_bits >> 1) & 0x7;
213 os <<
"...............(O)TMB2020 TMB Run3 Header.................."
215 os << std::hex <<
"BOC LINE " <<
bits.b0cline <<
" EOB " <<
bits.e0bline <<
"\n";
216 os << std::hex <<
"FW revision: 0x" <<
bits.firmRevCode <<
"\n";
217 os <<
std::dec <<
"fifoMode = " <<
bits.fifoMode <<
", nTBins = " <<
bits.nTBins <<
"\n";
218 os <<
"boardID = " <<
bits.boardID <<
", cscID = " <<
bits.cscID <<
"\n";
219 os <<
"l1aNumber = " <<
bits.l1aNumber <<
", bxnCount = " <<
bits.bxnCount <<
"\n";
220 os <<
"trigSourceVect = " <<
bits.trigSourceVect <<
", activeCFEBs = 0x" << std::hex
221 << (
bits.activeCFEBs | (
bits.activeCFEBs_2 << 5)) <<
", readCFEBs = 0x" << std::hex
223 os <<
"bxnPreTrigger = " <<
bits.bxnPreTrigger <<
"\n";
224 os <<
"tmbMatch = " <<
bits.tmbMatch <<
" alctOnly = " <<
bits.alctOnly <<
" clctOnly = " <<
bits.clctOnly <<
"\n";
226 os <<
"CLCT Words:\n"
227 <<
" bits.clct0_valid = " <<
bits.clct0_valid <<
" bits.clct0_shape = " <<
bits.clct0_shape
228 <<
" bits.clct0_quality = " <<
bits.clct0_quality
229 <<
" halfstrip = " << (
bits.clct0_key_low + (
bits.clct0_key_high << 7)) <<
"\n";
231 os <<
" bits.clct1_valid = " <<
bits.clct1_valid <<
" bits.clct1_shape = " <<
bits.clct1_shape
232 <<
" bits.clct1_quality = " <<
bits.clct1_quality
233 <<
" halfstrip = " << (
bits.clct1_key_low + (
bits.clct1_key_high << 7)) <<
"\n";
236 <<
" LCT0 valid = " <<
bits.MPC_Muon0_lct_vpf <<
" key WG = " <<
bits.MPC_Muon0_alct_key_wire
237 <<
" key halfstrip = " <<
bits.MPC_Muon0_clct_key_halfstrip
238 <<
" 1/4strip flag = " <<
bits.MPC_Muon0_clct_QuarterStrip
239 <<
" 1/8strip flag = " <<
bits.MPC_Muon0_clct_EighthStrip <<
"\n"
240 <<
" quality = " <<
bits.MPC_Muon0_lct_quality
241 <<
" slope/bend = " << ((
bits.MPC_Muon0_clct_bend_low & 0x7) | (
bits.MPC_Muon0_clct_bend_bit4 << 3))
242 <<
" L/R bend = " <<
bits.MPC_Muon0_clct_LR <<
"\n";
244 os <<
" LCT1 valid = " <<
bits.MPC_Muon1_lct_vpf <<
" key WG = " <<
bits.MPC_Muon1_alct_key_wire
245 <<
" key halfstrip = " <<
bits.MPC_Muon1_clct_key_halfstrip
246 <<
" 1/4strip flag = " <<
bits.MPC_Muon1_clct_QuarterStrip
247 <<
" 1/8strip flag = " <<
bits.MPC_Muon1_clct_EighthStrip <<
"\n"
248 <<
" quality = " <<
bits.MPC_Muon1_lct_quality
249 <<
" slope/bend = " << ((
bits.MPC_Muon1_clct_bend_low & 0x7) | (
bits.MPC_Muon1_clct_bend_bit4 << 3))
250 <<
" L/R bend = " <<
bits.MPC_Muon1_clct_LR <<
"\n";
252 os <<
" clct_5bit_pattern_id = " << (
bits.MPC_Muon_clct_pattern_low | (
bits.MPC_Muon_clct_pattern_bit5 << 4))
253 <<
" HMT = " << (
bits.MPC_Muon_HMT_bit0 | (
bits.MPC_Muon_HMT_high << 1)) <<
"\n";
uint16_t getFullBX() const
return 12-bit full BX.
uint16_t getBX() const
return BX
static const double slope[3]
uint16_t getKeyStrip(const uint16_t n=2) const
uint16_t bitsInTime() const
bool isValid() const
check CLCT validity (1 - valid CLCT)
uint16_t bitsOutOfTime() const
uint16_t getPattern() const
return pattern
uint16_t getQuality() const
return quality of a pattern (number of layers hit!)