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.strip < 160) ) {
532 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.strip = " << tp_data.strip ;
return selected; }
533 if ( !(tp_data.keywire < 128) ) {
534 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.keywire = " << tp_data.keywire;
return selected; }
535 if ( !(tp_data.valid ==
true) ) {
536 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.valid = " << tp_data.valid ;
return selected; }
537 if ( !(tp_data.pattern <= 10) ) {
538 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.pattern = " << tp_data.pattern;
return selected; }
539 if ( !(tp_data.quality > 0) ) {
540 edm::LogWarning(
"L1T") <<
"EMTF CSC format error: tp_data.quality = " << tp_data.quality;
return selected; }
544 if (tp_station == 1 && tp_ring == 1) {
545 if (not(tp_data.strip < 128))
546 {
edm::LogError(
"L1T") <<
"tp_data.strip = " << tp_data.strip;
return selected; }
547 if (not(1 <= tp_csc_ID && tp_csc_ID <= 3))
548 {
edm::LogError(
"L1T") <<
"tp_csc_ID = " << tp_csc_ID;
return selected; }
550 if (tp_station == 1 && tp_ring == 4) {
551 if (not(tp_data.strip < 128))
552 {
edm::LogError(
"L1T") <<
"tp_data.strip = " << tp_data.strip;
return selected; }
553 if (not(1 <= tp_csc_ID && tp_csc_ID <= 3))
554 {
edm::LogError(
"L1T") <<
"tp_csc_ID = " << tp_csc_ID;
return selected; }
559 int tp_subsector = (tp_station != 1) ? 0 : ((tp_chamber%6 > 2) ? 1 : 2);
564 selected =
get_index_csc(tp_subsector, tp_station, tp_csc_ID,
false);
566 selected =
get_index_csc(tp_subsector, tp_station, tp_csc_ID,
true);
578 auto get_neighbor = [](
int sector) {
579 return (sector == 1) ? 6 : sector - 1;
583 if ((
endcap_ == tp_endcap) && (get_neighbor(
sector_) == tp_sector)) {
584 if (tp_station == 1) {
585 if ((tp_subsector == 2) && (tp_csc_ID == 3 || tp_csc_ID == 6 || tp_csc_ID == 9))
589 if (tp_csc_ID == 3 || tp_csc_ID == 9)
599 return (
bx_ == tp_bx);
607 if (tp_station == 1) {
608 selected = (tp_subsector-1) * 9 + (tp_csc_ID-1);
610 selected = (tp_station) * 9 + (tp_csc_ID-1);
614 if (tp_station == 1) {
615 selected = (5) * 9 + (tp_csc_ID-1)/3;
617 selected = (5) * 9 + (tp_station) * 2 - 1 + (tp_csc_ID-1 < 3 ? 0 : 1);
630 bool operator()(
const value_type&
x)
const {
641 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
643 std::make_pair(std::make_pair(lhs.rawId(), lhs.getRPCData().bx), lhs.getRPCData().strip) <
644 std::make_pair(std::make_pair(rhs.rawId(), rhs.getRPCData().bx), rhs.getRPCData().strip)
652 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
654 std::make_pair(std::make_pair(lhs.rawId(), lhs.getRPCData().bx), lhs.getRPCData().strip) ==
655 std::make_pair(std::make_pair(rhs.rawId(), rhs.getRPCData().bx), rhs.getRPCData().strip)
666 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
668 (lhs.rawId() == rhs.rawId()) &&
669 (lhs.getRPCData().bx == rhs.getRPCData().bx) &&
670 (lhs.getRPCData().strip_hi+1 == rhs.getRPCData().strip_low)
678 void operator()(value_type& lhs, value_type& rhs) {
679 lhs.accessRPCData().strip_hi += 1;
687 std::copy_if(muon_primitives.begin(), muon_primitives.end(), std::back_inserter(clus_muon_primitives), rpc_digi_select);
690 std::sort(clus_muon_primitives.begin(), clus_muon_primitives.end(), rpc_digi_less);
693 clus_muon_primitives.erase(
694 std::unique(clus_muon_primitives.begin(), clus_muon_primitives.end(), rpc_digi_equal),
695 clus_muon_primitives.end()
699 clus_muon_primitives.erase(
700 adjacent_cluster(clus_muon_primitives.begin(), clus_muon_primitives.end(), rpc_digi_adjacent, rpc_digi_cluster),
701 clus_muon_primitives.end()
712 int tp_region = tp_detId.
region();
713 int tp_endcap = (tp_region == -1) ? 2 : tp_region;
714 int tp_sector = tp_detId.
sector();
716 int tp_station = tp_detId.
station();
717 int tp_ring = tp_detId.
ring();
718 int tp_roll = tp_detId.
roll();
721 int tp_bx = tp_data.bx;
722 int tp_strip = tp_data.strip;
724 if ( !(tp_region != 0) ) {
725 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_region = " << tp_region;
return selected; }
727 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_endcap = " << tp_endcap;
return selected; }
729 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_sector = " << tp_sector;
return selected; }
730 if ( !(1 <= tp_subsector && tp_subsector <= 6) ) {
731 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_subsector = " << tp_subsector;
return selected; }
732 if ( !(1 <= tp_station && tp_station <= 4) ) {
733 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_station = " << tp_station;
return selected; }
734 if ( !(2 <= tp_ring && tp_ring <= 3) ) {
735 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_ring = " << tp_ring;
return selected; }
736 if ( !(1 <= tp_roll && tp_roll <= 3) ) {
737 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_roll = " << tp_roll;
return selected; }
738 if ( !(1 <= tp_strip && tp_strip <= 32) ) {
739 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_data.strip = " << tp_data.strip;
return selected; }
740 if ( !(tp_station > 2 || tp_ring != 3) ) {
741 edm::LogWarning(
"L1T") <<
"EMTF RPC format error: tp_station = " << tp_station <<
", tp_ring = " << tp_ring;
return selected; }
747 selected =
get_index_rpc(tp_station, tp_ring, tp_subsector,
false);
749 selected =
get_index_rpc(tp_station, tp_ring, tp_subsector,
true);
759 auto get_real_sector = [](
int sector,
int subsector) {
760 int corr = (subsector < 3) ? (sector == 1 ? +5 : -1) : 0;
761 return sector +
corr;
763 return ((
endcap_ == tp_endcap) && (
sector_ == get_real_sector(tp_sector, tp_subsector)));
772 return (
bx_ == tp_bx);
791 rpc_sub = ((tp_subsector + 3) % 6);
796 if (tp_station <= 2) {
797 rpc_chm = (tp_station - 1);
799 rpc_chm = 2 + (tp_station - 3)*2 + (tp_ring - 2);
802 if (not(rpc_sub != -1 && rpc_chm != -1))
803 {
edm::LogError(
"L1T") <<
"rpc_sub = " << rpc_sub <<
", rpc_chm = " << rpc_chm;
return selected; }
805 selected = (rpc_sub * 6) + rpc_chm;
816 bool operator()(
const value_type&
x)
const {
827 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
829 std::make_pair(std::make_pair(lhs.rawId(), lhs.getGEMData().bx), lhs.getGEMData().pad) <
830 std::make_pair(std::make_pair(rhs.rawId(), rhs.getGEMData().bx), rhs.getGEMData().pad)
838 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
840 std::make_pair(std::make_pair(lhs.rawId(), lhs.getGEMData().bx), lhs.getGEMData().pad) ==
841 std::make_pair(std::make_pair(rhs.rawId(), rhs.getGEMData().bx), rhs.getGEMData().pad)
852 bool operator()(
const value_type& lhs,
const value_type& rhs)
const {
854 (lhs.rawId() == rhs.rawId()) &&
855 (lhs.getGEMData().bx == rhs.getGEMData().bx) &&
856 (lhs.getGEMData().pad_hi+1 == rhs.getGEMData().pad_low)
864 void operator()(value_type& lhs, value_type& rhs) {
865 lhs.accessGEMData().pad_hi += 1;
873 std::copy_if(muon_primitives.begin(), muon_primitives.end(), std::back_inserter(clus_muon_primitives), gem_digi_select);
876 std::sort(clus_muon_primitives.begin(), clus_muon_primitives.end(), gem_digi_less);
879 clus_muon_primitives.erase(
880 std::unique(clus_muon_primitives.begin(), clus_muon_primitives.end(), gem_digi_equal),
881 clus_muon_primitives.end()
885 clus_muon_primitives.erase(
886 adjacent_cluster(clus_muon_primitives.begin(), clus_muon_primitives.end(), gem_digi_adjacent, gem_digi_cluster),
887 clus_muon_primitives.end()
898 int tp_region = tp_detId.
region();
899 int tp_endcap = (tp_region == -1) ? 2 : tp_region;
900 int tp_station = tp_detId.
station();
901 int tp_ring = tp_detId.
ring();
902 int tp_roll = tp_detId.
roll();
903 int tp_layer = tp_detId.
layer();
904 int tp_chamber = tp_detId.
chamber();
906 int tp_bx = tp_data.bx;
907 int tp_pad = tp_data.pad;
913 if( station > 1 && ring > 1 ) {
914 result = ((
static_cast<unsigned>(
chamber-3) & 0x7f) / 6) + 1;
917 result = (station != 1) ? ((static_cast<unsigned>(
chamber-2) & 0x1f) / 3) + 1 :
918 ((
static_cast<unsigned>(
chamber-3) & 0x7f) / 6) + 1;
920 return (result <= 6) ? result : 6;
951 int tp_sector = get_trigger_sector(tp_ring, tp_station, tp_chamber);
952 int tp_csc_ID = get_trigger_csc_ID(tp_ring, tp_station, tp_chamber);
956 int tp_subsector = (tp_station != 1) ? 0 : ((tp_chamber%6 > 2) ? 1 : 2);
960 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_endcap = " << tp_endcap;
return selected; }
962 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_sector = " << tp_sector;
return selected; }
963 if ( !(1 <= tp_station && tp_station <= 2) ) {
964 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station;
return selected; }
965 if ( !(1 <= tp_ring && tp_ring <= 1) ) {
966 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_ring = " << tp_ring;
return selected; }
967 if ( !(1 <= tp_csc_ID && tp_csc_ID <= 9) ) {
968 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_csc_ID = " << tp_csc_ID;
return selected; }
969 if (!(tp_station == 1 && 1 <= tp_roll && tp_roll <= 8) || (tp_station != 1)) {
970 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
971 <<
", tp_roll = " << tp_roll;
return selected; }
972 if ( !(tp_station == 2 && 1 <= tp_roll && tp_roll <= 12) || (tp_station != 2)) {
973 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
974 <<
", tp_roll = " << tp_roll;
return selected; }
975 if ( !(1 <= tp_layer && tp_layer <= 2)) {
976 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_layer = " << tp_layer;
return selected; }
977 if ( !((tp_station == 1 && 1 <= tp_pad && tp_pad <= 192) || (tp_station != 1))) {
978 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
979 <<
", tp_pad = " << tp_pad;
return selected; }
980 if ( !((tp_station == 2 && 1 <= tp_pad && tp_pad <= 192) || (tp_station != 2))) {
981 edm::LogWarning(
"L1T") <<
"EMTF GEM format error: tp_station = " << tp_station
982 <<
", tp_pad = " << tp_pad;
return selected; }
987 selected =
get_index_gem(tp_subsector, tp_station, tp_csc_ID,
false);
989 selected =
get_index_gem(tp_subsector, tp_station, tp_csc_ID,
true);
1008 return (
bx_ == tp_bx);
1013 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.