CMS 3D CMS Logo

GEMInternalCluster.cc
Go to the documentation of this file.
3 
5  const GEMPadDigiCluster& cluster1,
6  const GEMPadDigiCluster& cluster2) {
7  id_ = id;
8 
9  // set coincidence to false first
10  isCoincidence_ = false;
11  isValid_ = false;
12 
13  if (cluster1.isValid()) {
14  isValid_ = true;
15  cl1_ = cluster1;
16  bx_ = cluster1.bx() + CSCConstants::LCT_CENTRAL_BX;
17  layer1_pad_ = cluster1.pads()[0];
18  layer1_size_ = cluster1.pads().size();
19  }
20  if (cluster2.isValid()) {
21  isValid_ = true;
22  cl2_ = cluster2;
23  bx_ = cluster2.bx() + CSCConstants::LCT_CENTRAL_BX;
24  layer2_pad_ = cluster2.pads()[0];
25  layer2_size_ = cluster2.pads().size();
26  }
27 
28  if (cluster1.isValid() and cluster2.isValid()) {
29  bx_ = cluster1.bx() + CSCConstants::LCT_CENTRAL_BX;
30  isCoincidence_ = true;
31  }
32 
33  layer1_min_wg_ = -1;
34  layer1_max_wg_ = -1;
35  layer2_min_wg_ = -1;
36  layer2_max_wg_ = -1;
37 
38  layer1_first_hs_ = -1;
39  layer2_first_hs_ = -1;
40  layer1_last_hs_ = -1;
41  layer2_last_hs_ = -1;
42 
47 
48  layer1_middle_hs_ = -1;
49  layer2_middle_hs_ = -1;
50 
53 
54  layer1_first_es_ = -1;
55  layer2_first_es_ = -1;
56  layer1_last_es_ = -1;
57  layer2_last_es_ = -1;
58 
63 
64  layer1_middle_es_ = -1;
65  layer2_middle_es_ = -1;
66 
69 }
70 
72  // set coincidence to false first
73  isCoincidence_ = false;
74  isValid_ = false;
75 
76  layer1_min_wg_ = -1;
77  layer1_max_wg_ = -1;
78  layer2_min_wg_ = -1;
79  layer2_max_wg_ = -1;
80 
81  layer1_first_hs_ = -1;
82  layer2_first_hs_ = -1;
83  layer1_last_hs_ = -1;
84  layer2_last_hs_ = -1;
85 
90 
91  layer1_middle_hs_ = -1;
92  layer2_middle_hs_ = -1;
93 
96 
97  layer1_first_es_ = -1;
98  layer2_first_es_ = -1;
99  layer1_last_es_ = -1;
100  layer2_last_es_ = -1;
101 
106 
107  layer1_middle_es_ = -1;
108  layer2_middle_es_ = -1;
109 
112 }
113 
115  if (!cl1_.isValid())
116  return GEMPadDigi();
117  const unsigned pad = cl1_.pads()[cl1_.pads().size() / 2];
118 
119  return GEMPadDigi(pad, cl1_.bx(), cl1_.station(), cl1_.nPartitions());
120 }
121 
123  if (!cl2_.isValid())
124  return GEMPadDigi();
125  const unsigned pad = cl2_.pads()[cl2_.pads().size() / 2];
126 
127  return GEMPadDigi(pad, cl2_.bx(), cl2_.station(), cl2_.nPartitions());
128 }
129 
131  if (id_.layer() == 1)
132  return layer1_min_wg();
133  else
134  return layer2_min_wg();
135 }
136 
138  if (id_.layer() == 1)
139  return layer1_max_wg();
140  else
141  return layer2_max_wg();
142 }
143 
144 uint16_t GEMInternalCluster::getKeyStrip(int n) const {
145  // case for half-strips
146  if (n == 2) {
147  if (id_.layer() == 1) {
148  return (layer1_first_hs_ + layer1_last_hs_) / 2.;
149  } else {
150  return (layer2_first_hs_ + layer2_last_hs_) / 2.;
151  }
152  }
153 
154  // case for 1/8-strips
155  else {
156  if (id_.layer() == 1) {
157  return (layer1_first_es_ + layer1_last_es_) / 2.;
158  } else {
159  return (layer2_first_es_ + layer2_last_es_) / 2.;
160  }
161  }
162 }
163 
165  // case for half-strips
166  if (n == 2) {
167  if (id_.layer() == 1) {
169  } else {
171  }
172  }
173 
174  // case for 1/8-strips
175  else {
176  if (id_.layer() == 1) {
178  } else {
180  }
181  }
182 }
183 
185  return cl1_ == cluster or cl2_ == cluster;
186 }
187 
189  return id_ == cluster.id() and cl1_ == cluster.cl1() and cl2_ == cluster.cl2();
190 }
191 
192 std::ostream& operator<<(std::ostream& os, const GEMInternalCluster& cl) {
193  return os << cl.id() << " " << cl.cl1() << " " << cl.cl2();
194 }
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
operator<<
std::ostream & operator<<(std::ostream &os, const GEMInternalCluster &cl)
Definition: GEMInternalCluster.cc:192
GEMInternalCluster::layer2_last_es_
int layer2_last_es_
Definition: GEMInternalCluster.h:189
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
GEMInternalCluster::layer1_first_es_me1a_
int layer1_first_es_me1a_
Definition: GEMInternalCluster.h:191
GEMPadDigi
Definition: GEMPadDigi.h:17
GEMDetId::layer
constexpr int layer() const
Definition: GEMDetId.h:190
GEMInternalCluster::getKeyStripME1a
uint16_t getKeyStripME1a(int n=2) const
Definition: GEMInternalCluster.cc:164
GEMPadDigiCluster
Definition: GEMPadDigiCluster.h:19
GEMInternalCluster::layer1_pad_
int layer1_pad_
Definition: GEMInternalCluster.h:160
GEMInternalCluster::GEMInternalCluster
GEMInternalCluster()
Definition: GEMInternalCluster.cc:71
CSCConstants::LCT_CENTRAL_BX
Definition: CSCConstants.h:148
GEMPadDigiCluster::pads
const std::vector< uint16_t > & pads() const
Definition: GEMPadDigiCluster.h:39
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.h
GEMPadDigiCluster::bx
int bx() const
Definition: GEMPadDigiCluster.h:40
GEMInternalCluster::layer2_first_hs_
int layer2_first_hs_
Definition: GEMInternalCluster.h:169
GEMInternalCluster::layer2_pad_
int layer2_pad_
Definition: GEMInternalCluster.h:162
GEMInternalCluster::bx_
int bx_
Definition: GEMInternalCluster.h:155
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
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
GEMPadDigiCluster::isValid
bool isValid() const
Definition: GEMPadDigiCluster.cc:31
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
CSCConstants.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_max_wg_
int layer1_max_wg_
Definition: GEMInternalCluster.h:205
GEMInternalCluster::operator==
bool operator==(const GEMInternalCluster &cluster) const
Definition: GEMInternalCluster.cc:188
GEMInternalCluster::cl2_
GEMPadDigiCluster cl2_
Definition: GEMInternalCluster.h:150
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
GEMInternalCluster::layer1_last_es_me1a_
int layer1_last_es_me1a_
Definition: GEMInternalCluster.h:192
GEMDetId
Definition: GEMDetId.h:18
GEMInternalCluster::cl1_
GEMPadDigiCluster cl1_
Definition: GEMInternalCluster.h:149
GEMInternalCluster::isCoincidence_
bool isCoincidence_
Definition: GEMInternalCluster.h:210
GEMInternalCluster::mid1
GEMPadDigi mid1() const
Definition: GEMInternalCluster.cc:114
GEMPadDigiCluster::nPartitions
unsigned nPartitions() const
Definition: GEMPadDigiCluster.h:43
GEMInternalCluster::layer1_last_hs_
int layer1_last_hs_
Definition: GEMInternalCluster.h:168
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::layer2_min_wg_
int layer2_min_wg_
Definition: GEMInternalCluster.h:206
GEMInternalCluster::id_
GEMDetId id_
Definition: GEMInternalCluster.h:148
GEMInternalCluster::layer1_last_es_
int layer1_last_es_
Definition: GEMInternalCluster.h:187
GEMInternalCluster::layer1_first_hs_
int layer1_first_hs_
Definition: GEMInternalCluster.h:167
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::layer2_first_es_
int layer2_first_es_
Definition: GEMInternalCluster.h:188
GEMInternalCluster::layer2_last_hs_
int layer2_last_hs_
Definition: GEMInternalCluster.h:170
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
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::layer2_middle_hs_
int layer2_middle_hs_
Definition: GEMInternalCluster.h:179
GEMPadDigiCluster::station
GEMSubDetId::Station station() const
Definition: GEMPadDigiCluster.h:41
GEMInternalCluster::layer2_middle_hs_me1a_
int layer2_middle_hs_me1a_
Definition: GEMInternalCluster.h:182
GEMInternalCluster::layer2_min_wg
int layer2_min_wg() const
Definition: GEMInternalCluster.h:48
GEMInternalCluster::layer1_first_hs_me1a_
int layer1_first_hs_me1a_
Definition: GEMInternalCluster.h:172