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  const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
26  const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
27  const 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  const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
34  const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
35  const 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  int select_rpc(const TriggerPrimitive& muon_primitive) const;
56 
57  bool is_in_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const;
58 
59  bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const;
60 
61  bool is_in_bx_rpc(int tp_bx) const;
62 
63  int get_index_rpc(int tp_station, int tp_ring, int tp_subsector, bool is_neighbor) const;
64 
65  // GEM functions
66  int select_gem(const TriggerPrimitive& muon_primitive) const;
67 
68  bool is_in_sector_gem(int tp_endcap, int tp_sector) const;
69 
70  bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const;
71 
72  bool is_in_bx_gem(int tp_bx) const;
73 
74  int get_index_gem(int tp_subsector, int tp_station, int tp_csc_ID, bool is_neighbor) const;
75 
76 
77 private:
79 
81 
83 
85 };
86 
87 #endif
bool is_in_sector_csc(int tp_endcap, int tp_sector) 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 merge_no_truncate(const std::map< int, TriggerPrimitiveCollection > &selected_csc_map, const std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, const std::map< int, TriggerPrimitiveCollection > &selected_gem_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) 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_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const
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
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
int get_index_csc(int tp_subsector, int tp_station, int tp_csc_ID, bool is_neighbor) const
void merge(const std::map< int, TriggerPrimitiveCollection > &selected_csc_map, const std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, const std::map< int, TriggerPrimitiveCollection > &selected_gem_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
bool is_in_bx_rpc(int tp_bx) const
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
Definition: Common.h:34
int get_index_rpc(int tp_station, int tp_ring, int tp_subsector, bool is_neighbor) const
long double T
bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const
bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const