10 #define NUM_CSC_CHAMBERS 6*9 // 18 in ME1; 9 in ME2,3,4; 9 from neighbor sector. 12 #define NUM_RPC_CHAMBERS 7*6 // 6 in RE1,2; 12 in RE3,4; 6 from neighbor sector. 14 #define NUM_GEM_CHAMBERS 6*9 // 6 in GE1/1; 3 in GE2/1; 2 from neighbor sector. 20 int bxShiftCSC,
int bxShiftRPC,
int bxShiftGEM,
21 bool includeNeighbor,
bool duplicateTheta,
45 std::map<int, TriggerPrimitiveCollection>& selected_csc_map
47 TriggerPrimitiveCollection::const_iterator tp_it = muon_primitives.begin();
48 TriggerPrimitiveCollection::const_iterator tp_end = muon_primitives.end();
50 for (; tp_it != tp_end; ++tp_it) {
55 bool patchPattern =
true;
65 bool patchQuality =
true;
75 if (selected_csc >= 0) {
79 if (selected_csc_map[selected_csc].
size() < 2) {
80 selected_csc_map[selected_csc].push_back(new_tp);
83 edm::LogWarning(
"L1T") <<
"\n******************* EMTF EMULATOR: SUPER-BIZZARE CASE *******************";
84 edm::LogWarning(
"L1T") <<
"Found 3 CSC trigger primitives in the same chamber";
85 for (
int ii = 0;
ii < 3;
ii++) {
93 edm::LogWarning(
"L1T") <<
"************************* ONLY KEEP FIRST TWO *************************\n\n";
103 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_csc_map.begin();
104 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_csc_map.end();
106 for (; map_tp_it != map_tp_end; ++map_tp_it) {
107 int selected = map_tp_it->first;
109 if (not(tmp_primitives.size() <= 2))
110 {
edm::LogError(
"L1T") <<
"tmp_primitives.size() = " << tmp_primitives.size() ;
return; }
112 if (tmp_primitives.size() == 2) {
114 (tmp_primitives.at(0).getStrip() != tmp_primitives.at(1).getStrip()) &&
115 (tmp_primitives.at(0).getWire() != tmp_primitives.at(1).getWire())
124 tmp_primitives.insert(tmp_primitives.begin()+1, tp1);
125 tmp_primitives.insert(tmp_primitives.begin()+2, tp0);
128 const bool is_csc_me11 = (0 <= selected && selected <= 2) || (9 <= selected && selected <= 11) || (selected == 45);
132 if (tmp_primitives.size() == 2) {
140 tmp_primitives.insert(tmp_primitives.begin()+1, tp1);
141 tmp_primitives.insert(tmp_primitives.begin()+2, tp0);
143 if (not(tmp_primitives.size() == 1 || tmp_primitives.size() == 4))
144 {
edm::LogError(
"L1T") <<
"tmp_primitives.size() = " << tmp_primitives.size();
return; }
159 std::map<int, TriggerPrimitiveCollection>& selected_rpc_map
164 cluster_rpc(muon_primitives, clus_muon_primitives);
166 TriggerPrimitiveCollection::const_iterator tp_it = clus_muon_primitives.begin();
167 TriggerPrimitiveCollection::const_iterator tp_end = clus_muon_primitives.end();
169 for (; tp_it != tp_end; ++tp_it) {
172 if (selected_rpc >= 0) {
175 selected_rpc_map[selected_rpc].push_back(*tp_it);
187 bool apply_truncation =
true;
188 if (apply_truncation) {
191 bool operator()(
const value_type&
x)
const {
192 int sz = x.getRPCData().strip_hi - x.getRPCData().strip_low + 1;
197 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_rpc_map.begin();
198 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_rpc_map.end();
200 for (; map_tp_it != map_tp_end; ++map_tp_it) {
205 if (tmp_primitives.size() > 2)
206 tmp_primitives.erase(tmp_primitives.begin()+2, tmp_primitives.end());
209 tmp_primitives.erase(
210 std::remove_if(tmp_primitives.begin(), tmp_primitives.end(), cluster_size_cut),
218 bool map_rpc_to_csc =
true;
219 if (map_rpc_to_csc) {
220 std::map<int, TriggerPrimitiveCollection> tmp_selected_rpc_map;
222 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_rpc_map.begin();
223 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_rpc_map.end();
225 for (; map_tp_it != map_tp_end; ++map_tp_it) {
226 int selected = map_tp_it->first;
229 int rpc_sub = selected / 6;
230 int rpc_chm = selected % 6;
237 if (0 <= rpc_sub && rpc_sub < 3) {
239 pc_chamber = 3 + rpc_sub;
240 }
else if (3 <= rpc_sub && rpc_sub < 6) {
242 pc_chamber = 3 + (rpc_sub - 3);
244 }
else if (rpc_chm == 1) {
246 pc_chamber = 3 + rpc_sub;
247 }
else if (2 <= rpc_chm && rpc_chm <= 3) {
249 pc_chamber = 3 + rpc_sub;
250 }
else if (4 <= rpc_chm && rpc_chm <= 5) {
252 pc_chamber = 3 + rpc_sub;
259 }
else if (rpc_chm == 1) {
261 }
else if (2 <= rpc_chm && rpc_chm <= 3) {
263 }
else if (4 <= rpc_chm && rpc_chm <= 5) {
268 if (not(pc_station != -1 && pc_chamber != -1))
269 {
edm::LogError(
"L1T") <<
"pc_station = " << pc_station <<
", pc_chamber = " << pc_chamber;
return; }
271 selected = (pc_station * 9) + pc_chamber;
273 bool ignore_this_rpc_chm =
false;
274 if (rpc_chm == 3 || rpc_chm == 5) {
277 if (tmp_selected_rpc_map.find(selected) != tmp_selected_rpc_map.end())
278 ignore_this_rpc_chm =
true;
281 if (!ignore_this_rpc_chm) {
282 if (not(tmp_selected_rpc_map.find(selected) == tmp_selected_rpc_map.end()))
283 {
edm::LogError(
"L1T") <<
"tmp_selected_rpc_map.find(selected) != tmp_selected_rpc_map.end()";
return; }
284 tmp_selected_rpc_map[selected] = tmp_primitives;
287 tmp_selected_rpc_map[selected].insert(tmp_selected_rpc_map[selected].
end(), tmp_primitives.begin(), tmp_primitives.end());
292 std::swap(selected_rpc_map, tmp_selected_rpc_map);
303 std::map<int, TriggerPrimitiveCollection>& selected_gem_map
308 cluster_gem(muon_primitives, clus_muon_primitives);
310 TriggerPrimitiveCollection::const_iterator tp_it = clus_muon_primitives.begin();
311 TriggerPrimitiveCollection::const_iterator tp_end = clus_muon_primitives.end();
313 for (; tp_it != tp_end; ++tp_it) {
316 if (selected_gem >= 0) {
319 selected_gem_map[selected_gem].push_back(*tp_it);
324 bool apply_truncation =
true;
325 if (apply_truncation) {
328 bool operator()(
const value_type&
x)
const {
329 int sz = x.getRPCData().strip_hi - x.getRPCData().strip_low + 1;
334 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_it = selected_gem_map.begin();
335 std::map<int, TriggerPrimitiveCollection>::iterator map_tp_end = selected_gem_map.end();
337 for (; map_tp_it != map_tp_end; ++map_tp_it) {
342 tmp_primitives.erase(
343 std::remove_if(tmp_primitives.begin(), tmp_primitives.end(), cluster_size_cut),
348 if (tmp_primitives.size() > 8)
349 tmp_primitives.erase(tmp_primitives.begin()+8, tmp_primitives.end());
378 std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
379 std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
380 std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
381 std::map<int, TriggerPrimitiveCollection>& selected_prim_map
385 std::map<int, TriggerPrimitiveCollection>::const_iterator map_tp_it = selected_csc_map.begin();
386 std::map<int, TriggerPrimitiveCollection>::const_iterator map_tp_end = selected_csc_map.end();
388 for (; map_tp_it != map_tp_end; ++map_tp_it) {
389 int selected_csc = map_tp_it->first;
391 if (not(csc_primitives.size() <= 4))
392 {
edm::LogError(
"L1T") <<
"csc_primitives.size() = " << csc_primitives.size();
return; }
395 selected_prim_map[selected_csc] = csc_primitives;
399 map_tp_it = selected_rpc_map.begin();
400 map_tp_end = selected_rpc_map.end();
402 for (; map_tp_it != map_tp_end; ++map_tp_it) {
403 int selected_rpc = map_tp_it->first;
405 if (rpc_primitives.empty())
continue;
406 if (not(rpc_primitives.size() <= 4))
407 {
edm::LogError(
"L1T") <<
"rpc_primitives.size() = " << rpc_primitives.size();
return; }
409 bool found = (selected_prim_map.find(selected_rpc) != selected_prim_map.end());
412 int pc_station = selected_rpc / 9;
413 int pc_chamber = selected_rpc % 9;
414 int station =
std::max(1, (pc_station < 5 ? pc_station : pc_chamber / 2));
418 selected_prim_map[selected_rpc] = rpc_primitives;
421 bool RPC_in_ring_2 =
false;
422 bool RPC_in_ring_3 =
false;
424 for (
const auto& tp_it : rpc_primitives) {
425 if (tp_it.detId<
RPCDetId>().
ring() == 2) RPC_in_ring_2 =
true;
426 if (tp_it.detId<
RPCDetId>().
ring() == 3) RPC_in_ring_3 =
true;
429 if (!RPC_in_ring_2 || !RPC_in_ring_3)
430 selected_prim_map[selected_rpc] = rpc_primitives;
433 for (
const auto& tp_it : rpc_primitives) {
435 rpc_primitives_ring_2.push_back(tp_it);
438 selected_prim_map[selected_rpc] = rpc_primitives_ring_2;
442 if (not(selected_prim_map[selected_rpc].
size() <= 2))
443 {
edm::LogError(
"L1T") <<
"selected_prim_map[selected_rpc].size() = " << selected_prim_map[selected_rpc].size();
return; }
457 map_tp_it = selected_gem_map.begin();
458 map_tp_end = selected_gem_map.end();
460 for (; map_tp_it != map_tp_end; ++map_tp_it) {
461 int selected_gem = map_tp_it->first;
463 if (gem_primitives.empty())
continue;
464 if (not(gem_primitives.size() <= 2))
465 {
edm::LogError(
"L1T") <<
"gem_primitives.size() = " << gem_primitives.size();
return; }
467 bool found = (selected_prim_map.find(selected_gem) != selected_prim_map.end());
470 selected_prim_map[selected_gem] = gem_primitives;
476 if (tmp_primitives.size() < 2) {
477 tmp_primitives.push_back(gem_primitives.front());
484 std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
485 std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
486 std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
487 std::map<int, TriggerPrimitiveCollection>& selected_prim_map
490 merge_map_into_map(selected_csc_map, selected_prim_map);
493 merge_map_into_map(selected_gem_map, selected_prim_map);
496 merge_map_into_map(selected_rpc_map, selected_prim_map);
499 selected_csc_map.clear();
500 selected_rpc_map.clear();
501 selected_gem_map.clear();
514 int tp_endcap = tp_detId.
endcap();
516 int tp_station = tp_detId.
station();
517 int tp_ring = tp_detId.
ring();
518 int tp_chamber = tp_detId.
chamber();
520 int tp_bx = tp_data.bx;
521 int tp_csc_ID = tp_data.cscID;
524 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_endcap = " << tp_endcap;
return selected; }
526 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_sector = " << tp_sector;
return selected; }
527 if ( !(1 <= tp_station && tp_station <= 4) ) {
528 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_station = " << tp_station;
return selected; }
529 if ( !(1 <= tp_csc_ID && tp_csc_ID <= 9) ) {
530 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_csc_ID = " << tp_csc_ID;
return selected; }
531 if ( !(tp_data.valid ==
true) ) {
532 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.valid = " << tp_data.valid ;
return selected; }
533 if ( !(tp_data.pattern <= 10) ) {
534 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.pattern = " << tp_data.pattern;
return selected; }
535 if ( !(tp_data.quality > 0) ) {
536 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.quality = " << tp_data.quality;
return selected; }
540 if (tp_station == 1 && tp_ring == 4) {
543 }
else if (tp_station == 1 && tp_ring == 1) {
546 }
else if (tp_station == 1 && tp_ring == 2) {
549 }
else if (tp_station == 1 && tp_ring == 3) {
552 }
else if (tp_station == 2 && tp_ring == 1) {
555 }
else if (tp_station >= 3 && tp_ring == 1) {
558 }
else if (tp_station >= 2 && tp_ring == 2) {
563 if ( !(tp_data.strip < max_strip) ) {
564 edm::LogWarning(
"L1T") <<
"EMTF CSC format error in station " << tp_station <<
", ring " << tp_ring
565 <<
": tp_data.strip = " << tp_data.strip <<
" (max = " << max_strip - 1 <<
")" << std::endl;
567 if ( !(tp_data.keywire < max_wire) ) {
568 edm::LogWarning(
"L1T") <<
"EMTF CSC format error in station " << tp_station <<
", ring " << tp_ring
569 <<
": tp_data.keywire = " << tp_data.keywire <<
" (max = " << max_wire - 1 <<
")" << std::endl;
575 int tp_subsector = (tp_station != 1) ? 0 : ((tp_chamber%6 > 2) ? 1 : 2);
580 selected =
get_index_csc(tp_subsector, tp_station, tp_csc_ID,
false);
582 selected =
get_index_csc(tp_subsector, tp_station, tp_csc_ID,
true);
594 auto get_neighbor = [](
int sector) {
595 return (sector == 1) ? 6 : sector - 1;
599 if ((
endcap_ == tp_endcap) && (get_neighbor(
sector_) == tp_sector)) {
600 if (tp_station == 1) {
601 if ((tp_subsector == 2) && (tp_csc_ID == 3 || tp_csc_ID == 6 || tp_csc_ID == 9))
605 if (tp_csc_ID == 3 || tp_csc_ID == 9)
615 return (
bx_ == tp_bx);
623 if (tp_station == 1) {
624 selected = (tp_subsector-1) * 9 + (tp_csc_ID-1);
626 selected = (tp_station) * 9 + (tp_csc_ID-1);
630 if (tp_station == 1) {
631 selected = (5) * 9 + (tp_csc_ID-1)/3;
633 selected = (5) * 9 + (tp_station) * 2 - 1 + (tp_csc_ID-1 < 3 ? 0 : 1);
646 bool operator()(
const value_type&
x)
const {
657 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
659 std::make_pair(std::make_pair(lhs.rawId(), lhs.getRPCData().bx), lhs.getRPCData().strip) <
660 std::make_pair(std::make_pair(rhs.rawId(), rhs.getRPCData().bx), rhs.getRPCData().strip)
668 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
670 std::make_pair(std::make_pair(lhs.rawId(), lhs.getRPCData().bx), lhs.getRPCData().strip) ==
671 std::make_pair(std::make_pair(rhs.rawId(), rhs.getRPCData().bx), rhs.getRPCData().strip)
682 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
684 (lhs.rawId() == rhs.rawId()) &&
685 (lhs.getRPCData().bx == rhs.getRPCData().bx) &&
686 (lhs.getRPCData().strip_hi+1 == rhs.getRPCData().strip_low)
694 void operator()(value_type& lhs, value_type& rhs) {
695 lhs.accessRPCData().strip_hi += 1;
703 std::copy_if(muon_primitives.begin(), muon_primitives.end(), std::back_inserter(clus_muon_primitives), rpc_digi_select);
706 std::sort(clus_muon_primitives.begin(), clus_muon_primitives.end(), rpc_digi_less);
709 clus_muon_primitives.erase(
710 std::unique(clus_muon_primitives.begin(), clus_muon_primitives.end(), rpc_digi_equal),
711 clus_muon_primitives.end()
715 clus_muon_primitives.erase(
716 adjacent_cluster(clus_muon_primitives.begin(), clus_muon_primitives.end(), rpc_digi_adjacent, rpc_digi_cluster),
717 clus_muon_primitives.end()
728 int tp_region = tp_detId.
region();
729 int tp_endcap = (tp_region == -1) ? 2 : tp_region;
730 int tp_sector = tp_detId.
sector();
732 int tp_station = tp_detId.
station();
733 int tp_ring = tp_detId.
ring();
734 int tp_roll = tp_detId.
roll();
737 int tp_bx = tp_data.bx;
738 int tp_strip = tp_data.strip;
740 if ( !(tp_region != 0) ) {
741 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_region = " << tp_region;
return selected; }
743 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_endcap = " << tp_endcap;
return selected; }
745 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_sector = " << tp_sector;
return selected; }
746 if ( !(1 <= tp_subsector && tp_subsector <= 6) ) {
747 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_subsector = " << tp_subsector;
return selected; }
748 if ( !(1 <= tp_station && tp_station <= 4) ) {
749 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_station = " << tp_station;
return selected; }
750 if ( !(2 <= tp_ring && tp_ring <= 3) ) {
751 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_ring = " << tp_ring;
return selected; }
752 if ( !(1 <= tp_roll && tp_roll <= 3) ) {
753 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_roll = " << tp_roll;
return selected; }
754 if ( !(1 <= tp_strip && tp_strip <= 32) ) {
755 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_data.strip = " << tp_data.strip;
return selected; }
756 if ( !(tp_station > 2 || tp_ring != 3) ) {
757 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_station = " << tp_station <<
", tp_ring = " << tp_ring;
return selected; }
763 selected =
get_index_rpc(tp_station, tp_ring, tp_subsector,
false);
765 selected =
get_index_rpc(tp_station, tp_ring, tp_subsector,
true);
775 auto get_real_sector = [](
int sector,
int subsector) {
776 int corr = (subsector < 3) ? (sector == 1 ? +5 : -1) : 0;
777 return sector +
corr;
779 return ((
endcap_ == tp_endcap) && (
sector_ == get_real_sector(tp_sector, tp_subsector)));
788 return (
bx_ == tp_bx);
807 rpc_sub = ((tp_subsector + 3) % 6);
812 if (tp_station <= 2) {
813 rpc_chm = (tp_station - 1);
815 rpc_chm = 2 + (tp_station - 3)*2 + (tp_ring - 2);
818 if (not(rpc_sub != -1 && rpc_chm != -1))
819 {
edm::LogError(
"L1T") <<
"rpc_sub = " << rpc_sub <<
", rpc_chm = " << rpc_chm;
return selected; }
821 selected = (rpc_sub * 6) + rpc_chm;
832 bool operator()(
const value_type&
x)
const {
843 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
845 std::make_pair(std::make_pair(lhs.rawId(), lhs.getGEMData().bx), lhs.getGEMData().pad) <
846 std::make_pair(std::make_pair(rhs.rawId(), rhs.getGEMData().bx), rhs.getGEMData().pad)
854 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
856 std::make_pair(std::make_pair(lhs.rawId(), lhs.getGEMData().bx), lhs.getGEMData().pad) ==
857 std::make_pair(std::make_pair(rhs.rawId(), rhs.getGEMData().bx), rhs.getGEMData().pad)
868 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
870 (lhs.rawId() == rhs.rawId()) &&
871 (lhs.getGEMData().bx == rhs.getGEMData().bx) &&
872 (lhs.getGEMData().pad_hi+1 == rhs.getGEMData().pad_low)
880 void operator()(value_type& lhs, value_type& rhs) {
881 lhs.accessGEMData().pad_hi += 1;
889 std::copy_if(muon_primitives.begin(), muon_primitives.end(), std::back_inserter(clus_muon_primitives), gem_digi_select);
892 std::sort(clus_muon_primitives.begin(), clus_muon_primitives.end(), gem_digi_less);
895 clus_muon_primitives.erase(
896 std::unique(clus_muon_primitives.begin(), clus_muon_primitives.end(), gem_digi_equal),
897 clus_muon_primitives.end()
901 clus_muon_primitives.erase(
902 adjacent_cluster(clus_muon_primitives.begin(), clus_muon_primitives.end(), gem_digi_adjacent, gem_digi_cluster),
903 clus_muon_primitives.end()
914 int tp_region = tp_detId.
region();
915 int tp_endcap = (tp_region == -1) ? 2 : tp_region;
916 int tp_station = tp_detId.
station();
917 int tp_ring = tp_detId.
ring();
918 int tp_roll = tp_detId.
roll();
919 int tp_layer = tp_detId.
layer();
920 int tp_chamber = tp_detId.
chamber();
922 int tp_bx = tp_data.bx;
923 int tp_pad = tp_data.pad;
929 if( station > 1 && ring > 1 ) {
930 result = ((
static_cast<unsigned>(
chamber-3) & 0x7f) / 6) + 1;
933 result = (station != 1) ? ((static_cast<unsigned>(
chamber-2) & 0x1f) / 3) + 1 :
934 ((
static_cast<unsigned>(
chamber-3) & 0x7f) / 6) + 1;
936 return (result <= 6) ? result : 6;
967 int tp_sector = get_trigger_sector(tp_ring, tp_station, tp_chamber);
968 int tp_csc_ID = get_trigger_csc_ID(tp_ring, tp_station, tp_chamber);
972 int tp_subsector = (tp_station != 1) ? 0 : ((tp_chamber%6 > 2) ? 1 : 2);
976 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_endcap = " << tp_endcap;
return selected; }
978 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_sector = " << tp_sector;
return selected; }
979 if ( !(1 <= tp_station && tp_station <= 2) ) {
980 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station;
return selected; }
981 if ( !(1 <= tp_ring && tp_ring <= 1) ) {
982 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_ring = " << tp_ring;
return selected; }
983 if ( !(1 <= tp_csc_ID && tp_csc_ID <= 9) ) {
984 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_csc_ID = " << tp_csc_ID;
return selected; }
985 if (!(tp_station == 1 && 1 <= tp_roll && tp_roll <= 8) || (tp_station != 1)) {
986 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
987 <<
", tp_roll = " << tp_roll;
return selected; }
988 if ( !(tp_station == 2 && 1 <= tp_roll && tp_roll <= 12) || (tp_station != 2)) {
989 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
990 <<
", tp_roll = " << tp_roll;
return selected; }
991 if ( !(1 <= tp_layer && tp_layer <= 2)) {
992 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_layer = " << tp_layer;
return selected; }
993 if ( !((tp_station == 1 && 1 <= tp_pad && tp_pad <= 192) || (tp_station != 1))) {
994 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
995 <<
", tp_pad = " << tp_pad;
return selected; }
996 if ( !((tp_station == 2 && 1 <= tp_pad && tp_pad <= 192) || (tp_station != 2))) {
997 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
998 <<
", tp_pad = " << tp_pad;
return selected; }
1003 selected =
get_index_gem(tp_subsector, tp_station, tp_csc_ID,
false);
1005 selected =
get_index_gem(tp_subsector, tp_station, tp_csc_ID,
true);
1024 return (
bx_ == tp_bx);
1029 return get_index_csc(tp_subsector, tp_station, tp_csc_ID, is_neighbor);
const subsystem_type subsystem() const
bool is_in_sector_csc(int tp_endcap, int tp_sector) const
void cluster_rpc(const TriggerPrimitiveCollection &muon_primitives, TriggerPrimitiveCollection &clus_muon_primitives) const
const GEMData getGEMData() const
int get_index_gem(int tp_subsector, int tp_station, int tp_csc_ID, bool is_neighbor) const
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
const CSCData getCSCData() const
int select_gem(const TriggerPrimitive &muon_primitive) const
bool is_in_sector_gem(int tp_endcap, int tp_sector) const
const RPCData getRPCData() const
void configure(int verbose, int endcap, int sector, int bx, int bxShiftCSC, int bxShiftRPC, int bxShiftGEM, bool includeNeighbor, bool duplicateTheta, bool bugME11Dupes)
const int getStrip() const
Container::value_type value_type
bool is_in_bx_gem(int tp_bx) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
CSCData & accessCSCData()
def unique(seq, keepstr=True)
int layer() const
Layer id: each station have two layers of chambers: layer 1 is the inner chamber and layer 2 is the o...
int select_rpc(const TriggerPrimitive &muon_primitive) const
int station() const
Station id : the station is the pair of chambers at same disk.
int select_csc(const TriggerPrimitive &muon_primitive) const
void process(T tag, const TriggerPrimitiveCollection &muon_primitives, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
void merge_no_truncate(std::map< int, TriggerPrimitiveCollection > &selected_csc_map, std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, std::map< int, TriggerPrimitiveCollection > &selected_gem_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
bool is_in_neighbor_sector_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const
bool is_in_bx_csc(int tp_bx) const
bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_sector, int tp_subsector) const
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
int get_index_csc(int tp_subsector, int tp_station, int tp_csc_ID, bool is_neighbor) const
bool is_in_bx_rpc(int tp_bx) const
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
bool is_in_sector_rpc(int tp_endcap, int tp_sector, int tp_subsector) const
int triggerSector() const
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
const int getWire() const
int get_index_rpc(int tp_station, int tp_ring, int tp_subsector, bool is_neighbor) const
void merge(std::map< int, TriggerPrimitiveCollection > &selected_csc_map, std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, std::map< int, TriggerPrimitiveCollection > &selected_gem_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
void cluster_gem(const TriggerPrimitiveCollection &muon_primitives, TriggerPrimitiveCollection &clus_muon_primitives) const
Int_t triggerSector(Int_t station, Int_t ring, Int_t chamber) const
bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.