CMS 3D CMS Logo

HGCalTopology.cc
Go to the documentation of this file.
9 
10 //#define EDM_ML_DEBUG
11 
12 HGCalTopology::HGCalTopology(const HGCalDDDConstants& hdcons, int det) : hdcons_(hdcons) {
14  layers_ = hdcons_.layers(true);
15  cells_ = hdcons_.maxCells(true);
19  waferMax_ = 2 * waferOff_ + 1;
22  if (waferHexagon6()) {
24  subdet_ = (ForwardSubdetector)(det);
26  types_ = 2;
27  } else if (det == (int)(DetId::Forward)) {
29  subdet_ = HFNose;
31  types_ = 3;
32  } else if (tileTrapezoid()) {
33  det_ = (DetId::Detector)(det);
36  types_ = 2;
37  } else {
38  det_ = (DetId::Detector)(det);
41  types_ = 3;
42  }
43  kSizeForDenseIndexing = (unsigned int)(2 * kHGhalf_);
44 #ifdef EDM_ML_DEBUG
45  edm::LogVerbatim("HGCalGeom") << "HGCalTopology initialized for detector " << det << ":" << det_ << ":" << subdet_
46  << " having " << sectors_ << " Sectors, " << layers_ << " Layers from " << firstLay_
47  << ", " << cells_ << " cells and total channels " << kSizeForDenseIndexing << ":"
48  << (2 * kHGeomHalf_);
49 #endif
50 }
51 
52 unsigned int HGCalTopology::allGeomModules() const {
53  return (tileTrapezoid() ? (unsigned int)(2 * hdcons_.numberCells(true)) : (unsigned int)(2 * hdcons_.wafers()));
54 }
55 
56 std::vector<DetId> HGCalTopology::neighbors(const DetId& idin) const {
57  std::vector<DetId> ids;
59  if (waferHexagon8()) {
60  HGCalTypes::CellType celltype = hdcons_.cellType(id.iType, id.iCell1, id.iCell2);
61 #ifdef EDM_ML_DEBUG
62  edm::LogVerbatim("HGCalGeom") << "Type:WaferU:WaferV " << id.iType << ":" << id.iCell1 << ":" << id.iCell2
63  << " CellType "
64  << static_cast<std::underlying_type<HGCalTypes::CellType>::type>(celltype);
65 #endif
66  switch (celltype) {
68  // cell within the wafer
69 #ifdef EDM_ML_DEBUG
70  edm::LogVerbatim("HGCalGeom") << "Cell Type 0";
71 #endif
72  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
73  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
74  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
75  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
76  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
77  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
78  break;
79  }
81  // bottom left edge
82  int wu1(id.iSec1), wv1(id.iSec2 - 1);
83  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
84  int N1 = hdcons_.getUVMax(t1);
85  int v1 = hdcons_.modifyUV(id.iCell2, id.iType, t1);
86 #ifdef EDM_ML_DEBUG
87  edm::LogVerbatim("HGCalGeom") << "Cell Type 1 "
88  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << v1;
89 #endif
90  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
91  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
92  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1 - 1);
93  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1);
94  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
95  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
96  break;
97  }
99  // left edege
100  int wu1(id.iSec1 + 1), wv1(id.iSec2);
101  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
102  int N1 = hdcons_.getUVMax(t1);
103  int u1 = hdcons_.modifyUV(id.iCell1, id.iType, t1);
104 #ifdef EDM_ML_DEBUG
105  edm::LogVerbatim("HGCalGeom") << "Cell Type 2 "
106  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << u1;
107 #endif
108  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
109  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 + N1, 2 * N1 - 1);
110  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 + N1 - 1, 2 * N1 - 1);
111  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
112  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
113  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
114  break;
115  }
117  // top left edge
118  int wu1(id.iSec1 + 1), wv1(id.iSec2 + 1);
119  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
120  int N1 = hdcons_.getUVMax(t1);
121  int v1 = hdcons_.modifyUV(id.iCell2, id.iType, t1);
122 #ifdef EDM_ML_DEBUG
123  edm::LogVerbatim("HGCalGeom") << "Cell Type 3 "
124  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << v1;
125 #endif
126  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, v1 + 1, v1 + N1);
127  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, v1, v1 + N1 - 1);
128  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
129  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
130  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
131  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
132  break;
133  }
135  // top right edge
136  int wu1(id.iSec1), wv1(id.iSec2 + 1);
137  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
138  int N1 = hdcons_.getUVMax(t1);
139  int v1 = hdcons_.modifyUV(id.iCell2, id.iType, t1);
140 #ifdef EDM_ML_DEBUG
141  edm::LogVerbatim("HGCalGeom") << "Cell Type 4 "
142  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << v1;
143 #endif
144  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, 0, v1 - N1);
145  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
146  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
147  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
148  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
149  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, 0, v1 - N1 + 1);
150  break;
151  }
153  // right edge
154  int wu1(id.iSec1 - 1), wv1(id.iSec2);
155  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
156  int N1 = hdcons_.getUVMax(t1);
157  int u1 = hdcons_.modifyUV(id.iCell1, id.iType, t1);
158 #ifdef EDM_ML_DEBUG
159  edm::LogVerbatim("HGCalGeom") << "Cell Type 5 "
160  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << u1;
161 #endif
162  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
163  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
164  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
165  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
166  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 - N1, 0);
167  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 - N1 + 1, 0);
168  break;
169  }
171  // bottom right edge
172  int wu1(id.iSec1 - 1), wv1(id.iSec2 - 1);
173  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
174  int N1 = hdcons_.getUVMax(t1);
175  int u1 = hdcons_.modifyUV(id.iCell1, id.iType, t1);
176 #ifdef EDM_ML_DEBUG
177  edm::LogVerbatim("HGCalGeom") << "Cell Type 6 "
178  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << u1;
179 #endif
180  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
181  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
182  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
183  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 + N1 - 1, u1 - 1);
184  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 + N1, u1);
185  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
186  break;
187  }
189  // bottom corner
190  int wu1(id.iSec1), wv1(id.iSec2 - 1);
191  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
192  int N1 = hdcons_.getUVMax(t1);
193  int v1 = hdcons_.modifyUV(id.iCell2, id.iType, t1);
194  int wu2(id.iSec1 - 1), wv2(id.iSec2 - 1);
195  int t2 = hdcons_.getTypeHex(id.iLay, wu2, wv2);
196  int N2 = hdcons_.getUVMax(t2);
197  int u2 = hdcons_.modifyUV(id.iCell1, id.iType, t2);
198 #ifdef EDM_ML_DEBUG
199  edm::LogVerbatim("HGCalGeom") << "Cell Type 11 "
200  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << v1 << ":" << t2
201  << ":" << N2 << ":" << u2;
202 #endif
203  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
204  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
205  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1 - 1);
206  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1);
207  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, u2 + N2, u2);
208  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
209  break;
210  }
212  // bottom left corner
213  int wu1(id.iSec1 + 1), wv1(id.iSec2);
214  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
215  int N1 = hdcons_.getUVMax(t1);
216  int u1 = hdcons_.modifyUV(id.iCell1, id.iType, t1);
217  int wu2(id.iSec1), wv2(id.iSec2 - 1);
218  int t2 = hdcons_.getTypeHex(id.iLay, wu2, wv2);
219  int N2 = hdcons_.getUVMax(t2);
220  int v2 = hdcons_.modifyUV(id.iCell2, id.iType, t2);
221 #ifdef EDM_ML_DEBUG
222  edm::LogVerbatim("HGCalGeom") << "Cell Type 12 "
223  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << u1 << ":" << t2
224  << ":" << N2 << ":" << v2;
225 #endif
226  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
227  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 + N1, 2 * N1 - 1);
228  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, 2 * N2 - 1, v2 + N2 - 1);
229  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, 2 * N2 - 1, v2 + N2);
230  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
231  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
232  break;
233  }
235  // top left corner
236  int wu1(id.iSec1 + 1), wv1(id.iSec2 + 1);
237  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
238  int N1 = hdcons_.getUVMax(t1);
239  int v1 = hdcons_.modifyUV(id.iCell2, id.iType, t1);
240  int wu2(id.iSec1 + 1), wv2(id.iSec2);
241  int t2 = hdcons_.getTypeHex(id.iLay, wu2, wv2);
242  int N2 = hdcons_.getUVMax(t2);
243  int u2 = hdcons_.modifyUV(id.iCell1, id.iType, t2);
244 #ifdef EDM_ML_DEBUG
245  edm::LogVerbatim("HGCalGeom") << "Cell Type 13 "
246  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << v1 << ":" << t2
247  << ":" << N2 << ":" << u2;
248 #endif
249  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, v1 + 1, N1 + v1);
250  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, v1, N1 + v1 - 1);
251  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, u2 + N2 - 1, 2 * N2 - 1);
252  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
253  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
254  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2 + 1);
255  break;
256  }
258  // top corner
259  int wu1(id.iSec1 + 1), wv1(id.iSec2 + 1);
260  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
261  int N1 = hdcons_.getUVMax(t1);
262  int v1 = hdcons_.modifyUV(id.iCell2, id.iType, t1);
263  int wu2(id.iSec1), wv2(id.iSec2 + 1);
264  int t2 = hdcons_.getTypeHex(id.iLay, wu2, wv2);
265  int N2 = hdcons_.getUVMax(t2);
266  int v2 = hdcons_.modifyUV(id.iCell2, id.iType, t2);
267 #ifdef EDM_ML_DEBUG
268  edm::LogVerbatim("HGCalGeom") << "Cell Type 14 "
269  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << v1 << ":" << t2
270  << ":" << N2 << ":" << v2;
271 #endif
272  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, v1 + 1, v1 + N1);
273  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, v1, v1 + N1 - 1);
274  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
275  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
276  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 + 1);
277  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, 0, v2 - N2 + 1);
278  break;
279  }
281  // top right corner
282  int wu1(id.iSec1), wv1(id.iSec2 + 1);
283  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
284  int N1 = hdcons_.getUVMax(t1);
285  int v1 = hdcons_.modifyUV(id.iCell2, id.iType, t1);
286  int wu2(id.iSec1 - 1), wv2(id.iSec2);
287  int t2 = hdcons_.getTypeHex(id.iLay, wu2, wv2);
288  int N2 = hdcons_.getUVMax(t2);
289  int u2 = hdcons_.modifyUV(id.iCell1, id.iType, t2);
290 #ifdef EDM_ML_DEBUG
291  edm::LogVerbatim("HGCalGeom") << "Cell Type 15 "
292  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << v1 << ":" << t2
293  << ":" << N2 << ":" << u2;
294 #endif
295  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, 0, v1 - N1);
296  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
297  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
298  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2);
299  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, u2 - N2, 0);
300  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, u2 - N2 + 1, 0);
301  break;
302  }
304  // bottom right corner
305  int wu1(id.iSec1 - 1), wv1(id.iSec2 - 1);
306  int t1 = hdcons_.getTypeHex(id.iLay, wu1, wv1);
307  int N1 = hdcons_.getUVMax(t1);
308  int u1 = hdcons_.modifyUV(id.iCell1, id.iType, t1);
309  int wu2(id.iSec1 - 1), wv2(id.iSec2);
310  int t2 = hdcons_.getTypeHex(id.iLay, wu2, wv2);
311  int N2 = hdcons_.getUVMax(t2);
312  int u2 = hdcons_.modifyUV(id.iCell1, id.iType, t2);
313 #ifdef EDM_ML_DEBUG
314  edm::LogVerbatim("HGCalGeom") << "Cell Type 16 "
315  << ":" << wu1 << ":" << wv1 << ":" << t1 << ":" << N1 << ":" << u1 << ":" << t2
316  << ":" << N2 << ":" << u2;
317 #endif
318  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 + 1, id.iCell2);
319  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2 - 1);
320  addHGCSiliconId(ids, id.det, id.zSide, id.iType, id.iLay, id.iSec1, id.iSec2, id.iCell1 - 1, id.iCell2 - 1);
321  addHGCSiliconId(ids, id.det, id.zSide, t1, id.iLay, wu1, wv1, u1 + N1 - 1, u1 - 1);
322  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, u2 - N2, 0);
323  addHGCSiliconId(ids, id.det, id.zSide, t2, id.iLay, wu2, wv2, u2 - N2 + 1, 0);
324  break;
325  }
326  default:
327  // Not valid u, v
328  int N = hdcons_.getUVMax(id.iType);
329  edm::LogWarning("HGCalGeom") << "u:v " << id.iCell1 << ":" << id.iCell2 << " Tests " << (id.iCell1 > 2 * N - 1)
330  << ":" << (id.iCell2 > 2 * N - 1) << ":" << (id.iCell2 >= (id.iCell1 + N)) << ":"
331  << (id.iCell1 > (id.iCell2 + N)) << " ERROR";
332  }
333  } else if (tileTrapezoid()) {
334  int iphi1 = (id.iCell1 > 1) ? id.iCell1 - 1 : hdcons_.getUVMax(id.iType);
335  int iphi2 = (id.iCell1 < hdcons_.getUVMax(id.iType)) ? id.iCell1 + 1 : 1;
336  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1 - 1, id.iCell1);
337  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1 - 1, iphi1);
338  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1, iphi1);
339  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1 + 1, iphi1);
340  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1 + 1, id.iCell1);
341  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1 + 1, iphi2);
342  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1, iphi2);
343  addHGCSCintillatorId(ids, id.zSide, id.iType, id.iLay, id.iSec1 - 1, iphi2);
344  }
345  return ids;
346 }
347 
348 uint32_t HGCalTopology::detId2denseId(const DetId& idin) const {
350  uint32_t idx;
351  if (waferHexagon6()) {
352  int type = (id.iType > 0) ? 1 : 0;
353  idx = (uint32_t)(((id.zSide > 0) ? kHGhalf_ : 0) +
354  ((((id.iCell1 - 1) * layers_ + id.iLay - 1) * sectors_ + id.iSec1) * types_ + type));
355 #ifdef EDM_ML_DEBUG
356  edm::LogVerbatim("HGCalGeom") << "Input Hex " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":" << id.iCell1
357  << ":" << id.iType << " Constants " << kHGeomHalf_ << ":" << layers_ << ":"
358  << sectors_ << ":" << types_ << " o/p " << idx;
359 #endif
360  } else if (tileTrapezoid()) {
361  idx =
362  (uint32_t)(((id.zSide > 0) ? kHGhalf_ : 0) +
363  ((((id.iCell1 - 1) * layers_ + id.iLay - firstLay_) * sectors_ + id.iSec1 - 1) * types_ + id.iType));
364 #ifdef EDM_ML_DEBUG
365  edm::LogVerbatim("HGCalGeom") << "Input Trap " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":" << id.iCell1
366  << ":" << id.iType << " Constants " << kHGeomHalf_ << ":" << layers_ << ":"
367  << sectors_ << ":" << types_ << " o/p " << idx;
368 #endif
369  } else {
370  idx =
371  (uint32_t)(((id.zSide > 0) ? kHGhalf_ : 0) +
372  (((((id.iCell1 * cellMax_ + id.iCell2) * layers_ + id.iLay - 1) * waferMax_ + id.iSec1 + waferOff_) *
373  waferMax_ +
374  id.iSec2 + waferOff_) *
375  types_ +
376  id.iType));
377 #ifdef EDM_ML_DEBUG
378  edm::LogVerbatim("HGCalGeom") << "Input Hex8 " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":" << id.iSec2
379  << ":" << id.iCell1 << ":" << id.iCell2 << ":" << id.iType << " Constants "
380  << kHGeomHalf_ << ":" << cellMax_ << ":" << layers_ << ":" << waferMax_ << ":"
381  << waferOff_ << ":" << types_ << " o/p " << idx;
382 #endif
383  }
384  return idx;
385 }
386 
389  if (validHashIndex(hi)) {
390  id.zSide = ((int)(hi) < kHGhalf_ ? -1 : 1);
391  int di = ((int)(hi) % kHGhalf_);
392  if (waferHexagon6()) {
393  int type = (di % types_);
394  id.iType = (type == 0 ? -1 : 1);
395  id.iSec1 = (((di - type) / types_) % sectors_);
396  id.iLay = (((((di - type) / types_) - id.iSec1 + 1) / sectors_) % layers_ + 1);
397  id.iCell1 = (((((di - type) / types_) - id.iSec1 + 1) / sectors_ - id.iLay + 1) / layers_ + 1);
398 #ifdef EDM_ML_DEBUG
399  edm::LogVerbatim("HGCalGeom") << "Input Hex " << hi << " o/p " << id.zSide << ":" << id.iLay << ":" << id.iType
400  << ":" << id.iSec1 << ":" << id.iCell1;
401 #endif
402  } else if (tileTrapezoid()) {
403  int type = (di % types_);
404  id.iType = type;
405  id.iSec1 = (((di - type) / types_) % sectors_) + 1;
406  id.iLay = (((((di - type) / types_) - id.iSec1 + 1) / sectors_) % layers_ + firstLay_);
407  id.iCell1 = (((((di - type) / types_) - id.iSec1 + 1) / sectors_ - id.iLay + firstLay_) / layers_ + 1);
408 #ifdef EDM_ML_DEBUG
409  edm::LogVerbatim("HGCalGeom") << "Input Trap " << hi << " o/p " << id.zSide << ":" << id.iLay << ":" << id.iType
410  << ":" << id.iSec1 << ":" << id.iCell1;
411 #endif
412  } else {
413  int type = (di % types_);
414  id.iType = type;
415  di = (di - type) / types_;
416  id.iSec2 = (di % waferMax_) - waferOff_;
417  di = (di - id.iSec2 - waferOff_) / waferMax_;
418  id.iSec1 = (di % waferMax_) - waferOff_;
419  di = (di - id.iSec1 - waferOff_) / waferMax_;
420  id.iLay = (di % layers_) + 1;
421  di = (di - id.iLay + 1) / layers_;
422  id.iCell2 = (di % cellMax_);
423  id.iCell1 = (di - id.iCell2) / cellMax_;
424 #ifdef EDM_ML_DEBUG
425  edm::LogVerbatim("HGCalGeom") << "Input Hex8 " << hi << " o/p " << id.zSide << ":" << id.iLay << ":" << id.iType
426  << ":" << id.iSec1 << ":" << id.iSec2 << ":" << id.iCell1 << ":" << id.iCell2;
427 #endif
428  }
429  }
430  return encode(id);
431 }
432 
433 uint32_t HGCalTopology::detId2denseGeomId(const DetId& idin) const {
435  uint32_t idx;
436  if (waferHexagon6()) {
437  idx = (uint32_t)(((id.zSide > 0) ? kHGeomHalf_ : 0) + (id.iLay - 1) * sectors_ + id.iSec1);
438 #ifdef EDM_ML_DEBUG
439  edm::LogVerbatim("HGCalGeom") << "Geom Hex I/P " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":" << id.iType
440  << " Constants " << kHGeomHalf_ << ":" << layers_ << ":" << sectors_ << " o/p "
441  << idx;
442 #endif
443  } else if (tileTrapezoid()) {
444  idx = (uint32_t)(((id.zSide > 0) ? kHGeomHalf_ : 0) +
445  (((id.iLay - firstLay_) * sectors_ + id.iSec1 - 1) * cellMax_ + id.iCell1 - 1));
446 #ifdef EDM_ML_DEBUG
447  edm::LogVerbatim("HGCalGeom") << "Geom Trap I/P " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":"
448  << id.iCell1 << ":" << id.iType << " Constants " << kHGeomHalf_ << ":" << layers_
449  << ":" << firstLay_ << ":" << sectors_ << ":" << cellMax_ << " o/p " << idx;
450 #endif
451  } else {
452  idx = (uint32_t)(((id.zSide > 0) ? kHGeomHalf_ : 0) +
453  (((id.iLay - 1) * waferMax_ + id.iSec1 + waferOff_) * waferMax_ + id.iSec2 + waferOff_));
454 #ifdef EDM_ML_DEBUG
455  edm::LogVerbatim("HGCalGeom") << "Geom Hex8 I/P " << id.zSide << ":" << id.iLay << ":" << id.iSec1 << ":"
456  << id.iSec2 << ":" << id.iType << " Constants " << kHGeomHalf_ << ":" << layers_
457  << ":" << waferMax_ << ":" << waferOff_ << " o/p " << idx;
458 #endif
459  }
460  return idx;
461 }
462 
463 bool HGCalTopology::valid(const DetId& idin) const {
465  bool flag;
466  if (waferHexagon6()) {
467  flag = (idin.det() == det_ && idin.subdetId() == (int)(subdet_) && id.iCell1 >= 0 && id.iCell1 < cells_ &&
468  id.iLay > 0 && id.iLay <= layers_ && id.iSec1 >= 0 && id.iSec1 <= sectors_);
469  if (flag)
470  flag = hdcons_.isValidHex(id.iLay, id.iSec1, id.iCell1, true);
471  } else if (tileTrapezoid()) {
472  flag = ((idin.det() == det_) && hdcons_.isValidTrap(id.iLay, id.iSec1, id.iCell1));
473  } else {
474  flag = ((idin.det() == det_) && hdcons_.isValidHex8(id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2));
475  }
476  return flag;
477 }
478 
479 bool HGCalTopology::valid(const DetId& idin, int cornerMin) const {
480  if (waferHexagon8()) {
482  bool mask = (cornerMin < HGCalTypes::WaferCornerMin) ? false : hdcons_.maskCell(idin, cornerMin);
483  bool flag = ((idin.det() == det_) &&
485  id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2, (cornerMin >= HGCalTypes::WaferCornerMin)));
486  return (flag && (!mask));
487  } else {
488  return valid(idin);
489  }
490 }
491 
492 bool HGCalTopology::validModule(const DetId& idin, int cornerMin) const {
493  if (idin.det() != det_) {
494  return false;
495  } else if ((idin.det() == DetId::HGCalEE) || (idin.det() == DetId::HGCalHSi)) {
497  return hdcons_.isValidHex8(id.iLay, id.iSec1, id.iSec2, (cornerMin >= HGCalTypes::WaferCornerMin));
498  } else {
499  return valid(idin);
500  }
501 }
502 
503 DetId HGCalTopology::offsetBy(const DetId startId, int nrStepsX, int nrStepsY) const {
504  if (startId.det() == DetId::Forward && startId.subdetId() == (int)(subdet_)) {
505  DetId id = changeXY(startId, nrStepsX, nrStepsY);
506  if (valid(id))
507  return id;
508  }
509  return DetId(0);
510 }
511 
512 DetId HGCalTopology::switchZSide(const DetId startId) const {
513  HGCalTopology::DecodedDetId id_ = decode(startId);
514  id_.zSide = -id_.zSide;
515  DetId id = encode(id_);
516  if (valid(id))
517  return id;
518  else
519  return DetId(0);
520 }
521 
524  if (hi < totalGeomModules()) {
525  id.zSide = ((int)(hi) < kHGeomHalf_ ? -1 : 1);
526  int di = ((int)(hi) % kHGeomHalf_);
527  if (waferHexagon6()) {
528  id.iSec1 = (di % sectors_);
529  di = (di - id.iSec1) / sectors_;
530  id.iLay = (di % layers_) + 1;
531  id.iType = ((di - id.iLay + 1) / layers_ == 0) ? -1 : 1;
532 #ifdef EDM_ML_DEBUG
533  edm::LogVerbatim("HGCalGeom") << "Geom Hex I/P " << hi << " O/P " << id.zSide << ":" << id.iType << ":" << id.iLay
534  << ":" << id.iSec1;
535 #endif
536  } else if (tileTrapezoid()) {
537  id.iCell1 = (di % cellMax_) + 1;
538  di = (di - id.iCell1 + 1) / cellMax_;
539  id.iSec1 = (di % sectors_) + 1;
540  di = (di - id.iSec1 + 1) / sectors_;
541  id.iLay = (di % layers_) + firstLay_;
542  id.iType = (di - id.iLay + firstLay_) / layers_;
543 #ifdef EDM_ML_DEBUG
544  edm::LogVerbatim("HGCalGeom") << "Geom Trap I/P " << hi << " O/P " << id.zSide << ":" << id.iType << ":"
545  << id.iLay << ":" << id.iSec1 << ":" << id.iCell1;
546 #endif
547  } else {
548  id.iSec2 = (di % waferMax_) - waferOff_;
549  di = (di - id.iSec2 - waferOff_) / waferMax_;
550  id.iSec1 = (di % waferMax_) - waferOff_;
551  di = (di - id.iSec1 - waferOff_) / waferMax_;
552  id.iLay = (di % layers_) + 1;
553  id.iType = (di - id.iLay + 1) / layers_;
554 #ifdef EDM_ML_DEBUG
555  edm::LogVerbatim("HGCalGeom") << "Geom Hex8 I/P " << hi << " O/P " << id.zSide << ":" << id.iType << ":"
556  << id.iLay << ":" << id.iSec1 << ":" << id.iSec2;
557 #endif
558  }
559  }
560  return id;
561 }
562 
564  std::vector<DetId>& ids, int zside, int type, int lay, int iradius, int iphi) const {
565 #ifdef EDM_ML_DEBUG
566  edm::LogVerbatim("HGCalGeom") << "addHGCSCintillatorId " << zside << ":" << type << ":" << lay << ":" << iradius
567  << ":" << iphi << " ==> Validity " << hdcons_.isValidTrap(lay, iradius, iphi);
568 #endif
569  if (hdcons_.isValidTrap(lay, iradius, iphi)) {
570  HGCScintillatorDetId id(type, lay, zside * iradius, iphi);
571  ids.emplace_back(DetId(id));
572  }
573 }
574 
576  std::vector<DetId>& ids, int det, int zside, int type, int lay, int waferU, int waferV, int cellU, int cellV) const {
577 #ifdef EDM_ML_DEBUG
578  edm::LogVerbatim("HGCalGeom") << "addHGCSiliconId " << det << ":" << zside << ":" << type << ":" << lay << ":"
579  << waferU << ":" << waferV << ":" << cellU << ":" << cellV << " ==> Validity "
580  << hdcons_.isValidHex8(lay, waferU, waferV, cellU, cellV);
581 #endif
582  if (hdcons_.isValidHex8(lay, waferU, waferV, cellU, cellV)) {
583  HGCSiliconDetId id((DetId::Detector)(det), zside, type, lay, waferU, waferV, cellU, cellV);
584  ids.emplace_back(DetId(id));
585  }
586 }
587 
590  if (waferHexagon6()) {
591  HGCalDetId id(startId);
592  idx.iCell1 = id.cell();
593  idx.iCell2 = 0;
594  idx.iLay = id.layer();
595  idx.iSec1 = id.wafer();
596  idx.iSec2 = 0;
597  idx.iType = id.waferType();
598  idx.zSide = id.zside();
599  idx.det = id.subdetId();
600  } else if (tileTrapezoid()) {
601  HGCScintillatorDetId id(startId);
602  idx.iCell1 = id.iphi();
603  idx.iCell2 = 0;
604  idx.iLay = id.layer();
605  idx.iSec1 = id.ietaAbs();
606  idx.iSec2 = 0;
607  idx.iType = id.type();
608  idx.zSide = id.zside();
609  idx.det = (int)(id.subdet());
611  HFNoseDetId id(startId);
612  idx.iCell1 = id.cellU();
613  idx.iCell2 = id.cellV();
614  idx.iLay = id.layer();
615  idx.iSec1 = id.waferU();
616  idx.iSec2 = id.waferV();
617  idx.iType = id.type();
618  idx.zSide = id.zside();
619  idx.det = (int)(id.subdet());
620  } else {
621  HGCSiliconDetId id(startId);
622  idx.iCell1 = id.cellU();
623  idx.iCell2 = id.cellV();
624  idx.iLay = id.layer();
625  idx.iSec1 = id.waferU();
626  idx.iSec2 = id.waferV();
627  idx.iType = id.type();
628  idx.zSide = id.zside();
629  idx.det = (int)(id.subdet());
630  }
631  return idx;
632 }
633 
635  DetId id;
636 #ifdef EDM_ML_DEBUG
637  edm::LogVerbatim("HGCalGeom") << "Encode " << idx.det << ":" << idx.zSide << ":" << idx.iType << ":" << idx.iLay
638  << ":" << idx.iSec1 << ":" << idx.iSec2 << ":" << idx.iCell1 << ":" << idx.iCell2;
639 #endif
640  if (waferHexagon6()) {
641  id =
642  HGCalDetId((ForwardSubdetector)(idx.det), idx.zSide, idx.iLay, ((idx.iType > 0) ? 1 : 0), idx.iSec1, idx.iCell1)
643  .rawId();
644  } else if (tileTrapezoid()) {
645  id = HGCScintillatorDetId(idx.iType, idx.iLay, idx.zSide * idx.iSec1, idx.iCell1).rawId();
647  id = HFNoseDetId(idx.zSide, idx.iType, idx.iLay, idx.iSec1, idx.iSec2, idx.iCell1, idx.iCell2).rawId();
648  } else {
649  id = HGCSiliconDetId(
650  (DetId::Detector)(idx.det), idx.zSide, idx.iType, idx.iLay, idx.iSec1, idx.iSec2, idx.iCell1, idx.iCell2)
651  .rawId();
652  }
653  return id;
654 }
655 
656 DetId HGCalTopology::changeXY(const DetId& id, int nrStepsX, int nrStepsY) const { return DetId(); }
657 
658 DetId HGCalTopology::changeZ(const DetId& id, int nrStepsZ) const { return DetId(); }
659 
661 
RandomServiceHelper.t2
t2
Definition: RandomServiceHelper.py:257
HGCalTopology::layers_
int layers_
Definition: HGCalTopology.h:153
MessageLogger.h
HGCalTopology::neighbors
std::vector< DetId > neighbors(const DetId &id) const
Definition: HGCalTopology.cc:56
HGCScintillatorDetId.h
ForwardEmpty
Definition: ForwardSubdetector.h:5
HGCalDDDConstants::firstLayer
int firstLayer() const
Definition: HGCalDDDConstants.h:52
HGCalDDDConstants::isValidHex
bool isValidHex(int lay, int mod, int cell, bool reco) const
Definition: HGCalDDDConstants.cc:444
HGCalTopology::allGeomModules
unsigned int allGeomModules() const
Definition: HGCalTopology.cc:52
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
ForwardSubdetector
ForwardSubdetector
Definition: ForwardSubdetector.h:4
HGCalTopology::addHGCSCintillatorId
void addHGCSCintillatorId(std::vector< DetId > &ids, int zside, int type, int lay, int iradius, int iphi) const
add DetId of Scintillator and Silicon type if valid
Definition: HGCalTopology.cc:563
HGCalDDDConstants::geomMode
HGCalGeometryMode::GeometryMode geomMode() const
Definition: HGCalDDDConstants.h:53
HGCalTopology::waferOff_
int waferOff_
Definition: HGCalTopology.h:154
HGCalTopology::types_
int types_
Definition: HGCalTopology.h:153
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
HGCalTopology::HGCalTopology
HGCalTopology(const HGCalDDDConstants &hdcons, int subdet)
create a new Topology
Definition: HGCalTopology.cc:12
HGCalTopology::switchZSide
DetId switchZSide(const DetId startId) const
Definition: HGCalTopology.cc:512
HGCalDDDConstants::waferUVMax
int waferUVMax() const
Definition: HGCalDDDConstants.h:191
HGCalTopology::kSizeForDenseIndexing
unsigned int kSizeForDenseIndexing
Definition: HGCalTopology.h:156
HGCSiliconDetId.h
HGCalTopology::denseId2detId
DetId denseId2detId(uint32_t denseId) const override
Definition: HGCalTopology.cc:387
typelookup.h
HGCalTopology::det_
DetId::Detector det_
Definition: HGCalTopology.h:151
HGCalTopology::decode
DecodedDetId decode(const DetId &id) const
Definition: HGCalTopology.cc:588
HGCalTypes::CellType::TopLeftEdge
HGCalTopology::DecodedDetId
Definition: HGCalTopology.h:108
HGCalTypes::WaferCornerMin
static constexpr int32_t WaferCornerMin
Definition: HGCalTypes.h:61
HFNoseDetId.h
HGCalTopology::mode_
HGCalGeometryMode::GeometryMode mode_
Definition: HGCalTopology.h:149
HGCalTopology::totalGeomModules
unsigned int totalGeomModules() const
Definition: HGCalTopology.h:93
HGCalTopology::tileTrapezoid
bool tileTrapezoid() const
Definition: HGCalTopology.h:124
HGCalDDDConstants::getTypeHex
int getTypeHex(int layer, int waferU, int waferV) const
Definition: HGCalDDDConstants.cc:428
HFNoseDetId
Definition: HFNoseDetId.h:22
HGCalTypes::CellType::TopRightEdge
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
HGCalTopology::kHGeomHalf_
int kHGeomHalf_
Definition: HGCalTopology.h:155
HGCalTopology::DecodedDetId::zSide
int zSide
Definition: HGCalTopology.h:110
HGCalDDDConstants
Definition: HGCalDDDConstants.h:26
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
HGCalTopology::waferMax_
int waferMax_
Definition: HGCalTopology.h:154
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
DetId
Definition: DetId.h:17
HGCalDDDConstants::isValidHex8
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart=false) const
Definition: HGCalDDDConstants.cc:486
HGCalTopology::kHGhalf_
int kHGhalf_
Definition: HGCalTopology.h:155
DetId::HGCalHSi
Definition: DetId.h:33
DetId::HGCalEE
Definition: DetId.h:32
HGCalTypes::CellType::BottomCorner
HGCalTopology::hdcons_
const HGCalDDDConstants & hdcons_
Definition: HGCalTopology.h:148
RandomServiceHelper.t1
t1
Definition: RandomServiceHelper.py:256
HGCalTopology.h
HGCalDDDConstants::maxCells
int maxCells(bool reco) const
Definition: HGCalDDDConstants.cc:785
HGCalDDDConstants::maxCellUV
int maxCellUV() const
Definition: HGCalDDDConstants.h:89
HFNose
Definition: ForwardSubdetector.h:11
HGCalTopology::subdet_
ForwardSubdetector subdet_
Definition: HGCalTopology.h:152
N
#define N
Definition: blowfish.cc:9
HGCalTopology::waferHexagon6
bool waferHexagon6() const
Definition: HGCalTopology.h:127
HGCalTopology::firstLay_
int firstLay_
Definition: HGCalTopology.h:154
HGCalTopology::geomDenseId2decId
DecodedDetId geomDenseId2decId(const uint32_t &hi) const
Definition: HGCalTopology.cc:522
HGCalDDDConstants::wafers
int wafers() const
Definition: HGCalDDDConstants.cc:1396
HGCalTypes::CellType
CellType
Definition: HGCalTypes.h:12
HGCalTopology::waferHexagon8
bool waferHexagon8() const
Definition: HGCalTopology.h:130
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
CaloSubdetectorGeometry.h
HGCalDDDConstants::numberCells
int numberCells(bool reco) const
Definition: HGCalDDDConstants.cc:882
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
HGCalDDDConstants::layers
unsigned int layers(bool reco) const
Definition: HGCalDDDConstants.cc:561
HGCalTopology::cellMax_
int cellMax_
Definition: HGCalTopology.h:154
createfilelist.int
int
Definition: createfilelist.py:10
testProducerWithPsetDescEmpty_cfi.u1
u1
Definition: testProducerWithPsetDescEmpty_cfi.py:49
HGCalTopology::detId2denseGeomId
virtual uint32_t detId2denseGeomId(const DetId &id) const
Definition: HGCalTopology.cc:433
HGCalTopology::changeZ
DetId changeZ(const DetId &id, int nrStepsZ) const
move the nagivator along z
Definition: HGCalTopology.cc:658
HGCalTypes::CellType::TopLeftCorner
HGCalTypes::CellType::LeftEdge
DetId::Detector
Detector
Definition: DetId.h:24
HGCalDDDConstants::sectors
int sectors() const
Definition: HGCalDDDConstants.h:108
HGCalDDDConstants::isValidTrap
bool isValidTrap(int lay, int ieta, int iphi) const
Definition: HGCalDDDConstants.cc:550
HGCalDDDConstants::getUVMax
int getUVMax(int type) const
Definition: HGCalDDDConstants.h:70
HGCalTopology::changeXY
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
Definition: HGCalTopology.cc:656
TYPELOOKUP_DATA_REG
#define TYPELOOKUP_DATA_REG(_dataclass_)
Definition: typelookup.h:102
HGCalTypes::CellType::TopCorner
HGCalTopology
Definition: HGCalTopology.h:12
HGCalTypes::CellType::BottomRightCorner
hi
Definition: EPCuts.h:4
HGCalDetId
Definition: HGCalDetId.h:8
HGCalDetId.h
HGCalDDDConstants::cellType
HGCalTypes::CellType cellType(int type, int waferU, int waferV) const
Definition: HGCalDDDConstants.cc:239
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HGCalTypes::CellType::BottomLeftCorner
HGCalTopology::encode
DetId encode(const DecodedDetId &id_) const
Definition: HGCalTopology.cc:634
HGCalTopology::validModule
bool validModule(const DetId &id, int cornerMin) const
Definition: HGCalTopology.cc:492
HGCalTypes::CellType::RightEdge
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:23
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HGCalTypes::CellType::BottomRightEdge
HGCalTopology::sectors_
int sectors_
Definition: HGCalTopology.h:153
HGCalTopology::cells_
int cells_
Definition: HGCalTopology.h:153
HGCalTypes::CellType::CentralType
HGCalTopology::valid
bool valid(const DetId &id) const override
Is this a valid cell id.
Definition: HGCalTopology.cc:463
HGCalTopology::detId2denseId
uint32_t detId2denseId(const DetId &id) const override
Dense indexing.
Definition: HGCalTopology.cc:348
HGCalTopology::addHGCSiliconId
void addHGCSiliconId(std::vector< DetId > &ids, int det, int zside, int type, int lay, int waferU, int waferV, int cellU, int cellV) const
Definition: HGCalTopology.cc:575
DetId::Forward
Definition: DetId.h:30
MetAnalyzer.u2
u2
Definition: MetAnalyzer.py:61
HGCalTypes.h
HGCalTopology::offsetBy
DetId offsetBy(const DetId startId, int nrStepsX, int nrStepsY) const
Definition: HGCalTopology.cc:503
HGCalDDDConstants::modifyUV
int modifyUV(int uv, int type1, int type2) const
Definition: HGCalDDDConstants.cc:850
HGCalDDDConstants::maskCell
bool maskCell(const DetId &id, int corners) const
Definition: HGCalDDDConstants.cc:745
HGCalTypes::CellType::BottomLeftEdge
HGCalTopology::validHashIndex
bool validHashIndex(uint32_t ix) const
Definition: HGCalTopology.h:89
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
HGCalTypes::CellType::TopRightCorner