CMS 3D CMS Logo

PrimitiveSelection.h
Go to the documentation of this file.
1 #ifndef L1TMuonEndCap_PrimitiveSelection_h
2 #define L1TMuonEndCap_PrimitiveSelection_h
3 
5 
6 
8 public:
9  void configure(
10  int verbose, int endcap, int sector, int bx,
11  int bxShiftCSC, int bxShiftRPC, int bxShiftGEM,
12  bool includeNeighbor, bool duplicateTheta,
13  bool bugME11Dupes
14  );
15 
16  template<typename T>
17  void process(
18  T tag,
19  const TriggerPrimitiveCollection& muon_primitives,
20  std::map<int, TriggerPrimitiveCollection>& selected_prim_map
21  ) const;
22 
23  // Put the hits from CSC, RPC, GEM together in one collection
24  void merge(
25  std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
26  std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
27  std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
28  std::map<int, TriggerPrimitiveCollection>& selected_prim_map
29  ) const;
30 
31  // Like merge(), but keep all the hits
32  void merge_no_truncate(
33  std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
34  std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
35  std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
36  std::map<int, TriggerPrimitiveCollection>& selected_prim_map
37  ) const;
38 
39  // CSC functions
40  // If selected, return an index 0-53, else return -1
41  // The index 0-53 roughly corresponds to an input link. It maps to the
42  // 2D index [station][chamber] used in the firmware, with size [5:0][8:0].
43  // Station 5 = neighbor sector, all stations.
44  int select_csc(const TriggerPrimitive& muon_primitive) const;
45 
46  bool is_in_sector_csc(int tp_endcap, int tp_sector) const;
47 
48  bool is_in_neighbor_sector_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const;
49 
50  bool is_in_bx_csc(int tp_bx) const;
51 
52  int get_index_csc(int tp_subsector, int tp_station, int tp_csc_ID, bool is_neighbor) const;
53 
54  // RPC functions
55  void cluster_rpc(const TriggerPrimitiveCollection& muon_primitives, TriggerPrimitiveCollection& clus_muon_primitives) const;
56 
57  int select_rpc(const TriggerPrimitive& muon_primitive) const;
58 
59  bool is_in_sector_rpc(int tp_endcap, int tp_sector, int tp_subsector) const;
60 
61  bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_sector, int tp_subsector) const;
62 
63  bool is_in_bx_rpc(int tp_bx) const;
64 
65  int get_index_rpc(int tp_station, int tp_ring, int tp_subsector, bool is_neighbor) const;
66 
67  // GEM functions
68  void cluster_gem(const TriggerPrimitiveCollection& muon_primitives, TriggerPrimitiveCollection& clus_muon_primitives) const;
69 
70  int select_gem(const TriggerPrimitive& muon_primitive) const;
71 
72  bool is_in_sector_gem(int tp_endcap, int tp_sector) const;
73 
74  bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const;
75 
76  bool is_in_bx_gem(int tp_bx) const;
77 
78  int get_index_gem(int tp_subsector, int tp_station, int tp_csc_ID, bool is_neighbor) const;
79 
80 
81 private:
83 
85 
87 
89 };
90 
91 #endif
bool is_in_sector_csc(int tp_endcap, int tp_sector) const
void cluster_rpc(const TriggerPrimitiveCollection &muon_primitives, TriggerPrimitiveCollection &clus_muon_primitives) const
int get_index_gem(int tp_subsector, int tp_station, int tp_csc_ID, bool is_neighbor) const
int select_gem(const TriggerPrimitive &muon_primitive) const
bool is_in_sector_gem(int tp_endcap, int tp_sector) const
void configure(int verbose, int endcap, int sector, int bx, int bxShiftCSC, int bxShiftRPC, int bxShiftGEM, bool includeNeighbor, bool duplicateTheta, bool bugME11Dupes)
bool is_in_bx_gem(int tp_bx) const
int select_rpc(const TriggerPrimitive &muon_primitive) const
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 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
Definition: Common.h:29
bool is_in_sector_rpc(int tp_endcap, int tp_sector, int tp_subsector) 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
long double T
bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const