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