13 allLCTs(match_trig_window_size) {
15 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runPhase2_ is not set! +++\n";
19 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME11Up_ is not set! +++\n";
21 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME21Up_ is not set! +++\n";
23 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME31Up_ is not set! +++\n";
25 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME41Up_ is not set! +++\n";
31 generator_ = std::make_unique<CSCUpgradeMotherboardLUTGenerator>();
55 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runPhase2_ is not set! +++\n";
59 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME11Up_ is not set! +++\n";
61 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME21Up_ is not set! +++\n";
63 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME31Up_ is not set! +++\n";
65 edm::LogError(
"CSCUpgradeMotherboard|SetupError") <<
"+++ TMB constructed while runME41Up_ is not set! +++\n";
76 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
91 unsigned alctBits =
alctProc->getHighMultiplictyBits();
94 int used_clct_mask[20];
95 for (
int c = 0;
c < 20; ++
c)
96 used_clct_mask[
c] = 0;
100 if (
alctProc->getBestALCT(bx_alct).isValid()) {
106 <<
"========================================================================" << std::endl;
107 LogTrace(
"CSCUpgradeMotherboard") <<
"ALCT-CLCT matching in ME34/1 chamber: " <<
cscId_ << std::endl;
109 <<
"------------------------------------------------------------------------" << std::endl;
110 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Best ALCT Details: ";
111 alctProc->getBestALCT(bx_alct).print();
112 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Second ALCT Details: ";
113 alctProc->getSecondALCT(bx_alct).print();
116 <<
"------------------------------------------------------------------------" << std::endl;
117 LogTrace(
"CSCUpgradeMotherboard") <<
"Attempt ALCT-CLCT matching in ME34/13 in bx range: [" << bx_clct_start
118 <<
"," << bx_clct_stop <<
"]" << std::endl;
122 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
127 if (
clctProc->getBestCLCT(bx_clct).isValid()) {
129 LogTrace(
"CSCUpgradeMotherboard") <<
"++Valid ME21 CLCT: " <<
clctProc->getBestCLCT(bx_clct) << std::endl;
131 int mbx = bx_clct - bx_clct_start;
140 <<
"Successful ALCT-CLCT match in ME21: bx_alct = " << bx_alct <<
"; match window: [" << bx_clct_start
141 <<
"; " << bx_clct_stop <<
"]; bx_clct = " << bx_clct << std::endl;
142 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Best CLCT Details: ";
143 clctProc->getBestCLCT(bx_clct).print();
144 LogTrace(
"CSCUpgradeMotherboard") <<
"+++ Second CLCT Details: ";
145 clctProc->getSecondCLCT(bx_clct).print();
146 if (
allLCTs(bx_alct, mbx, 0).isValid()) {
147 used_clct_mask[bx_clct] += 1;
200 LogDebug(
"CSCUpgradeMotherboard") <<
"bx " <<
bx <<
" nnLCT:" <<
n <<
" " <<
n << std::endl;
208 LogTrace(
"CSCUpgradeMotherboard") <<
"========================================================================"
210 LogTrace(
"CSCUpgradeMotherboard") <<
"Counting the final LCTs" << std::endl;
211 LogTrace(
"CSCUpgradeMotherboard") <<
"========================================================================"
218 LogTrace(
"CSCUpgradeMotherboard") <<
"LCT " <<
n <<
" " <<
p << std::endl;
233 const bool anodeBestValid = bestALCT.
isValid();
234 const bool anodeSecondValid = secondALCT.
isValid();
235 const bool cathodeBestValid = bestCLCT.
isValid();
236 const bool cathodeSecondValid = secondCLCT.
isValid();
238 if (anodeBestValid and !anodeSecondValid)
239 secondALCT = bestALCT;
240 if (!anodeBestValid and anodeSecondValid)
241 bestALCT = secondALCT;
242 if (cathodeBestValid and !cathodeSecondValid)
243 secondCLCT = bestCLCT;
244 if (!cathodeBestValid and cathodeSecondValid)
245 bestCLCT = secondCLCT;
254 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
263 std::vector<CSCCorrelatedLCTDigi>
result;
270 for (
const auto& lct :
result) {
286 }
else if (keystrip <= CSCConstants::MAX_HALF_STRIP_ME1B and keystrip >= 0)
297 edm::LogError(
"CSCUpgradeMotherboard|Error") <<
" ++ getCSCPart() failed to find the CSC chamber for in case ";
317 std::sort(lcts.begin(), lcts.end(), *
sorter);
319 lcts.erase(lcts.begin() +
max_lcts, lcts.end());