9 #include "boost/container/flat_set.hpp"
12 { 0,2.441},{ 1,2.435},{ 2,2.425},{ 3,2.414},{ 4,2.404},{ 5,2.394},{ 6,2.384},{ 7,2.374},
13 { 8,2.365},{ 9,2.355},{10,2.346},{11,2.336},{12,2.327},{13,2.317},{14,2.308},{15,2.299},
14 {16,2.290},{17,2.281},{18,2.273},{19,2.264},{20,2.255},{21,2.247},{22,2.238},{23,2.230},
15 {24,2.221},{25,2.213},{26,2.205},{27,2.197},{28,2.189},{29,2.181},{30,2.173},{31,2.165},
16 {32,2.157},{33,2.149},{34,2.142},{35,2.134},{36,2.127},{37,2.119},{38,2.112},{39,2.104},
17 {40,2.097},{41,2.090},{42,2.083},{43,2.075},{44,2.070},{45,2.059},{46,2.054},{47,2.047},
18 {48,2.041},{49,2.034},{50,2.027},{51,2.020},{52,2.014},{53,2.007},{54,2.000},{55,1.994},
19 {56,1.988},{57,1.981},{58,1.975},{59,1.968},{60,1.962},{61,1.956},{62,1.950},{63,1.944},
20 {64,1.937},{65,1.931},{66,1.924},{67,1.916},{68,1.909},{69,1.902},{70,1.895},{71,1.888},
21 {72,1.881},{73,1.875},{74,1.868},{75,1.861},{76,1.854},{77,1.848},{78,1.841},{79,1.835},
22 {80,1.830},{81,1.820},{82,1.815},{83,1.809},{84,1.803},{85,1.796},{86,1.790},{87,1.784},
23 {88,1.778},{89,1.772},{90,1.766},{91,1.760},{92,1.754},{93,1.748},{94,1.742},{95,1.736},
24 {96,1.731},{97,1.725},{98,1.719},{99,1.714},{100,1.708},{101,1.702},{102,1.697},{103,1.691},
25 {104,1.686},{105,1.680},{106,1.675},{107,1.670},{108,1.664},{109,1.659},{110,1.654},{111,1.648},
29 { 0,2.412},{ 1,2.405},{ 2,2.395},{ 3,2.385},{ 4,2.375},{ 5,2.365},{ 6,2.355},{ 7,2.345},
30 { 8,2.335},{ 9,2.325},{10,2.316},{11,2.306},{12,2.297},{13,2.288},{14,2.279},{15,2.270},
31 {16,2.261},{17,2.252},{18,2.243},{19,2.234},{20,2.226},{21,2.217},{22,2.209},{23,2.200},
32 {24,2.192},{25,2.184},{26,2.175},{27,2.167},{28,2.159},{29,2.151},{30,2.143},{31,2.135},
33 {32,2.128},{33,2.120},{34,2.112},{35,2.105},{36,2.097},{37,2.090},{38,2.082},{39,2.075},
34 {40,2.068},{41,2.060},{42,2.053},{43,2.046},{44,2.041},{45,2.030},{46,2.025},{47,2.018},
35 {48,2.011},{49,2.005},{50,1.998},{51,1.991},{52,1.985},{53,1.978},{54,1.971},{55,1.965},
36 {56,1.958},{57,1.952},{58,1.946},{59,1.939},{60,1.933},{61,1.927},{62,1.921},{63,1.915},
37 {64,1.909},{65,1.902},{66,1.895},{67,1.887},{68,1.880},{69,1.873},{70,1.866},{71,1.859},
38 {72,1.853},{73,1.846},{74,1.839},{75,1.832},{76,1.826},{77,1.819},{78,1.812},{79,1.806},
39 {80,1.801},{81,1.792},{82,1.787},{83,1.780},{84,1.774},{85,1.768},{86,1.762},{87,1.756},
40 {88,1.750},{89,1.744},{90,1.738},{91,1.732},{92,1.726},{93,1.720},{94,1.714},{95,1.708},
41 {96,1.702},{97,1.697},{98,1.691},{99,1.685},{100,1.680},{101,1.674},{102,1.669},{103,1.663},
42 {104,1.658},{105,1.652},{106,1.647},{107,1.642},{108,1.636},{109,1.631},{110,1.626},{111,1.621},
50 {3, 0.01832829, 0.01003643 },
51 {5, 0.01095490, 0.00631625 },
52 {7, 0.00786026, 0.00501017 },
53 {10, 0.00596349, 0.00414560 },
54 {15, 0.00462411, 0.00365550 },
55 {20, 0.00435298, 0.00361550 },
56 {30, 0.00465160, 0.00335700 },
57 {40, 0.00372145, 0.00366262 }
61 unsigned sector,
unsigned subsector,
70 <<
"+++ Upgrade CSCMotherboardME21GEM constructed while isSLHC is not set! +++\n";
88 pref[
m-1] = pref[0] -
m/2;
89 pref[
m] = pref[0] +
m/2;
170 for (
int i=0;
i<2;
i++)
191 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
198 bool gemGeometryAvailable(
false);
199 if (
gem_g !=
nullptr) {
201 <<
"+++ run() called for GEM-CSC integrated trigger! +++ \n";
202 gemGeometryAvailable =
true;
208 const CSCDetId csc_id(cscChamber->id());
213 if ((not gemGeometryAvailable)
or (gemGeometryAvailable and (
gem_g->
stations()).
size()==2)) {
215 <<
"+++ run() called for GEM-CSC integrated trigger without valid GE21 geometry! +++ \n";
220 const CSCLayer* keyLayer(cscChamber->layer(3));
225 const bool isEven(csc_id.chamber()%2==0);
226 const GEMDetId gem_id_long(region, 1, 3, 1, csc_id.chamber(), 0);
233 std::cout<<
"csc id "<< csc_id <<
" "<< csc_id.rawId() << (isEven ?
" even" :
" odd") <<
" chamber" << csc_id.chamber()<<std::endl;
234 if (gemRollToEtaLimits_.size())
235 for(
auto p : gemRollToEtaLimits_) {
236 std::cout <<
"pad "<<
p.first <<
" min eta " << (
p.second).
first <<
" max eta " << (
p.second).second << std::endl;
241 const int numberOfWG(keyLayerGeometry->numberOfWireGroups());
242 for (
int i = 0;
i< numberOfWG; ++
i){
248 std::cout <<
"WG "<<
p.first <<
" GEM roll " <<
p.second << std::endl;
252 auto randRoll(gemChamberLong->etaPartition(2));
253 auto nStrips(keyLayerGeometry->numberOfStrips());
254 for (
float i = 0;
i< nStrips;
i =
i+0.5){
255 const LocalPoint lpCSC(keyLayerGeometry->topology()->localPosition(
i));
257 const LocalPoint lpGEM(randRoll->toLocal(gp));
259 const bool edge(HS < 5 or HS > 155);
260 const float pad(edge ? -99 : randRoll->pad(lpGEM));
262 cscHsToGemPad_[HS] = std::make_pair(std::floor(pad),std::ceil(pad));
265 std::cout <<
"detId " << csc_id << std::endl;
267 std::cout <<
"CSC HS "<<
p.first <<
" GEM Pad low " << (
p.second).
first <<
" GEM Pad high " << (
p.second).second << std::endl;
272 const int nGEMPads(randRoll->npads());
273 for (
int i = 0;
i< nGEMPads; ++
i){
276 const LocalPoint lpCSC(keyLayer->toLocal(gp));
277 const float strip(keyLayerGeometry->strip(lpCSC));
282 std::cout <<
"detId " << csc_id << std::endl;
284 std::cout <<
"GEM Pad "<<
p.first <<
" CSC HS : " <<
p.second << std::endl;
301 int used_clct_mask[20];
302 for (
int c=0;
c<20;++
c) used_clct_mask[
c]=0;
304 const bool hasPads(
pads_.size()!=0);
305 const bool hasCoPads(hasPads and
coPads_.size()!=0);
310 if (
alct->bestALCT[bx_alct].isValid())
318 std::cout <<
"========================================================================" << std::endl;
319 std::cout <<
"ALCT-CLCT matching in ME2/1 chamber: " << cscChamber->id() << std::endl;
320 std::cout <<
"------------------------------------------------------------------------" << std::endl;
322 alct->bestALCT[bx_alct].print();
323 std::cout <<
"+++ Second ALCT Details: ";
324 alct->secondALCT[bx_alct].print();
328 std::cout <<
"------------------------------------------------------------------------" << std::endl;
329 std::cout <<
"Attempt ALCT-CLCT matching in ME2/1 in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
333 int nSuccesFulMatches = 0;
334 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
338 if (
clct->bestCLCT[bx_clct].isValid())
341 const int quality(
clct->bestCLCT[bx_clct].getQuality());
343 const bool lowQualityALCT(
alct->bestALCT[bx_alct].getQuality() == 0);
345 const bool lowQuality(
quality<4
or lowQualityALCT);
352 int nFound(matchingPads.size());
353 const bool clctInEdge(
clct->bestCLCT[bx_clct].getKeyStrip() < 5
or clct->bestCLCT[bx_clct].getKeyStrip() > 155);
370 int nFound(matchingCoPads.size());
371 if (nFound != 0 and bx_alct == 6 and bx_clct != 6){
379 int mbx = bx_clct-bx_clct_start;
382 clct->bestCLCT[bx_clct],
clct->secondCLCT[bx_clct],
383 allLCTs[bx_alct][mbx][0],
allLCTs[bx_alct][mbx][1], matchingPads, matchingCoPads);
386 std::cout <<
"Successful ALCT-CLCT match in ME21: bx_alct = " << bx_alct
387 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
388 <<
"]; bx_clct = " << bx_clct << std::endl;
390 clct->bestCLCT[bx_clct].print();
391 std::cout <<
"+++ Second CLCT Details: ";
392 clct->secondCLCT[bx_clct].print();
394 if (
allLCTs[bx_alct][mbx][0].isValid()) {
395 used_clct_mask[bx_clct] += 1;
402 int nSuccesFulGEMMatches = 0;
405 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
413 if (copads.size()==0) {
419 if (
allLCTs[bx_alct][0][0].isValid()) {
420 ++nSuccesFulGEMMatches;
424 std::cout <<
"Successful ALCT-GEM CoPad match in ME21: bx_alct = " << bx_alct << std::endl << std::endl;
425 std::cout <<
"------------------------------------------------------------------------" << std::endl << std::endl;
431 std::cout <<
"========================================================================" << std::endl;
433 if (nSuccesFulMatches>1)
434 std::cout <<
"Too many successful ALCT-CLCT matches in ME21: " << nSuccesFulMatches
435 <<
", CSCDetId " << cscChamber->id()
436 <<
", bx_alct = " << bx_alct
437 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
438 else if (nSuccesFulMatches==1)
439 std::cout <<
"1 successful ALCT-CLCT match in ME21: "
440 <<
" CSCDetId " << cscChamber->id()
441 <<
", bx_alct = " << bx_alct
442 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
443 else if (nSuccesFulGEMMatches==1)
444 std::cout <<
"1 successful ALCT-GEM match in ME21: "
445 <<
" CSCDetId " << cscChamber->id()
446 <<
", bx_alct = " << bx_alct
447 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
449 std::cout <<
"Unsuccessful ALCT-CLCT match in ME21: "
450 <<
"CSCDetId " << cscChamber->id()
451 <<
", bx_alct = " << bx_alct
452 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
463 std::cout <<
"========================================================================" << std::endl;
465 std::cout <<
"GEM-CLCT matching in ME2/1 chamber: "<< cscChamber->id()<<
"in bx:"<<bx_alct<<std::endl;
466 std::cout <<
"------------------------------------------------------------------------" << std::endl;
469 int nSuccesFulMatches = 0;
474 if (
clct->bestCLCT[bx_alct].isValid())
476 const int quality(
clct->bestCLCT[bx_alct].getQuality());
482 int mbx =
std::abs(
clct->bestCLCT[bx_alct].getBX()-bx_alct);
488 std::cout <<
"Successful GEM-CLCT match in ME21: bx_alct = " << bx_alct <<std::endl;
492 clct->bestCLCT[bx_alct].print();
493 std::cout <<
"+++ Second CLCT Details: ";
494 clct->secondCLCT[bx_alct].print();
496 if (
allLCTs[bx_gem][mbx][0].isValid()) {
497 used_clct_mask[bx_alct] += 1;
514 for (
int i=0;
i<2;
i++)
516 int cbx = bx + mbx - match_trig_window_size/2;
521 <<
"LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs[bx][mbx][
i]<<std::endl;
530 for (
int i=0;
i<2;
i++)
541 for (
int i=0;
i<2;
i++)
543 int cbx = bx + mbx - match_trig_window_size/2;
552 <<
"bx "<<bx<<
" nnLCT:"<<n<<
" "<<n<<std::endl;
560 std::cout <<
"========================================================================" << std::endl;
561 std::cout <<
"Counting the final LCTs" << std::endl;
562 std::cout <<
"========================================================================" << std::endl;
582 std::vector<CSCCorrelatedLCTDigi>
result;
584 std::vector<CSCCorrelatedLCTDigi> tmpV;
587 result.insert(result.end(), tmpV.begin(), tmpV.end());
591 result.insert(result.end(), tmpV.begin(), tmpV.end());
595 for (
int i=0;
i<2;
i++) {
596 if (
allLCTs[bx][mbx][
i].isValid()) {
597 result.push_back(
allLCTs[bx][mbx][
i]);
609 std::vector<CSCCorrelatedLCTDigi> LCTs;
612 for (
int i=0;
i<2;
i++)
614 LCTs.push_back(
allLCTs[bx][mbx][
i]);
631 std::vector<CSCCorrelatedLCTDigi> LCTs;
634 for (
int i=0;
i<2;
i++)
636 LCTs.push_back(
allLCTs[bx][mbx][
i]);
655 const int nPads(pads.size());
656 const int nCoPads(copads.size());
657 const bool hasPads(nPads!=0);
658 const bool hasCoPads(nCoPads!=0);
660 bool anodeBestValid = bestALCT.
isValid();
661 bool anodeSecondValid = secondALCT.
isValid();
662 bool cathodeBestValid = bestCLCT.
isValid();
663 bool cathodeSecondValid = secondCLCT.
isValid();
665 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
666 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
667 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
668 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
680 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
697 bool anodeBestValid = bestALCT.
isValid();
698 bool anodeSecondValid = secondALCT.
isValid();
700 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
701 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
727 bool cathodeBestValid = bestCLCT.
isValid();
728 bool cathodeSecondValid = secondCLCT.
isValid();
730 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
731 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
763 int bx = alct.
getBX();
772 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
790 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
812 return CSCCorrelatedLCTDigi(0, 1, quality, wg, clct.
getKeyStrip(),
pattern, clct.
getBend(), bx, 0, 0, 0,
theTrigChamber);
828 return CSCCorrelatedLCTDigi(0, 1, quality, wg, 0, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
834 bool hasPad,
bool hasCoPad)
855 bool hasPad,
bool hasCoPad)
873 if (isDistrip) {quality = 4;}
882 if (sumQual < 1 || sumQual > 6) {
884 <<
"+++ findQuality: sumQual = " << sumQual <<
"+++ \n";
887 if (sumQual == 2) {quality = 6;}
888 else if (sumQual == 3) {quality = 7;}
889 else if (sumQual == 4) {quality = 8;}
890 else if (sumQual == 5) {quality = 9;}
891 else if (sumQual == 6) {quality = 10;}
894 if (sumQual == 2) {quality = 11;}
895 else if (sumQual == 3) {quality = 12;}
896 else if (sumQual == 4) {quality = 13;}
897 else if (sumQual == 5) {quality = 14;}
898 else if (sumQual == 6) {quality = 15;}
919 if (sumQual < 1 || sumQual > 6) {
921 <<
"+++ findQuality: Unexpected sumQual = " << sumQual <<
"+++\n";
930 quality = offset + sumQual;
948 if (hasPad) n_gem = 1;
949 if (hasCoPad) n_gem = 2;
953 if (!a4 && !c4) quality = 5;
954 else if ( a4 && !c4) quality = 6;
955 else if (!a4 && c4) quality = 7;
956 else if ( a4 && c4) {
965 else if (
pattern == 10) quality = 15;
968 <<
"+++ findQuality: Unexpected CLCT pattern id = "
987 for (
auto det_range = out_pads->begin(); det_range != out_pads->end(); ++det_range) {
988 const GEMDetId&
id = (*det_range).first;
992 id.ring() != csc_id.
ring()
or id.chamber() != csc_id.
chamber())
continue;
995 if (
id.
station() != 3)
continue;
998 if (
id.layer() != 1)
continue;
1003 auto co_pads_range = out_pads->get(co_id);
1005 if (co_pads_range.first == co_pads_range.second)
continue;
1008 const auto& pads_range = (*det_range).second;
1009 for (
auto p = pads_range.first;
p != pads_range.second; ++
p) {
1010 for (
auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p) {
1018 out_co_pads.insertDigi(
id,
GEMCoPadDigi(
id.roll(),*
p,*co_p));
1025 std::map<int,std::pair<double,double> >
1028 std::map<int,std::pair<double,double> >
result;
1031 if (chamber==
nullptr)
return result;
1033 for(
int i = 1;
i<= chamber->nEtaPartitions(); ++
i){
1034 auto roll(chamber->etaPartition(
i));
1035 if (roll==
nullptr)
continue;
1036 const float half_striplength(roll->specs()->specificTopology().stripLength()/2.);
1037 const LocalPoint lp_top(0., half_striplength, 0.);
1038 const LocalPoint lp_bottom(0., -half_striplength, 0.);
1040 const GlobalPoint gp_bottom(roll->toGlobal(lp_bottom));
1042 result[
i] = std::make_pair(gp_top.eta(), gp_bottom.eta());
1050 for (
auto ch : superChamber->chambers()) {
1051 for (
auto roll : ch->etaPartitions()) {
1053 auto pads_in_det = gemPads->get(roll_id);
1054 for (
auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
1055 auto id_pad = std::make_pair(roll_id, &(*pad));
1058 pads_[bx].push_back(id_pad);
1068 for (
auto ch : superChamber->chambers()) {
1069 for (
auto roll : ch->etaPartitions()) {
1071 auto pads_in_det = gemPads->get(roll_id);
1072 for (
auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
1074 auto id_pad = std::make_pair(roll_id, &gfirst);
1078 coPads_[bx].push_back(id_pad);
1089 const bool hasPads(thePads.size()!=0);
1091 std::cout <<
"------------------------------------------------------------------------" << std::endl;
1093 for (
int bx = bx_start; bx <= bx_stop; bx++) {
1096 std::vector<std::pair<unsigned int, const GEMPadDigi*> > in_pads = thePads[bx];
1098 if (!iscopad)
std::cout <<
"* GEM trigger pads: " << std::endl;
1099 else std::cout <<
"* GEM trigger coincidence pads: " << std::endl;
1102 if (!iscopad)
std::cout <<
"N(pads) BX " << bx <<
" : " << in_pads.size() << std::endl;
1103 else std::cout <<
"N(copads) BX " << bx <<
" : " << in_pads.size() << std::endl;
1105 for (
auto pad : in_pads){
1107 std::cout <<
"\tdetId " << pad.first <<
" " << roll_id <<
", pad = " << pad.second->pad() <<
", BX = " << pad.second->bx() + 6 << std::endl;
1124 int clct_bx = clct.
getBX();
1127 const bool debug(
false);
1128 if (debug)
std::cout <<
"lowpad " << lowPad <<
" highpad " << highPad <<
" delta pad " << deltaPad <<std::endl;
1131 auto padRoll((
p.second)->pad());
1133 if (debug)
std::cout <<
"padRoll " << padRoll << std::endl;
1134 if (
std::abs(clct_bx-pad_bx)>deltaBX)
continue;
1136 if (debug)
std::cout <<
"++Matches! " << std::endl;
1137 result.push_back(
p);
1138 if (first)
return result;
1150 int alct_bx = alct.
getBX();
1152 std::vector<int> Rolls;
1159 const bool debug(
false);
1161 for (
auto alctRoll : Rolls)
1163 if (debug)
std::cout <<
"roll " << alctRoll << std::endl;
1168 if (debug)
std::cout <<
"Candidate ALCT: " << padRoll << std::endl;
1169 if (
std::abs(alct_bx-pad_bx)>deltaBX)
continue;
1170 if (alctRoll != padRoll)
continue;
1171 if (debug)
std::cout <<
"++Matches! " << std::endl;
1172 result.push_back(
p);
1173 if (first)
return result;
1182 bool isCoPad,
bool first)
1190 const bool debug(
false);
1191 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
1193 for (
auto p : padsAlct){
1194 if (debug)
std::cout<<
"Candidate ALCT: " <<
p.first <<
" " << *(
p.second) << std::endl;
1195 for (
auto q: padsClct){
1196 if (debug)
std::cout<<
"++Candidate CLCT: " <<
q.first <<
" " << *(
q.second) << std::endl;
1198 if ((
p.first !=
q.first)
or GEMPadDigi(*(
p.second)) != *(
q.second))
continue;
1199 if (debug)
std::cout <<
"++Matches! " << std::endl;
1200 result.push_back(
p);
1201 if (first)
return result;
1204 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
1365 const float minEta((
p.second).first);
1366 const float maxEta((
p.second).second);
1367 if (minEta <= eta and eta <= maxEta) {
int getQuality() const
return quality of a pattern (number of layers hit!)
std::vector< GEMCoPadDigi > readoutCoPads()
T getParameter(std::string const &) const
std::vector< CSCCorrelatedLCTDigi > getLCTs()
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), bool isCopad=false, bool first=true)
unsigned int clct_trig_enable
CSCChamber * chamber(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned tcscid) const
Return the CSCChamber for a corresponding endcap/station/sector/subsector/trigger cscid...
unsigned int findQualityGEM(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT, bool hasPad, bool hasCoPad)
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static bool sortByGEMDphi(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
unsigned int match_trig_window_size
const unsigned theTrigChamber
bool isValid() const
check ALCT validity (1 - valid ALCT)
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
bool promoteALCTGEMquality_
unsigned int tmb_cross_bx_algo
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx)
bool promoteCLCTGEMquality_
int getStripType() const
return striptype
int deltaPad(int hs, int pad)
int getBend() const
return bend
double gem_match_delta_phi_odd
GEM matching dphi and deta.
U second(std::pair< T, U > const &p)
bool dropLowQualityALCTsNoGEMs_
const unsigned theStation
int assignGEMRoll(double eta)
void retrieveGEMPads(const GEMPadDigiCollection *pads, unsigned id)
static CSCTriggerGeomManager * get()
static const double lut_wg_eta_odd[112][2]
double gem_match_delta_eta
const unsigned theSubsector
int getBX() const
return BX
unsigned int encodePattern(const int ptn, const int highPt)
bool do_gem_matching
Do GEM matching?
Abs< T >::type abs(const T &t)
std::vector< GEMPadBX > GEMPadsBX
bool correctLCTtimingWithGEM_
double gem_match_min_eta
min eta of LCT for which we require GEM match (we don't throw out LCTs below this min eta) ...
bool isValid() const
check CLCT validity (1 - valid CLCT)
unsigned int match_trig_enable
unsigned int max_me21_lcts
MuonDigiCollection< GEMDetId, GEMCoPadDigi > GEMCoPadDigiCollection
std::map< int, std::pair< double, double > > createGEMRollEtaLUT()
const GEMSuperChamber * superChamber(GEMDetId id) const
double gem_match_delta_phi_even
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
short int zendcap() const
int getQuality() const
return quality of a pattern
static const double lut_pt_vs_dphi_gemcsc[8][3]
int getAccelerator() const
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads)
std::map< int, std::pair< int, int > > cscHsToGemPad_
int getPattern() const
return pattern
const GEMChamber * chamber(GEMDetId id) const
std::map< int, int > gemPadToCscHs_
bool buildLCTfromALCTandGEM_
CSCCorrelatedLCTDigi allLCTs[MAX_LCT_BINS][15][2]
int gem_match_delta_bx
delta BX for GEM pads matching
const GEMGeometry * gem_g
unsigned int alct_trig_enable
bool buildLCTfromCLCTandGEM_
std::vector< GEMCoPadDigi > gemCoPadV
std::unique_ptr< CSCAnodeLCTProcessor > alct
void buildCoincidencePads(const GEMPadDigiCollection *out_pads, GEMCoPadDigiCollection &out_co_pads, CSCDetId csc_id)
void printGEMTriggerPads(int minBX, int maxBx, bool iscopad=false)
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, bool oldDataFormat=false)
bool doLCTGhostBustingWithGEMs_
std::vector< CSCCorrelatedLCTDigi > sortLCTsByGEMDPhi(int bx)
bool dropLowQualityCLCTsNoGEMs_
std::unique_ptr< CSCCathodeLCTProcessor > clct
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
const std::vector< const GEMStation * > & stations() const
Return a vector of all GEM stations.
CSCMotherboardME21GEM(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned chamber, const edm::ParameterSet &conf)
void retrieveGEMCoPads(const GEMCoPadDigiCollection *pads, unsigned id)
bool match_earliest_clct_me21_only
bool useOldLCTDataFormat_
void correlateLCTsGEM(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, GEMPadDigi gemPad, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2)
std::map< int, int > cscWgToGemRoll_
int getKeyWG() const
return key wire group
tuple size
Write out results.
bool gem_clear_nomatch_lcts
whether to throw out GEM-fiducial LCTs that have no gem match
bool promoteALCTGEMpattern_
static bool sortByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
static const double lut_wg_eta_even[112][2]