|
|
Go to the documentation of this file.
57 std::vector<DetId> ids;
62 edm::LogVerbatim(
"HGCalGeom") <<
"Type:WaferU:WaferV " <<
id.iType <<
":" <<
id.iCell1 <<
":" <<
id.iCell2
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);
82 int wu1(
id.iSec1), wv1(
id.iSec2 - 1);
88 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1;
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);
100 int wu1(
id.iSec1 + 1), wv1(
id.iSec2);
106 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1;
108 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
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);
118 int wu1(
id.iSec1 + 1), wv1(
id.iSec2 + 1);
124 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1;
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);
136 int wu1(
id.iSec1), wv1(
id.iSec2 + 1);
142 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1;
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);
154 int wu1(
id.iSec1 - 1), wv1(
id.iSec2);
160 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1;
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);
172 int wu1(
id.iSec1 - 1), wv1(
id.iSec2 - 1);
178 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1;
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);
185 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
190 int wu1(
id.iSec1), wv1(
id.iSec2 - 1);
194 int wu2(
id.iSec1 - 1), wv2(
id.iSec2 - 1);
200 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
201 <<
":" << N2 <<
":" <<
u2;
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);
208 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
213 int wu1(
id.iSec1 + 1), wv1(
id.iSec2);
217 int wu2(
id.iSec1), wv2(
id.iSec2 - 1);
223 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1 <<
":" <<
t2
224 <<
":" << N2 <<
":" << v2;
226 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
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);
236 int wu1(
id.iSec1 + 1), wv1(
id.iSec2 + 1);
240 int wu2(
id.iSec1 + 1), wv2(
id.iSec2);
246 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
247 <<
":" << N2 <<
":" <<
u2;
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);
259 int wu1(
id.iSec1 + 1), wv1(
id.iSec2 + 1);
263 int wu2(
id.iSec1), wv2(
id.iSec2 + 1);
269 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
270 <<
":" << N2 <<
":" << v2;
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);
282 int wu1(
id.iSec1), wv1(
id.iSec2 + 1);
286 int wu2(
id.iSec1 - 1), wv2(
id.iSec2);
292 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
293 <<
":" << N2 <<
":" <<
u2;
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);
305 int wu1(
id.iSec1 - 1), wv1(
id.iSec2 - 1);
309 int wu2(
id.iSec1 - 1), wv2(
id.iSec2);
315 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1 <<
":" <<
t2
316 <<
":" << N2 <<
":" <<
u2;
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);
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";
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;
352 int type = (
id.iType > 0) ? 1 : 0;
356 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iCell1
362 (uint32_t)(((
id.zSide > 0) ?
kHGhalf_ : 0) +
365 edm::LogVerbatim(
"HGCalGeom") <<
"Input Trap " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iCell1
371 (uint32_t)(((
id.zSide > 0) ?
kHGhalf_ : 0) +
378 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex8 " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iSec2
379 <<
":" <<
id.iCell1 <<
":" <<
id.iCell2 <<
":" <<
id.iType <<
" Constants "
394 id.iType = (
type == 0 ? -1 : 1);
399 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex " <<
hi <<
" o/p " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iType
400 <<
":" <<
id.iSec1 <<
":" <<
id.iCell1;
409 edm::LogVerbatim(
"HGCalGeom") <<
"Input Trap " <<
hi <<
" o/p " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iType
410 <<
":" <<
id.iSec1 <<
":" <<
id.iCell1;
421 di = (di -
id.iLay + 1) /
layers_;
423 id.iCell1 = (di -
id.iCell2) /
cellMax_;
425 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex8 " <<
hi <<
" o/p " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iType
426 <<
":" <<
id.iSec1 <<
":" <<
id.iSec2 <<
":" <<
id.iCell1 <<
":" <<
id.iCell2;
439 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex I/P " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iType
447 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Trap I/P " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":"
455 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex8 I/P " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":"
468 id.iLay > 0 &&
id.iLay <=
layers_ &&
id.iSec1 >= 0 &&
id.iSec1 <=
sectors_);
486 return (
flag && (!mask));
531 id.iType = ((di -
id.iLay + 1) /
layers_ == 0) ? -1 : 1;
533 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex I/P " <<
hi <<
" O/P " <<
id.zSide <<
":" <<
id.iType <<
":" <<
id.iLay
538 di = (di -
id.iCell1 + 1) /
cellMax_;
540 di = (di -
id.iSec1 + 1) /
sectors_;
544 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Trap I/P " <<
hi <<
" O/P " <<
id.zSide <<
":" <<
id.iType <<
":"
545 <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iCell1;
553 id.iType = (di -
id.iLay + 1) /
layers_;
555 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex8 I/P " <<
hi <<
" O/P " <<
id.zSide <<
":" <<
id.iType <<
":"
556 <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iSec2;
564 std::vector<DetId>& ids,
int zside,
int type,
int lay,
int iradius,
int iphi)
const {
571 ids.emplace_back(
DetId(
id));
576 std::vector<DetId>& ids,
int det,
int zside,
int type,
int lay,
int waferU,
int waferV,
int cellU,
int cellV)
const {
579 << waferU <<
":" << waferV <<
":" << cellU <<
":" << cellV <<
" ==> Validity "
584 ids.emplace_back(
DetId(
id));
592 idx.iCell1 =
id.cell();
594 idx.iLay =
id.layer();
595 idx.iSec1 =
id.wafer();
597 idx.iType =
id.waferType();
598 idx.zSide =
id.zside();
599 idx.det =
id.subdetId();
602 idx.iCell1 =
id.iphi();
604 idx.iLay =
id.layer();
605 idx.iSec1 =
id.ietaAbs();
607 idx.iType =
id.type();
608 idx.zSide =
id.zside();
609 idx.det = (
int)(
id.subdet());
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());
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());
638 <<
":" <<
idx.iSec1 <<
":" <<
idx.iSec2 <<
":" <<
idx.iCell1 <<
":" <<
idx.iCell2;
std::vector< DetId > neighbors(const DetId &id) const
bool isValidHex(int lay, int mod, int cell, bool reco) const
unsigned int allGeomModules() const
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
HGCalGeometryMode::GeometryMode geomMode() const
constexpr Detector det() const
get the detector field from this detid
HGCalTopology(const HGCalDDDConstants &hdcons, int subdet)
create a new Topology
DetId switchZSide(const DetId startId) const
unsigned int kSizeForDenseIndexing
DetId denseId2detId(uint32_t denseId) const override
DecodedDetId decode(const DetId &id) const
static constexpr int32_t WaferCornerMin
HGCalGeometryMode::GeometryMode mode_
unsigned int totalGeomModules() const
bool tileTrapezoid() const
int getTypeHex(int layer, int waferU, int waferV) const
Log< level::Warning, false > LogWarning
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart=false) const
const HGCalDDDConstants & hdcons_
int maxCells(bool reco) const
ForwardSubdetector subdet_
bool waferHexagon6() const
DecodedDetId geomDenseId2decId(const uint32_t &hi) const
bool waferHexagon8() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
int numberCells(bool reco) const
unsigned int layers(bool reco) const
virtual uint32_t detId2denseGeomId(const DetId &id) const
DetId changeZ(const DetId &id, int nrStepsZ) const
move the nagivator along z
bool isValidTrap(int lay, int ieta, int iphi) const
int getUVMax(int type) const
DetId changeXY(const DetId &id, int nrStepsX, int nrStepsY) const
move the nagivator along x, y
#define TYPELOOKUP_DATA_REG(_dataclass_)
HGCalTypes::CellType cellType(int type, int waferU, int waferV) const
constexpr uint32_t rawId() const
get the raw id
DetId encode(const DecodedDetId &id_) const
bool validModule(const DetId &id, int cornerMin) const
Log< level::Info, true > LogVerbatim
bool valid(const DetId &id) const override
Is this a valid cell id.
uint32_t detId2denseId(const DetId &id) const override
Dense indexing.
void addHGCSiliconId(std::vector< DetId > &ids, int det, int zside, int type, int lay, int waferU, int waferV, int cellU, int cellV) const
DetId offsetBy(const DetId startId, int nrStepsX, int nrStepsY) const
int modifyUV(int uv, int type1, int type2) const
bool maskCell(const DetId &id, int corners) const
bool validHashIndex(uint32_t ix) const