12 #include "boost/container/flat_set.hpp"
18 {0, 95},{0, 95},{0, 95},{0, 95},{0, 95},
19 {0, 95},{0, 95},{0, 95},{0, 95},{0, 95},
20 {0, 95},{0, 95},{0, 77},{0, 61},{0, 39},
21 {0, 22},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
22 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
23 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
24 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
25 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
26 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
27 {-1,-1},{-1,-1},{-1,-1} };
30 {0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
31 {0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
32 {0, 31},{0, 31},{0, 31},{0, 31},{0, 31},
33 {0, 22},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
34 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
35 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
36 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
37 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
38 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
39 {-1,-1},{-1,-1},{-1,-1} };
45 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
46 {-1,-1},{-1,-1},{-1,-1},{-1,-1},{-1,-1},
47 {100, 127},{73, 127},{47, 127},{22, 127},{0, 127},
48 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
49 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
50 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
51 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
52 {0, 127},{0, 127},{0, 127},{0, 127},{0, 127},
53 {0, 127},{0, 127},{0, 127},{0, 127},{0, 105},
54 {0, 93},{0, 78},{0, 63} };
72 {3, 0.03971647, 0.01710244},
73 {5, 0.02123785, 0.00928431},
74 {7, 0.01475524, 0.00650928},
75 {10, 0.01023299, 0.00458796},
76 {15, 0.00689220, 0.00331313},
77 {20, 0.00535176, 0.00276152},
78 {30, 0.00389050, 0.00224959},
79 {40, 0.00329539, 0.00204670}};
82 {0, 2.44005, 2.44688},
83 {1, 2.38863, 2.45035},
84 {2, 2.32742, 2.43077},
85 {3, 2.30064, 2.40389},
87 {5, 2.24925, 2.35231},
88 {6, 2.22458, 2.32754},
89 {7, 2.20054, 2.30339},
91 {9, 2.15425, 2.25689},
92 {10, 2.13194, 2.23447},
93 {11, 2.11016, 2.21258},
94 {12, 2.08889, 2.19119},
95 {13, 2.06809, 2.17028},
96 {14, 2.04777, 2.14984},
97 {15, 2.02788, 2.12983},
98 {16, 2.00843, 2.11025},
99 {17, 1.98938, 2.09108},
100 {18, 1.97073, 2.0723},
101 {19, 1.95246, 2.0539},
102 {20, 1.93456, 2.03587},
103 {21, 1.91701, 2.01818},
104 {22, 1.8998, 2.00084},
105 {23, 1.88293, 1.98382},
106 {24, 1.86637, 1.96712},
107 {25, 1.85012, 1.95073},
108 {26, 1.83417, 1.93463},
109 {27, 1.8185, 1.91882},
110 {28, 1.80312, 1.90329},
111 {29, 1.788, 1.88803},
112 {30, 1.77315, 1.87302},
113 {31, 1.75855, 1.85827},
114 {32, 1.74421, 1.84377},
115 {33, 1.7301, 1.8295},
116 {34, 1.71622, 1.81547},
117 {35, 1.70257, 1.80166},
118 {36, 1.68914, 1.78807},
119 {37, 1.67592, 1.77469},
120 {38, 1.66292, 1.76151},
121 {39, 1.65011, 1.74854},
122 {40, 1.63751, 1.73577},
123 {41, 1.62509, 1.72319},
124 {42, 1.61287, 1.71079},
125 {43, 1.60082, 1.69857},
126 {44, 1.59924, 1.68654},
127 {45, 1.6006, 1.67467},
128 {46, 1.60151, 1.66297},
129 {47, 1.60198, 1.65144} };
132 {0, 2.3917, 2.39853},
133 {1, 2.34037, 2.40199},
134 {2, 2.27928, 2.38244},
135 {3, 2.25254, 2.35561},
136 {4, 2.22655, 2.32951},
137 {5, 2.20127, 2.30412},
138 {6, 2.17665, 2.27939},
139 {7, 2.15267, 2.25529},
140 {8, 2.12929, 2.2318},
141 {9, 2.1065, 2.20889},
142 {10, 2.08425, 2.18652},
143 {11, 2.06253, 2.16468},
144 {12, 2.04132, 2.14334},
145 {13, 2.0206, 2.12249},
146 {14, 2.00033, 2.1021},
147 {15, 1.98052, 2.08215},
148 {16, 1.96113, 2.06262},
149 {17, 1.94215, 2.04351},
150 {18, 1.92357, 2.02479},
151 {19, 1.90538, 2.00645},
152 {20, 1.88755, 1.98847},
153 {21, 1.87007, 1.97085},
154 {22, 1.85294, 1.95357},
155 {23, 1.83614, 1.93662},
156 {24, 1.81965, 1.91998},
157 {25, 1.80348, 1.90365},
158 {26, 1.78761, 1.88762},
159 {27, 1.77202, 1.87187},
160 {28, 1.75672, 1.85641},
161 {29, 1.74168, 1.84121},
162 {30, 1.72691, 1.82628},
163 {31, 1.7124, 1.8116},
164 {32, 1.69813, 1.79716},
165 {33, 1.68411, 1.78297},
166 {34, 1.67032, 1.769},
167 {35, 1.65675, 1.75526},
168 {36, 1.64341, 1.74174},
169 {37, 1.63028, 1.72844},
170 {38, 1.61736, 1.71534},
171 {39, 1.60465, 1.70245},
172 {40, 1.59213, 1.68975},
173 {41, 1.57981, 1.67724},
174 {42, 1.56767, 1.66492},
175 {43, 1.55572, 1.65278},
176 {44, 1.55414, 1.64082},
177 {45, 1.55549, 1.62903},
178 {46, 1.5564, 1.61742},
179 {47, 1.55686, 1.60596} };
182 unsigned sector,
unsigned subsector,
196 <<
"+++ Upgrade CSCMotherboardME11GEM constructed while isSLHC is not set! +++\n";
198 <<
"+++ Upgrade CSCMotherboardME11GEM constructed while smartME1aME1b is not set! +++\n";
226 pref[
m-1] = pref[0] -
m/2;
227 pref[
m] = pref[0] +
m/2;
339 for (
int i=0;
i<2;
i++)
361 alct->setConfigParameters(conf);
362 clct->setConfigParameters(conf);
363 clct1a->setConfigParameters(conf);
377 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
385 bool gemGeometryAvailable(
false);
386 if (
gem_g !=
nullptr) {
388 <<
"+++ run() called for GEM-CSC integrated trigger! +++ \n";
389 gemGeometryAvailable =
true;
392 int used_clct_mask[20], used_clct_mask_1a[20];
393 for (
int b=0;
b<20;
b++)
394 used_clct_mask[
b] = used_clct_mask_1a[
b] = 0;
399 const CSCDetId me1bId(cscChamberME1b->id());
400 const CSCDetId me1aId(me1bId.endcap(), 1, 4, me1bId.chamber());
406 if (not gemGeometryAvailable){
408 <<
"+++ run() called for GEM-CSC integrated trigger without valid GEM geometry! +++ \n";
413 const CSCLayer* keyLayerME1b(cscChamberME1b->layer(3));
415 const CSCLayer* keyLayerME1a(cscChamberME1a->layer(3));
418 const bool isEven(me1bId.chamber()%2==0);
432 LogDebug(
"CSCMotherboardME11GEM") <<
"me1b Det "<< me1bId<<
" "<< me1bId.rawId() <<
" "
433 << (isEven ?
"Even":
"odd") <<
" chamber "<< me1bId.chamber()<<std::endl;
436 LogDebug(
"CSCMotherboardME11GEM") <<
"pad "<<
p.first <<
" min eta " << (
p.second).
first <<
" max eta " << (
p.second).second << std::endl;
440 const int numberOfWG(keyLayerGeometryME1b->numberOfWireGroups());
441 for (
int i = 0;
i< numberOfWG; ++
i){
448 LogDebug(
"CSCMotherboardME11GEM") <<
"WG "<<
p.first <<
" GEM pads " << (
p.second).
first <<
" " << (
p.second).second << std::endl;
453 auto randRoll(gemChamber->etaPartition(2));
456 auto nStripsME1a(keyLayerGeometryME1a->numberOfStrips());
457 for (
float i = 0;
i< nStripsME1a;
i =
i+0.5){
458 const LocalPoint lpCSC(keyLayerGeometryME1a->topology()->localPosition(
i));
459 const GlobalPoint gp(keyLayerME1a->toGlobal(lpCSC));
460 const LocalPoint lpGEM(randRoll->toLocal(gp));
462 const bool edge(HS < 4 or HS > 93);
463 const float pad(edge ? -99 : randRoll->pad(lpGEM));
468 auto nStripsME1b(keyLayerGeometryME1b->numberOfStrips());
469 for (
float i = 0;
i< nStripsME1b;
i =
i+0.5){
470 const LocalPoint lpCSC(keyLayerGeometryME1b->topology()->localPosition(
i));
471 const GlobalPoint gp(keyLayerME1b->toGlobal(lpCSC));
472 const LocalPoint lpGEM(randRoll->toLocal(gp));
474 const bool edge(HS < 5 or HS > 124);
475 const float pad(edge ? -99 : randRoll->pad(lpGEM));
480 LogDebug(
"CSCMotherboardME11GEM") <<
"detId " << me1bId;
481 LogDebug(
"CSCMotherboardME11GEM") <<
"CSCHSToGEMPad LUT in ME1a";
483 LogDebug(
"CSCMotherboardME11GEM") <<
"CSC HS "<<
p.first <<
" GEM Pad low " << (
p.second).
first <<
" GEM Pad high " << (
p.second).second;
485 LogDebug(
"CSCMotherboardME11GEM") <<
"CSCHSToGEMPad LUT in ME1b";
487 LogDebug(
"CSCMotherboardME11GEM") <<
"CSC HS "<<
p.first <<
" GEM Pad low " << (
p.second).
first <<
" GEM Pad high " << (
p.second).second;
491 const int nGEMPads(randRoll->npads());
492 for (
int i = 0;
i< nGEMPads; ++
i){
495 const LocalPoint lpCSCME1a(keyLayerME1a->toLocal(gp));
496 const LocalPoint lpCSCME1b(keyLayerME1b->toLocal(gp));
497 const float stripME1a(keyLayerGeometryME1a->strip(lpCSCME1a));
498 const float stripME1b(keyLayerGeometryME1b->strip(lpCSCME1b));
504 LogDebug(
"CSCMotherboardME11GEM") <<
"detId " << me1bId;
505 LogDebug(
"CSCMotherboardME11GEM") <<
"GEMPadToCSCHs LUT in ME1a";
507 LogDebug(
"CSCMotherboardME11GEM") <<
"GEM Pad "<<
p.first <<
" CSC HS: " <<
p.second;
509 LogDebug(
"CSCMotherboardME11GEM") <<
"GEMPadToCSCHs LUT in ME1b";
511 LogDebug(
"CSCMotherboardME11GEM") <<
"GEM Pad "<<
p.first <<
" CSC HS: " <<
p.second;
526 const bool hasPads(
pads_.size()!=0);
527 const bool hasCoPads(hasPads and
coPads_.size()!=0);
533 if (
alct->bestALCT[bx_alct].isValid())
541 std::cout <<
"========================================================================" << std::endl;
542 std::cout <<
"ALCT-CLCT matching in ME1/1 chamber: " << cscChamberME1b->id() << std::endl;
543 std::cout <<
"------------------------------------------------------------------------" << std::endl;
545 alct->bestALCT[bx_alct].print();
546 std::cout <<
"+++ Second ALCT Details: ";
547 alct->secondALCT[bx_alct].print();
552 std::cout <<
"------------------------------------------------------------------------" << std::endl;
553 std::cout <<
"Attempt ALCT-CLCT matching in ME1/b in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
557 int nSuccesFulMatches = 0;
558 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
562 if (
clct->bestCLCT[bx_clct].isValid())
564 const int quality(
clct->bestCLCT[bx_clct].getQuality());
571 int nFound(matchingPads.size());
572 const bool clctInEdge(
clct->bestCLCT[bx_clct].getKeyStrip() < 5
or clct->bestCLCT[bx_clct].getKeyStrip() > 124);
589 int nFound(matchingCoPads.size());
590 if (nFound != 0 and bx_alct == 6 and bx_clct != 6){
600 int mbx = bx_clct-bx_clct_start;
602 clct->bestCLCT[bx_clct],
clct->secondCLCT[bx_clct],
605 std::cout <<
"Successful ALCT-CLCT match in ME1b: bx_alct = " << bx_alct
606 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
607 <<
"]; bx_clct = " << bx_clct << std::endl;
609 clct->bestCLCT[bx_clct].print();
610 std::cout <<
"+++ Second CLCT Details: ";
611 clct->secondCLCT[bx_clct].print();
614 if (
allLCTs1b[bx_alct][mbx][0].isValid()) {
615 used_clct_mask[bx_clct] += 1;
622 int nSuccesFulGEMMatches = 0;
625 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
633 if (copads.size()==0) {
639 if (
allLCTs1b[bx_alct][0][0].isValid()) {
640 ++nSuccesFulGEMMatches;
644 std::cout <<
"Successful ALCT-GEM CoPad match in ME1b: bx_alct = " << bx_alct << std::endl << std::endl;
645 std::cout <<
"------------------------------------------------------------------------" << std::endl << std::endl;
651 std::cout <<
"========================================================================" << std::endl;
653 if (nSuccesFulMatches>1)
654 std::cout <<
"Too many successful ALCT-CLCT matches in ME1b: " << nSuccesFulMatches
655 <<
", CSCDetId " << cscChamberME1b->id()
656 <<
", bx_alct = " << bx_alct
657 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
658 else if (nSuccesFulMatches==1)
659 std::cout <<
"1 successful ALCT-CLCT match in ME1b: "
660 <<
" CSCDetId " << cscChamberME1b->id()
661 <<
", bx_alct = " << bx_alct
662 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
663 else if (nSuccesFulGEMMatches==1)
664 std::cout <<
"1 successful ALCT-GEM match in ME1b: "
665 <<
" CSCDetId " << cscChamberME1b->id()
666 <<
", bx_alct = " << bx_alct
667 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
669 std::cout <<
"Unsuccessful ALCT-CLCT match in ME1b: "
670 <<
"CSCDetId " << cscChamberME1b->id()
671 <<
", bx_alct = " << bx_alct
672 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
674 std::cout <<
"------------------------------------------------------------------------" << std::endl;
675 std::cout <<
"Attempt ALCT-CLCT matching in ME1/a in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
679 nSuccesFulMatches = 0;
680 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
684 if (
clct1a->bestCLCT[bx_clct].isValid())
693 int nFound(matchingPads.size());
694 const bool clctInEdge(
clct1a->bestCLCT[bx_clct].getKeyStrip() < 4
or clct1a->bestCLCT[bx_clct].getKeyStrip() > 93);
709 int mbx = bx_clct-bx_clct_start;
714 std::cout <<
"Successful ALCT-CLCT match in ME1a: bx_alct = " << bx_alct
715 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
716 <<
"]; bx_clct = " << bx_clct << std::endl;
718 clct1a->bestCLCT[bx_clct].print();
719 std::cout <<
"+++ Second CLCT Details: ";
720 clct1a->secondCLCT[bx_clct].print();
722 if (
allLCTs1a[bx_alct][mbx][0].isValid()){
723 used_clct_mask_1a[bx_clct] += 1;
730 nSuccesFulGEMMatches = 0;
733 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
741 if (copads.size()==0) {
747 if (
allLCTs1a[bx_alct][0][0].isValid()) {
748 ++nSuccesFulGEMMatches;
752 std::cout <<
"Successful ALCT-GEM CoPad match in ME1a: bx_alct = " << bx_alct << std::endl << std::endl;
753 std::cout <<
"------------------------------------------------------------------------" << std::endl << std::endl;
759 std::cout <<
"========================================================================" << std::endl;
761 if (nSuccesFulMatches>1)
762 std::cout <<
"Too many successful ALCT-CLCT matches in ME1a: " << nSuccesFulMatches
763 <<
", CSCDetId " << cscChamberME1a->id()
764 <<
", bx_alct = " << bx_alct
765 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
766 else if (nSuccesFulMatches==1)
767 std::cout <<
"1 successful ALCT-CLCT match in ME1a: "
768 <<
" CSCDetId " << cscChamberME1a->id()
769 <<
", bx_alct = " << bx_alct
770 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
771 else if (nSuccesFulGEMMatches==1)
772 std::cout <<
"1 successful ALCT-GEM match in ME1a: "
773 <<
" CSCDetId " << cscChamberME1a->id()
774 <<
", bx_alct = " << bx_alct
775 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
777 std::cout <<
"Unsuccessful ALCT-CLCT match in ME1a: "
778 <<
"CSCDetId " << cscChamberME1a->id()
779 <<
", bx_alct = " << bx_alct
780 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
793 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
796 if (
clct->bestCLCT[bx_clct].isValid()) {
797 const int quality(
clct->bestCLCT[bx_clct].getQuality());
800 int mbx = bx_clct-bx_clct_start;
805 std::cout <<
"Successful GEM-CLCT match in ME1b: bx_alct = " << bx_alct
806 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
807 <<
"]; bx_clct = " << bx_clct << std::endl;
809 clct->bestCLCT[bx_clct].print();
810 std::cout <<
"+++ Second CLCT Details: ";
811 clct->secondCLCT[bx_clct].print();
813 if (
allLCTs1b[bx_alct][mbx][0].isValid()) {
814 used_clct_mask[bx_clct] += 1;
823 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
826 if (
clct1a->bestCLCT[bx_clct].isValid()){
830 int mbx = bx_clct-bx_clct_start;
835 std::cout <<
"Successful GEM-CLCT match in ME1a: bx_alct = " << bx_alct
836 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
837 <<
"]; bx_clct = " << bx_clct << std::endl;
839 clct1a->bestCLCT[bx_clct].print();
840 std::cout <<
"+++ Second CLCT Details: ";
841 clct1a->secondCLCT[bx_clct].print();
843 if (
allLCTs1a[bx_alct][mbx][0].isValid()){
844 used_clct_mask_1a[bx_clct] += 1;
861 std::cout <<
"========================================================================" << std::endl;
862 std::cout <<
"Counting the LCTs" << std::endl;
863 std::cout <<
"========================================================================" << std::endl;
870 unsigned int n1a=0, n1b=0;
872 for (
int i=0;
i<2;
i++)
874 int cbx = bx + mbx - match_trig_window_size/2;
879 <<
"1b LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1b[bx][mbx][
i]<<std::endl;
885 <<
"1a LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1a[bx][mbx][
i]<<std::endl;
889 <<
"bx "<<bx<<
" nLCT:"<<n1a<<
" "<<n1b<<
" "<<n1a+n1b<<std::endl;
896 for (
int i=0;
i<2;
i++)
912 for (
int i=0;
i<2;
i++)
914 int cbx = bx + mbx - match_trig_window_size/2;
929 <<
"bx "<<bx<<
" nnLCT:"<<n1a<<
" "<<n1b<<
" "<<n1a+n1b<<std::endl;
937 unsigned int nLCT=n1b;
941 for (
int i=0;
i<2;
i++)
953 unsigned int n1b=0, n1a=0;
956 if (debug_gem_matching and first){
957 std::cout <<
"========================================================================" << std::endl;
958 std::cout <<
"Counting the final LCTs" << std::endl;
959 std::cout <<
"========================================================================" << std::endl;
965 if (debug_gem_matching)
966 std::cout <<
"1b LCT "<<n1b<<
" " <<
p <<std::endl;
971 if (debug_gem_matching and first){
972 std::cout <<
"========================================================================" << std::endl;
973 std::cout <<
"Counting the final LCTs" << std::endl;
974 std::cout <<
"========================================================================" << std::endl;
979 if (debug_gem_matching)
980 std::cout <<
"1a LCT "<<n1a<<
" " <<
p <<std::endl;
1005 std::vector<CSCCorrelatedLCTDigi> tmpV;
1014 static int lct_bins =
1021 int bx_readout = -1;
1022 std::vector<CSCCorrelatedLCTDigi> tmp_lcts;
1023 std::vector<CSCCorrelatedLCTDigi> all_lcts;
1027 case 0: all_lcts = tmp_lcts;
1029 case 1: all_lcts = tmp_lcts;
1035 default:
std::cout<<
"tmb_cross_bx_algo error" <<std::endl;
1038 std::vector <CSCCorrelatedLCTDigi>::const_iterator plct = all_lcts.begin();
1039 for (; plct != all_lcts.end(); plct++)
1041 if (!plct->isValid())
continue;
1043 int bx = (*plct).getBX();
1048 if (bx > late_tbins)
continue;
1055 tmpV.push_back(*plct);
1056 if (bx_readout == -1) bx_readout = bx;
1058 else tmpV.push_back(*plct);
1067 std::vector<CSCCorrelatedLCTDigi> tmpV;
1071 for (
int i=0;
i<2;
i++)
1080 std::vector<CSCCorrelatedLCTDigi> tmpV;
1088 for (
int i=0;
i<2;
i++)
1098 std::vector<CSCCorrelatedLCTDigi> LCTs;
1099 std::vector<CSCCorrelatedLCTDigi> tmpV;
1103 for (
int i=0;
i<2;
i++)
1104 if (allLCTs[bx][mbx][
i].isValid())
1105 LCTs.push_back(allLCTs[bx][mbx][
i]);
1115 std::vector<CSCCorrelatedLCTDigi> tmpV;
1127 std::vector<CSCCorrelatedLCTDigi> LCTs_final;
1131 std::vector<CSCCorrelatedLCTDigi> LCTs1a;
1132 std::vector<CSCCorrelatedLCTDigi> LCTs1b;
1133 std::vector<CSCCorrelatedLCTDigi> LCTs_tmp;
1134 std::vector<CSCCorrelatedLCTDigi> LCTs_tmp1;
1137 std::vector<CSCCorrelatedLCTDigi>::iterator it1a = LCTs1a.begin();
1138 std::vector<CSCCorrelatedLCTDigi>::iterator it1b = LCTs1b.begin();
1139 LCTs_tmp.insert(LCTs_tmp.begin(), LCTs1b.begin(), LCTs1b.end());
1140 LCTs_tmp.insert(LCTs_tmp.end(), LCTs1a.begin(), LCTs1a.end());
1144 std::vector<CSCCorrelatedLCTDigi>::iterator itp = LCTs_tmp1.begin();
1145 for ( ; itp != LCTs_tmp1.end(); itp++)
1147 if (me==
ME1A and it1a != LCTs1a.end() and *itp==*it1a )
1149 LCTs_final.push_back(*it1a);
1152 if (me==
ME1B and it1b != LCTs1b.end() and *itp==*it1b)
1154 LCTs_final.push_back(*it1b);
1160 if (LCTs1a.size() and LCTs1b.size() and me==
ME1A)
1161 LCTs_final.push_back(*LCTs1a.begin());
1162 else if (LCTs1a.size() and LCTs1b.size() and me==
ME1B)
1163 LCTs_final.push_back(*LCTs1b.begin());
1164 else if (LCTs1a.size() and LCTs1b.size()==0 and me==
ME1A)
1165 LCTs_final.insert(LCTs_final.end(), LCTs1a.begin(), LCTs1a.end());
1166 else if (LCTs1b.size() and LCTs1a.size()==0 and me==
ME1B)
1167 LCTs_final.insert(LCTs_final.end(), LCTs1b.begin(), LCTs1b.end());
1179 std::vector<CSCCorrelatedLCTDigi> LCTs;
1180 std::vector<CSCCorrelatedLCTDigi> tmpV;
1184 for (
int i=0;
i<2;
i++)
1185 if (allLCTs[bx][mbx][
i].isValid())
1186 LCTs.push_back(allLCTs[bx][mbx][
i]);
1196 std::vector<CSCCorrelatedLCTDigi> tmpV;
1208 std::vector<CSCCorrelatedLCTDigi> LCTs_final;
1212 std::vector<CSCCorrelatedLCTDigi> LCTs1a;
1213 std::vector<CSCCorrelatedLCTDigi> LCTs1b;
1214 std::vector<CSCCorrelatedLCTDigi> LCTs_tmp;
1215 std::vector<CSCCorrelatedLCTDigi> LCTs_tmp1;
1218 std::vector<CSCCorrelatedLCTDigi>::iterator it1a = LCTs1a.begin();
1219 std::vector<CSCCorrelatedLCTDigi>::iterator it1b = LCTs1b.begin();
1220 LCTs_tmp.insert(LCTs_tmp.begin(), LCTs1b.begin(), LCTs1b.end());
1221 LCTs_tmp.insert(LCTs_tmp.end(), LCTs1a.begin(), LCTs1a.end());
1225 std::vector<CSCCorrelatedLCTDigi>::iterator itp = LCTs_tmp1.begin();
1226 while (itp != LCTs_tmp1.end())
1228 if (me==
ME1B and it1b != LCTs1b.end() and *itp==*it1b)
1230 LCTs_final.push_back(*it1b);
1233 if (me==
ME1A and it1a != LCTs1a.end() and *itp==*it1a)
1235 LCTs_final.push_back(*it1a);
1242 if (LCTs1a.size() and LCTs1b.size() and me==
ME1A)
1243 LCTs_final.push_back(*LCTs1a.begin());
1244 else if (LCTs1a.size() and LCTs1b.size() and me==
ME1B)
1245 LCTs_final.push_back(*LCTs1b.begin());
1246 else if (LCTs1a.size() and LCTs1b.size()==0 and me==
ME1A)
1247 LCTs_final.insert(LCTs_final.end(), LCTs1a.begin(), LCTs1a.end());
1248 else if (LCTs1b.size() and LCTs1a.size()==0 and me==
ME1B)
1249 LCTs_final.insert(LCTs_final.end(), LCTs1b.begin(), LCTs1b.end());
1281 if (
theEndcap==2) key_hs = 127 - key_hs;
1295 bool anodeBestValid = bestALCT.
isValid();
1296 bool anodeSecondValid = secondALCT.
isValid();
1297 bool cathodeBestValid = bestCLCT.
isValid();
1298 bool cathodeSecondValid = secondCLCT.
isValid();
1300 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
1301 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
1302 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
1303 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
1315 if (((secondALCT != bestALCT)
or (secondCLCT != bestCLCT)) and
1332 bool anodeBestValid = bestALCT.
isValid();
1333 bool anodeSecondValid = secondALCT.
isValid();
1335 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
1336 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
1362 bool cathodeBestValid = bestCLCT.
isValid();
1363 bool cathodeSecondValid = secondCLCT.
isValid();
1365 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
1366 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
1395 if (secondALCT == bestALCT) secondALCT.
clear();
1396 if (secondCLCT == bestCLCT) secondCLCT.
clear();
1402 int code = (ok11<<3) | (ok12<<2) | (ok21<<1) | (ok22);
1408 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"debug correlateLCTs in "<<did<<std::endl
1409 <<
"ALCT1: "<<bestALCT<<std::endl
1410 <<
"ALCT2: "<<secondALCT<<std::endl
1411 <<
"CLCT1: "<<bestCLCT<<std::endl
1412 <<
"CLCT2: "<<secondCLCT<<std::endl
1413 <<
"ok 11 12 21 22 code = "<<ok11<<
" "<<ok12<<
" "<<ok21<<
" "<<ok22<<
" "<<code<<std::endl;
1415 if ( code==0 )
return;
1439 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lut 0 1 = "<<lut[code][0]<<
" "<<lut[code][1]<<std::endl;
1442 const int nPads(pads.size());
1443 const int nCoPads(copads.size());
1444 const bool hasPads(nPads!=0);
1445 const bool hasCoPads(nCoPads!=0);
1449 if (
debug_gem_matching)
std::cout <<
"++Info: 2 valid ALCTs-CLCTs pairs with trigger pads. Call the GHOSTBUSTERS!!!" << std::endl;
1451 typedef std::pair<int,int> mypair;
1453 std::vector<std::tuple<mypair,mypair,mypair,mypair>> deltas;
1457 for (
auto p : copads) {
1459 const int rollN(detId.
roll());
1460 const int padN((
p.second)->pad());
1467 deltas.push_back(std::make_tuple(t11,t22,t12,t21));
1470 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1471 std::cout <<
"Printing (deltaRoll, deltaPad) for each (ALCT,CLCT) pair and for each trigger copad" << std::endl;
1472 for (
unsigned i =0;
i < deltas.size(); ++
i){
1473 auto c(deltas.at(
i));
1475 std::cout <<
"\t11: " <<
"(" << std::get<0>(
c).
first <<
"," << std::get<0>(
c).second <<
"); "
1476 <<
"22: " <<
"(" << std::get<1>(
c).
first <<
"," << std::get<1>(
c).second <<
"); "
1477 <<
"12: " <<
"(" << std::get<2>(
c).
first <<
"," << std::get<2>(
c).second <<
"); "
1478 <<
"21: " <<
"(" << std::get<3>(
c).
first <<
"," << std::get<3>(
c).second <<
")" << std::endl << std::endl;
1480 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1498 for (
auto p : pads) {
1500 const int rollN(detId.
roll());
1501 const int padN((
p.second)->pad());
1508 deltas.push_back(std::make_tuple(t11,t22,t12,t21));
1511 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1512 std::cout <<
"Printing (deltaRoll, deltaPad) for each (ALCT,CLCT) pair and for each trigger pad" << std::endl;
1513 for (
unsigned i =0;
i < deltas.size(); ++
i){
1514 auto c(deltas.at(
i));
1516 std::cout <<
"\t11: " <<
"(" << std::get<0>(
c).
first <<
"," << std::get<0>(
c).second <<
"); "
1517 <<
"22: " <<
"(" << std::get<1>(
c).
first <<
"," << std::get<1>(
c).second <<
"); "
1518 <<
"12: " <<
"(" << std::get<2>(
c).
first <<
"," << std::get<2>(
c).second <<
"); "
1519 <<
"21: " <<
"(" << std::get<3>(
c).
first <<
"," << std::get<3>(
c).second <<
")" << std::endl << std::endl;
1521 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1528 switch (lut[code][0]) {
1546 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct1: "<<lct1<<std::endl;
1548 switch (lut[code][1])
1553 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct2: "<<lct2<<std::endl;
1558 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct2: "<<lct2<<std::endl;
1563 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct2: "<<lct2<<std::endl;
1568 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"out of correlateLCTs"<<std::endl;
1755 for (
auto det_range = out_pads->begin(); det_range != out_pads->end(); ++det_range) {
1756 const GEMDetId&
id = (*det_range).first;
1759 id.ring() != csc_id.
ring()
or id.chamber() != csc_id.
chamber())
continue;
1762 if (
id.layer() != 1)
continue;
1767 auto co_pads_range = out_pads->get(co_id);
1769 if (co_pads_range.first == co_pads_range.second)
continue;
1772 const auto& pads_range = (*det_range).second;
1773 for (
auto p = pads_range.first;
p != pads_range.second; ++
p) {
1774 for (
auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p) {
1782 out_co_pads.insertDigi(
id,
GEMCoPadDigi(
id.roll(),*
p,*co_p));
1791 int ch(isEven ? 2 : 1);
1793 if (chamber==
nullptr)
return;
1797 for(
auto roll : chamber->etaPartitions()) {
1798 const float half_striplength(roll->specs()->specificTopology().stripLength()/2.);
1799 const LocalPoint lp_top(0., half_striplength, 0.);
1800 const LocalPoint lp_bottom(0., -half_striplength, 0.);
1802 const GlobalPoint gp_bottom(roll->toGlobal(lp_bottom));
1813 const float minEta((
p.second).first);
1814 const float maxEta((
p.second).second);
1815 if (minEta <= eta and eta <= maxEta) {
1826 int ME,
bool oldDataFormat)
1840 int bx = alct.
getBX();
1843 int keyStrip = mymap[gem.
pad()];
1848 if (keyStrip>wgvshs[wg][0] && keyStrip<wgvshs[wg][1])
1850 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
1852 else return CSCCorrelatedLCTDigi(0,0,0,0,0,0,0,0,0,0,0,0);
1866 int keyStrip = mymap[gem.
pad()];
1871 if (keyStrip>wgvshs[wg][0] && keyStrip<wgvshs[wg][1])
1873 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
1875 else return CSCCorrelatedLCTDigi(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1881 int ME,
bool oldDataFormat)
1890 unsigned int quality = promoteCLCTGEMquality ? 14 : 11;
1899 return CSCCorrelatedLCTDigi(0, 1, quality, wg, clct.
getKeyStrip(),
pattern, clct.
getBend(), bx, 0, 0, 0,
theTrigChamber);
1915 return CSCCorrelatedLCTDigi(0, 1, quality, 0, 0, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
1921 bool hasPad,
bool hasCoPad)
1948 bool hasPad,
bool hasCoPad)
1966 if (isDistrip) {quality = 4;}
1975 if (sumQual < 1 || sumQual > 6) {
1977 <<
"+++ findQuality: sumQual = " << sumQual <<
"+++ \n";
1980 if (sumQual == 2) {quality = 6;}
1981 else if (sumQual == 3) {quality = 7;}
1982 else if (sumQual == 4) {quality = 8;}
1983 else if (sumQual == 5) {quality = 9;}
1984 else if (sumQual == 6) {quality = 10;}
1987 if (sumQual == 2) {quality = 11;}
1988 else if (sumQual == 3) {quality = 12;}
1989 else if (sumQual == 4) {quality = 13;}
1990 else if (sumQual == 5) {quality = 14;}
1991 else if (sumQual == 6) {quality = 15;}
2012 if (sumQual < 1 || sumQual > 6) {
2014 <<
"+++ findQuality: Unexpected sumQual = " << sumQual <<
"+++\n";
2023 quality = offset + sumQual;
2036 if (pattern == 1) quality = 3;
2042 if (hasPad) n_gem = 1;
2043 if (hasCoPad) n_gem = 2;
2047 if (!a4 && !c4) quality = 5;
2048 else if ( a4 && !c4) quality = 6;
2049 else if (!a4 && c4) quality = 7;
2050 else if ( a4 && c4) {
2055 if (pattern == 2 || pattern == 3) quality = 11;
2056 else if (pattern == 4 || pattern == 5) quality = 12;
2057 else if (pattern == 6 || pattern == 7) quality = 13;
2058 else if (pattern == 8 || pattern == 9) quality = 14;
2059 else if (pattern == 10) quality = 15;
2062 <<
"+++ findQuality: Unexpected CLCT pattern id = "
2063 << pattern <<
"+++\n";
2084 const bool hasPads(thePads.size()!=0);
2086 std::cout <<
"------------------------------------------------------------------------" << std::endl;
2088 for (
int bx = bx_start; bx <= bx_stop; bx++) {
2091 std::vector<std::pair<unsigned int, const GEMPadDigi*> > in_pads = thePads[bx];
2093 if (!iscopad)
std::cout <<
"* GEM trigger pads: " << std::endl;
2094 else std::cout <<
"* GEM trigger coincidence pads: " << std::endl;
2097 if (!iscopad)
std::cout <<
"N(pads) BX " << bx <<
" : " << in_pads.size() << std::endl;
2098 else std::cout <<
"N(copads) BX " << bx <<
" : " << in_pads.size() << std::endl;
2100 for (
auto pad : in_pads){
2102 std::cout <<
"\tdetId " << pad.first <<
" " << roll_id <<
", pad = " << pad.second->pad() <<
", BX = " << pad.second->bx() + 6;
2115 for (
auto ch : superChamber->chambers()) {
2116 for (
auto roll : ch->etaPartitions()) {
2118 auto pads_in_det = gemPads->get(roll_id);
2119 for (
auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
2120 auto id_pad = std::make_pair(roll_id, &(*pad));
2123 pads_[bx].push_back(id_pad);
2133 for (
auto ch : superChamber->chambers()) {
2134 for (
auto roll : ch->etaPartitions()) {
2136 auto pads_in_det = gemPads->get(roll_id);
2137 for (
auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
2139 auto id_pad = std::make_pair(roll_id, &gfirst);
2143 coPads_[bx].push_back(id_pad);
2154 if ((
p.first < 10)
or (
p.first > 15))
continue;
2155 if (((
p.second).first <= roll) and (roll <= (
p.second).second))
return true;
2183 const int lowPad(mymap[clct.
getKeyStrip()].first);
2184 const int highPad(mymap[clct.
getKeyStrip()].second);
2185 const bool debug(
false);
2186 if (debug)
std::cout <<
"lowpad " << lowPad <<
" highpad " << highPad <<
" delta pad " << deltaPad <<std::endl;
2188 auto padRoll((
p.second)->pad());
2189 if (debug)
std::cout <<
"padRoll " << padRoll << std::endl;
2191 if (debug)
std::cout <<
"++Matches! " << std::endl;
2192 result.push_back(
p);
2193 if (first)
return result;
2206 const bool debug(
false);
2207 if (debug)
std::cout <<
"ALCT keyWG " << alct.
getKeyWG() <<
", rolls " << alctRoll.first <<
" " << alctRoll.second << std::endl;
2210 if (debug)
std::cout <<
"Candidate ALCT: " << padRoll << std::endl;
2213 if (alctRoll.first == -99 and alctRoll.second == -99)
continue;
2214 else if (alctRoll.first == -99 and !(padRoll <= alctRoll.second))
continue;
2215 else if (alctRoll.second == -99 and !(padRoll >= alctRoll.first))
continue;
2216 else if ((alctRoll.first != -99 and alctRoll.second != -99) and
2217 (alctRoll.first > padRoll
or padRoll > alctRoll.second))
continue;
2218 if (debug)
std::cout <<
"++Matches! " << std::endl;
2219 result.push_back(
p);
2220 if (first)
return result;
2236 const bool debug(
false);
2237 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
2239 for (
auto p : padsAlct){
2240 if (debug)
std::cout<<
"Candidate ALCT: " <<
p.first <<
" " << *(
p.second) << std::endl;
2241 for (
auto q: padsClct){
2242 if (debug)
std::cout<<
"++Candidate CLCT: " <<
q.first <<
" " << *(
q.second) << std::endl;
2244 if ((
p.first !=
q.first)
or GEMPadDigi(*(
p.second)) != *(
q.second))
continue;
2245 if (debug)
std::cout <<
"++Matches! " << std::endl;
2246 result.push_back(
p);
2247 if (first)
return result;
2250 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
int getQuality() const
return quality of a pattern (number of layers hit!)
bool isPadInOverlap(int roll)
void retrieveGEMCoPads(const GEMCoPadDigiCollection *pads, unsigned id)
bool dropLowQualityCLCTsNoGEMs_ME1a_
T getParameter(std::string const &) const
std::map< int, std::pair< int, int > > cscHsToGemPadME1a_
CSCCorrelatedLCTDigi constructLCTs(const CSCALCTDigi &aLCT, const CSCCLCTDigi &cLCT)
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx, enum ME11Part=ME1B)
bool do_gem_matching
Do GEM matching?
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...
static const int lut_wg_vs_hs_me1ag[48][2]
bool gem_clear_nomatch_lcts
whether to throw out GEM-fiducial LCTs that have no gem match
bool dropLowQualityCLCTsNoGEMs_ME1b_
double gem_match_delta_phi_odd
GEM matching dphi and deta.
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 &)
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1a()
std::vector< CSCCorrelatedLCTDigi > readoutLCTs()
unsigned int match_trig_window_size
const unsigned theTrigChamber
bool isValid() const
check ALCT validity (1 - valid ALCT)
void buildCoincidencePads(const GEMPadDigiCollection *out_pads, GEMCoPadDigiCollection &out_co_pads, CSCDetId csc_id)
unsigned int encodePatternGEM(const int ptn, const int highPt)
static const double lut_pt_vs_dphi_gemcsc[8][3]
int assignGEMRoll(double eta)
bool runME11ILT_
GEM-CSC integrated local algorithm.
std::map< int, std::pair< int, int > > cscHsToGemPadME1b_
void clear()
clear this ALCT
double gem_match_delta_eta
int deltaPad(int hs, int pad)
bool dropLowQualityALCTsNoGEMs_ME1a_
bool buildLCTfromCLCTandGEM_ME1a_
bool match_earliest_alct_me11_only
int maxDeltaPadCoPadEven_
int getStripType() const
return striptype
int getBend() const
return bend
unsigned int max_me11_lcts
unsigned int mpc_block_me1a
static const int lut_wg_vs_hs_me1b[48][2]
U second(std::pair< T, U > const &p)
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
bool firstTwoLCTsInChamber_
CSCCorrelatedLCTDigi allLCTs1a[MAX_LCT_BINS][15][2]
const unsigned theStation
static CSCTriggerGeomManager * get()
void correlateLCTsGEM(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2, int me, const GEMPadsBX &pads=GEMPadsBX(), const GEMPadsBX &copads=GEMPadsBX())
double gem_match_delta_phi_even
const unsigned theSubsector
int getBX() const
return BX
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
unsigned int encodePattern(const int ptn, const int highPt)
Abs< T >::type abs(const T &t)
unsigned int tmb_l1a_window_size
bool isValid() const
check CLCT validity (1 - valid CLCT)
unsigned int match_trig_enable
CSCCorrelatedLCTDigi constructLCTsGEM(const CSCALCTDigi &alct, const GEMPadDigi &gem, int me, bool oldDataFormat=false)
void correlateLCTs(CSCALCTDigi bestALCT, CSCALCTDigi secondALCT, CSCCLCTDigi bestCLCT, CSCCLCTDigi secondCLCT, CSCCorrelatedLCTDigi &lct1, CSCCorrelatedLCTDigi &lct2)
std::vector< CSCCorrelatedLCTDigi > getLCTs1b()
unsigned int tmb_cross_bx_algo
int deltaRoll(int wg, int roll)
MuonDigiCollection< GEMDetId, GEMCoPadDigi > GEMCoPadDigiCollection
int gem_match_delta_bx
delta BX for GEM pads matching
const GEMSuperChamber * superChamber(GEMDetId id) const
void printGEMTriggerPads(int minBX, int maxBx, bool iscopad=false)
int getBX() const
return BX - five low bits of BXN counter tagged by the ALCT
std::vector< CSCCorrelatedLCTDigi > getLCTs1a()
bool match_earliest_clct_me11_only
bool promoteCLCTGEMquality_ME1a_
static const int lut_wg_vs_hs_me1a[48][2]
short int zendcap() const
int getQuality() const
return quality of a pattern
int getAccelerator() const
bool doLCTGhostBustingWithGEMs_
std::vector< CSCALCTDigi > alctV
void matchGEMPads(enum ME11Part=ME1B)
int getPattern() const
return pattern
void retrieveGEMPads(const GEMPadDigiCollection *pads, unsigned id)
const GEMGeometry * gem_g
const GEMChamber * chamber(GEMDetId id) const
unsigned int findQualityGEM(const CSCALCTDigi &aLCT, const GEMPadDigi &gem)
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
std::vector< GEMCoPadDigi > gemCoPadV
bool doesALCTCrossCLCT(CSCALCTDigi &a, CSCCLCTDigi &c, int me)
std::map< int, int > gemPadToCscHsME1a_
std::map< int, std::pair< int, int > > cscWgToGemRoll_
unsigned int alct_trig_enable
bool promoteALCTGEMquality_
bool buildLCTfromCLCTandGEM_ME1b_
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) ...
std::vector< CSCCorrelatedLCTDigi > readoutLCTs1b()
bool dropLowQualityALCTsNoGEMs_ME1b_
void createGEMRollEtaLUT(bool isEven)
std::unique_ptr< CSCAnodeLCTProcessor > alct
std::vector< CSCCLCTDigi > clctV1b
std::vector< CSCCLCTDigi > clctV1a
bool promoteCLCTGEMquality_ME1b_
std::unique_ptr< CSCCathodeLCTProcessor > clct
void run(const CSCWireDigiCollection *wiredc, const CSCComparatorDigiCollection *compdc, const GEMPadDigiCollection *gemPads)
void clear()
clear this CLCT
bool correctLCTtimingWithGEM_
CSCCorrelatedLCTDigi allLCTs1b[MAX_LCT_BINS][15][2]
std::map< int, int > gemPadToCscHsME1b_
bool buildLCTfromALCTandGEM_ME1b_
bool useOldLCTDataFormat_
bool promoteALCTGEMpattern_
std::unique_ptr< CSCCathodeLCTProcessor > clct1a
bool buildLCTfromALCTandGEM_ME1a_
const CSCGeometry * csc_g
std::vector< GEMCoPadDigi > readoutCoPads()
int getKeyWG() const
return key wire group
static int chamberFromTriggerLabels(int TriggerSector, int TriggerSubSector, int station, int TriggerCSCID)
static const double lut_wg_etaMin_etaMax_even[48][3]
static const double lut_wg_etaMin_etaMax_odd[48][3]
std::vector< GEMPadBX > GEMPadsBX
static bool sortByQuality(const CSCCorrelatedLCTDigi &, const CSCCorrelatedLCTDigi &)
void setConfigParameters(const CSCDBL1TPParameters *conf)
std::vector< CSCCorrelatedLCTDigi > sortLCTsByGEMDPhi(int bx, enum ME11Part=ME1B)