7 unsigned sector,
unsigned subsector,
11 , allLCTs1b(match_trig_window_size)
12 , allLCTs1a(match_trig_window_size)
14 , smartME1aME1b(commonParams_.getParameter<
bool>(
"smartME1aME1b"))
15 , disableME1a(commonParams_.getParameter<
bool>(
"disableME1a"))
16 , gangedME1a(commonParams_.getParameter<
bool>(
"gangedME1a"))
17 , dropLowQualityCLCTsNoGEMs_ME1a_(tmbParams_.getParameter<
bool>(
"dropLowQualityCLCTsNoGEMs_ME1a"))
18 , dropLowQualityCLCTsNoGEMs_ME1b_(tmbParams_.getParameter<
bool>(
"dropLowQualityCLCTsNoGEMs_ME1b"))
19 , dropLowQualityALCTsNoGEMs_ME1a_(tmbParams_.getParameter<
bool>(
"dropLowQualityALCTsNoGEMs_ME1a"))
20 , dropLowQualityALCTsNoGEMs_ME1b_(tmbParams_.getParameter<
bool>(
"dropLowQualityALCTsNoGEMs_ME1b"))
21 , buildLCTfromALCTandGEM_ME1a_(tmbParams_.getParameter<
bool>(
"buildLCTfromALCTandGEM_ME1a"))
22 , buildLCTfromALCTandGEM_ME1b_(tmbParams_.getParameter<
bool>(
"buildLCTfromALCTandGEM_ME1b"))
23 , buildLCTfromCLCTandGEM_ME1a_(tmbParams_.getParameter<
bool>(
"buildLCTfromCLCTandGEM_ME1a"))
24 , buildLCTfromCLCTandGEM_ME1b_(tmbParams_.getParameter<
bool>(
"buildLCTfromCLCTandGEM_ME1b"))
25 , promoteCLCTGEMquality_ME1a_(tmbParams_.getParameter<
bool>(
"promoteCLCTGEMquality_ME1a"))
26 , promoteCLCTGEMquality_ME1b_(tmbParams_.getParameter<
bool>(
"promoteCLCTGEMquality_ME1b"))
29 <<
"+++ Upgrade CSCGEMMotherboardME11 constructed while smartME1aME1b is not set! +++\n";
89 if (
gem_g !=
nullptr) {
91 <<
"+++ run() called for GEM-CSC integrated trigger! +++ \n";
98 <<
"+++ run() called for GEM-CSC integrated trigger without valid GEM geometry! +++ \n";
106 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
121 int used_clct_mask[20], used_clct_mask_1a[20];
122 for (
int b=0;
b<20;
b++)
123 used_clct_mask[
b] = used_clct_mask_1a[
b] = 0;
132 const bool hasPads(!
pads_.empty());
133 const bool hasCoPads(hasPads and !
coPads_.empty());
138 if (
alct->bestALCT[bx_alct].isValid())
146 LogTrace(
"CSCGEMCMotherboardME11") <<
"========================================================================\n" 147 <<
"ALCT-CLCT matching in ME1/1 chamber: " <<
cscChamber->
id() <<
"\n" 148 <<
"------------------------------------------------------------------------\n" 149 <<
"+++ Best ALCT Details: " <<
alct->bestALCT[bx_alct] <<
"\n" 150 <<
"+++ Second ALCT Details: " <<
alct->secondALCT[bx_alct] << std::endl;
155 LogTrace(
"CSCGEMCMotherboardME11") <<
"------------------------------------------------------------------------ \n" 156 <<
"Attempt ALCT-CLCT matching in ME1/b in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
160 int nSuccesFulMatches = 0;
161 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
165 if (
clct->bestCLCT[bx_clct].isValid())
167 const int quality(
clct->bestCLCT[bx_clct].getQuality());
171 matches<GEMPadDigi> mPads;
172 matchingPads<GEMPadDigi>(
clct->bestCLCT[bx_clct],
clct->secondCLCT[bx_clct],
173 alct->bestALCT[bx_alct],
alct->secondALCT[bx_alct],
ME1B, mPads);
174 matches<GEMCoPadDigi> mCoPads;
175 matchingPads<GEMCoPadDigi>(
clct->bestCLCT[bx_clct],
clct->secondCLCT[bx_clct],
176 alct->bestALCT[bx_alct],
alct->secondALCT[bx_alct],
ME1B, mCoPads);
180 int nFound(mPads.size());
182 const bool clctInEdge(
clct->bestCLCT[bx_clct].getKeyStrip() < 5
or clct->bestCLCT[bx_clct].getKeyStrip() > 124);
184 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\tInfo: low quality CLCT in CSC chamber edge, don't care about GEM pads" << std::endl;
188 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\tInfo: low quality CLCT with " << nFound <<
" matching GEM trigger pads" << std::endl;
191 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\tWarning: low quality CLCT without matching GEM trigger pad" << std::endl;
200 int mbx = bx_clct-bx_clct_start;
202 clct->bestCLCT[bx_clct],
clct->secondCLCT[bx_clct],
206 LogTrace(
"CSCGEMCMotherboardME11") <<
"Successful ALCT-CLCT match in ME1b: bx_alct = " << bx_alct
207 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
208 <<
"]; bx_clct = " << bx_clct <<
"\n" 209 <<
"+++ Best CLCT Details: " <<
clct->bestCLCT[bx_clct] <<
"\n" 210 <<
"+++ Second CLCT Details: " <<
clct->secondCLCT[bx_clct] << std::endl;
212 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #1 "<<
allLCTs1b(bx_alct,mbx,0) << std::endl;
214 LogTrace(
"CSCGEMCMotherboardME11") <<
"No valid LCT is built from ALCT-CLCT matching in ME1b" << std::endl;
216 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #2 "<<
allLCTs1b(bx_alct,mbx,1) << std::endl;
219 if (
allLCTs1b(bx_alct,mbx,0).isValid()) {
220 used_clct_mask[bx_clct] += 1;
227 int nSuccesFulGEMMatches = 0;
229 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"++No valid ALCT-CLCT matches in ME1b" << std::endl;
230 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
236 matches<GEMCoPadDigi> copads;
237 matchingPads<CSCALCTDigi, GEMCoPadDigi>(
alct->bestALCT[bx_alct],
alct->secondALCT[bx_alct],
ME1B, copads);
239 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\t++Number of matching GEM CoPads in BX " << bx_alct <<
" : "<< copads.size() << std::endl;
240 if (copads.empty()) {
248 LogTrace(
"CSCGEMCMotherboardME11") <<
"Successful ALCT-GEM CoPad match in ME1b: bx_alct = " << bx_alct <<
"\n\n" 249 <<
"------------------------------------------------------------------------" << std::endl << std::endl;
251 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #1 "<<
allLCTs1b(bx_alct,0,0) << std::endl;
253 LogTrace(
"CSCGEMCMotherboardME11") <<
"No valid LCT is built from ALCT-GEM matching in ME1b" << std::endl;
255 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #2 "<<
allLCTs1b(bx_alct,0,1) << std::endl;
259 ++nSuccesFulGEMMatches;
266 LogTrace(
"CSCGEMCMotherboardME11") <<
"========================================================================" << std::endl
267 <<
"Summary: " << std::endl;
268 if (nSuccesFulMatches>1)
269 LogTrace(
"CSCGEMCMotherboardME11") <<
"Too many successful ALCT-CLCT matches in ME1b: " << nSuccesFulMatches
271 <<
", bx_alct = " << bx_alct
272 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
273 else if (nSuccesFulMatches==1)
274 LogTrace(
"CSCGEMCMotherboardME11") <<
"1 successful ALCT-CLCT match in ME1b: " 276 <<
", bx_alct = " << bx_alct
277 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
278 else if (nSuccesFulGEMMatches==1)
279 LogTrace(
"CSCGEMCMotherboardME11") <<
"1 successful ALCT-GEM match in ME1b: " 281 <<
", bx_alct = " << bx_alct
282 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
284 LogTrace(
"CSCGEMCMotherboardME11") <<
"Unsuccessful ALCT-CLCT match in ME1b: " 286 <<
", bx_alct = " << bx_alct
287 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
289 LogTrace(
"CSCGEMCMotherboardME11") <<
"------------------------------------------------------------------------" << std::endl
290 <<
"Attempt ALCT-CLCT matching in ME1/a in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
294 nSuccesFulMatches = 0;
295 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
299 if (
clct1a->bestCLCT[bx_clct].isValid())
305 matches<GEMPadDigi> mPads;
306 matchingPads<GEMPadDigi>(
clct1a->bestCLCT[bx_clct],
clct1a->secondCLCT[bx_clct],
307 alct->bestALCT[bx_alct],
alct->secondALCT[bx_alct],
ME1A, mPads);
308 matches<GEMCoPadDigi> mCoPads;
309 matchingPads<GEMCoPadDigi>(
clct1a->bestCLCT[bx_clct],
clct1a->secondCLCT[bx_clct],
310 alct->bestALCT[bx_alct],
alct->secondALCT[bx_alct],
ME1A, mCoPads);
313 int nFound(mPads.size());
314 const bool clctInEdge(
clct1a->bestCLCT[bx_clct].getKeyStrip() < 4
or clct1a->bestCLCT[bx_clct].getKeyStrip() > 93);
316 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\tInfo: low quality CLCT in CSC chamber edge, don't care about GEM pads" << std::endl;
320 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\tInfo: low quality CLCT with " << nFound <<
" matching GEM trigger pads" << std::endl;
323 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\tWarning: low quality CLCT without matching GEM trigger pad" << std::endl;
329 int mbx = bx_clct-bx_clct_start;
335 LogTrace(
"CSCGEMCMotherboardME11") <<
"Successful ALCT-CLCT match in ME1a: bx_alct = " << bx_alct
336 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
337 <<
"]; bx_clct = " << bx_clct <<
"\n" 338 <<
"+++ Best CLCT Details: " <<
clct1a->bestCLCT[bx_clct] <<
"\n" 339 <<
"+++ Second CLCT Details: " <<
clct1a->secondCLCT[bx_clct] << std::endl;
341 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #1 "<<
allLCTs1a(bx_alct,mbx,0) << std::endl;
343 LogTrace(
"CSCGEMCMotherboardME11") <<
"No valid LCT is built from ALCT-CLCT matching in ME1a" << std::endl;
345 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #2 "<<
allLCTs1a(bx_alct,mbx,1) << std::endl;
348 used_clct_mask_1a[bx_clct] += 1;
355 nSuccesFulGEMMatches = 0;
357 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"++No valid ALCT-CLCT matches in ME1a" << std::endl;
358 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
364 matches<GEMCoPadDigi> copads;
365 matchingPads<CSCALCTDigi, GEMCoPadDigi>(
alct->bestALCT[bx_alct],
alct->secondALCT[bx_alct],
ME1A, copads);
367 if (
debug_matching)
LogTrace(
"CSCGEMCMotherboardME11") <<
"\t++Number of matching GEM CoPads in BX " << bx_alct <<
" : "<< copads.size() << std::endl;
368 if (copads.empty()) {
376 LogTrace(
"CSCGEMCMotherboardME11") <<
"Successful ALCT-GEM CoPad match in ME1a: bx_alct = " << bx_alct <<
"\n\n" 377 <<
"------------------------------------------------------------------------" << std::endl << std::endl;
379 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #1 "<<
allLCTs1a(bx_alct,0,0) << std::endl;
381 LogTrace(
"CSCGEMCMotherboardME11") <<
"No valid LCT is built from ALCT-GEM matching in ME1a" << std::endl;
383 LogTrace(
"CSCGEMCMotherboardME11") <<
"LCT #2 "<<
allLCTs1a(bx_alct,0,1) << std::endl;
387 ++nSuccesFulGEMMatches;
394 LogTrace(
"CSCGEMCMotherboardME11") <<
"======================================================================== \n" 395 <<
"Summary: " << std::endl;
396 if (nSuccesFulMatches>1)
397 LogTrace(
"CSCGEMCMotherboardME11") <<
"Too many successful ALCT-CLCT matches in ME1a: " << nSuccesFulMatches
398 <<
", CSCDetId " << cscChamberME1a->id()
399 <<
", bx_alct = " << bx_alct
400 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
401 else if (nSuccesFulMatches==1)
402 LogTrace(
"CSCGEMCMotherboardME11") <<
"1 successful ALCT-CLCT match in ME1a: " 403 <<
" CSCDetId " << cscChamberME1a->id()
404 <<
", bx_alct = " << bx_alct
405 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
406 else if (nSuccesFulGEMMatches==1)
407 LogTrace(
"CSCGEMCMotherboardME11") <<
"1 successful ALCT-GEM match in ME1a: " 408 <<
" CSCDetId " << cscChamberME1a->id()
409 <<
", bx_alct = " << bx_alct
410 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
412 LogTrace(
"CSCGEMCMotherboardME11") <<
"Unsuccessful ALCT-CLCT match in ME1a: " 413 <<
"CSCDetId " << cscChamberME1a->id()
414 <<
", bx_alct = " << bx_alct
415 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
421 if (!coPads.empty()) {
428 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
431 if (
clct->bestCLCT[bx_clct].isValid()) {
432 const int quality(
clct->bestCLCT[bx_clct].getQuality());
435 int mbx = bx_clct-bx_clct_start;
440 LogTrace(
"CSCGEMCMotherboardME11") <<
"Successful GEM-CLCT match in ME1b: bx_alct = " << bx_alct
441 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
442 <<
"]; bx_clct = " << bx_clct <<
"\n" 443 <<
"+++ Best CLCT Details: " <<
clct->bestCLCT[bx_clct] <<
"\n" 444 <<
"+++ Second CLCT Details: " <<
clct->secondCLCT[bx_clct] << std::endl;
446 if (
allLCTs1b(bx_alct,mbx,0).isValid()) {
447 used_clct_mask[bx_clct] += 1;
456 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
459 if (
clct1a->bestCLCT[bx_clct].isValid()){
463 int mbx = bx_clct-bx_clct_start;
468 LogTrace(
"CSCGEMCMotherboardME11") <<
"Successful GEM-CLCT match in ME1a: bx_alct = " << bx_alct
469 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
470 <<
"]; bx_clct = " << bx_clct <<
"\n" 471 <<
"+++ Best CLCT Details: " <<
clct1a->bestCLCT[bx_clct] <<
"\n" 472 <<
"+++ Second CLCT Details: " <<
clct1a->secondCLCT[bx_clct] << std::endl;
475 used_clct_mask_1a[bx_clct] += 1;
486 LogTrace(
"CSCGEMCMotherboardME11") <<
"======================================================================== \n" 487 <<
"Counting the LCTs \n" 488 <<
"========================================================================" << std::endl;
495 unsigned int n1a=0, n1b=0;
499 int cbx = bx + mbx - match_trig_window_size/2;
504 <<
"1b LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1b(bx,mbx,
i)<<std::endl;
510 <<
"1a LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1a(bx,mbx,
i)<<std::endl;
513 if (
infoV > 0 and n1a+n1b>0)
LogDebug(
"CSCGEMMotherboardME11")
514 <<
"bx "<<bx<<
" nLCT:"<<n1a<<
" "<<n1b<<
" "<<n1a+n1b<<std::endl;
539 int cbx = bx + mbx - match_trig_window_size/2;
544 <<
"1b LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1b(bx,mbx,
i)<< std::endl;
550 <<
"1a LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1a(bx,mbx,
i)<< std::endl;
553 if (
infoV > 0 and n1a+n1b>0)
LogDebug(
"CSCGEMMotherboardME11")
554 <<
"bx "<<bx<<
" nnLCT:"<<n1a<<
" "<<n1b<<
" "<<n1a+n1b<<std::endl;
562 unsigned int nLCT=n1b;
573 <<
"bx "<<bx<<
" nnnLCT: "<<n1a<<
" "<<n1b<<
" "<<n1a+n1b<< std::endl;
577 unsigned int n1b=0, n1a=0;
578 LogTrace(
"CSCGEMCMotherboardME11") <<
"======================================================================== \n" 579 <<
"Counting the final LCTs \n" 580 <<
"======================================================================== \n" 585 LogTrace(
"CSCGEMCMotherboardME11") <<
"1b LCT "<<n1b<<
" " <<
p <<std::endl;
590 LogTrace(
"CSCGEMCMotherboardME11") <<
"1a LCT "<<n1a<<
" " <<
p <<std::endl;
612 std::vector<CSCCorrelatedLCTDigi> tmpV;
628 std::vector<CSCCorrelatedLCTDigi> all_lcts;
633 }
else if (me1ab ==
ME1B) {
641 default:
LogTrace(
"CSCGEMCMotherboardME11")<<
"tmb_cross_bx_algo error" <<std::endl;
645 for (
const auto& lct: all_lcts)
647 if (!lct.isValid())
continue;
649 int bx = lct.getBX();
654 if (bx > late_tbins)
continue;
662 if (bx_readout == -1) bx_readout = bx;
664 else tmpV.push_back(lct);
675 allLCTs.getTimeMatched(bx, LCTs);
689 std::vector<CSCCorrelatedLCTDigi> LCTs1a;
690 std::vector<CSCCorrelatedLCTDigi> LCTs1b;
696 std::vector<CSCCorrelatedLCTDigi> LCTs_tmp;
697 LCTs_tmp.insert(LCTs_tmp.begin(), LCTs1b.begin(), LCTs1b.end());
698 LCTs_tmp.insert(LCTs_tmp.end(), LCTs1a.begin(), LCTs1a.end());
706 if (LCTs_tmp.size() >
max_lcts) LCTs_tmp.erase(LCTs_tmp.begin()+
max_lcts, LCTs_tmp.end());
708 for (
const auto&
p: LCTs_tmp){
710 if (me==
ME1A and
std::find(LCTs1a.begin(), LCTs1a.end(),
p) != LCTs1a.end()){
711 LCTs_final.push_back(
p);
714 else if(me==
ME1B and
std::find(LCTs1b.begin(), LCTs1b.end(),
p) != LCTs1b.end()){
715 LCTs_final.push_back(
p);
720 if (!LCTs1a.empty() and !LCTs1b.empty() and me==
ME1A)
721 LCTs_final.push_back(*LCTs1a.begin());
722 else if (!LCTs1a.empty() and !LCTs1b.empty() and me==
ME1B)
723 LCTs_final.push_back(*LCTs1b.begin());
724 else if (!LCTs1a.empty() and LCTs1b.empty() and me==
ME1A)
725 LCTs_final.insert(LCTs_final.end(), LCTs1a.begin(), LCTs1a.end());
726 else if (!LCTs1b.empty() and LCTs1a.empty() and me==
ME1B)
727 LCTs_final.insert(LCTs_final.end(), LCTs1b.begin(), LCTs1b.end());
782 if (secondALCT == bestALCT) secondALCT.
clear();
783 if (secondCLCT == bestCLCT) secondCLCT.
clear();
794 const int code = (ok11<<3) | (ok12<<2) | (ok21<<1) | (ok22);
800 if (dbg)
LogTrace(
"CSCGEMMotherboardME11")<<
"debug correlateLCTs in "<<did<<
"\n" 801 <<
"ALCT1: "<<bestALCT<<
"\n" 802 <<
"ALCT2: "<<secondALCT<<
"\n" 803 <<
"CLCT1: "<<bestCLCT<<
"\n" 804 <<
"CLCT2: "<<secondCLCT<<
"\n" 805 <<
"ok 11 12 21 22 code = "<<ok11<<
" "<<ok12<<
" "<<ok21<<
" "<<ok22<<
" "<<code<<std::endl;
807 if ( code==0 )
return;
831 if (dbg)
LogTrace(
"CSCGEMMotherboardME11")<<
"lut 0 1 = "<<lut[code][0]<<
" "<<lut[code][1]<<std::endl;
834 const GEMCoPadDigi& bb_copad = bestMatchingPad<GEMCoPadDigi>(bestALCT, bestCLCT, copads,
p);
835 const GEMCoPadDigi& bs_copad = bestMatchingPad<GEMCoPadDigi>(bestALCT, secondCLCT, copads,
p);
836 const GEMCoPadDigi& sb_copad = bestMatchingPad<GEMCoPadDigi>(secondALCT, bestCLCT, copads,
p);
837 const GEMCoPadDigi& ss_copad = bestMatchingPad<GEMCoPadDigi>(secondALCT, secondCLCT, copads,
p);
840 const GEMPadDigi& bb_pad = bestMatchingPad<GEMPadDigi>(bestALCT, bestCLCT, pads,
p);
841 const GEMPadDigi& bs_pad = bestMatchingPad<GEMPadDigi>(bestALCT, secondCLCT, pads,
p);
842 const GEMPadDigi& sb_pad = bestMatchingPad<GEMPadDigi>(secondALCT, bestCLCT, pads,
p);
843 const GEMPadDigi& ss_pad = bestMatchingPad<GEMPadDigi>(secondALCT, secondCLCT, pads,
p);
846 const bool ok_bb_copad = ok11==1 and ok_bb and bb_copad.
isValid();
847 const bool ok_bs_copad = ok12==1 and ok_bs and bs_copad.isValid();
848 const bool ok_sb_copad = ok21==1 and ok_sb and sb_copad.isValid();
849 const bool ok_ss_copad = ok22==1 and ok_ss and ss_copad.isValid();
851 const bool ok_bb_pad = (not ok_bb_copad) and ok11==1 and ok_bb and bb_pad.isValid();
852 const bool ok_bs_pad = (not ok_bs_copad) and ok12==1 and ok_bs and bs_pad.isValid();
853 const bool ok_sb_pad = (not ok_sb_copad) and ok21==1 and ok_sb and sb_pad.isValid();
854 const bool ok_ss_pad = (not ok_ss_copad) and ok22==1 and ok_ss and ss_pad.isValid();
856 switch (lut[code][0]) {
877 if (dbg)
LogTrace(
"CSCGEMMotherboardME11")<<
"lct1: "<<lct1<<std::endl;
879 switch (lut[code][1]){
896 if (dbg)
LogTrace(
"CSCGEMMotherboardME11")<<
"lct2: "<<lct2<<std::endl;
898 if (dbg)
LogTrace(
"CSCGEMMotherboardME11")<<
"out of correlateLCTs"<<std::endl;
void retrieveGEMPads(const GEMPadDigiCollection *pads, unsigned id)
T getParameter(std::string const &) const
bool gemGeometryAvailable
bool buildLCTfromALCTandGEM_ME1a_
std::vector< CSCCLCTDigi > clctV1b
unsigned int match_trig_window_size
CSCDetId id() const
Get the (concrete) DetId.
const unsigned theTrigChamber
bool isValid() const
check ALCT validity (1 - valid ALCT)
GEMCoPadDigiIdsBX coPads_
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMCoPadDigi &gem, enum CSCPart, int i) const
bool match_earliest_clct_only
bool doesALCTCrossCLCT(const CSCALCTDigi &a, const CSCCLCTDigi &c, int me) const
void clear()
clear this ALCT
static bool sortLCTsByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
int pref[CSCConstants::MAX_LCT_TBINS]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const CSCChamber * cscChamber
matches< GEMCoPadDigi > GEMCoPadDigiIds
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b() const
std::vector< GEMCoPadDigi > gemCoPadV
std::vector< CSCALCTDigi > alctV
void correlateLCTsGEM(const CSCALCTDigi &bestALCT, const CSCALCTDigi &secondALCT, const CSCCLCTDigi &bestCLCT, const CSCCLCTDigi &secondCLCT, const GEMPadDigiIds &pads, const GEMCoPadDigiIds &copads, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, enum CSCPart p) const
unsigned int mpc_block_me1a
void sortLCTs(std::vector< CSCCorrelatedLCTDigi > &lcts, bool(*sorter)(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)) const
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a() const
bool buildLCTfromALCTandGEM_ME1b_
const unsigned theStation
std::unique_ptr< GEMCoPadProcessor > coPadProcessor
const CSCGeometry * csc_g
edm::ParameterSet commonParams_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const unsigned theSubsector
void correlateLCTsGEM(T &best, T &second, const GEMCoPadDigiIds &coPads, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, enum CSCPart) const
~CSCGEMMotherboardME11() override
static bool sortLCTsByGEMDphi(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
void printGEMTriggerCoPads(int bx_start, int bx_stop, enum CSCPart)
unsigned int tmb_l1a_window_size
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
bool isValid() const
check CLCT validity (1 - valid CLCT)
bool dropLowQualityCLCTsNoGEMs_ME1a_
bool dropLowQualityCLCTsNoGEMs_ME1b_
edm::ParameterSet tmbParams_
void getMatched(std::vector< CSCCorrelatedLCTDigi > &) const
std::unique_ptr< CSCGEMMotherboardLUTME11 > tmbLUT_
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
void sortLCTs(std::vector< CSCCorrelatedLCTDigi > &, int bx, enum CSCPart, bool(*sorter)(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)) const
std::vector< CSCCLCTDigi > clctV1a
bool buildLCTfromCLCTandGEM_ME1a_
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::unique_ptr< CSCCathodeLCTProcessor > clct
void clear()
clear this CLCT
matches< GEMPadDigi > GEMPadDigiIds
const GEMGeometry * gem_g
bool buildLCTfromCLCTandGEM_ME1b_
unsigned int tmb_cross_bx_algo
int getKeyWG() const
return key wire group
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
std::vector< CSCCorrelatedLCTDigi > readoutLCTs() const
void printGEMTriggerPads(int bx_start, int bx_stop, enum CSCPart)
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads) override