|
|
Go to the documentation of this file.
58 std::vector<DetId> ids;
63 edm::LogVerbatim(
"HGCalGeom") <<
"Type:WaferU:WaferV " <<
id.iType <<
":" <<
id.iCell1 <<
":" <<
id.iCell2
73 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
74 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
75 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
76 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2);
77 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
78 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
83 int wu1(
id.iSec1), wv1(
id.iSec2 - 1);
89 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1;
91 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
92 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
93 addHGCSiliconId(ids,
id.det,
id.zSide,
t1,
id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1 - 1);
94 addHGCSiliconId(ids,
id.det,
id.zSide,
t1,
id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1);
95 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
96 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
101 int wu1(
id.iSec1 + 1), wv1(
id.iSec2);
107 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1;
109 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 - 1,
id.iCell2);
113 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
114 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
119 int wu1(
id.iSec1 + 1), wv1(
id.iSec2 + 1);
125 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1;
129 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
130 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2);
131 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
132 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
137 int wu1(
id.iSec1), wv1(
id.iSec2 + 1);
143 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1;
146 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
147 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
148 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2);
149 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
155 int wu1(
id.iSec1 - 1), wv1(
id.iSec2);
161 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1;
163 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
164 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
165 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
166 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2);
173 int wu1(
id.iSec1 - 1), wv1(
id.iSec2 - 1);
179 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1;
181 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
182 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
183 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
186 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
191 int wu1(
id.iSec1), wv1(
id.iSec2 - 1);
195 int wu2(
id.iSec1 - 1), wv2(
id.iSec2 - 1);
201 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
202 <<
":" << N2 <<
":" <<
u2;
204 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
205 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
206 addHGCSiliconId(ids,
id.det,
id.zSide,
t1,
id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1 - 1);
207 addHGCSiliconId(ids,
id.det,
id.zSide,
t1,
id.iLay, wu1, wv1, 2 * N1 - 1, v1 + N1);
209 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
214 int wu1(
id.iSec1 + 1), wv1(
id.iSec2);
218 int wu2(
id.iSec1), wv2(
id.iSec2 - 1);
224 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1 <<
":" <<
t2
225 <<
":" << N2 <<
":" << v2;
227 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
229 addHGCSiliconId(ids,
id.det,
id.zSide,
t2,
id.iLay, wu2, wv2, 2 * N2 - 1, v2 + N2 - 1);
230 addHGCSiliconId(ids,
id.det,
id.zSide,
t2,
id.iLay, wu2, wv2, 2 * N2 - 1, v2 + N2);
231 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
232 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
237 int wu1(
id.iSec1 + 1), wv1(
id.iSec2 + 1);
241 int wu2(
id.iSec1 + 1), wv2(
id.iSec2);
247 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
248 <<
":" << N2 <<
":" <<
u2;
253 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2);
254 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
255 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2 + 1);
260 int wu1(
id.iSec1 + 1), wv1(
id.iSec2 + 1);
264 int wu2(
id.iSec1), wv2(
id.iSec2 + 1);
270 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
271 <<
":" << N2 <<
":" << v2;
275 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
276 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2);
277 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 + 1);
283 int wu1(
id.iSec1), wv1(
id.iSec2 + 1);
287 int wu2(
id.iSec1 - 1), wv2(
id.iSec2);
293 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" << v1 <<
":" <<
t2
294 <<
":" << N2 <<
":" <<
u2;
297 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
298 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
299 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2);
306 int wu1(
id.iSec1 - 1), wv1(
id.iSec2 - 1);
310 int wu2(
id.iSec1 - 1), wv2(
id.iSec2);
316 <<
":" << wu1 <<
":" << wv1 <<
":" <<
t1 <<
":" << N1 <<
":" <<
u1 <<
":" <<
t2
317 <<
":" << N2 <<
":" <<
u2;
319 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 + 1,
id.iCell2);
320 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1,
id.iCell2 - 1);
321 addHGCSiliconId(ids,
id.det,
id.zSide,
id.iType,
id.iLay,
id.iSec1,
id.iSec2,
id.iCell1 - 1,
id.iCell2 - 1);
330 edm::LogWarning(
"HGCalGeom") <<
"u:v " <<
id.iCell1 <<
":" <<
id.iCell2 <<
" Tests " << (
id.iCell1 > 2 *
N - 1)
331 <<
":" << (
id.iCell2 > 2 *
N - 1) <<
":" << (
id.iCell2 >= (
id.iCell1 +
N)) <<
":"
332 << (
id.iCell1 > (
id.iCell2 +
N)) <<
" ERROR";
335 int iphi1 = (
id.iCell1 > 1) ?
id.iCell1 - 1 :
hdcons_.
getUVMax(
id.iType);
336 int iphi2 = (
id.iCell1 <
hdcons_.
getUVMax(
id.iType)) ?
id.iCell1 + 1 : 1;
353 int type = (
id.iType > 0) ? 1 : 0;
357 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iCell1
366 edm::LogVerbatim(
"HGCalGeom") <<
"Input Trap " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iCell1
379 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex8 " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iSec2
380 <<
":" <<
id.iCell1 <<
":" <<
id.iCell2 <<
":" <<
id.iType <<
" Constants "
395 id.iType = (
type == 0 ? -1 : 1);
400 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex " <<
hi <<
" o/p " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iType
401 <<
":" <<
id.iSec1 <<
":" <<
id.iCell1;
410 edm::LogVerbatim(
"HGCalGeom") <<
"Input Trap " <<
hi <<
" o/p " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iType
411 <<
":" <<
id.iSec1 <<
":" <<
id.iCell1;
422 di = (di -
id.iLay + 1) /
layers_;
424 id.iCell1 = (di -
id.iCell2) /
cellMax_;
426 edm::LogVerbatim(
"HGCalGeom") <<
"Input Hex8 " <<
hi <<
" o/p " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iType
427 <<
":" <<
id.iSec1 <<
":" <<
id.iSec2 <<
":" <<
id.iCell1 <<
":" <<
id.iCell2;
440 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex I/P " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iType
448 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Trap I/P " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":"
456 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex8 I/P " <<
id.zSide <<
":" <<
id.iLay <<
":" <<
id.iSec1 <<
":"
469 id.iLay > 0 &&
id.iLay <=
layers_ &&
id.iSec1 >= 0 &&
id.iSec1 <=
sectors_);
487 return (
flag && (!mask));
532 id.iType = ((di -
id.iLay + 1) /
layers_ == 0) ? -1 : 1;
534 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex I/P " <<
hi <<
" O/P " <<
id.zSide <<
":" <<
id.iType <<
":" <<
id.iLay
539 di = (di -
id.iCell1 + 1) /
cellMax_;
541 di = (di -
id.iSec1 + 1) /
sectors_;
545 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Trap I/P " <<
hi <<
" O/P " <<
id.zSide <<
":" <<
id.iType <<
":"
546 <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iCell1;
554 id.iType = (di -
id.iLay + 1) /
layers_;
556 edm::LogVerbatim(
"HGCalGeom") <<
"Geom Hex8 I/P " <<
hi <<
" O/P " <<
id.zSide <<
":" <<
id.iType <<
":"
557 <<
id.iLay <<
":" <<
id.iSec1 <<
":" <<
id.iSec2;
565 std::vector<DetId>& ids,
int zside,
int type,
int lay,
int iradius,
int iphi)
const {
572 ids.emplace_back(
DetId(
id));
577 std::vector<DetId>& ids,
int det,
int zside,
int type,
int lay,
int waferU,
int waferV,
int cellU,
int cellV)
const {
580 <<
waferU <<
":" <<
waferV <<
":" << cellU <<
":" << cellV <<
" ==> Validity "
585 ids.emplace_back(
DetId(
id));
593 idx.iCell1 =
id.cell();
595 idx.iLay =
id.layer();
596 idx.iSec1 =
id.wafer();
598 idx.iType =
id.waferType();
599 idx.zSide =
id.zside();
600 idx.det =
id.subdetId();
603 idx.iCell1 =
id.iphi();
605 idx.iLay =
id.layer();
606 idx.iSec1 =
id.ietaAbs();
608 idx.iType =
id.type();
609 idx.zSide =
id.zside();
610 idx.det = (
int)(
id.subdet());
613 idx.iCell1 =
id.cellU();
614 idx.iCell2 =
id.cellV();
615 idx.iLay =
id.layer();
616 idx.iSec1 =
id.waferU();
617 idx.iSec2 =
id.waferV();
618 idx.iType =
id.type();
619 idx.zSide =
id.zside();
620 idx.det = (
int)(
id.subdet());
623 idx.iCell1 =
id.cellU();
624 idx.iCell2 =
id.cellV();
625 idx.iLay =
id.layer();
626 idx.iSec1 =
id.waferU();
627 idx.iSec2 =
id.waferV();
628 idx.iType =
id.type();
629 idx.zSide =
id.zside();
630 idx.det = (
int)(
id.subdet());
639 <<
":" <<
idx.iSec1 <<
":" <<
idx.iSec2 <<
":" <<
idx.iCell1 <<
":" <<
idx.iCell2;
648 if (typm.first >= 0) {
int ring() const
get the eta index
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
int32_t waferU(const int32_t index)
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
int layer() const
get the layer #
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart=false) const
const HGCalDDDConstants & hdcons_
int maxCells(bool reco) const
std::pair< int, int > tileType(int layer, int ring, int phi) const
ForwardSubdetector subdet_
int32_t waferV(const int32_t index)
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