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  int bxShiftME0,
16  bool includeNeighbor,
17  bool duplicateTheta,
18  bool bugME11Dupes);
19 
20  template <typename T>
21  void process(T tag,
22  const TriggerPrimitiveCollection& muon_primitives,
23  std::map<int, TriggerPrimitiveCollection>& selected_prim_map) const;
24 
25  // Put the hits from DT, CSC, RPC, GEM, ME0 together in one collection
26  void merge(const std::map<int, TriggerPrimitiveCollection>& selected_dt_map,
27  const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
28  const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
29  const std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
30  const std::map<int, TriggerPrimitiveCollection>& selected_me0_map,
31  std::map<int, TriggerPrimitiveCollection>& selected_prim_map) const;
32 
33  // Like merge(), but keep all the hits
34  void merge_no_truncate(const std::map<int, TriggerPrimitiveCollection>& selected_dt_map,
35  const std::map<int, TriggerPrimitiveCollection>& selected_csc_map,
36  const std::map<int, TriggerPrimitiveCollection>& selected_rpc_map,
37  const std::map<int, TriggerPrimitiveCollection>& selected_gem_map,
38  const std::map<int, TriggerPrimitiveCollection>& selected_me0_map,
39  std::map<int, TriggerPrimitiveCollection>& selected_prim_map) const;
40 
41  // ___________________________________________________________________________
42  // CSC functions
43  // - If a chamber is selected, return an index 0-53, else return -1.
44  // The index 0-53 roughly corresponds to an input link. It maps to the
45  // 2D index [station][chamber] used in the firmware, with size [5:0][8:0].
46  // Station 5 = neighbor sector, all stations.
47  int select_csc(const TriggerPrimitive& muon_primitive) const;
48 
49  bool is_in_sector_csc(int tp_endcap, int tp_sector) const;
50 
51  bool is_in_neighbor_sector_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const;
52 
53  bool is_in_bx_csc(int tp_bx) const;
54 
55  int get_index_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const;
56 
57  // RPC functions
58  // - If a chamber is selected, return an index 0-41, else return -1.
59  // The index 0-41 corresponds to CPPF link x chamber. Each CPPF link corresponds
60  // to a RPC subsector (6+1 incl. neighbor), and carries data from 6 RPC chambers
61  // (RE1/2, RE2/2, RE3/2, RE3/3, RE4/2, RE4/3). The index maps to the 2D index
62  // [subsector][chamber] used in the firmware, with size [6:0][5:0].
63  // For Phase 2, add RE1/3, RE2/3, RE3/1, RE4/1 -> 10 chambers, so the index
64  // becomes 0-69.
65  int select_rpc(const TriggerPrimitive& muon_primitive) const;
66 
67  bool is_in_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const;
68 
69  bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const;
70 
71  bool is_in_bx_rpc(int tp_bx) const;
72 
73  int get_index_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector, int tp_bx) const;
74 
75  // GEM functions
76  int select_gem(const TriggerPrimitive& muon_primitive) const;
77 
78  bool is_in_sector_gem(int tp_endcap, int tp_sector) const;
79 
80  bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const;
81 
82  bool is_in_bx_gem(int tp_bx) const;
83 
84  int get_index_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const;
85 
86  // ME0 functions
87  int select_me0(const TriggerPrimitive& muon_primitive) const;
88 
89  bool is_in_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const;
90 
91  bool is_in_neighbor_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const;
92 
93  bool is_in_bx_me0(int tp_bx) const;
94 
95  int get_index_me0(
96  int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_pad, int tp_bx) const;
97 
98  // DT functions
99  int select_dt(const TriggerPrimitive& muon_primitive) const;
100 
101  bool is_in_sector_dt(int tp_endcap, int tp_sector) const;
102 
103  bool is_in_neighbor_sector_dt(int tp_endcap, int tp_sector, int tp_csc_ID) const;
104 
105  bool is_in_bx_dt(int tp_bx) const;
106 
107  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;
108 
109 private:
111 
113 
115 
117 };
118 
119 #endif
PrimitiveSelection::select_me0
int select_me0(const TriggerPrimitive &muon_primitive) const
Definition: PrimitiveSelection.cc:995
PrimitiveSelection::verbose_
int verbose_
Definition: PrimitiveSelection.h:110
PrimitiveSelection::duplicateTheta_
bool duplicateTheta_
Definition: PrimitiveSelection.h:114
PrimitiveSelection::is_in_bx_gem
bool is_in_bx_gem(int tp_bx) const
Definition: PrimitiveSelection.cc:951
PrimitiveSelection::get_index_rpc
int get_index_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector, int tp_bx) const
Definition: PrimitiveSelection.cc:834
PrimitiveSelection::bxShiftME0_
int bxShiftME0_
Definition: PrimitiveSelection.h:112
PrimitiveSelection::is_in_bx_csc
bool is_in_bx_csc(int tp_bx) const
Definition: PrimitiveSelection.cc:702
PrimitiveSelection::bx_
int bx_
Definition: PrimitiveSelection.h:110
PrimitiveSelection::endcap_
int endcap_
Definition: PrimitiveSelection.h:110
PrimitiveSelection::select_dt
int select_dt(const TriggerPrimitive &muon_primitive) const
Definition: PrimitiveSelection.cc:1133
PrimitiveSelection::is_in_sector_dt
bool is_in_sector_dt(int tp_endcap, int tp_sector) const
Definition: PrimitiveSelection.cc:1187
PrimitiveSelection::is_in_sector_me0
bool is_in_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const
Definition: PrimitiveSelection.cc:1039
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
PrimitiveSelection::get_index_dt
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
Definition: PrimitiveSelection.cc:1203
PrimitiveSelection::select_gem
int select_gem(const TriggerPrimitive &muon_primitive) const
Definition: PrimitiveSelection.cc:896
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
PrimitiveSelection::process
void process(T tag, const TriggerPrimitiveCollection &muon_primitives, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
PrimitiveSelection::select_rpc
int select_rpc(const TriggerPrimitive &muon_primitive) const
Definition: PrimitiveSelection.cc:744
PrimitiveSelection::get_index_gem
int get_index_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const
Definition: PrimitiveSelection.cc:956
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
PrimitiveSelection::bxShiftRPC_
int bxShiftRPC_
Definition: PrimitiveSelection.h:112
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
PrimitiveSelection::bxShiftGEM_
int bxShiftGEM_
Definition: PrimitiveSelection.h:112
L1TMuon::TriggerPrimitive
Definition: MuonTriggerPrimitive.h:56
PrimitiveSelection::get_index_me0
int get_index_me0(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_pad, int tp_bx) const
Definition: PrimitiveSelection.cc:1106
PrimitiveSelection::is_in_neighbor_sector_csc
bool is_in_neighbor_sector_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const
Definition: PrimitiveSelection.cc:683
TriggerPrimitiveCollection
L1TMuon::TriggerPrimitiveCollection TriggerPrimitiveCollection
Definition: Common.h:32
PrimitiveSelection::is_in_sector_gem
bool is_in_sector_gem(int tp_endcap, int tp_sector) const
Definition: PrimitiveSelection.cc:940
PrimitiveSelection::sector_
int sector_
Definition: PrimitiveSelection.h:110
PrimitiveSelection
Definition: PrimitiveSelection.h:6
Common.h
PrimitiveSelection::is_in_bx_rpc
bool is_in_bx_rpc(int tp_bx) const
Definition: PrimitiveSelection.cc:829
PrimitiveSelection::is_in_sector_csc
bool is_in_sector_csc(int tp_endcap, int tp_sector) const
Definition: PrimitiveSelection.cc:679
PrimitiveSelection::bugME11Dupes_
bool bugME11Dupes_
Definition: PrimitiveSelection.h:116
PrimitiveSelection::bxShiftCSC_
int bxShiftCSC_
Definition: PrimitiveSelection.h:112
PrimitiveSelection::is_in_neighbor_sector_dt
bool is_in_neighbor_sector_dt(int tp_endcap, int tp_sector, int tp_csc_ID) const
Definition: PrimitiveSelection.cc:1192
T
long double T
Definition: Basic3DVectorLD.h:48
PrimitiveSelection::merge_no_truncate
void merge_no_truncate(const std::map< int, TriggerPrimitiveCollection > &selected_dt_map, const std::map< int, TriggerPrimitiveCollection > &selected_csc_map, const std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, const std::map< int, TriggerPrimitiveCollection > &selected_gem_map, const std::map< int, TriggerPrimitiveCollection > &selected_me0_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
Definition: PrimitiveSelection.cc:561
PrimitiveSelection::merge
void merge(const std::map< int, TriggerPrimitiveCollection > &selected_dt_map, const std::map< int, TriggerPrimitiveCollection > &selected_csc_map, const std::map< int, TriggerPrimitiveCollection > &selected_rpc_map, const std::map< int, TriggerPrimitiveCollection > &selected_gem_map, const std::map< int, TriggerPrimitiveCollection > &selected_me0_map, std::map< int, TriggerPrimitiveCollection > &selected_prim_map) const
Definition: PrimitiveSelection.cc:482
PrimitiveSelection::is_in_bx_me0
bool is_in_bx_me0(int tp_bx) const
Definition: PrimitiveSelection.cc:1101
PrimitiveSelection::is_in_neighbor_sector_rpc
bool is_in_neighbor_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const
Definition: PrimitiveSelection.cc:813
PrimitiveSelection::includeNeighbor_
bool includeNeighbor_
Definition: PrimitiveSelection.h:114
PrimitiveSelection::is_in_bx_dt
bool is_in_bx_dt(int tp_bx) const
Definition: PrimitiveSelection.cc:1198
PrimitiveSelection::get_index_csc
int get_index_csc(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID, int tp_bx) const
Definition: PrimitiveSelection.cc:708
PrimitiveSelection::configure
void configure(int verbose, int endcap, int sector, int bx, int bxShiftCSC, int bxShiftRPC, int bxShiftGEM, int bxShiftME0, bool includeNeighbor, bool duplicateTheta, bool bugME11Dupes)
Definition: PrimitiveSelection.cc:17
PrimitiveSelection::is_in_sector_rpc
bool is_in_sector_rpc(int tp_endcap, int tp_station, int tp_ring, int tp_sector, int tp_subsector) const
Definition: PrimitiveSelection.cc:792
PrimitiveSelection::is_in_neighbor_sector_gem
bool is_in_neighbor_sector_gem(int tp_endcap, int tp_sector, int tp_subsector, int tp_station, int tp_csc_ID) const
Definition: PrimitiveSelection.cc:945
PrimitiveSelection::select_csc
int select_csc(const TriggerPrimitive &muon_primitive) const
Definition: PrimitiveSelection.cc:585
PrimitiveSelection::is_in_neighbor_sector_me0
bool is_in_neighbor_sector_me0(int tp_endcap, int tp_sector, int tp_csc_ID, int tp_pad) const
Definition: PrimitiveSelection.cc:1069