24 <<
"+++ Upgrade CSCMotherboardME11 constructed while isSLHC_ is not set! +++\n";
35 <<
"+++ Upgrade CSCMotherboardME11 constructed while isSLHC_ is not set! +++\n";
55 edm::LogError(
"CSCMotherboardME11|SetupError") <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
70 unsigned alctBits =
alctProc->getHighMultiplictyBits();
73 int used_alct_mask[20];
74 int used_clct_mask[20];
75 for (
int b = 0;
b < 20;
b++)
76 used_alct_mask[
b] = used_clct_mask[
b] = 0;
81 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
82 bool is_matched =
false;
85 for (
int bx_alct = bx_alct_start; bx_alct <= bx_alct_stop; bx_alct++) {
90 if (
alctProc->getBestALCT(bx_alct).isValid()) {
93 <<
"Successful CLCT-ALCT match in ME11: bx_clct = " << bx_clct <<
"; match window: [" << bx_alct_start
94 <<
"; " << bx_alct_stop <<
"]; bx_alct = " << bx_alct;
95 int mbx = bx_alct_stop - bx_alct;
102 if (
allLCTs(bx_alct, mbx, 0).isValid()) {
103 used_alct_mask[bx_alct] += 1;
112 LogTrace(
"CSCMotherboard") <<
"Unsuccessful ALCT-CLCT match (CLCT only): bx_clct = " << bx_clct
113 <<
" first CLCT " <<
clctProc->getBestCLCT(bx_clct) <<
"; match window: ["
114 << bx_alct_start <<
"; " << bx_alct_stop <<
"]";
122 if (
alctProc->getBestALCT(bx_alct).isValid()) {
127 bool is_matched =
false;
128 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
133 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
136 <<
"Successful ALCT-CLCT match in ME11: bx_alct = " << bx_alct <<
"; match window: [" << bx_clct_start
137 <<
"; " << bx_clct_stop <<
"]; bx_clct = " << bx_clct;
138 int mbx = bx_clct - bx_clct_start;
145 if (
allLCTs(bx_alct, mbx, 0).isValid()) {
147 used_clct_mask[bx_clct] += 1;
155 LogTrace(
"CSCMotherboard") <<
"Unsuccessful ALCT-CLCT match (ALCT only): bx_alct = " << bx_alct
156 <<
" first ALCT " <<
alctProc->getBestALCT(bx_alct) <<
"; match window: ["
157 << bx_clct_start <<
"; " << bx_clct_stop <<
"]";
167 unsigned int nlct = 0;
168 unsigned int nbx = 0;
176 LogDebug(
"CSCMotherboardME11") <<
"LCT" <<
i + 1 <<
" " <<
bx <<
"/"
184 if (
infoV > 0 && nlct > 0)
185 LogDebug(
"CSCMotherboardME11") <<
"bx " <<
bx <<
" nLCT: " << nlct <<
" total mbx with LCTs " << nbx;
206 LogDebug(
"CSCMotherboardME11") <<
"After x-bx sorting:";
213 LogDebug(
"CSCMotherboardME11") <<
"LCT" <<
i + 1 <<
" " <<
bx <<
"/"
218 if (
infoV > 0 && nlct > 0)
219 LogDebug(
"CSCMotherboardME11") <<
"bx " <<
bx <<
" nnLCT: " << nlct;
232 std::vector<CSCCorrelatedLCTDigi> tmpV;
247 std::vector<CSCCorrelatedLCTDigi> all_lcts;
252 std::vector<CSCCorrelatedLCTDigi>::const_iterator plct = all_lcts.begin();
253 for (; plct != all_lcts.end(); plct++) {
254 if (!plct->isValid())
257 int bx = (*plct).getBX();
270 tmpV.push_back(*plct);
271 if (bx_readout == -1)
274 tmpV.push_back(*plct);
281 std::vector<CSCCorrelatedLCTDigi> tmpV;
298 std::vector<CSCCorrelatedLCTDigi> tmpV;
334 const bool anodeBestValid = bestALCT.
isValid();
335 const bool anodeSecondValid = secondALCT.
isValid();
336 const bool cathodeBestValid = bestCLCT.
isValid();
337 const bool cathodeSecondValid = secondCLCT.
isValid();
338 if (anodeBestValid and !anodeSecondValid)
339 secondALCT = bestALCT;
340 if (!anodeBestValid and anodeSecondValid)
341 bestALCT = secondALCT;
342 if (cathodeBestValid and !cathodeSecondValid)
343 secondCLCT = bestCLCT;
344 if (!cathodeBestValid and cathodeSecondValid)
345 bestCLCT = secondCLCT;
352 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
359 if (secondALCT == bestALCT)
361 if (secondCLCT == bestCLCT)
368 const int code = (ok11 << 3) | (ok12 << 2) | (ok21 << 1) | (ok22);
372 LogTrace(
"CSCMotherboardME11") <<
"debug correlateLCTs in ME11 " <<
cscId_ << std::endl
373 <<
"ALCT1: " << bestALCT << std::endl
374 <<
"ALCT2: " << secondALCT << std::endl
375 <<
"CLCT1: " << bestCLCT << std::endl
376 <<
"CLCT2: " << secondCLCT << std::endl
377 <<
"ok 11 12 21 22 code = " << ok11 <<
" " << ok12 <<
" " << ok21 <<
" " << ok22
378 <<
" " << code << std::endl;
406 LogTrace(
"CSCMotherboardME11") <<
"lut 0 1 = " << lut[code][0] <<
" " << lut[code][1] << std::endl;
408 switch (lut[code][0]) {
426 LogTrace(
"CSCMotherboardME11") <<
"lct1: " << lct1 << std::endl;
428 switch (lut[code][1]) {
432 LogTrace(
"CSCMotherboardME11") <<
"lct2: " << lct2 << std::endl;
437 LogTrace(
"CSCMotherboardME11") <<
"lct2: " << lct2 << std::endl;
442 LogTrace(
"CSCMotherboardME11") <<
"lct2: " << lct2 << std::endl;
448 LogTrace(
"CSCMotherboardME11") <<
"out of correlateLCTsME11" << std::endl;