8 #define NUM_CSC_CHAMBERS 6 * 9 12 #define NUM_RPC_CHAMBERS 7 * 10 14 #define NUM_GEM_CHAMBERS 15 16 #define NUM_DT_CHAMBERS 3 * 4 29 bool useRun3CCLUT_OTMB,
30 bool useRun3CCLUT_TMB) {
55 std::map<int, TriggerPrimitiveCollection>& selected_csc_map)
const {
56 TriggerPrimitiveCollection::const_iterator tp_it = muon_primitives.begin();
57 TriggerPrimitiveCollection::const_iterator tp_end = muon_primitives.end();
59 for (; tp_it != tp_end; ++tp_it) {
62 if (selected_csc >= 0) {
66 if (selected_csc_map[selected_csc].
size() < 2) {
67 selected_csc_map[selected_csc].push_back(*tp_it);
69 edm::LogWarning(
"L1T") <<
"\n******************* EMTF EMULATOR: SUPER-BIZZARE CASE *******************";
70 edm::LogWarning(
"L1T") <<
"Found 3 CSC trigger primitives in the same chamber";
71 for (
int ii = 0;
ii < 3;
ii++) {
81 edm::LogWarning(
"L1T") <<
"************************* ONLY KEEP FIRST TWO *************************\n\n";
91 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_csc_map.begin();
92 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_csc_map.end();
94 for (; map_tp_it != map_tp_end; ++map_tp_it) {
95 int selected = map_tp_it->first;
98 if (tmp_primitives.size() >= 4) {
99 edm::LogWarning(
"L1T") <<
"EMTF found 4 or more CSC LCTs in one chamber: keeping only two";
100 tmp_primitives.erase(tmp_primitives.begin() + 4, tmp_primitives.end());
101 tmp_primitives.erase(tmp_primitives.begin() + 2);
102 tmp_primitives.erase(tmp_primitives.begin() + 1);
103 }
else if (tmp_primitives.size() == 3) {
104 edm::LogWarning(
"L1T") <<
"EMTF found 3 CSC LCTs in one chamber: keeping only two";
105 tmp_primitives.erase(tmp_primitives.begin() + 2);
109 if (tmp_primitives.size() == 2) {
110 if ((tmp_primitives.at(0).getStrip() != tmp_primitives.at(1).getStrip()) &&
111 (tmp_primitives.at(0).getWire() != tmp_primitives.at(1).getWire())) {
119 tmp_primitives.insert(tmp_primitives.begin() + 1, tp1);
120 tmp_primitives.insert(tmp_primitives.begin() + 2, tp0);
123 const bool is_csc_me11 = (0 <= selected && selected <= 2) || (9 <= selected && selected <= 11) ||
128 if (tmp_primitives.size() == 2) {
136 tmp_primitives.insert(tmp_primitives.begin() + 1, tp1);
137 tmp_primitives.insert(tmp_primitives.begin() + 2, tp0);
139 emtf_assert(tmp_primitives.size() == 1 || tmp_primitives.size() == 4);
152 std::map<int, TriggerPrimitiveCollection>& selected_rpc_map)
const {
153 TriggerPrimitiveCollection::const_iterator tp_it = muon_primitives.begin();
154 TriggerPrimitiveCollection::const_iterator tp_end = muon_primitives.end();
156 for (; tp_it != tp_end; ++tp_it) {
159 if (selected_rpc >= 0) {
161 selected_rpc_map[selected_rpc].push_back(*tp_it);
174 bool apply_truncation =
true;
175 if (apply_truncation) {
180 if (
x.getRPCData().isCPPF)
183 int sz =
x.getRPCData().strip_hi -
x.getRPCData().strip_low + 1;
186 int tp_station = tp_detId.
station();
187 int tp_ring = tp_detId.
ring();
188 const bool is_irpc = (tp_station == 3 || tp_station == 4) && (tp_ring == 1);
195 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_rpc_map.begin();
196 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_rpc_map.end();
198 for (; map_tp_it != map_tp_end; ++map_tp_it) {
199 int selected = map_tp_it->first;
204 if (tmp_primitives.size() > 2 && tmp_primitives.at(0).getRPCData().isCPPF) {
205 edm::LogWarning(
"L1T") <<
"\n******************* EMTF EMULATOR: SUPER-BIZZARE CASE *******************";
206 edm::LogWarning(
"L1T") <<
"Found " << tmp_primitives.size() <<
" CPPF digis in the same chamber";
207 for (
const auto&
tp : tmp_primitives)
209 edm::LogWarning(
"L1T") <<
"************************* ONLY KEEP FIRST TWO *************************\n\n";
212 if ((selected % 10) == 8 || (selected % 10) == 9) {
214 if (tmp_primitives.size() > 4)
215 tmp_primitives.erase(tmp_primitives.begin() + 4, tmp_primitives.end());
218 if (tmp_primitives.size() > 2)
219 tmp_primitives.erase(tmp_primitives.begin() + 2, tmp_primitives.end());
223 tmp_primitives.erase(std::remove_if(tmp_primitives.begin(), tmp_primitives.end(), cluster_size_cut),
224 tmp_primitives.end());
230 bool map_rpc_to_csc =
true;
231 if (map_rpc_to_csc) {
232 std::map<int, TriggerPrimitiveCollection> tmp_selected_rpc_map;
234 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_rpc_map.begin();
235 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_rpc_map.end();
237 for (; map_tp_it != map_tp_end; ++map_tp_it) {
238 int selected = map_tp_it->first;
241 int rpc_sub = selected / 10;
242 int rpc_chm = selected % 10;
249 if (0 <= rpc_sub && rpc_sub < 3) {
251 pc_chamber = 3 + rpc_sub;
252 }
else if (3 <= rpc_sub && rpc_sub < 6) {
254 pc_chamber = 3 + (rpc_sub - 3);
256 }
else if (rpc_chm == 6) {
257 if (0 <= rpc_sub && rpc_sub < 3) {
259 pc_chamber = 6 + rpc_sub;
260 }
else if (3 <= rpc_sub && rpc_sub < 6) {
262 pc_chamber = 6 + (rpc_sub - 3);
264 }
else if (rpc_chm == 1 || rpc_chm == 7) {
266 pc_chamber = 3 + rpc_sub;
267 }
else if (2 <= rpc_chm && rpc_chm <= 3) {
269 pc_chamber = 3 + rpc_sub;
270 }
else if (4 <= rpc_chm && rpc_chm <= 5) {
272 pc_chamber = 3 + rpc_sub;
273 }
else if (rpc_chm == 8) {
275 pc_chamber = rpc_sub;
276 }
else if (rpc_chm == 9) {
278 pc_chamber = rpc_sub;
285 }
else if (rpc_chm == 6) {
287 }
else if (rpc_chm == 1 || rpc_chm == 7) {
289 }
else if (2 <= rpc_chm && rpc_chm <= 3) {
291 }
else if (4 <= rpc_chm && rpc_chm <= 5) {
293 }
else if (rpc_chm == 8) {
295 }
else if (rpc_chm == 9) {
302 selected = (pc_station * 9) + pc_chamber;
304 bool ignore_this_rpc_chm =
false;
305 if (rpc_chm == 3 || rpc_chm == 5) {
308 if (tmp_selected_rpc_map.find(selected) != tmp_selected_rpc_map.end())
309 ignore_this_rpc_chm =
true;
312 if (rpc_chm == 6 || rpc_chm == 7) {
313 ignore_this_rpc_chm =
true;
316 if (rpc_chm == 8 || rpc_chm == 9) {
317 ignore_this_rpc_chm =
true;
320 if (ignore_this_rpc_chm) {
322 for (
auto&&
tp : tmp_primitives) {
323 tp.accessRPCData().valid = 0;
328 if (tmp_selected_rpc_map.find(selected) == tmp_selected_rpc_map.end()) {
329 tmp_selected_rpc_map[selected] = tmp_primitives;
331 tmp_selected_rpc_map[selected].insert(
332 tmp_selected_rpc_map[selected].
end(), tmp_primitives.begin(), tmp_primitives.end());
336 std::swap(selected_rpc_map, tmp_selected_rpc_map);
345 std::map<int, TriggerPrimitiveCollection>& selected_gem_map)
const {
346 TriggerPrimitiveCollection::const_iterator tp_it = muon_primitives.begin();
347 TriggerPrimitiveCollection::const_iterator tp_end = muon_primitives.end();
349 for (; tp_it != tp_end; ++tp_it) {
352 if (selected_gem >= 0) {
354 selected_gem_map[selected_gem].push_back(*tp_it);
359 bool apply_truncation =
true;
360 if (apply_truncation) {
364 int sz =
x.getGEMData().pad_hi -
x.getGEMData().pad_low + 1;
369 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_gem_map.begin();
370 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_gem_map.end();
372 for (; map_tp_it != map_tp_end; ++map_tp_it) {
377 tmp_primitives.erase(std::remove_if(tmp_primitives.begin(), tmp_primitives.end(), cluster_size_cut),
378 tmp_primitives.end());
381 if (tmp_primitives.size() > 8)
382 tmp_primitives.erase(tmp_primitives.begin() + 8, tmp_primitives.end());
392 std::map<int, TriggerPrimitiveCollection>& selected_me0_map)
const {
393 TriggerPrimitiveCollection::const_iterator tp_it = muon_primitives.begin();
394 TriggerPrimitiveCollection::const_iterator tp_end = muon_primitives.end();
396 for (; tp_it != tp_end; ++tp_it) {
399 if (selected_me0 >= 0) {
401 selected_me0_map[selected_me0].push_back(*tp_it);
406 bool apply_truncation =
true;
407 if (apply_truncation) {
408 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_me0_map.begin();
409 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_me0_map.end();
411 for (; map_tp_it != map_tp_end; ++map_tp_it) {
416 if (tmp_primitives.size() > 20)
417 tmp_primitives.erase(tmp_primitives.begin() + 20, tmp_primitives.end());
427 std::map<int, TriggerPrimitiveCollection>& selected_dt_map)
const {
428 TriggerPrimitiveCollection::const_iterator tp_it = muon_primitives.begin();
429 TriggerPrimitiveCollection::const_iterator tp_end = muon_primitives.end();
431 for (; tp_it != tp_end; ++tp_it) {
434 if (selected_dt >= 0) {
436 selected_dt_map[selected_dt].push_back(*tp_it);
442 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_dt_map.begin();
443 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_dt_map.end();
445 for (; map_tp_it != map_tp_end; ++map_tp_it) {
451 if (tmp_primitives.size() == 2) {
452 if ((tmp_primitives.at(0).getStrip() != tmp_primitives.at(1).getStrip()) &&
453 (tmp_primitives.at(0).getWire() != tmp_primitives.at(1).getWire())) {
461 tmp_primitives.insert(tmp_primitives.begin() + 1, tp1);
462 tmp_primitives.insert(tmp_primitives.begin() + 2, tp0);
490 const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
491 const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
492 const std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
493 const std::map<int, TriggerPrimitiveCollection>& selected_me0_map,
494 std::map<int, TriggerPrimitiveCollection>& selected_prim_map)
const {
496 std::map<int, TriggerPrimitiveCollection>::const_iterator map_tp_it = selected_csc_map.begin();
497 std::map<int, TriggerPrimitiveCollection>::const_iterator map_tp_end = selected_csc_map.end();
499 for (; map_tp_it != map_tp_end; ++map_tp_it) {
500 int selected_csc = map_tp_it->first;
505 selected_prim_map[selected_csc] = csc_primitives;
509 map_tp_it = selected_gem_map.begin();
510 map_tp_end = selected_gem_map.end();
512 for (; map_tp_it != map_tp_end; ++map_tp_it) {
513 int selected_gem = map_tp_it->first;
515 if (gem_primitives.empty())
519 bool found = (selected_prim_map.find(selected_gem) != selected_prim_map.end());
522 selected_prim_map[selected_gem] = gem_primitives;
530 map_tp_it = selected_rpc_map.begin();
531 map_tp_end = selected_rpc_map.end();
533 for (; map_tp_it != map_tp_end; ++map_tp_it) {
534 int selected_rpc = map_tp_it->first;
536 if (rpc_primitives.empty())
540 bool found = (selected_prim_map.find(selected_rpc) != selected_prim_map.end());
547 for (
const auto&
tp : rpc_primitives) {
548 if (
tp.getRPCData().valid != 0) {
549 tmp_rpc_primitives.push_back(
tp);
554 selected_prim_map[selected_rpc] = tmp_rpc_primitives;
569 const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
570 const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
571 const std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
572 const std::map<int, TriggerPrimitiveCollection>& selected_me0_map,
573 std::map<int, TriggerPrimitiveCollection>& selected_prim_map)
const {
575 merge_map_into_map(selected_csc_map, selected_prim_map);
578 merge_map_into_map(selected_me0_map, selected_prim_map);
581 merge_map_into_map(selected_gem_map, selected_prim_map);
584 merge_map_into_map(selected_rpc_map, selected_prim_map);
587 merge_map_into_map(selected_dt_map, selected_prim_map);
599 int tp_endcap = tp_detId.
endcap();
601 int tp_station = tp_detId.
station();
602 int tp_ring = tp_detId.
ring();
603 int tp_chamber = tp_detId.
chamber();
605 int tp_bx = tp_data.bx;
606 int tp_csc_ID = tp_data.cscID;
621 emtf_assert(0 < tp_data.quality && tp_data.quality < max_quality);
627 if (!(tp_data.strip < max_strip)) {
628 edm::LogWarning(
"L1T") <<
"Found error in LCT strip: " << tp_data.strip <<
" (allowed range: 0-" 629 << max_strip - 1 <<
").";
631 <<
"From endcap " << tp_endcap <<
", sector " << tp_sector <<
", station " << tp_station <<
", ring " 632 << tp_ring <<
", cscid " << tp_csc_ID
633 <<
". (Note that this LCT may be reported multiple times. See source code for explanations.)";
637 if (!(tp_data.keywire < max_wire)) {
638 edm::LogWarning(
"L1T") <<
"Found error in LCT wire: " << tp_data.keywire <<
" (allowed range: 0-" 639 << max_wire - 1 <<
").";
641 <<
"From endcap " << tp_endcap <<
", sector " << tp_sector <<
", station " << tp_station <<
", ring " 642 << tp_ring <<
", cscid " << tp_csc_ID
643 <<
". (Note that this LCT may be reported multiple times. See source code for explanations.)";
647 if (!(tp_data.valid ==
true)) {
648 edm::LogWarning(
"L1T") <<
"Found error in LCT valid: " << tp_data.valid <<
" (allowed value: 1).";
650 <<
"From endcap " << tp_endcap <<
", sector " << tp_sector <<
", station " << tp_station <<
", ring " 651 << tp_ring <<
", cscid " << tp_csc_ID
652 <<
". (Note that this LCT may be reported multiple times. See source code for explanations.)";
656 if (!(tp_data.pattern < max_pattern)) {
657 edm::LogWarning(
"L1T") <<
"Found error in LCT pattern: " << tp_data.pattern <<
" (allowed range: 0-" 658 << max_pattern - 1 <<
").";
660 <<
"From endcap " << tp_endcap <<
", sector " << tp_sector <<
", station " << tp_station <<
", ring " 661 << tp_ring <<
", cscid " << tp_csc_ID
662 <<
". (Note that this LCT may be reported multiple times. See source code for explanations.)";
666 if (!(0 < tp_data.quality && tp_data.quality < max_quality)) {
667 edm::LogWarning(
"L1T") <<
"Found error in LCT quality: " << tp_data.quality <<
" (allowed range: 1-" 668 << max_quality - 1 <<
").";
670 <<
"From endcap " << tp_endcap <<
", sector " << tp_sector <<
", station " << tp_station <<
", ring " 671 << tp_ring <<
", cscid " << tp_csc_ID
672 <<
". (Note that this LCT may be reported multiple times. See source code for explanations.)";
676 if (!(tp_data.slope < max_slope)) {
677 edm::LogWarning(
"L1T") <<
"Found error in LCT slope: " << tp_data.slope <<
" (allowed range: 0-" 678 << max_slope - 1 <<
").";
680 <<
"From endcap " << tp_endcap <<
", sector " << tp_sector <<
", station " << tp_station <<
", ring " 681 << tp_ring <<
", cscid " << tp_csc_ID
682 <<
". (Note that this LCT may be reported multiple times. See source code for explanations.)";
689 int tp_subsector = (tp_station != 1) ? 0 : ((tp_chamber % 6 > 2) ? 1 : 2);
692 selected =
get_index_csc(tp_endcap, tp_sector, tp_subsector, tp_station, tp_csc_ID, tp_bx);
702 int tp_endcap,
int tp_sector,
int tp_subsector,
int tp_station,
int tp_csc_ID)
const {
706 if ((
endcap_ == tp_endcap) && (get_neighbor(
sector_) == tp_sector)) {
707 if (tp_station == 1) {
708 if ((tp_subsector == 2) && (tp_csc_ID == 3 || tp_csc_ID == 6 || tp_csc_ID == 9))
712 if (tp_csc_ID == 3 || tp_csc_ID == 9)
722 return (
bx_ == tp_bx);
727 int tp_endcap,
int tp_sector,
int tp_subsector,
int tp_station,
int tp_csc_ID,
int tp_bx)
const {
730 bool is_native =
false;
731 bool is_neighbor =
false;
739 if (!is_native && !is_neighbor)
743 if (tp_station == 1) {
744 selected = (tp_subsector - 1) * 9 + (tp_csc_ID - 1);
746 selected = (tp_station)*9 + (tp_csc_ID - 1);
750 if (tp_station == 1) {
751 selected = (5) * 9 + (tp_csc_ID - 1) / 3;
753 selected = (5) * 9 + (tp_station)*2 - 1 + (tp_csc_ID - 1 < 3 ? 0 : 1);
769 int tp_region = tp_detId.
region();
770 int tp_endcap = (tp_region == -1) ? 2 : tp_region;
771 int tp_sector = tp_detId.
sector();
773 int tp_station = tp_detId.
station();
774 int tp_ring = tp_detId.
ring();
775 int tp_roll = tp_detId.
roll();
778 int tp_bx = tp_data.bx;
779 int tp_strip = tp_data.strip;
780 int tp_emtf_sect = tp_data.emtf_sector;
781 bool tp_CPPF = tp_data.isCPPF;
784 if (tp_CPPF && (tp_emtf_sect !=
sector_))
787 const bool is_irpc = (tp_station == 3 || tp_station == 4) && (tp_ring == 1);
793 emtf_assert(1 <= tp_subsector && tp_subsector <= 6);
795 emtf_assert((!is_irpc && 2 <= tp_ring && tp_ring <= 3) || (is_irpc && tp_ring == 1));
796 emtf_assert((!is_irpc && 1 <= tp_roll && tp_roll <= 3) || (is_irpc && 1 <= tp_roll && tp_roll <= 5));
798 emtf_assert((!is_irpc && (tp_CPPF || (1 <= tp_strip && tp_strip <= 32))) ||
799 (is_irpc && 1 <= tp_strip && tp_strip <= 96 * 2));
805 selected =
get_index_rpc(tp_endcap, tp_station, tp_ring, tp_sector, tp_subsector, tp_bx);
811 int tp_endcap,
int tp_station,
int tp_ring,
int tp_sector,
int tp_subsector)
const {
816 auto get_csc_sector = [](
int tp_station,
int tp_ring,
int tp_sector,
int tp_subsector) {
817 const bool is_irpc = (tp_station == 3 || tp_station == 4) && (tp_ring == 1);
820 int corr = (tp_subsector < 2) ? (tp_sector == 1 ? +5 : -1) : 0;
821 return tp_sector +
corr;
824 int corr = (tp_subsector < 3) ? (tp_sector == 1 ? +5 : -1) : 0;
825 return tp_sector +
corr;
828 return ((
endcap_ == tp_endcap) && (
sector_ == get_csc_sector(tp_station, tp_ring, tp_sector, tp_subsector)));
832 int tp_endcap,
int tp_station,
int tp_ring,
int tp_sector,
int tp_subsector)
const {
833 auto get_neighbor_subsector = [](
int tp_station,
int tp_ring) {
834 const bool is_irpc = (tp_station == 3 || tp_station == 4) && (tp_ring == 1);
844 (tp_subsector == get_neighbor_subsector(tp_station, tp_ring)));
849 return (
bx_ == tp_bx);
853 int tp_endcap,
int tp_station,
int tp_ring,
int tp_sector,
int tp_subsector,
int tp_bx)
const {
856 bool is_native =
false;
857 bool is_neighbor =
false;
859 if (
is_in_sector_rpc(tp_endcap, tp_station, tp_ring, tp_sector, tp_subsector)) {
865 if (!is_native && !is_neighbor)
881 const bool is_irpc = (tp_station == 3 || tp_station == 4) && (tp_ring == 1);
885 rpc_sub = ((tp_subsector + 3) % 6);
887 rpc_sub = ((tp_subsector + 1) % 3);
893 if (tp_station <= 2 && tp_ring == 2) {
894 rpc_chm = (tp_station - 1);
895 }
else if (tp_station >= 3 && tp_ring >= 2) {
896 rpc_chm = 2 + (tp_station - 3) * 2 + (tp_ring - 2);
897 }
else if (tp_station <= 2 && tp_ring == 3) {
898 rpc_chm = 6 + (tp_station - 1);
899 }
else if (tp_station >= 3 && tp_ring == 1) {
900 rpc_chm = 8 + (tp_station - 3);
903 selected = (rpc_sub * 10) + rpc_chm;
921 int tp_region = tp_detId.
region();
922 int tp_endcap = (tp_region == -1) ? 2 : tp_region;
923 int tp_station = tp_detId.
station();
924 int tp_ring = tp_detId.
ring();
925 int tp_roll = tp_detId.
roll();
926 int tp_layer = tp_detId.
layer();
927 int tp_chamber = tp_detId.
chamber();
929 int tp_bx = tp_data.bx;
930 int tp_pad = ((tp_data.pad_low + tp_data.pad_hi) / 2);
937 int tp_subsector = (tp_station != 1) ? 0 : ((tp_chamber % 6 > 2) ? 1 : 2);
948 emtf_assert((tp_station == 1 && 0 <= tp_pad && tp_pad <= 191) || (tp_station != 1));
949 emtf_assert((tp_station == 2 && 0 <= tp_pad && tp_pad <= 383) || (tp_station != 2));
953 selected =
get_index_gem(tp_endcap, tp_sector, tp_subsector, tp_station, tp_csc_ID, tp_bx);
964 int tp_endcap,
int tp_sector,
int tp_subsector,
int tp_station,
int tp_csc_ID)
const {
971 return (
bx_ == tp_bx);
975 int tp_endcap,
int tp_sector,
int tp_subsector,
int tp_station,
int tp_csc_ID,
int tp_bx)
const {
978 bool is_native =
false;
979 bool is_neighbor =
false;
987 if (!is_native && !is_neighbor)
991 if (tp_station == 1) {
992 selected = (tp_subsector - 1) * 3 + (tp_csc_ID - 1);
994 selected = 6 + (tp_csc_ID - 1);
998 if (tp_station == 1) {
1020 int tp_region = tp_detId.
region();
1021 int tp_endcap = (tp_region == -1) ? 2 : tp_region;
1022 int tp_station = tp_detId.
station();
1026 int tp_chamber = tp_detId.
chamber();
1028 int tp_bx = tp_data.bx;
1029 int tp_pad = tp_data.phiposition;
1030 int tp_partition = tp_data.partition;
1036 int tp_subsector = 0;
1048 emtf_assert(0 <= tp_partition && tp_partition <= 15);
1052 selected =
get_index_me0(tp_endcap, tp_sector, tp_subsector, tp_station, tp_csc_ID, tp_pad, tp_bx);
1066 bool add5deg =
false;
1067 bool sub5deg =
false;
1069 if ((
endcap_ == tp_endcap) && (get_other_neighbor(
sector_) == tp_sector)) {
1070 if (tp_csc_ID == 1 && tp_endcap == 1 && tp_pad >= (767 - 192)) {
1072 }
else if (tp_csc_ID == 1 && tp_endcap == 2 && tp_pad <= 191) {
1077 if (tp_csc_ID == 1 && tp_endcap == 1 && tp_pad >= (767 - 192)) {
1079 }
else if (tp_csc_ID == 1 && tp_endcap == 2 && tp_pad <= 191) {
1097 bool add5deg =
false;
1098 bool sub5deg =
false;
1100 if ((
endcap_ == tp_endcap) && (get_neighbor(
sector_) == tp_sector)) {
1101 if (tp_csc_ID == 3 && tp_endcap == 1 && tp_pad >= (767 - 192)) {
1103 }
else if (tp_csc_ID == 3 && tp_endcap == 2 && tp_pad <= 191) {
1108 if (tp_csc_ID == 1 && tp_endcap == 1 && tp_pad >= (767 - 192)) {
1110 }
else if (tp_csc_ID == 1 && tp_endcap == 2 && tp_pad <= 191) {
1121 return (
bx_ == tp_bx);
1125 int tp_endcap,
int tp_sector,
int tp_subsector,
int tp_station,
int tp_csc_ID,
int tp_pad,
int tp_bx)
const {
1128 bool is_native =
false;
1129 bool is_neighbor =
false;
1137 if (!is_native && !is_neighbor)
1141 selected = 9 + (tp_csc_ID - 1);
1158 int tp_wheel = tp_detId.
wheel();
1159 int tp_station = tp_detId.
station();
1160 int tp_sector = tp_detId.
sector();
1165 if (tp_station == 4) {
1166 if (tp_sector == 13)
1168 else if (tp_sector == 14)
1172 int tp_bx = tp_data.bx;
1173 int tp_phi = tp_data.radialAngle;
1180 int tp_endcap = (tp_wheel > 0) ? 1 : ((tp_wheel < 0) ? 2 : 0);
1183 int tp_subsector = 0;
1200 selected =
get_index_dt(tp_endcap, csc_tp_sector, tp_subsector, tp_station, tp_csc_ID, tp_bx);
1218 return (
bx_ == tp_bx);
1222 int tp_endcap,
int csc_tp_sector,
int tp_subsector,
int tp_station,
int tp_csc_ID,
int tp_bx)
const {
1225 bool is_native =
false;
1226 bool is_neighbor =
false;
1234 if (!is_native && !is_neighbor)
1238 selected = (tp_station - 1) * 2 + (tp_csc_ID - 6) / 3;
1240 selected = 8 + (tp_station - 1);
int get_index_dt(int tp_endcap, int csc_tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
int station() const
Return the station number.
void merge(const std::map< int, TriggerPrimitiveCollection > &selected_dt_map, const std::map< int, TriggerPrimitiveCollection > &selected_csc_map, const std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, const std::map< int, TriggerPrimitiveCollection > &selected_gem_map, const std::map< int, TriggerPrimitiveCollection > &selected_me0_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
RPCData getRPCData() const
bool is_in_neighbor_sector_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const
constexpr int station() const
int get_index_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const
constexpr int region() const
int get_trigger_sector(int ring, int station, int chamber)
int select_rpc(const TriggerPrimitive &muon_primitive) const
bool is_in_sector_csc(int tp_endcap, int tp_sector) const
bool is_in_bx_gem(int tp_bx) const
bool is_in_bx_csc(int tp_bx) const
CSCData getCSCData() const
bool is_in_neighbor_sector_dt(int tp_endcap, int tp_sector, int tp_csc_ID) const
int get_index_me0(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_pad, int tp_bx) const
std::pair< int, int > get_csc_max_pattern_and_quality(int station, int ring)
constexpr int layer() const
constexpr int chamber() const
GEMData getGEMData() const
int get_trigger_csc_ID(int ring, int station, int chamber)
void merge_no_truncate(const std::map< int, TriggerPrimitiveCollection > &selected_dt_map, const std::map< int, TriggerPrimitiveCollection > &selected_csc_map, const std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, const std::map< int, TriggerPrimitiveCollection > &selected_gem_map, const std::map< int, TriggerPrimitiveCollection > &selected_me0_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
bool is_in_sector_gem(int tp_endcap, int tp_sector) const
constexpr int MIN_TRIGSECTOR
bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const
Container::value_type value_type
int select_csc(const TriggerPrimitive &muon_primitive) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
CSCData & accessCSCData()
int get_index_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const
int get_csc_max_slope(int station, int ring, bool useRun3CCLUT_OTMB, bool useRun3CCLUT_TMB)
bool is_in_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const
constexpr int ring() const
void configure(int verbose, int endcap, int sector, int bx, int bxShiftCSC, int bxShiftRPC, int bxShiftGEM, int bxShiftME0, bool includeNeighbor, bool duplicateTheta, bool bugME11Dupes, bool useRun3CCLUT_OTMB, bool useRun3CCLUT_TMB)
int get_index_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector, int tp_bx) const
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const
int select_dt(const TriggerPrimitive &muon_primitive) const
bool is_in_bx_me0(int tp_bx) const
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
int select_gem(const TriggerPrimitive &muon_primitive) const
bool is_in_sector_dt(int tp_endcap, int tp_sector) const
bool is_in_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const
std::pair< int, int > get_csc_max_strip_and_wire(int station, int ring)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
int wheel() const
Return the wheel number.
constexpr int roll() const
int select_me0(const TriggerPrimitive &muon_primitive) const
void process(T tag, const TriggerPrimitiveCollection &muon_primitives, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
bool is_in_bx_rpc(int tp_bx) const
bool is_in_neighbor_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const
subsystem_type subsystem() const
constexpr int MAX_TRIGSECTOR
int triggerSector() const
Log< level::Warning, false > LogWarning
ME0Data getME0Data() const
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
Int_t triggerSector(Int_t station, Int_t ring, Int_t chamber) const
bool is_in_bx_dt(int tp_bx) const