File indexing completed on 2024-04-06 12:20:54
0001 #ifndef L1TMuonEndCap_PrimitiveSelection_h
0002 #define L1TMuonEndCap_PrimitiveSelection_h
0003
0004 #include "L1Trigger/L1TMuonEndCap/interface/Common.h"
0005
0006 class PrimitiveSelection {
0007 public:
0008 void configure(int verbose,
0009 int endcap,
0010 int sector,
0011 int bx,
0012 int bxShiftCSC,
0013 int bxShiftRPC,
0014 int bxShiftGEM,
0015 int bxShiftME0,
0016 bool includeNeighbor,
0017 bool duplicateTheta,
0018 bool bugME11Dupes,
0019 bool useRun3CCLUT_OTMB,
0020 bool useRun3CCLUT_TMB);
0021
0022 template <typename T>
0023 void process(T tag,
0024 const TriggerPrimitiveCollection& muon_primitives,
0025 std::map<int, TriggerPrimitiveCollection>& selected_prim_map) const;
0026
0027
0028 void merge(const std::map<int, TriggerPrimitiveCollection>& selected_dt_map,
0029 const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
0030 const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
0031 const std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
0032 const std::map<int, TriggerPrimitiveCollection>& selected_me0_map,
0033 std::map<int, TriggerPrimitiveCollection>& selected_prim_map) const;
0034
0035
0036 void merge_no_truncate(const std::map<int, TriggerPrimitiveCollection>& selected_dt_map,
0037 const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
0038 const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
0039 const std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
0040 const std::map<int, TriggerPrimitiveCollection>& selected_me0_map,
0041 std::map<int, TriggerPrimitiveCollection>& selected_prim_map) const;
0042
0043
0044
0045
0046
0047
0048
0049 int select_csc(const TriggerPrimitive& muon_primitive) const;
0050
0051 bool is_in_sector_csc(int tp_endcap, int tp_sector) const;
0052
0053 bool is_in_neighbor_sector_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const;
0054
0055 bool is_in_bx_csc(int tp_bx) const;
0056
0057 int get_index_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const;
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067 int select_rpc(const TriggerPrimitive& muon_primitive) const;
0068
0069 bool is_in_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const;
0070
0071 bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const;
0072
0073 bool is_in_bx_rpc(int tp_bx) const;
0074
0075 int get_index_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector, int tp_bx) const;
0076
0077
0078 int select_gem(const TriggerPrimitive& muon_primitive) const;
0079
0080 bool is_in_sector_gem(int tp_endcap, int tp_sector) const;
0081
0082 bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const;
0083
0084 bool is_in_bx_gem(int tp_bx) const;
0085
0086 int get_index_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const;
0087
0088
0089 int select_me0(const TriggerPrimitive& muon_primitive) const;
0090
0091 bool is_in_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const;
0092
0093 bool is_in_neighbor_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const;
0094
0095 bool is_in_bx_me0(int tp_bx) const;
0096
0097 int get_index_me0(
0098 int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_pad, int tp_bx) const;
0099
0100
0101 int select_dt(const TriggerPrimitive& muon_primitive) const;
0102
0103 bool is_in_sector_dt(int tp_endcap, int tp_sector) const;
0104
0105 bool is_in_neighbor_sector_dt(int tp_endcap, int tp_sector, int tp_csc_ID) const;
0106
0107 bool is_in_bx_dt(int tp_bx) const;
0108
0109 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;
0110
0111 private:
0112 int verbose_, endcap_, sector_, bx_;
0113
0114 int bxShiftCSC_, bxShiftRPC_, bxShiftGEM_, bxShiftME0_;
0115
0116 bool includeNeighbor_, duplicateTheta_;
0117
0118 bool bugME11Dupes_;
0119
0120 bool useRun3CCLUT_OTMB_;
0121 bool useRun3CCLUT_TMB_;
0122 };
0123
0124 #endif