CMS 3D CMS Logo

GEMInternalCluster.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_GEMInternalCluster_h
2 #define L1Trigger_CSCTriggerPrimitives_GEMInternalCluster_h
3 
17 
19 public:
20  // constructor
21  GEMInternalCluster(const GEMDetId& id, const GEMPadDigiCluster& cluster1, const GEMPadDigiCluster& cluster2);
22 
23  // empty object
25 
26  GEMDetId id() const { return id_; }
27  GEMPadDigiCluster cl1() const { return cl1_; }
28  GEMPadDigiCluster cl2() const { return cl2_; }
29 
30  // an internal cluster is valid if at least one is valid
31  bool isValid() const { return isValid_; }
32 
33  // return the centers of the pads
34  GEMPadDigi mid1() const;
35  GEMPadDigi mid2() const;
36 
37  // return the coincidence pad
38  GEMCoPadDigi copad() const;
39 
40  int bx() const { return bx_; }
41  int roll() const { return id_.roll(); }
42  int layer1_pad() const { return layer1_pad_; }
43  int layer1_size() const { return layer1_size_; }
44  int layer2_pad() const { return layer2_pad_; }
45  int layer2_size() const { return layer2_size_; }
46  int layer1_min_wg() const { return layer1_min_wg_; }
47  int layer1_max_wg() const { return layer1_max_wg_; }
48  int layer2_min_wg() const { return layer2_min_wg_; }
49  int layer2_max_wg() const { return layer2_max_wg_; }
50  int min_wg() const;
51  int max_wg() const;
52  bool isCoincidence() const { return isCoincidence_; }
53 
54  // return "key wiregroup" and "key half-strip" for a cluster
55  // these are approximate numbers obviously for LCTs with lower quality
56  unsigned getKeyWG() const { return (min_wg() + max_wg()) / 2.; }
57  uint16_t getKeyStrip(int n = 2) const;
58  uint16_t getKeyStripME1a(int n = 2) const;
59 
60  // first and last 1/2-strips
61  int layer1_first_hs() const { return layer1_first_hs_; }
62  int layer2_first_hs() const { return layer2_first_hs_; }
63  int layer1_last_hs() const { return layer1_last_hs_; }
64  int layer2_last_hs() const { return layer2_last_hs_; }
65 
68  int layer1_last_hs_me1a() const { return layer1_last_hs_me1a_; }
69  int layer2_last_hs_me1a() const { return layer2_last_hs_me1a_; }
70 
71  // middle 1/2-strips (sum divided by two)
72  int layer1_middle_hs() const { return layer1_middle_hs_; }
73  int layer2_middle_hs() const { return layer2_middle_hs_; }
74 
77 
78  // first and last 1/8-strips
79  int layer1_first_es() const { return layer1_first_es_; }
80  int layer2_first_es() const { return layer2_first_es_; }
81  int layer1_last_es() const { return layer1_last_es_; }
82  int layer2_last_es() const { return layer2_last_es_; }
83 
86  int layer1_last_es_me1a() const { return layer1_last_es_me1a_; }
87  int layer2_last_es_me1a() const { return layer2_last_es_me1a_; }
88 
89  // middle 1/8-strips (sum divided by two)
90  int layer1_middle_es() const { return layer1_middle_es_; }
91  int layer2_middle_es() const { return layer2_middle_es_; }
92 
95 
96  // setters for first/last 1/2-strip
97  void set_layer1_first_hs(const int hs) { layer1_first_hs_ = hs; }
98  void set_layer2_first_hs(const int hs) { layer2_first_hs_ = hs; }
99  void set_layer1_last_hs(const int hs) { layer1_last_hs_ = hs; }
100  void set_layer2_last_hs(const int hs) { layer2_last_hs_ = hs; }
101 
102  void set_layer1_first_hs_me1a(const int hs) { layer1_first_hs_me1a_ = hs; }
103  void set_layer2_first_hs_me1a(const int hs) { layer2_first_hs_me1a_ = hs; }
104  void set_layer1_last_hs_me1a(const int hs) { layer1_last_hs_me1a_ = hs; }
105  void set_layer2_last_hs_me1a(const int hs) { layer2_last_hs_me1a_ = hs; }
106 
107  // setters for middle 1/2-strip
108  void set_layer1_middle_hs(const int hs) { layer1_middle_hs_ = hs; }
109  void set_layer2_middle_hs(const int hs) { layer2_middle_hs_ = hs; }
112 
113  // setters for first/last 1/8-strip
114  void set_layer1_first_es(const int es) { layer1_first_es_ = es; }
115  void set_layer2_first_es(const int es) { layer2_first_es_ = es; }
116  void set_layer1_last_es(const int es) { layer1_last_es_ = es; }
117  void set_layer2_last_es(const int es) { layer2_last_es_ = es; }
118 
119  void set_layer1_first_es_me1a(const int es) { layer1_first_es_me1a_ = es; }
120  void set_layer2_first_es_me1a(const int es) { layer2_first_es_me1a_ = es; }
121  void set_layer1_last_es_me1a(const int es) { layer1_last_es_me1a_ = es; }
122  void set_layer2_last_es_me1a(const int es) { layer2_last_es_me1a_ = es; }
123 
124  // setters for middle 1/8-strip
125  void set_layer1_middle_es(const int es) { layer1_middle_es_ = es; }
126  void set_layer2_middle_es(const int es) { layer2_middle_es_ = es; }
129 
130  // set the corresponding wiregroup numbers
131  void set_layer1_min_wg(const int wg) { layer1_min_wg_ = wg; }
132  void set_layer1_max_wg(const int wg) { layer1_max_wg_ = wg; }
133  void set_layer2_min_wg(const int wg) { layer2_min_wg_ = wg; }
134  void set_layer2_max_wg(const int wg) { layer2_max_wg_ = wg; }
135 
136  bool has_cluster(const GEMPadDigiCluster& cluster) const;
137 
138  // equality operator: detid, cluster 1 and cluster 2
139  bool operator==(const GEMInternalCluster& cluster) const;
140 
141 private:
142  /*
143  Detector id. There are three cases. For single clusters in layer 1
144  the GEMDetId in layer 1 is stored. Similarly, for single clusters in
145  layer 2 the GEMDetId in layer 2 is stored. For coincidences the GEMDetId
146  in layer 1 is stored
147  */
151 
152  bool isValid_;
153 
154  // bunch crossing
155  int bx_;
156 
157  // starting pads and sizes of the clusters in each layer
158  // depending on the presence of a coincidence, layer 1, layer2, or both
159  // can be filled
164 
165  // corresponding CSC 1/2-strip coordinates (es) of the cluster
166  // in each layer (if applicable)
171  // for ME1/a
176 
177  // middle CSC 1/2-strip
180  // for ME1/a
183 
184  // corresponding CSC 1/8-strip coordinates (es) of the cluster
185  // in each layer (if applicable)
190  // for ME1/a
195 
196  // middle CSC 1/8-strip
199  // for ME1/a
202 
203  // corresponding min and max wiregroup
208 
209  // flag to signal if it is a coincidence
211 };
212 
213 std::ostream& operator<<(std::ostream& os, const GEMInternalCluster& cl);
214 
215 #endif
GEMInternalCluster::layer1_last_hs_me1a_
int layer1_last_hs_me1a_
Definition: GEMInternalCluster.h:173
GEMInternalCluster::layer1_middle_hs_me1a_
int layer1_middle_hs_me1a_
Definition: GEMInternalCluster.h:181
GEMInternalCluster::set_layer2_first_hs
void set_layer2_first_hs(const int hs)
Definition: GEMInternalCluster.h:98
GEMInternalCluster::layer1_last_hs
int layer1_last_hs() const
Definition: GEMInternalCluster.h:63
GEMInternalCluster::set_layer1_last_hs
void set_layer1_last_hs(const int hs)
Definition: GEMInternalCluster.h:99
GEMInternalCluster::set_layer1_first_es_me1a
void set_layer1_first_es_me1a(const int es)
Definition: GEMInternalCluster.h:119
GEMInternalCluster::layer1_middle_es_me1a
int layer1_middle_es_me1a() const
Definition: GEMInternalCluster.h:93
GEMInternalCluster::copad
GEMCoPadDigi copad() const
GEMInternalCluster::set_layer2_middle_hs
void set_layer2_middle_hs(const int hs)
Definition: GEMInternalCluster.h:109
GEMInternalCluster::layer2_last_es_
int layer2_last_es_
Definition: GEMInternalCluster.h:189
GEMInternalCluster::set_layer1_middle_hs_me1a
void set_layer1_middle_hs_me1a(const int hs)
Definition: GEMInternalCluster.h:110
GEMInternalCluster::set_layer1_middle_es
void set_layer1_middle_es(const int es)
Definition: GEMInternalCluster.h:125
GEMInternalCluster::layer2_size
int layer2_size() const
Definition: GEMInternalCluster.h:45
GEMInternalCluster::layer2_last_es
int layer2_last_es() const
Definition: GEMInternalCluster.h:82
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
GEMInternalCluster::set_layer2_first_es_me1a
void set_layer2_first_es_me1a(const int es)
Definition: GEMInternalCluster.h:120
GEMInternalCluster::layer1_first_es_me1a_
int layer1_first_es_me1a_
Definition: GEMInternalCluster.h:191
GEMPadDigi
Definition: GEMPadDigi.h:17
GEMInternalCluster::set_layer2_first_hs_me1a
void set_layer2_first_hs_me1a(const int hs)
Definition: GEMInternalCluster.h:103
GEMInternalCluster::set_layer2_min_wg
void set_layer2_min_wg(const int wg)
Definition: GEMInternalCluster.h:133
GEMInternalCluster::getKeyStripME1a
uint16_t getKeyStripME1a(int n=2) const
Definition: GEMInternalCluster.cc:164
GEMInternalCluster::set_layer1_max_wg
void set_layer1_max_wg(const int wg)
Definition: GEMInternalCluster.h:132
GEMPadDigiCluster
Definition: GEMPadDigiCluster.h:19
GEMInternalCluster::layer1_pad_
int layer1_pad_
Definition: GEMInternalCluster.h:160
GEMInternalCluster::GEMInternalCluster
GEMInternalCluster()
Definition: GEMInternalCluster.cc:71
GEMInternalCluster::layer1_first_es_me1a
int layer1_first_es_me1a() const
Definition: GEMInternalCluster.h:84
GEMCoPadDigi.h
GEMInternalCluster::set_layer1_middle_es_me1a
void set_layer1_middle_es_me1a(const int es)
Definition: GEMInternalCluster.h:127
GEMInternalCluster::layer2_middle_es_me1a_
int layer2_middle_es_me1a_
Definition: GEMInternalCluster.h:201
GEMInternalCluster::isValid_
bool isValid_
Definition: GEMInternalCluster.h:152
GEMInternalCluster::has_cluster
bool has_cluster(const GEMPadDigiCluster &cluster) const
Definition: GEMInternalCluster.cc:184
GEMInternalCluster::layer2_middle_hs_me1a
int layer2_middle_hs_me1a() const
Definition: GEMInternalCluster.h:76
GEMInternalCluster::layer2_first_hs_
int layer2_first_hs_
Definition: GEMInternalCluster.h:169
GEMInternalCluster::set_layer2_last_es_me1a
void set_layer2_last_es_me1a(const int es)
Definition: GEMInternalCluster.h:122
GEMInternalCluster::layer2_pad_
int layer2_pad_
Definition: GEMInternalCluster.h:162
GEMInternalCluster::layer2_last_hs_me1a
int layer2_last_hs_me1a() const
Definition: GEMInternalCluster.h:69
GEMInternalCluster::layer1_middle_hs
int layer1_middle_hs() const
Definition: GEMInternalCluster.h:72
GEMInternalCluster::set_layer2_middle_es_me1a
void set_layer2_middle_es_me1a(const int es)
Definition: GEMInternalCluster.h:128
GEMInternalCluster::bx_
int bx_
Definition: GEMInternalCluster.h:155
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
GEMInternalCluster::set_layer2_first_es
void set_layer2_first_es(const int es)
Definition: GEMInternalCluster.h:115
GEMInternalCluster::layer1_middle_es_
int layer1_middle_es_
Definition: GEMInternalCluster.h:197
GEMInternalCluster::cl2
GEMPadDigiCluster cl2() const
Definition: GEMInternalCluster.h:28
GEMInternalCluster::id
GEMDetId id() const
Definition: GEMInternalCluster.h:26
GEMInternalCluster::mid2
GEMPadDigi mid2() const
Definition: GEMInternalCluster.cc:122
GEMInternalCluster::layer2_max_wg_
int layer2_max_wg_
Definition: GEMInternalCluster.h:207
GEMInternalCluster::layer1_middle_hs_
int layer1_middle_hs_
Definition: GEMInternalCluster.h:178
GEMInternalCluster::layer1_first_es_
int layer1_first_es_
Definition: GEMInternalCluster.h:186
GEMInternalCluster::set_layer1_last_es
void set_layer1_last_es(const int es)
Definition: GEMInternalCluster.h:116
GEMInternalCluster::set_layer1_middle_hs
void set_layer1_middle_hs(const int hs)
Definition: GEMInternalCluster.h:108
GEMInternalCluster::bx
int bx() const
Definition: GEMInternalCluster.h:40
GEMInternalCluster::layer1_min_wg
int layer1_min_wg() const
Definition: GEMInternalCluster.h:46
GEMInternalCluster::layer1_middle_es_me1a_
int layer1_middle_es_me1a_
Definition: GEMInternalCluster.h:200
GEMInternalCluster::layer2_middle_es_
int layer2_middle_es_
Definition: GEMInternalCluster.h:198
GEMInternalCluster::roll
int roll() const
Definition: GEMInternalCluster.h:41
GEMPadDigiCluster.h
GEMInternalCluster::layer1_min_wg_
int layer1_min_wg_
Definition: GEMInternalCluster.h:204
GEMInternalCluster::min_wg
int min_wg() const
Definition: GEMInternalCluster.cc:130
GEMInternalCluster::layer1_pad
int layer1_pad() const
Definition: GEMInternalCluster.h:42
GEMInternalCluster::set_layer1_first_es
void set_layer1_first_es(const int es)
Definition: GEMInternalCluster.h:114
GEMInternalCluster::layer1_max_wg_
int layer1_max_wg_
Definition: GEMInternalCluster.h:205
GEMInternalCluster::operator==
bool operator==(const GEMInternalCluster &cluster) const
Definition: GEMInternalCluster.cc:188
GEMInternalCluster::set_layer2_last_hs_me1a
void set_layer2_last_hs_me1a(const int hs)
Definition: GEMInternalCluster.h:105
GEMInternalCluster::cl2_
GEMPadDigiCluster cl2_
Definition: GEMInternalCluster.h:150
GEMInternalCluster::layer2_last_hs
int layer2_last_hs() const
Definition: GEMInternalCluster.h:64
GEMInternalCluster::layer2_first_hs
int layer2_first_hs() const
Definition: GEMInternalCluster.h:62
GEMInternalCluster::layer2_first_es_me1a_
int layer2_first_es_me1a_
Definition: GEMInternalCluster.h:193
GEMInternalCluster::layer1_max_wg
int layer1_max_wg() const
Definition: GEMInternalCluster.h:47
GEMCoPadDigi
Definition: GEMCoPadDigi.h:16
GEMInternalCluster::set_layer1_min_wg
void set_layer1_min_wg(const int wg)
Definition: GEMInternalCluster.h:131
GEMInternalCluster::isCoincidence
bool isCoincidence() const
Definition: GEMInternalCluster.h:52
GEMDetId::roll
constexpr int roll() const
Definition: GEMDetId.h:194
GEMInternalCluster::layer1_last_es_me1a_
int layer1_last_es_me1a_
Definition: GEMInternalCluster.h:192
GEMDetId
Definition: GEMDetId.h:18
GEMInternalCluster::set_layer1_last_hs_me1a
void set_layer1_last_hs_me1a(const int hs)
Definition: GEMInternalCluster.h:104
GEMInternalCluster::cl1_
GEMPadDigiCluster cl1_
Definition: GEMInternalCluster.h:149
GEMInternalCluster::layer2_pad
int layer2_pad() const
Definition: GEMInternalCluster.h:44
GEMInternalCluster::isCoincidence_
bool isCoincidence_
Definition: GEMInternalCluster.h:210
GEMInternalCluster::layer2_middle_hs
int layer2_middle_hs() const
Definition: GEMInternalCluster.h:73
GEMInternalCluster::layer2_last_es_me1a
int layer2_last_es_me1a() const
Definition: GEMInternalCluster.h:87
GEMInternalCluster::mid1
GEMPadDigi mid1() const
Definition: GEMInternalCluster.cc:114
GEMInternalCluster::layer1_last_hs_me1a
int layer1_last_hs_me1a() const
Definition: GEMInternalCluster.h:68
GEMInternalCluster::set_layer2_last_hs
void set_layer2_last_hs(const int hs)
Definition: GEMInternalCluster.h:100
GEMInternalCluster::isValid
bool isValid() const
Definition: GEMInternalCluster.h:31
GEMInternalCluster::layer2_first_hs_me1a
int layer2_first_hs_me1a() const
Definition: GEMInternalCluster.h:67
GEMInternalCluster::layer1_last_hs_
int layer1_last_hs_
Definition: GEMInternalCluster.h:168
GEMInternalCluster::set_layer1_last_es_me1a
void set_layer1_last_es_me1a(const int es)
Definition: GEMInternalCluster.h:121
GEMInternalCluster::layer2_last_es_me1a_
int layer2_last_es_me1a_
Definition: GEMInternalCluster.h:194
GEMInternalCluster::getKeyStrip
uint16_t getKeyStrip(int n=2) const
Definition: GEMInternalCluster.cc:144
GEMInternalCluster::layer1_middle_hs_me1a
int layer1_middle_hs_me1a() const
Definition: GEMInternalCluster.h:75
GEMInternalCluster::set_layer2_last_es
void set_layer2_last_es(const int es)
Definition: GEMInternalCluster.h:117
GEMInternalCluster::layer2_min_wg_
int layer2_min_wg_
Definition: GEMInternalCluster.h:206
GEMInternalCluster::id_
GEMDetId id_
Definition: GEMInternalCluster.h:148
GEMInternalCluster::set_layer1_first_hs
void set_layer1_first_hs(const int hs)
Definition: GEMInternalCluster.h:97
GEMInternalCluster::layer1_last_es_
int layer1_last_es_
Definition: GEMInternalCluster.h:187
GEMInternalCluster::set_layer1_first_hs_me1a
void set_layer1_first_hs_me1a(const int hs)
Definition: GEMInternalCluster.h:102
GEMInternalCluster::layer2_middle_es
int layer2_middle_es() const
Definition: GEMInternalCluster.h:91
GEMInternalCluster::layer1_first_hs_
int layer1_first_hs_
Definition: GEMInternalCluster.h:167
GEMDetId.h
GEMInternalCluster::getKeyWG
unsigned getKeyWG() const
Definition: GEMInternalCluster.h:56
GEMInternalCluster::layer2_max_wg
int layer2_max_wg() const
Definition: GEMInternalCluster.h:49
GEMInternalCluster::max_wg
int max_wg() const
Definition: GEMInternalCluster.cc:137
GEMInternalCluster::layer2_size_
int layer2_size_
Definition: GEMInternalCluster.h:163
GEMInternalCluster::layer2_last_hs_me1a_
int layer2_last_hs_me1a_
Definition: GEMInternalCluster.h:175
GEMInternalCluster::cl1
GEMPadDigiCluster cl1() const
Definition: GEMInternalCluster.h:27
GEMInternalCluster::layer1_first_hs
int layer1_first_hs() const
Definition: GEMInternalCluster.h:61
GEMInternalCluster::layer2_first_es_
int layer2_first_es_
Definition: GEMInternalCluster.h:188
GEMInternalCluster::layer1_middle_es
int layer1_middle_es() const
Definition: GEMInternalCluster.h:90
GEMInternalCluster::layer2_middle_es_me1a
int layer2_middle_es_me1a() const
Definition: GEMInternalCluster.h:94
GEMInternalCluster::layer2_last_hs_
int layer2_last_hs_
Definition: GEMInternalCluster.h:170
GEMInternalCluster::layer2_first_es
int layer2_first_es() const
Definition: GEMInternalCluster.h:80
GEMInternalCluster::layer1_size
int layer1_size() const
Definition: GEMInternalCluster.h:43
GEMInternalCluster::set_layer2_middle_hs_me1a
void set_layer2_middle_hs_me1a(const int hs)
Definition: GEMInternalCluster.h:111
GEMInternalCluster
Definition: GEMInternalCluster.h:18
GEMInternalCluster::layer1_size_
int layer1_size_
Definition: GEMInternalCluster.h:161
GEMInternalCluster::layer2_first_hs_me1a_
int layer2_first_hs_me1a_
Definition: GEMInternalCluster.h:174
GEMInternalCluster::set_layer2_middle_es
void set_layer2_middle_es(const int es)
Definition: GEMInternalCluster.h:126
GEMInternalCluster::layer2_middle_hs_
int layer2_middle_hs_
Definition: GEMInternalCluster.h:179
GEMInternalCluster::layer2_first_es_me1a
int layer2_first_es_me1a() const
Definition: GEMInternalCluster.h:85
GEMInternalCluster::set_layer2_max_wg
void set_layer2_max_wg(const int wg)
Definition: GEMInternalCluster.h:134
operator<<
std::ostream & operator<<(std::ostream &os, const GEMInternalCluster &cl)
Definition: GEMInternalCluster.cc:192
GEMPadDigi.h
GEMInternalCluster::layer2_middle_hs_me1a_
int layer2_middle_hs_me1a_
Definition: GEMInternalCluster.h:182
GEMInternalCluster::layer1_last_es
int layer1_last_es() const
Definition: GEMInternalCluster.h:81
GEMInternalCluster::layer2_min_wg
int layer2_min_wg() const
Definition: GEMInternalCluster.h:48
GEMInternalCluster::layer1_first_hs_me1a
int layer1_first_hs_me1a() const
Definition: GEMInternalCluster.h:66
GEMInternalCluster::layer1_last_es_me1a
int layer1_last_es_me1a() const
Definition: GEMInternalCluster.h:86
GEMInternalCluster::layer1_first_hs_me1a_
int layer1_first_hs_me1a_
Definition: GEMInternalCluster.h:172
GEMInternalCluster::layer1_first_es
int layer1_first_es() const
Definition: GEMInternalCluster.h:79