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;
152 for (
int i=0;
i<2;
i++)
173 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
180 bool gemGeometryAvailable(
false);
181 if (
gem_g !=
nullptr) {
183 <<
"+++ run() called for GEM-CSC integrated trigger! +++ \n";
184 gemGeometryAvailable =
true;
190 const CSCDetId csc_id(cscChamber->id());
195 if ((not gemGeometryAvailable)
or (gemGeometryAvailable and (
gem_g->
stations()).
size()==2)) {
197 <<
"+++ run() called for GEM-CSC integrated trigger without valid GE21 geometry! +++ \n";
202 const CSCLayer* keyLayer(cscChamber->layer(3));
207 const bool isEven(csc_id.chamber()%2==0);
208 const GEMDetId gem_id_long(region, 1, 2, 1, csc_id.chamber(), 0);
215 std::cout<<
"csc id "<< csc_id <<
" "<< csc_id.rawId() << (isEven ?
" even" :
" odd") <<
" chamber" << csc_id.chamber()<<std::endl;
216 if (gemRollToEtaLimits_.size())
217 for(
auto p : gemRollToEtaLimits_) {
218 std::cout <<
"pad "<<
p.first <<
" min eta " << (
p.second).
first <<
" max eta " << (
p.second).second << std::endl;
223 const int numberOfWG(keyLayerGeometry->numberOfWireGroups());
224 for (
int i = 0;
i< numberOfWG; ++
i){
230 std::cout <<
"WG "<<
p.first <<
" GEM roll " <<
p.second << std::endl;
234 auto randRoll(gemChamberLong->etaPartition(2));
235 auto nStrips(keyLayerGeometry->numberOfStrips());
236 for (
float i = 0;
i< nStrips;
i =
i+0.5){
237 const LocalPoint lpCSC(keyLayerGeometry->topology()->localPosition(
i));
241 const bool edge(HS < 5 or HS > 155);
242 const float pad(edge ? -99 : randRoll->pad(lpGEM));
244 cscHsToGemPad_[HS] = std::make_pair(std::floor(pad),std::ceil(pad));
247 std::cout <<
"detId " << csc_id << std::endl;
249 std::cout <<
"CSC HS "<<
p.first <<
" GEM Pad low " << (
p.second).
first <<
" GEM Pad high " << (
p.second).second << std::endl;
254 const int nGEMPads(randRoll->npads());
255 for (
int i = 0;
i< nGEMPads; ++
i){
259 const float strip(keyLayerGeometry->strip(lpCSC));
264 std::cout <<
"detId " << csc_id << std::endl;
266 std::cout <<
"GEM Pad "<<
p.first <<
" CSC HS : " <<
p.second << std::endl;
283 int used_clct_mask[20];
284 for (
int c=0;
c<20;++
c) used_clct_mask[
c]=0;
286 const bool hasPads(
pads_.size()!=0);
287 const bool hasCoPads(hasPads and
coPads_.size()!=0);
292 if (
alct->bestALCT[bx_alct].isValid())
300 std::cout <<
"========================================================================" << std::endl;
301 std::cout <<
"ALCT-CLCT matching in ME2/1 chamber: " << cscChamber->id() << std::endl;
302 std::cout <<
"------------------------------------------------------------------------" << std::endl;
304 alct->bestALCT[bx_alct].print();
305 std::cout <<
"+++ Second ALCT Details: ";
306 alct->secondALCT[bx_alct].print();
310 std::cout <<
"------------------------------------------------------------------------" << std::endl;
311 std::cout <<
"Attempt ALCT-CLCT matching in ME2/1 in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
315 int nSuccesFulMatches = 0;
316 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
320 if (
clct->bestCLCT[bx_clct].isValid())
323 const int quality(
clct->bestCLCT[bx_clct].getQuality());
325 const bool lowQualityALCT(
alct->bestALCT[bx_alct].getQuality() == 0);
327 const bool lowQuality(
quality<4
or lowQualityALCT);
334 int nFound(matchingPads.size());
335 const bool clctInEdge(
clct->bestCLCT[bx_clct].getKeyStrip() < 5
or clct->bestCLCT[bx_clct].getKeyStrip() > 155);
352 int nFound(matchingCoPads.size());
353 if (nFound != 0 and bx_alct == 6 and bx_clct != 6){
361 int mbx = bx_clct-bx_clct_start;
364 clct->bestCLCT[bx_clct],
clct->secondCLCT[bx_clct],
365 allLCTs[bx_alct][mbx][0],
allLCTs[bx_alct][mbx][1], matchingPads, matchingCoPads);
368 std::cout <<
"Successful ALCT-CLCT match in ME21: bx_alct = " << bx_alct
369 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
370 <<
"]; bx_clct = " << bx_clct << std::endl;
372 clct->bestCLCT[bx_clct].print();
373 std::cout <<
"+++ Second CLCT Details: ";
374 clct->secondCLCT[bx_clct].print();
376 if (
allLCTs[bx_alct][mbx][0].isValid()) {
377 used_clct_mask[bx_clct] += 1;
384 int nSuccesFulGEMMatches = 0;
387 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
395 if (copads.size()==0) {
401 if (
allLCTs[bx_alct][0][0].isValid()) {
402 ++nSuccesFulGEMMatches;
406 std::cout <<
"Successful ALCT-GEM CoPad match in ME21: bx_alct = " << bx_alct << std::endl << std::endl;
407 std::cout <<
"------------------------------------------------------------------------" << std::endl << std::endl;
413 std::cout <<
"========================================================================" << std::endl;
415 if (nSuccesFulMatches>1)
416 std::cout <<
"Too many successful ALCT-CLCT matches in ME21: " << nSuccesFulMatches
417 <<
", CSCDetId " << cscChamber->id()
418 <<
", bx_alct = " << bx_alct
419 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
420 else if (nSuccesFulMatches==1)
421 std::cout <<
"1 successful ALCT-CLCT match in ME21: "
422 <<
" CSCDetId " << cscChamber->id()
423 <<
", bx_alct = " << bx_alct
424 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
425 else if (nSuccesFulGEMMatches==1)
426 std::cout <<
"1 successful ALCT-GEM match in ME21: "
427 <<
" CSCDetId " << cscChamber->id()
428 <<
", bx_alct = " << bx_alct
429 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
431 std::cout <<
"Unsuccessful ALCT-CLCT match in ME21: "
432 <<
"CSCDetId " << cscChamber->id()
433 <<
", bx_alct = " << bx_alct
434 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
445 std::cout <<
"========================================================================" << std::endl;
447 std::cout <<
"GEM-CLCT matching in ME2/1 chamber: "<< cscChamber->id()<<
"in bx:"<<bx_alct<<std::endl;
448 std::cout <<
"------------------------------------------------------------------------" << std::endl;
451 int nSuccesFulMatches = 0;
456 if (
clct->bestCLCT[bx_alct].isValid())
458 const int quality(
clct->bestCLCT[bx_alct].getQuality());
464 int mbx =
std::abs(
clct->bestCLCT[bx_alct].getBX()-bx_alct);
470 std::cout <<
"Successful GEM-CLCT match in ME21: bx_alct = " << bx_alct <<std::endl;
474 clct->bestCLCT[bx_alct].print();
475 std::cout <<
"+++ Second CLCT Details: ";
476 clct->secondCLCT[bx_alct].print();
478 if (
allLCTs[bx_gem][mbx][0].isValid()) {
479 used_clct_mask[bx_alct] += 1;
493 for (
int i=0;
i<2;
i++)
495 int cbx = bx + mbx - match_trig_window_size/2;
500 <<
"LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs[bx][mbx][
i]<<std::endl;
509 for (
int i=0;
i<2;
i++)
520 for (
int i=0;
i<2;
i++)
522 int cbx = bx + mbx - match_trig_window_size/2;
531 <<
"bx "<<bx<<
" nnLCT:"<<n<<
" "<<n<<std::endl;
539 std::cout <<
"========================================================================" << std::endl;
540 std::cout <<
"Counting the final LCTs" << std::endl;
541 std::cout <<
"========================================================================" << std::endl;
561 std::vector<CSCCorrelatedLCTDigi>
result;
563 std::vector<CSCCorrelatedLCTDigi> tmpV;
566 result.insert(result.end(), tmpV.begin(), tmpV.end());
570 result.insert(result.end(), tmpV.begin(), tmpV.end());
574 for (
int i=0;
i<2;
i++) {
575 if (
allLCTs[bx][mbx][
i].isValid()) {
576 result.push_back(
allLCTs[bx][mbx][
i]);
588 std::vector<CSCCorrelatedLCTDigi> LCTs;
591 for (
int i=0;
i<2;
i++)
593 LCTs.push_back(
allLCTs[bx][mbx][
i]);
610 std::vector<CSCCorrelatedLCTDigi> LCTs;
613 for (
int i=0;
i<2;
i++)
615 LCTs.push_back(
allLCTs[bx][mbx][
i]);
634 const int nPads(pads.size());
635 const int nCoPads(copads.size());
636 const bool hasPads(nPads!=0);
637 const bool hasCoPads(nCoPads!=0);
639 bool anodeBestValid = bestALCT.
isValid();
640 bool anodeSecondValid = secondALCT.
isValid();
641 bool cathodeBestValid = bestCLCT.
isValid();
642 bool cathodeSecondValid = secondCLCT.
isValid();
644 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
645 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
646 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
647 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
659 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
676 bool anodeBestValid = bestALCT.
isValid();
677 bool anodeSecondValid = secondALCT.
isValid();
679 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
680 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
706 bool cathodeBestValid = bestCLCT.
isValid();
707 bool cathodeSecondValid = secondCLCT.
isValid();
709 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
710 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
742 int bx = alct.
getBX();
751 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
769 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
791 return CSCCorrelatedLCTDigi(0, 1, quality, wg, clct.
getKeyStrip(),
pattern, clct.
getBend(), bx, 0, 0, 0,
theTrigChamber);
807 return CSCCorrelatedLCTDigi(0, 1, quality, wg, 0, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
813 bool hasPad,
bool hasCoPad)
834 bool hasPad,
bool hasCoPad)
852 if (isDistrip) {quality = 4;}
861 if (sumQual < 1 || sumQual > 6) {
863 <<
"+++ findQuality: sumQual = " << sumQual <<
"+++ \n";
866 if (sumQual == 2) {quality = 6;}
867 else if (sumQual == 3) {quality = 7;}
868 else if (sumQual == 4) {quality = 8;}
869 else if (sumQual == 5) {quality = 9;}
870 else if (sumQual == 6) {quality = 10;}
873 if (sumQual == 2) {quality = 11;}
874 else if (sumQual == 3) {quality = 12;}
875 else if (sumQual == 4) {quality = 13;}
876 else if (sumQual == 5) {quality = 14;}
877 else if (sumQual == 6) {quality = 15;}
898 if (sumQual < 1 || sumQual > 6) {
900 <<
"+++ findQuality: Unexpected sumQual = " << sumQual <<
"+++\n";
909 quality = offset + sumQual;
927 if (hasPad) n_gem = 1;
928 if (hasCoPad) n_gem = 2;
932 if (!a4 && !c4) quality = 5;
933 else if ( a4 && !c4) quality = 6;
934 else if (!a4 && c4) quality = 7;
935 else if ( a4 && c4) {
944 else if (
pattern == 10) quality = 15;
947 <<
"+++ findQuality: Unexpected CLCT pattern id = "
966 for (
auto det_range = out_pads->begin(); det_range != out_pads->end(); ++det_range) {
967 const GEMDetId&
id = (*det_range).first;
971 id.ring() != csc_id.
ring()
or id.chamber() != csc_id.
chamber())
continue;
974 if (
id.
station() != 2)
continue;
977 if (
id.layer() != 1)
continue;
982 auto co_pads_range = out_pads->get(co_id);
984 if (co_pads_range.first == co_pads_range.second)
continue;
987 const auto& pads_range = (*det_range).second;
988 for (
auto p = pads_range.first;
p != pads_range.second; ++
p) {
989 for (
auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p) {
997 out_co_pads.insertDigi(
id,
GEMCoPadDigi(
id.roll(),*
p,*co_p));
1004 std::map<int,std::pair<double,double> >
1007 std::map<int,std::pair<double,double> >
result;
1010 if (chamber==
nullptr)
return result;
1012 for(
int i = 1;
i<= chamber->nEtaPartitions(); ++
i){
1013 auto roll(chamber->etaPartition(
i));
1014 if (roll==
nullptr)
continue;
1015 const float half_striplength(roll->specs()->specificTopology().stripLength()/2.);
1016 const LocalPoint lp_top(0., half_striplength, 0.);
1017 const LocalPoint lp_bottom(0., -half_striplength, 0.);
1019 const GlobalPoint gp_bottom(roll->toGlobal(lp_bottom));
1021 result[
i] = std::make_pair(gp_top.eta(), gp_bottom.eta());
1029 for (
auto ch : superChamber->chambers()) {
1030 for (
auto roll : ch->etaPartitions()) {
1032 auto pads_in_det = gemPads->get(roll_id);
1033 for (
auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
1034 auto id_pad = std::make_pair(roll_id, &(*pad));
1037 pads_[bx].push_back(id_pad);
1047 for (
auto ch : superChamber->chambers()) {
1048 for (
auto roll : ch->etaPartitions()) {
1050 auto pads_in_det = gemPads->get(roll_id);
1051 for (
auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
1053 auto id_pad = std::make_pair(roll_id, &gfirst);
1057 coPads_[bx].push_back(id_pad);
1068 const bool hasPads(thePads.size()!=0);
1070 std::cout <<
"------------------------------------------------------------------------" << std::endl;
1072 for (
int bx = bx_start; bx <= bx_stop; bx++) {
1075 std::vector<std::pair<unsigned int, const GEMPadDigi*> > in_pads = thePads[bx];
1077 if (!iscopad)
std::cout <<
"* GEM trigger pads: " << std::endl;
1078 else std::cout <<
"* GEM trigger coincidence pads: " << std::endl;
1081 if (!iscopad)
std::cout <<
"N(pads) BX " << bx <<
" : " << in_pads.size() << std::endl;
1082 else std::cout <<
"N(copads) BX " << bx <<
" : " << in_pads.size() << std::endl;
1084 for (
auto pad : in_pads){
1086 std::cout <<
"\tdetId " << pad.first <<
" " << roll_id <<
", pad = " << pad.second->pad() <<
", BX = " << pad.second->bx() + 6 << std::endl;
1103 int clct_bx = clct.
getBX();
1106 const bool debug(
false);
1107 if (debug)
std::cout <<
"lowpad " << lowPad <<
" highpad " << highPad <<
" delta pad " << deltaPad <<std::endl;
1110 auto padRoll((
p.second)->pad());
1112 if (debug)
std::cout <<
"padRoll " << padRoll << std::endl;
1113 if (
std::abs(clct_bx-pad_bx)>deltaBX)
continue;
1115 if (debug)
std::cout <<
"++Matches! " << std::endl;
1116 result.push_back(
p);
1117 if (first)
return result;
1129 int alct_bx = alct.
getBX();
1131 std::vector<int> Rolls;
1138 const bool debug(
false);
1140 for (
auto alctRoll : Rolls)
1142 if (debug)
std::cout <<
"roll " << alctRoll << std::endl;
1147 if (debug)
std::cout <<
"Candidate ALCT: " << padRoll << std::endl;
1148 if (
std::abs(alct_bx-pad_bx)>deltaBX)
continue;
1149 if (alctRoll != padRoll)
continue;
1150 if (debug)
std::cout <<
"++Matches! " << std::endl;
1151 result.push_back(
p);
1152 if (first)
return result;
1161 bool isCoPad,
bool first)
1169 const bool debug(
false);
1170 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
1172 for (
auto p : padsAlct){
1173 if (debug)
std::cout<<
"Candidate ALCT: " <<
p.first <<
" " << *(
p.second) << std::endl;
1174 for (
auto q: padsClct){
1175 if (debug)
std::cout<<
"++Candidate CLCT: " <<
q.first <<
" " << *(
q.second) << std::endl;
1177 if ((
p.first !=
q.first)
or GEMPadDigi(*(
p.second)) != *(
q.second))
continue;
1178 if (debug)
std::cout <<
"++Matches! " << std::endl;
1179 result.push_back(
p);
1180 if (first)
return result;
1183 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
1192 const float minEta((
p.second).first);
1193 const float maxEta((
p.second).second);
1194 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
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]
tuple quality
[pTError/pT]*max(1,normChi2) <= ptErrorCut
const unsigned theSubsector
int getBX() const
return BX
unsigned int encodePattern(const int ptn, const int highPt)
Abs< T >::type abs(const T &t)
std::vector< GEMPadBX > GEMPadsBX
bool correctLCTtimingWithGEM_
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
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]
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 promoteALCTGEMpattern_
static bool sortByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
static const double lut_wg_eta_even[112][2]