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} };
61 {3, 0.03971647, 0.01710244},
62 {5, 0.02123785, 0.00928431},
63 {7, 0.01475524, 0.00650928},
64 {10, 0.01023299, 0.00458796},
65 {15, 0.00689220, 0.00331313},
66 {20, 0.00535176, 0.00276152},
67 {30, 0.00389050, 0.00224959},
68 {40, 0.00329539, 0.00204670}};
71 {0, 2.44005, 2.44688},
72 {1, 2.38863, 2.45035},
73 {2, 2.32742, 2.43077},
74 {3, 2.30064, 2.40389},
76 {5, 2.24925, 2.35231},
77 {6, 2.22458, 2.32754},
78 {7, 2.20054, 2.30339},
80 {9, 2.15425, 2.25689},
81 {10, 2.13194, 2.23447},
82 {11, 2.11016, 2.21258},
83 {12, 2.08889, 2.19119},
84 {13, 2.06809, 2.17028},
85 {14, 2.04777, 2.14984},
86 {15, 2.02788, 2.12983},
87 {16, 2.00843, 2.11025},
88 {17, 1.98938, 2.09108},
89 {18, 1.97073, 2.0723},
90 {19, 1.95246, 2.0539},
91 {20, 1.93456, 2.03587},
92 {21, 1.91701, 2.01818},
93 {22, 1.8998, 2.00084},
94 {23, 1.88293, 1.98382},
95 {24, 1.86637, 1.96712},
96 {25, 1.85012, 1.95073},
97 {26, 1.83417, 1.93463},
98 {27, 1.8185, 1.91882},
99 {28, 1.80312, 1.90329},
100 {29, 1.788, 1.88803},
101 {30, 1.77315, 1.87302},
102 {31, 1.75855, 1.85827},
103 {32, 1.74421, 1.84377},
104 {33, 1.7301, 1.8295},
105 {34, 1.71622, 1.81547},
106 {35, 1.70257, 1.80166},
107 {36, 1.68914, 1.78807},
108 {37, 1.67592, 1.77469},
109 {38, 1.66292, 1.76151},
110 {39, 1.65011, 1.74854},
111 {40, 1.63751, 1.73577},
112 {41, 1.62509, 1.72319},
113 {42, 1.61287, 1.71079},
114 {43, 1.60082, 1.69857},
115 {44, 1.59924, 1.68654},
116 {45, 1.6006, 1.67467},
117 {46, 1.60151, 1.66297},
118 {47, 1.60198, 1.65144} };
121 {0, 2.3917, 2.39853},
122 {1, 2.34037, 2.40199},
123 {2, 2.27928, 2.38244},
124 {3, 2.25254, 2.35561},
125 {4, 2.22655, 2.32951},
126 {5, 2.20127, 2.30412},
127 {6, 2.17665, 2.27939},
128 {7, 2.15267, 2.25529},
129 {8, 2.12929, 2.2318},
130 {9, 2.1065, 2.20889},
131 {10, 2.08425, 2.18652},
132 {11, 2.06253, 2.16468},
133 {12, 2.04132, 2.14334},
134 {13, 2.0206, 2.12249},
135 {14, 2.00033, 2.1021},
136 {15, 1.98052, 2.08215},
137 {16, 1.96113, 2.06262},
138 {17, 1.94215, 2.04351},
139 {18, 1.92357, 2.02479},
140 {19, 1.90538, 2.00645},
141 {20, 1.88755, 1.98847},
142 {21, 1.87007, 1.97085},
143 {22, 1.85294, 1.95357},
144 {23, 1.83614, 1.93662},
145 {24, 1.81965, 1.91998},
146 {25, 1.80348, 1.90365},
147 {26, 1.78761, 1.88762},
148 {27, 1.77202, 1.87187},
149 {28, 1.75672, 1.85641},
150 {29, 1.74168, 1.84121},
151 {30, 1.72691, 1.82628},
152 {31, 1.7124, 1.8116},
153 {32, 1.69813, 1.79716},
154 {33, 1.68411, 1.78297},
155 {34, 1.67032, 1.769},
156 {35, 1.65675, 1.75526},
157 {36, 1.64341, 1.74174},
158 {37, 1.63028, 1.72844},
159 {38, 1.61736, 1.71534},
160 {39, 1.60465, 1.70245},
161 {40, 1.59213, 1.68975},
162 {41, 1.57981, 1.67724},
163 {42, 1.56767, 1.66492},
164 {43, 1.55572, 1.65278},
165 {44, 1.55414, 1.64082},
166 {45, 1.55549, 1.62903},
167 {46, 1.5564, 1.61742},
168 {47, 1.55686, 1.60596} };
171 unsigned sector,
unsigned subsector,
185 <<
"+++ Upgrade CSCMotherboardME11GEM constructed while isSLHC is not set! +++\n";
187 <<
"+++ Upgrade CSCMotherboardME11GEM constructed while smartME1aME1b is not set! +++\n";
217 pref[
m-1] = pref[0] -
m/2;
218 pref[
m] = pref[0] +
m/2;
304 for (
int i=0;
i<2;
i++)
326 alct->setConfigParameters(conf);
327 clct->setConfigParameters(conf);
328 clct1a->setConfigParameters(conf);
342 <<
"+++ run() called for non-existing ALCT/CLCT processor! +++ \n";
355 bool gemGeometryAvailable(
false);
356 if (
gem_g !=
nullptr) {
358 <<
"+++ run() called for GEM-CSC integrated trigger! +++ \n";
359 gemGeometryAvailable =
true;
362 int used_clct_mask[20], used_clct_mask_1a[20];
363 for (
int b=0;
b<20;
b++)
364 used_clct_mask[
b] = used_clct_mask_1a[
b] = 0;
369 const CSCDetId me1bId(cscChamberME1b->id());
370 const CSCDetId me1aId(me1bId.endcap(), 1, 4, me1bId.chamber());
373 const int region((
theEndcap == 1) ? 1: -1);
382 if (not gemGeometryAvailable){
384 <<
"+++ run() called for GEM-CSC integrated trigger without valid GEM geometry! +++ \n";
389 const CSCLayer* keyLayerME1b(cscChamberME1b->layer(3));
391 const CSCLayer* keyLayerME1a(cscChamberME1a->layer(3));
394 const bool isEven(me1bId.chamber()%2==0);
395 const int region((
theEndcap == 1) ? 1: -1);
408 LogDebug(
"CSCMotherboardME11GEM") <<
"me1b Det "<< me1bId<<
" "<< me1bId.rawId() <<
" " 409 << (isEven ?
"Even":
"odd") <<
" chamber "<< me1bId.chamber()<<std::endl;
411 LogDebug(
"CSCMotherboardME11GEM") <<
"pad "<<
p.first <<
" min eta " << (
p.second).
first <<
" max eta " << (
p.second).second << std::endl;
415 const int numberOfWG(keyLayerGeometryME1b->numberOfWireGroups());
416 for (
int i = 0;
i< numberOfWG; ++
i){
423 LogDebug(
"CSCMotherboardME11GEM") <<
"WG "<<
p.first <<
" GEM pads " << (
p.second).
first <<
" " << (
p.second).second << std::endl;
428 const auto& randRoll(gemChamber->chamber(1)->etaPartition(2));
430 const int nGEMPads(randRoll->npads());
431 for (
int i = 1;
i<= nGEMPads; ++
i){
436 const float stripME1a(keyLayerGeometryME1a->strip(lpCSCME1a));
437 const float stripME1b(keyLayerGeometryME1b->strip(lpCSCME1b));
443 LogDebug(
"CSCMotherboardME11GEM") <<
"detId " << me1bId;
444 LogDebug(
"CSCMotherboardME11GEM") <<
"CSCHSToGEMPad LUT in ME1a";
446 LogDebug(
"CSCMotherboardME11GEM") <<
"CSC HS "<<
p.first <<
" GEM Pad low " << (
p.second).
first <<
" GEM Pad high " << (
p.second).second;
448 LogDebug(
"CSCMotherboardME11GEM") <<
"CSCHSToGEMPad LUT in ME1b";
450 LogDebug(
"CSCMotherboardME11GEM") <<
"CSC HS "<<
p.first <<
" GEM Pad low " << (
p.second).
first <<
" GEM Pad high " << (
p.second).second;
454 auto nStripsME1a(keyLayerGeometryME1a->numberOfStrips());
455 auto nStripsME1b(keyLayerGeometryME1b->numberOfStrips());
461 for (
int i=0;
i<nStripsME1a*2; ++
i){
462 std::vector<int>
temp;
465 temp.push_back(
p.first);
469 std::sort(temp.begin(),temp.end());
470 temp.erase(
std::unique(temp.begin(),temp.end()),temp.end());
473 if (temp.size()%2==0 and !temp.empty()){
475 temp2.insert(temp[temp.size()/2]);
476 temp2.insert(temp[temp.size()/2-1]);
478 else if (temp.size()%2==1){
480 temp2.insert(temp[temp.size()/2]);
482 else if (temp.empty()) {
500 for (
int i=0;
i<nStripsME1b*2; ++
i){
501 std::vector<int>
temp;
504 temp.push_back(
p.first);
508 std::sort(temp.begin(),temp.end());
509 temp.erase(
std::unique(temp.begin(),temp.end()),temp.end());
512 if (temp.size()%2==0 and !temp.empty()){
514 temp2.insert(temp[temp.size()/2]);
515 temp2.insert(temp[temp.size()/2-1]);
517 else if (temp.size()%2==1){
519 temp2.insert(temp[temp.size()/2]);
549 LogDebug(
"CSCMotherboardME11GEM") <<
"detId " << me1bId;
550 LogDebug(
"CSCMotherboardME11GEM") <<
"GEMPadToCSCHs LUT in ME1a";
552 LogDebug(
"CSCMotherboardME11GEM") <<
"GEM Pad "<<
p.first <<
" CSC HS: " <<
p.second;
554 LogDebug(
"CSCMotherboardME11GEM") <<
"GEMPadToCSCHs LUT in ME1b";
556 LogDebug(
"CSCMotherboardME11GEM") <<
"GEM Pad "<<
p.first <<
" CSC HS: " <<
p.second;
567 const bool hasPads(!
pads_.empty());
573 if (
alct->bestALCT[bx_alct].isValid())
581 std::cout <<
"========================================================================" << std::endl;
582 std::cout <<
"ALCT-CLCT matching in ME1/1 chamber: " << cscChamberME1b->id() << std::endl;
583 std::cout <<
"------------------------------------------------------------------------" << std::endl;
584 std::cout <<
"+++ Best ALCT Details: " <<
alct->bestALCT[bx_alct] << std::endl;
585 if (not
alct->secondALCT[bx_alct].isValid())
586 std::cout <<
"+++ Second ALCT INVALID" << std::endl;
588 std::cout <<
"+++ Second ALCT Details: " <<
alct->secondALCT[bx_alct] << std::endl;
593 std::cout <<
"------------------------------------------------------------------------" << std::endl;
594 std::cout <<
"Attempt ALCT-CLCT matching in ME1/b in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
598 int nSuccesFulMatches = 0;
599 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
603 if (
clct->bestCLCT[bx_clct].isValid())
605 const int quality(
clct->bestCLCT[bx_clct].getQuality());
614 matchingPads.reserve(matchingPads11.size() +
615 matchingPads12.size() +
616 matchingPads21.size() +
617 matchingPads22.size()
629 matchingCoPads.reserve(matchingCoPads11.size() +
630 matchingCoPads12.size() +
631 matchingCoPads21.size() +
632 matchingCoPads22.size()
640 int nFound(!matchingPads.empty());
641 const bool clctInEdge(
clct->bestCLCT[bx_clct].getKeyStrip() < 5
or clct->bestCLCT[bx_clct].getKeyStrip() > 124);
658 int nFound(!matchingCoPads.empty());
659 if (nFound != 0 and bx_alct == 6 and bx_clct != 6){
669 int mbx = bx_clct-bx_clct_start;
671 clct->bestCLCT[bx_clct],
clct->secondCLCT[bx_clct],
674 std::cout <<
"Successful ALCT-CLCT match in ME1b: bx_alct = " << bx_alct
675 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
676 <<
"]; bx_clct = " << bx_clct << std::endl;
677 std::cout <<
"+++ Best CLCT Details: " <<
clct->bestCLCT[bx_clct] << std::endl;
678 if (not
clct->secondCLCT[bx_clct].isValid())
679 std::cout <<
"+++ Second CLCT INVALID" << std::endl;
681 std::cout <<
"+++ Second CLCT Details: " <<
clct->secondCLCT[bx_clct] << std:: endl;
684 if (
allLCTs1b[bx_alct][mbx][0].isValid()) {
685 used_clct_mask[bx_clct] += 1;
691 if (nSuccesFulMatches==0)
695 int nSuccesFulGEMMatches = 0;
697 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
704 copads.reserve(copads1.size() +
711 if (copads.empty()) {
717 if (allLCTs1b[bx_alct][0][0].isValid()) {
718 ++nSuccesFulGEMMatches;
722 std::cout <<
"Successful ALCT-GEM CoPad match in ME1b: bx_alct = " << bx_alct << std::endl << std::endl;
723 std::cout <<
"------------------------------------------------------------------------" << std::endl << std::endl;
729 std::cout <<
"========================================================================" << std::endl;
731 if (nSuccesFulMatches>1)
732 std::cout <<
"Too many successful ALCT-CLCT matches in ME1b: " << nSuccesFulMatches
733 <<
", CSCDetId " << cscChamberME1b->id()
734 <<
", bx_alct = " << bx_alct
735 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
736 else if (nSuccesFulMatches==1)
737 std::cout <<
"1 successful ALCT-CLCT match in ME1b: " 738 <<
" CSCDetId " << cscChamberME1b->id()
739 <<
", bx_alct = " << bx_alct
740 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
741 else if (nSuccesFulGEMMatches==1)
742 std::cout <<
"1 successful ALCT-GEM match in ME1b: " 743 <<
" CSCDetId " << cscChamberME1b->id()
744 <<
", bx_alct = " << bx_alct
745 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
747 std::cout <<
"Unsuccessful ALCT-CLCT match in ME1b: " 748 <<
"CSCDetId " << cscChamberME1b->id()
749 <<
", bx_alct = " << bx_alct
750 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
752 std::cout <<
"------------------------------------------------------------------------" << std::endl << std::endl;
753 std::cout <<
"Attempt ALCT-CLCT matching in ME1/a in bx range: [" << bx_clct_start <<
"," << bx_clct_stop <<
"]" << std::endl;
757 nSuccesFulMatches = 0;
758 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++)
762 if (
clct1a->bestCLCT[bx_clct].isValid())
773 matchingPads.reserve(matchingPads11.size() +
774 matchingPads12.size() +
775 matchingPads21.size() +
776 matchingPads22.size()
788 matchingCoPads.reserve(matchingCoPads11.size() +
789 matchingCoPads12.size() +
790 matchingCoPads21.size() +
791 matchingCoPads22.size()
799 int nFound(!matchingPads.empty());
800 const bool clctInEdge(
clct1a->bestCLCT[bx_clct].getKeyStrip() < 4
or clct1a->bestCLCT[bx_clct].getKeyStrip() > 93);
816 int mbx = bx_clct-bx_clct_start;
821 std::cout <<
"Successful ALCT-CLCT match in ME1a: bx_alct = " << bx_alct
822 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
823 <<
"]; bx_clct = " << bx_clct << std::endl;
824 std::cout <<
"+++ Best CLCT Details: " <<
clct1a->bestCLCT[bx_clct] << std::endl;
825 if (not
clct1a->secondCLCT[bx_clct].isValid())
826 std::cout <<
"+++ Second CLCT INVALID" << std::endl;
828 std::cout <<
"+++ Second CLCT Details: " <<
clct1a->secondCLCT[bx_clct] << std:: endl;
830 if (
allLCTs1a[bx_alct][mbx][0].isValid()){
831 used_clct_mask_1a[bx_clct] += 1;
837 if (nSuccesFulMatches==0)
841 nSuccesFulGEMMatches = 0;
843 for (
int bx_gem = bx_copad_start; bx_gem <= bx_copad_stop; bx_gem++) {
844 std::cout <<
"ALCT-to-GEM matching in ME1a, bx_gem "<< bx_gem << std::endl;
850 copads.reserve(copads1.size() +
857 if (copads.empty()) {
863 if (allLCTs1a[bx_alct][0][0].isValid()) {
864 ++nSuccesFulGEMMatches;
868 std::cout <<
"Successful ALCT-GEM CoPad match in ME1a: bx_alct = " << bx_alct << std::endl << std::endl;
869 std::cout <<
"------------------------------------------------------------------------" << std::endl << std::endl;
875 std::cout <<
"========================================================================" << std::endl;
877 if (nSuccesFulMatches>1)
878 std::cout <<
"Too many successful ALCT-CLCT matches in ME1a: " << nSuccesFulMatches
879 <<
", CSCDetId " << cscChamberME1a->id()
880 <<
", bx_alct = " << bx_alct
881 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
882 else if (nSuccesFulMatches==1)
883 std::cout <<
"1 successful ALCT-CLCT match in ME1a: " 884 <<
" CSCDetId " << cscChamberME1a->id()
885 <<
", bx_alct = " << bx_alct
886 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
887 else if (nSuccesFulGEMMatches==1)
888 std::cout <<
"1 successful ALCT-GEM match in ME1a: " 889 <<
" CSCDetId " << cscChamberME1a->id()
890 <<
", bx_alct = " << bx_alct
891 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
893 std::cout <<
"Unsuccessful ALCT-CLCT match in ME1a: " 894 <<
"CSCDetId " << cscChamberME1a->id()
895 <<
", bx_alct = " << bx_alct
896 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop <<
"]" << std::endl;
910 std::cout <<
"========================================================================" << std::endl;
911 std::cout <<
"GEM-CLCT matching in ME1/b chamber: "<< cscChamberME1b->id()<<
"in bx:"<<bx_alct<<std::endl;
912 std::cout <<
"------------------------------------------------------------------------" << std::endl;
915 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
918 if (
clct->bestCLCT[bx_clct].isValid()) {
919 const int quality(
clct->bestCLCT[bx_clct].getQuality());
922 int mbx = bx_clct-bx_clct_start;
927 std::cout <<
"Successful GEM-CLCT match in ME1b: bx_alct = " << bx_alct
928 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
929 <<
"]; bx_clct = " << bx_clct << std::endl;
930 std::cout <<
"+++ Best CLCT Details: " <<
clct->bestCLCT[bx_clct] << std::endl;
931 if (not
clct->secondCLCT[bx_clct].isValid())
932 std::cout <<
"+++ Second CLCT INVALID" << std::endl;
934 std::cout <<
"+++ Second CLCT Details: " <<
clct->secondCLCT[bx_clct] << std:: endl;
936 if (
allLCTs1b[bx_alct][mbx][0].isValid()) {
937 used_clct_mask[bx_clct] += 1;
947 std::cout <<
"========================================================================" << std::endl;
948 std::cout <<
"GEM-CLCT matching in ME1/a chamber: "<< cscChamberME1a->id()<<
"in bx:"<<bx_alct<<std::endl;
949 std::cout <<
"------------------------------------------------------------------------" << std::endl;
951 for (
int bx_clct = bx_clct_start; bx_clct <= bx_clct_stop; bx_clct++) {
954 if (
clct1a->bestCLCT[bx_clct].isValid()){
958 int mbx = bx_clct-bx_clct_start;
963 std::cout <<
"Successful GEM-CLCT match in ME1a: bx_alct = " << bx_alct
964 <<
"; match window: [" << bx_clct_start <<
"; " << bx_clct_stop
965 <<
"]; bx_clct = " << bx_clct << std::endl;
966 std::cout <<
"+++ Best CLCT Details: " <<
clct1a->bestCLCT[bx_clct] << std::endl;
967 if (not
clct1a->secondCLCT[bx_clct].isValid())
968 std::cout <<
"+++ Second CLCT INVALID" << std::endl;
970 std::cout <<
"+++ Second CLCT Details: " <<
clct1a->secondCLCT[bx_clct] << std:: endl;
972 if (
allLCTs1a[bx_alct][mbx][0].isValid()){
973 used_clct_mask_1a[bx_clct] += 1;
984 std::cout <<
"========================================================================" << std::endl;
985 std::cout <<
"Counting the LCTs" << std::endl;
986 std::cout <<
"========================================================================" << std::endl;
987 }
else if (debug_gem_matching){
988 std::cout <<
"========================================================================" << std::endl;
989 std::cout <<
"Counting the LCTs: No LCT is Built" << std::endl;
990 std::cout <<
"========================================================================" << std::endl;
997 unsigned int n1a=0, n1b=0;
999 for (
int i=0;
i<2;
i++)
1001 int cbx = bx + mbx - match_trig_window_size/2;
1006 <<
"1b LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1b[bx][mbx][
i]<<std::endl;
1012 <<
"1a LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1a[bx][mbx][
i]<<std::endl;
1016 <<
"bx "<<bx<<
" nLCT:"<<n1a<<
" "<<n1b<<
" "<<n1a+n1b<<std::endl;
1023 for (
int i=0;
i<2;
i++)
1039 for (
int i=0;
i<2;
i++)
1041 int cbx = bx + mbx - match_trig_window_size/2;
1046 <<
"1b LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1b[bx][mbx][
i]<<std::endl;
1052 <<
"1a LCT"<<
i+1<<
" "<<bx<<
"/"<<cbx<<
": "<<
allLCTs1a[bx][mbx][
i]<<std::endl;
1056 <<
"bx "<<bx<<
" nnLCT:"<<n1a<<
" "<<n1b<<
" "<<n1a+n1b<<std::endl;
1064 unsigned int nLCT=n1b;
1068 for (
int i=0;
i<2;
i++)
1080 unsigned int n1b=0, n1a=0;
1083 if (debug_gem_matching and first){
1084 std::cout <<
"========================================================================" << std::endl;
1085 std::cout <<
"Counting the final LCTs" << std::endl;
1086 std::cout <<
"========================================================================" << std::endl;
1092 if (debug_gem_matching)
1093 std::cout <<
"1b LCT "<<n1b<<
" " <<
p <<std::endl;
1098 if (debug_gem_matching and first){
1099 std::cout <<
"========================================================================" << std::endl;
1100 std::cout <<
"Counting the final LCTs" << std::endl;
1101 std::cout <<
"========================================================================" << std::endl;
1106 if (debug_gem_matching)
1107 std::cout <<
"1a LCT "<<n1a<<
" " <<
p <<std::endl;
1110 if (debug_gem_matching){
1111 std::cout <<
"Summarize LCTs, ME1b nLCT "<< n1b <<
" ME1a nLCT "<< n1a << std::endl;
1112 std::cout <<
"========================================================================" << std::endl;
1137 std::vector<CSCCorrelatedLCTDigi> tmpV;
1146 static int lct_bins =
1153 int bx_readout = -1;
1154 std::vector<CSCCorrelatedLCTDigi> tmp_lcts;
1155 std::vector<CSCCorrelatedLCTDigi> all_lcts;
1159 case 0: all_lcts = tmp_lcts;
1161 case 1: all_lcts = tmp_lcts;
1167 default:
std::cout<<
"tmb_cross_bx_algo error" <<std::endl;
1170 std::vector <CSCCorrelatedLCTDigi>::const_iterator plct = all_lcts.begin();
1171 for (; plct != all_lcts.end(); plct++)
1173 if (!plct->isValid())
continue;
1175 int bx = (*plct).getBX();
1180 if (bx > late_tbins)
continue;
1187 tmpV.push_back(*plct);
1188 if (bx_readout == -1) bx_readout = bx;
1190 else tmpV.push_back(*plct);
1199 std::vector<CSCCorrelatedLCTDigi> tmpV;
1203 for (
int i=0;
i<2;
i++)
1212 std::vector<CSCCorrelatedLCTDigi> tmpV;
1220 for (
int i=0;
i<2;
i++)
1230 std::vector<CSCCorrelatedLCTDigi> LCTs;
1231 std::vector<CSCCorrelatedLCTDigi> tmpV;
1235 for (
int i=0;
i<2;
i++)
1236 if (allLCTs[bx][mbx][
i].isValid())
1237 LCTs.push_back(allLCTs[bx][mbx][
i]);
1247 std::vector<CSCCorrelatedLCTDigi> tmpV;
1259 std::vector<CSCCorrelatedLCTDigi> LCTs_final;
1268 std::vector<CSCCorrelatedLCTDigi> LCTs_tmp;
1269 LCTs_tmp.insert(LCTs_tmp.begin(), LCTs1b.begin(), LCTs1b.end());
1270 LCTs_tmp.insert(LCTs_tmp.end(), LCTs1a.begin(), LCTs1a.end());
1279 for (
const auto&
p: LCTs_tmp){
1281 if (me==
ME1A and
std::find(LCTs1a.begin(), LCTs1a.end(),
p) != LCTs1a.end()){
1282 LCTs_final.push_back(
p);
1285 else if(me==
ME1B and
std::find(LCTs1b.begin(), LCTs1b.end(),
p) != LCTs1b.end()){
1286 LCTs_final.push_back(
p);
1291 if (!LCTs1a.empty() and !LCTs1b.empty() and me==
ME1A)
1292 LCTs_final.push_back(*LCTs1a.begin());
1293 else if (!LCTs1a.empty() and !LCTs1b.empty() and me==
ME1B)
1294 LCTs_final.push_back(*LCTs1b.begin());
1295 else if (!LCTs1a.empty() and LCTs1b.empty() and me==
ME1A)
1296 LCTs_final.insert(LCTs_final.end(), LCTs1a.begin(), LCTs1a.end());
1297 else if (!LCTs1b.empty() and LCTs1a.empty() and me==
ME1B)
1298 LCTs_final.insert(LCTs_final.end(), LCTs1b.begin(), LCTs1b.end());
1310 std::vector<CSCCorrelatedLCTDigi> LCTs;
1311 std::vector<CSCCorrelatedLCTDigi> tmpV;
1315 for (
int i=0;
i<2;
i++)
1316 if (allLCTs[bx][mbx][
i].isValid())
1317 LCTs.push_back(allLCTs[bx][mbx][
i]);
1327 std::vector<CSCCorrelatedLCTDigi> tmpV;
1339 std::vector<CSCCorrelatedLCTDigi> LCTs_final;
1348 std::vector<CSCCorrelatedLCTDigi> LCTs_tmp;
1349 LCTs_tmp.insert(LCTs_tmp.begin(), LCTs1b.begin(), LCTs1b.end());
1350 LCTs_tmp.insert(LCTs_tmp.end(), LCTs1a.begin(), LCTs1a.end());
1359 for (
const auto&
p: LCTs_tmp){
1361 if (me==
ME1A and
std::find(LCTs1a.begin(), LCTs1a.end(),
p) != LCTs1a.end()){
1362 LCTs_final.push_back(
p);
1365 else if(me==
ME1B and
std::find(LCTs1b.begin(), LCTs1b.end(),
p) != LCTs1b.end()){
1366 LCTs_final.push_back(
p);
1371 if (!LCTs1a.empty() and !LCTs1b.empty() and me==
ME1A)
1372 LCTs_final.push_back(*LCTs1a.begin());
1373 else if (!LCTs1a.empty() and !LCTs1b.empty() and me==
ME1B)
1374 LCTs_final.push_back(*LCTs1b.begin());
1375 else if (!LCTs1a.empty() and LCTs1b.empty() and me==
ME1A)
1376 LCTs_final.insert(LCTs_final.end(), LCTs1a.begin(), LCTs1a.end());
1377 else if (!LCTs1b.empty() and LCTs1a.empty() and me==
ME1B)
1378 LCTs_final.insert(LCTs_final.end(), LCTs1b.begin(), LCTs1b.end());
1410 if (
theEndcap==2) key_hs = 127 - key_hs;
1423 bool anodeBestValid = bestALCT.
isValid();
1424 bool anodeSecondValid = secondALCT.
isValid();
1426 if (anodeBestValid and !anodeSecondValid) secondALCT = bestALCT;
1427 if (!anodeBestValid and anodeSecondValid) bestALCT = secondALCT;
1457 bool cathodeBestValid = bestCLCT.
isValid();
1458 bool cathodeSecondValid = secondCLCT.
isValid();
1460 if (cathodeBestValid and !cathodeSecondValid) secondCLCT = bestCLCT;
1461 if (!cathodeBestValid and cathodeSecondValid) bestCLCT = secondCLCT;
1496 if (secondALCT == bestALCT) secondALCT.
clear();
1497 if (secondCLCT == bestCLCT) secondCLCT.
clear();
1503 int code = (ok11<<3) | (ok12<<2) | (ok21<<1) | (ok22);
1509 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"debug correlateLCTs in "<<did<<std::endl
1510 <<
"ALCT1: "<<bestALCT<<std::endl
1511 <<
"ALCT2: "<<secondALCT<<std::endl
1512 <<
"CLCT1: "<<bestCLCT<<std::endl
1513 <<
"CLCT2: "<<secondCLCT<<std::endl
1514 <<
"ok 11 12 21 22 code = "<<ok11<<
" "<<ok12<<
" "<<ok21<<
" "<<ok22<<
" "<<code<<std::endl;
1516 if ( code==0 )
return;
1540 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lut 0 1 = "<<lut[code][0]<<
" "<<lut[code][1]<<std::endl;
1543 const int nPads(!pads.empty());
1544 const int nCoPads(!copads.empty());
1545 const bool hasPads(nPads!=0);
1546 const bool hasCoPads(nCoPads!=0);
1552 typedef std::pair<int,int> mypair;
1554 std::vector<std::tuple<mypair,mypair,mypair,mypair>> deltas;
1558 for (
const auto&
p : copads) {
1560 const int rollN(detId.
roll());
1561 const int padN((
p.second).pad());
1568 deltas.push_back(std::make_tuple(t11,t22,t12,t21));
1571 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1572 std::cout <<
"Printing (deltaRoll, deltaPad) for each (ALCT,CLCT) pair and for each trigger copad" << std::endl;
1573 for (
unsigned i =0;
i < deltas.size(); ++
i){
1574 auto c(deltas.at(
i));
1576 std::cout <<
"\t11: " <<
"(" << std::get<0>(
c).
first <<
"," << std::get<0>(
c).second <<
"); " 1577 <<
"22: " <<
"(" << std::get<1>(
c).
first <<
"," << std::get<1>(
c).second <<
"); " 1578 <<
"12: " <<
"(" << std::get<2>(
c).
first <<
"," << std::get<2>(
c).second <<
"); " 1579 <<
"21: " <<
"(" << std::get<3>(
c).
first <<
"," << std::get<3>(
c).second <<
")" << std::endl << std::endl;
1581 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1599 for (
const auto&
p : pads) {
1601 const int rollN(detId.
roll());
1602 const int padN((
p.second).pad());
1609 deltas.push_back(std::make_tuple(t11,t22,t12,t21));
1612 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1613 std::cout <<
"Printing (deltaRoll, deltaPad) for each (ALCT,CLCT) pair and for each trigger pad" << std::endl;
1614 for (
unsigned i =0;
i < deltas.size(); ++
i){
1615 auto c(deltas.at(
i));
1617 std::cout <<
"\t11: " <<
"(" << std::get<0>(
c).
first <<
"," << std::get<0>(
c).second <<
"); " 1618 <<
"22: " <<
"(" << std::get<1>(
c).
first <<
"," << std::get<1>(
c).second <<
"); " 1619 <<
"12: " <<
"(" << std::get<2>(
c).
first <<
"," << std::get<2>(
c).second <<
"); " 1620 <<
"21: " <<
"(" << std::get<3>(
c).
first <<
"," << std::get<3>(
c).second <<
")" << std::endl << std::endl;
1622 std::cout <<
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " << std::endl;
1629 switch (lut[code][0]) {
1647 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct1: "<<lct1<<std::endl;
1649 switch (lut[code][1])
1654 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct2: "<<lct2<<std::endl;
1659 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct2: "<<lct2<<std::endl;
1664 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"lct2: "<<lct2<<std::endl;
1669 if (dbg)
LogTrace(
"CSCMotherboardME11GEM")<<
"out of correlateLCTs"<<std::endl;
1677 int ch(isEven ? 2 : 1);
1682 for(
auto roll :
chamber->etaPartitions()) {
1683 const float half_striplength(roll->specs()->specificTopology().stripLength()/2.);
1684 const LocalPoint lp_top(0., half_striplength, 0.);
1685 const LocalPoint lp_bottom(0., -half_striplength, 0.);
1687 const GlobalPoint gp_bottom(roll->toGlobal(lp_bottom));
1698 const float minEta((
p.second).first);
1699 const float maxEta((
p.second).second);
1700 if (minEta <= eta and eta <= maxEta) {
1711 int ME,
bool oldDataFormat)
1713 std::cout <<
"Constructing ALCT-GEM LCT in "<<(ME==
ME1A ?
"ME1a":
"ME1b") << std::endl;
1726 int bx = alct.
getBX();
1729 int keyStrip = mymap[gem.
pad()];
1734 if (keyStrip>wgvshs[wg][0] && keyStrip<wgvshs[wg][1])
1736 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
1738 else return CSCCorrelatedLCTDigi(0,0,0,0,0,0,0,0,0,0,0,0);
1752 int keyStrip = mymap[gem.
pad()];
1757 if (keyStrip>wgvshs[wg][0] && keyStrip<wgvshs[wg][1])
1759 return CSCCorrelatedLCTDigi(0, 1, quality, wg, keyStrip, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
1761 else return CSCCorrelatedLCTDigi(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1767 int ME,
bool oldDataFormat)
1776 unsigned int quality = promoteCLCTGEMquality ? 15 : 11;
1785 return CSCCorrelatedLCTDigi(0, 1, quality, wg, clct.
getKeyStrip(),
pattern, clct.
getBend(), bx, 0, 0, 0,
theTrigChamber);
1801 return CSCCorrelatedLCTDigi(0, 1, quality, wg, 0, pattern, 0, bx, 0, 0, 0,
theTrigChamber);
1807 bool hasPad,
bool hasCoPad)
1824 thisLCT.setCLCT(cLCT);
1838 bool hasPad,
bool hasCoPad)
1856 if (pattern == 1) quality = 3;
1862 if (hasPad) n_gem = 1;
1863 if (hasCoPad) n_gem = 2;
1867 if (!a4 && !c4) quality = 5;
1868 else if ( a4 && !c4) quality = 6;
1869 else if (!a4 && c4) quality = 7;
1870 else if ( a4 && c4) {
1875 if (pattern == 2 || pattern == 3) quality = 11;
1876 else if (pattern == 4 || pattern == 5) quality = 12;
1877 else if (pattern == 6 || pattern == 7) quality = 13;
1878 else if (pattern == 8 || pattern == 9) quality = 14;
1879 else if (pattern == 10) quality = 15;
1882 <<
"+++ findQuality: Unexpected CLCT pattern id = " 1883 << pattern <<
"+++\n";
1903 const bool hasPads(!thePads.empty());
1905 std::cout <<
"------------------------------------------------------------------------" << std::endl;
1906 if (!iscopad)
std::cout <<
"* GEM trigger pads ["<< bx_start <<
","<< bx_stop <<
"]: " << std::endl;
1907 else std::cout <<
"* GEM trigger coincidence pads ["<< bx_start <<
","<< bx_stop <<
"]: " << std::endl;
1909 for (
int bx = bx_start; bx <= bx_stop; bx++) {
1912 std::vector<std::pair<unsigned int, GEMPadDigi> > in_pads = thePads[bx];
1913 if (!iscopad)
std::cout <<
"N(pads) BX " << bx <<
" : " << in_pads.size() << std::endl;
1914 else std::cout <<
"N(copads) BX " << bx <<
" : " << in_pads.size() << std::endl;
1916 for (
const auto& pad : in_pads){
1918 std::cout <<
"\t" << roll_id <<
", pad = " << pad.second.pad() <<
", BX = " << pad.second.bx() + 6;
1931 for (
const auto& ch : superChamber->chambers()) {
1932 for (
const auto& roll : ch->etaPartitions()) {
1934 auto pads_in_det = gemPads->get(roll_id);
1935 for (
auto pad = pads_in_det.first; pad != pads_in_det.second; ++pad) {
1938 pads_[bx].push_back(std::make_pair(roll_id, *pad));
1950 auto detId1(
GEMDetId(region, 1, 1, 1, gemChamber, copad.roll()));
1951 auto detId2(
GEMDetId(region, 1, 1, 2, gemChamber, copad.roll()));
1962 if ((
p.first < 10)
or (
p.first > 15))
continue;
1963 if (((
p.second).first <= roll) and (roll <= (
p.second).second))
return true;
1987 if (not clct.
isValid())
return result;
1993 int clct_bx = clct.
getBX();
1994 const int lowPad(mymap[clct.
getKeyStrip()].first);
1995 const int highPad(mymap[clct.
getKeyStrip()].second);
1996 const bool debug(
false);
1997 if (debug)
std::cout <<
"CLCT lowpad " << lowPad <<
" highpad " << highPad <<
" delta pad " << deltaPad <<std::endl;
1998 for (
const auto&
p: pads){
2002 auto padRoll((
p.second).pad());
2004 if (debug)
std::cout <<
"Candidate GEMPad: " <<
p.second << std::endl;
2005 if (
std::abs(clct_bx-pad_bx)>deltaBX)
continue;
2007 if (debug)
std::cout <<
"++Matches! " << std::endl;
2008 result.push_back(
p);
2009 if (first)
return result;
2020 if (not alct.
isValid())
return result;
2024 int alct_bx = alct.
getBX();
2025 const bool debug(
false);
2026 if (debug)
std::cout <<
"ALCT keyWG " << alct.
getKeyWG() <<
", rolls " << alctRoll.first <<
" " << alctRoll.second <<
" bx "<< alct_bx << std::endl;
2027 for (
const auto&
p: pads){
2032 if (debug)
std::cout <<
"Candidate GEMPad: " <<
p.second << std::endl;
2036 if (
std::abs(alct_bx-pad_bx)>deltaBX)
continue;
2037 if (alctRoll.first == -99 and alctRoll.second == -99)
continue;
2038 else if (alctRoll.first == -99 and !(padRoll <= alctRoll.second))
continue;
2039 else if (alctRoll.second == -99 and !(padRoll >= alctRoll.first))
continue;
2040 else if ((alctRoll.first != -99 and alctRoll.second != -99) and
2041 (alctRoll.first-1 > padRoll
or padRoll > alctRoll.second+1))
continue;
2042 if (debug)
std::cout <<
"++Matches! " << std::endl;
2043 result.push_back(
p);
2044 if (first)
return result;
2057 const auto& padsClct(
matchingGEMPads(clct, pads, part, isCoPad,
false));
2058 const auto& padsAlct(
matchingGEMPads(alct, pads, part, isCoPad,
false));
2060 const bool debug(
false);
2061 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
2062 if (debug)
std::cout <<
"Finding common pads"<<std::endl;
2064 for (
const auto&
p : padsAlct){
2065 if (debug)
std::cout<<
"Candidate GEMPad matched to ALCT: " <<
p.first <<
" " <<
p.second << std::endl;
2066 for (
const auto&
q: padsClct){
2067 if (debug)
std::cout<<
"++Candidate GEMPad matched to CLCT: " <<
q.first <<
" " <<
q.second << std::endl;
2071 if (isCoPad)
std::cout <<
"++Matched copad" <<
GEMDetId(
p.first) <<
" " <<
p.second << std::endl;
2074 result.push_back(
p);
2075 if (first)
return result;
2078 if (debug)
std::cout <<
"-----------------------------------------------------------------------"<<std::endl;
2083 std::vector<GEMCoPadDigi>
int getQuality() const
return quality of a pattern (number of layers hit!)
bool isPadInOverlap(int roll)
bool dropLowQualityCLCTsNoGEMs_ME1a_
T getParameter(std::string const &) const
std::map< int, std::pair< int, int > > cscHsToGemPadME1a_
std::vector< CSCCorrelatedLCTDigi > sortLCTsByQuality(int bx, enum ME11Part=ME1B)
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 dropLowQualityCLCTsNoGEMs_ME1b_
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)
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
int deltaPad(int hs, int pad)
bool dropLowQualityALCTsNoGEMs_ME1a_
bool buildLCTfromCLCTandGEM_ME1a_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
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]
GEMPadsBX matchingGEMPads(const CSCCLCTDigi &cLCT, const GEMPadsBX &pads=GEMPadsBX(), enum ME11Part=ME1B, bool isCopad=false, bool first=true)
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())
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
def unique(seq, keepstr=True)
const unsigned theSubsector
int getBX() const
return BX
~CSCMotherboardME11GEM() override
std::map< int, std::pair< double, double > > gemRollToEtaLimits_
unsigned int encodePattern(const int ptn, const int highPt)
Abs< T >::type abs(const T &t)
std::unique_ptr< GEMCoPadProcessor > coPadProcessor
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)
std::vector< CSCCorrelatedLCTDigi > getLCTs1b()
unsigned int tmb_cross_bx_algo
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int deltaRoll(int wg, int roll)
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]
int getQuality() const
return quality of a pattern
int getAccelerator() const
bool doLCTGhostBustingWithGEMs_
std::vector< CSCALCTDigi > alctV
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_
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
Detector det() const
get the detector field from this detid
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)