26 : hgpar_(
hp), sqrt3_(
std::
sqrt(3.0)), mode_(hgpar_->mode_), fullAndPart_(waferHexagon8File()) {
36 hgcellUV_ = std::make_unique<HGCalCellUV>(
65 for (
int simreco = 0; simreco < 2; ++simreco) {
96 int wminT(9999999), wmaxT(-9999999), kount1(0), kount2(0);
99 int wmin(9999999),
wmax(-9999999), kount(0);
100 for (
int wafer = 0; wafer <
sectors(); ++wafer) {
125 int lay1 =
getIndex(lay0,
true).first;
126 edm::LogVerbatim(
"HGCalGeom") <<
"Index " <<
i <<
" Layer " << lay0 <<
":" << lay1 <<
" Wafer " <<
wmin <<
":" 127 <<
wmax <<
":" << kount;
132 waferMax_ = std::array<int, 4>{{wminT, wmaxT, kount1, kount2}};
134 edm::LogVerbatim(
"HGCalGeom") <<
"Overall wafer statistics: " << wminT <<
":" << wmaxT <<
":" << kount1 <<
":" 143 return std::make_pair(-1, -1);
153 <<
" ***** ERROR *****";
154 return std::make_pair(-1, -1);
160 return std::make_pair(wafer,
167 return std::make_pair(wafer,
175 return std::make_pair(-1, -1);
180 float x,
float y,
int zside,
int lay,
bool reco,
bool extend,
bool debug)
const {
187 edm::LogVerbatim(
"HGCalGeom") <<
"assignCellHex x " <<
x <<
":" <<
xx <<
" y " <<
y <<
":" <<
yy <<
" Lay " << lay;
189 waferFromPosition(
xx,
yy,
zside, lay,
waferU,
waferV, cellU, cellV,
waferType, wt, extend,
debug);
198 return std::array<int, 3>{{irad,
iphi,
type}};
199 int zside = (
z > 0) ? 1 : -1;
205 double phi = (((
yy == 0.0) && (
xx == 0.0)) ? 0. : std::atan2(
yy,
xx));
208 if (indx.second != 0)
216 std::ostringstream st1;
217 st1 <<
"Cassette " << cassette <<
" Shift " << cshift.first <<
":" << cshift.second <<
" Original " <<
xx <<
":" 223 st1 <<
" Shifted " <<
xx <<
":" <<
yy;
234 <<
" x|y|r " <<
xx <<
":" <<
yy <<
":" <<
r <<
" phi " <<
phi <<
":" 241 if (irad <= hgpar_->iradMinBH_[indx.first])
249 edm::LogVerbatim(
"HGCalGeomT") <<
"assignCellTrap: ring # modified to " << irad <<
":" 269 return std::array<int, 3>{{irad,
iphi,
type}};
279 if ((cshift.first != 0) || (cshift.second != 0))
290 if ((cshift.first != 0) || (cshift.second != 0))
303 return std::make_pair(
dr,
df);
307 const auto& indx =
getIndex(lay,
true);
308 if (indx.first >= 0) {
319 thck = (ktr->second).
type;
321 rotn = (ktr->second).
orient;
328 ((
waferHexagon8()) ?
locateCell(
zside, lay,
waferU,
waferV, cellU, cellV,
reco,
true,
false,
false,
false)
330 double rpos =
sqrt(
xy.first *
xy.first +
xy.second *
xy.second);
331 return ((rpos >=
hgpar_->
rMinLayHex_[indx.first]) && (rpos <= hgpar_->rMaxLayHex_[indx.first]));
347 thick = 100.0 * (
type + 1);
385 for (
int k = 0;
k < sizew; ++
k) {
407 edm::LogVerbatim(
"HGCalGeom") <<
"DistFromEdgeHex: Local " <<
xx <<
":" <<
yy <<
" wafer " << wafer <<
" flag " 418 double xx = (
z < 0) ? -
x :
x;
421 double phi = (
r == 0. ? 0. : std::atan2(
y,
xx));
431 int iphi = 1 +
static_cast<int>(
phi / cell);
435 edm::LogVerbatim(
"HGCalGeom") <<
"DistFromEdgeTrap: Global " <<
x <<
":" <<
y <<
":" <<
z <<
" Layer " << lay
436 <<
" Index " << indx <<
":" <<
type <<
" xx " <<
xx <<
" R " <<
r <<
":" << irad <<
":" 438 <<
" Phi " <<
phi <<
":" <<
iphi <<
":" << (
iphi - 0.5) * cell <<
" cell " << cell
439 <<
" Dphi " << dphi <<
" Dist " << dist <<
":" <<
r * dphi;
449 auto itr = std::find_if(zLayerHex.begin() + 1, zLayerHex.end(), [&
k, &
zz, &zLayerHex](
double zLayer) {
451 return zz < 0.5 * (zLayerHex[
k - 1] + zLayerHex[
k]);
453 int lay = (itr == zLayerHex.end()) ? static_cast<int>(zLayerHex.size()) :
k;
470 <<
" ***** ERROR *****";
481 std::vector<HGCalParameters::hgtrap> mytrs;
494 return std::make_pair(0, -1.);
498 int irmin(0), irmax(0);
506 return std::make_pair(irmin, irmax);
510 std::vector<HGCalParameters::hgtrform> mytrs;
548 double x1(x0),
y1(y0);
558 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants: Layer " <<
layer <<
":" << ll <<
" mode " << forwd <<
" x " <<
x 559 <<
":" << x0 <<
":" <<
x1 <<
" y " <<
y <<
":" << y0 <<
":" <<
y1;
561 return std::make_pair(x0, y0);
578 bool result(
false), resultMod(
false);
584 const int32_t lay_idx =
reco ? (lay - 1) * 3 + 1 : lay;
586 auto moditr = the_modules.find(copyNumber);
587 result = resultMod = (moditr != the_modules.end());
590 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants: Layer " << lay <<
":" << lay_idx <<
" Copy " << copyNumber
594 if (moditr->second >= 0) {
596 edm::LogWarning(
"HGCalGeom") <<
"Module no. out of bound for " <<
mod <<
" to be compared with " 602 result = (cell >= 0 && cell <= cellmax);
613 << (lay > 0 && (lay <= static_cast<int>(
layers(
reco)))) <<
" Module " <<
mod <<
":" 614 << resultMod <<
" Cell " << cell <<
":" << cellmax <<
":" 615 << (cell >= 0 && cell <= cellmax) <<
":" <<
maxCells(
reco);
625 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:WaferType " <<
layer <<
":" << modU <<
":" << modV
630 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: Cannot find " <<
layer <<
":" << modU <<
":" << modV
631 <<
" in wadferIndex";
639 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:WaferInfoMap " <<
layer <<
":" << modU <<
":" 644 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: Cannot find " <<
layer <<
":" << modU <<
":" << modV
645 <<
" in wadferInfoMap";
652 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:WaferIn " << jtr->first <<
":" << jtr->second;
654 if (!(jtr->second)) {
656 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: Cannot find " <<
layer <<
":" << modU <<
":" << modV
669 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: Cannot find " <<
layer <<
":" << modU <<
":" << modV
670 <<
" due to WaferOut";
677 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: Cannot find " <<
layer <<
":" << modU <<
":" << modV
678 <<
" due to WaferCornerMin";
691 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: layer|wafer " <<
layer <<
":" << modU <<
":" << modV <<
":" 704 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:Cell " << cellU <<
":" << cellV <<
":" <<
N 705 <<
" Tests " << (cellU >= 0) <<
":" << (cellU < 2 *
N) <<
":" << (cellV >= 0) <<
":" 706 << (cellV < 2 *
N) <<
":" << ((cellV - cellU) <
N) <<
":" << ((cellU - cellV) <=
N);
708 if ((cellU < 0) || (cellU >= 2 *
N) || (cellV < 0) || (cellV >= 2 *
N)) {
710 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: Cannot statisfy Cell 1 condition " << cellU <<
":" << cellV
715 if (((cellV - cellU) >=
N) || ((cellU - cellV) >
N)) {
717 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:: Cannot statisfy Cell 2 condition " << cellU <<
":" << cellV
739 <<
" Valid " <<
ok <<
":" <<
valid;
769 double x(localX),
y(localY);
774 <<
" Local (" <<
x <<
":" <<
y <<
") Reco " <<
reco;
786 std::ostringstream st1;
788 st1 <<
"Cassette " << (ktr->second).cassette <<
" Shift " << cshift.first <<
":" << cshift.second <<
" Original " 794 x -= (
zside * cshift.first);
798 st1 <<
" Final " <<
x <<
":" <<
y;
803 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer " <<
x <<
":" <<
y <<
" by adding " <<
xy.first <<
":" <<
xy.second;
804 return (rotx ?
getXY(lay,
x,
y,
false) : std::make_pair(
x,
y));
809 float x(999999.),
y(999999.);
813 return std::make_pair(
x,
y);
829 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell (Wafer) " << x0 <<
":" << y0 <<
" Final " <<
x <<
":" <<
y;
836 return std::make_pair(
x,
y);
858 <<
":" << rotx <<
":" <<
waferU <<
":" <<
waferV <<
":" << indx <<
":" 876 edm::LogVerbatim(
"HGCalGeom") <<
"Type " <<
type <<
" Place " << place <<
" Cell " << cellU <<
":" << cellV
877 <<
" Position " <<
x <<
":" <<
y;
879 int kndx = cellV * 100 + cellU;
887 edm::LogVerbatim(
"HGCalGeom") <<
"Fine " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" <<
y <<
":" 896 edm::LogVerbatim(
"HGCalGeom") <<
"Coarse " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" <<
y 910 std::ostringstream st1;
912 st1 <<
"Cassette " << (ktr->second).cassette <<
" Shift " << cshift.first <<
":" << cshift.second
913 <<
" Original " <<
x <<
":" <<
y;
922 st1 <<
" Final " <<
x <<
":" <<
y;
927 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer " <<
x <<
":" <<
y <<
" by adding " <<
xy.first <<
":" <<
xy.second;
929 return (rotx ?
getXY(lay,
x,
y,
false) : std::make_pair(
x,
y));
934 id.
zside(),
id.
layer(),
id.
waferU(),
id.
waferV(),
id.cellU(),
id.cellV(),
true,
true,
false, cog,
debug);
955 return std::make_pair(
x,
y);
962 if (indx.first >= 0) {
965 double phi = (
iphi - 0.5) * indx.second;
987 std::ostringstream st1;
989 st1 <<
"Cassette " << cassette <<
" Shift " << cshift.first <<
":" << cshift.second <<
" Original " <<
x <<
":" 994 st1 <<
" Final " <<
x <<
":" <<
y;
1003 return std::make_pair(
x,
y);
1063 if (
index.first < 0)
1066 unsigned int cells(0);
1077 return static_cast<int>(
cells);
1123 if (type1 != type2) {
1126 uvx = (2 * uv + 1) / 3;
1145 if (
index.first < 0)
1169 for (
unsigned k = 0;
k < nlayer; ++
k) {
1171 cells = std::accumulate(ncells.begin(), ncells.end(),
cells);
1180 std::vector<int> ncell;
1189 ncell.emplace_back(static_cast<int>(cell));
1195 ncell.emplace_back(
nphi);
1203 ncell.emplace_back(cell);
1235 double rmin(0), rmax(0),
zz(0);
1256 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:rangeR: " <<
z <<
":" <<
zz <<
" R " << rmin <<
":" << rmax;
1258 return std::make_pair(rmin, rmax);
1262 double rmin(0), rmax(0);
1273 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:rangeR: " << lay <<
":" <<
index.first <<
" R " << rmin <<
":" 1276 return std::make_pair(rmin, rmax);
1300 return std::make_pair(row,
col);
1309 return std::make_pair(cell, lay);
1314 edm::LogWarning(
"HGCalGeom") <<
"Wrong Layer # " << lay <<
" not in the list ***** ERROR *****";
1315 return std::make_pair(-1, -1);
1319 <<
" ***** ERROR *****";
1320 return std::make_pair(-1, -1);
1327 }
else if (
type == 2) {
1332 return std::make_pair(kx,
depth);
1346 for (
int lay = laymin; lay <= laymax; ++lay) {
1354 << ringmin <<
":" << ringmax;
1356 for (
int rin = ringmin; rin <= ringmax; ++rin) {
1360 edm::LogVerbatim(
"HGCalGeom") <<
"tileCount: rin " << rin <<
" indx " << indx <<
" itr " 1364 for (
int k = 0;
k < 4; ++
k) {
1365 std::bitset<24>
b(itr->second.hex[
k]);
1370 edm::LogVerbatim(
"HGCalGeom") <<
"tileCount: lay|rin " << lay <<
":" << rin <<
" kount " << kount;
1395 <<
" Differences " <<
dif1 <<
":" <<
dif2;
1406 <<
" Differences " <<
dif1 <<
":" <<
dif2;
1416 return std::make_pair(0, 0);
1421 int type(-1), sipm(-1);
1427 return std::make_pair(
type, sipm);
1434 for (
int k = 0;
k < ncopies; ++
k) {
1444 edm::LogVerbatim(
"HGCalGeom") <<
"Cannot find " <<
copy <<
" in a list of " << ncopies <<
" members";
1445 for (
int k = 0;
k < ncopies; ++
k)
1461 for (
int k = 0;
k < size_; ++
k) {
1474 if (wafer < size_) {
1487 edm::LogWarning(
"HGCalGeom") <<
"Cannot get wafer type corresponding to " <<
x <<
":" <<
y <<
" " <<
xx <<
":" 1492 edm::LogVerbatim(
"HGCalGeom") <<
"Position " <<
x <<
":" <<
y <<
" Wafer " << wafer <<
":" << size_ <<
" XX " <<
xx 1493 <<
":" <<
yy <<
" Cell " << icell <<
" Type " << celltyp;
1513 cellU = cellV = celltype = 0;
1519 double xx(0),
yy(0);
1521 std::pair<double, double>
xy =
1530 edm::LogVerbatim(
"HGCalGeom") <<
"waferFromPosition:: Layer " <<
layer <<
":" << ll <<
" Rot " << rotx <<
" X " <<
x 1531 <<
":" <<
xx <<
" Y " <<
y <<
":" <<
yy <<
" side " <<
zside <<
" extend " << extend
1539 double dx0(0), dy0(0);
1549 <<
"Cassette " << (ktr->second).cassette <<
" Shift " << cshift.first <<
":" << cshift.second;
1550 dx0 = -cshift.first;
1551 dy0 = cshift.second;
1559 <<
" Distance " <<
dx <<
":" <<
dy <<
" diff0 " << (
dx - rmax) <<
":" 1560 << (
dy - hexside) <<
" diff1 " << (
dy - 0.5 * hexside) <<
":" 1562 if ((
dx - rmax) <= tolc && (
dy - hexside) <= tolc) {
1567 if ((
dx - rmax) <= tolc && (
dy - hexside) <= tolc) {
1568 if (((
dy - 0.5 * hexside) <= tolc) || ((
dx *
tan30deg_ - (hexside -
dy)) <= tolc)) {
1574 <<
"Position (" <<
x <<
", " <<
y <<
") Wafer type:partial:orient:cassette " << celltype <<
":" 1601 double dx0(0), dy0(0);
1611 <<
"Cassette " << (ktr->second).cassette <<
" Shift " << cshift.first <<
":" << cshift.second;
1612 dx0 = -cshift.first;
1613 dy0 = cshift.second;
1620 edm::LogVerbatim(
"HGCalGeom") <<
"Position (" <<
x <<
", " <<
y <<
") Wafer type:partial:orient:cassette " 1644 edm::LogVerbatim(
"HGCalGeom") <<
"waferFromPosition: frontback " << layertype <<
":" 1646 <<
" place " << place <<
" part " <<
part;
1659 if ((celltype < 0) &&
debug) {
1662 edm::LogVerbatim(
"HGCalGeom") <<
"waferfFromPosition: Bad type for X " <<
x <<
":" <<
x1 <<
":" <<
xx <<
" Y " <<
y 1663 <<
":" <<
y1 <<
":" <<
yy <<
" Wafer " <<
waferU <<
":" <<
waferV <<
" Cell " << cellU
1670 <<
dx *
tan30deg_ <<
":" << hexside -
dy <<
" Paramerers " << rmax <<
":" 1675 <<
waferV <<
" Cell " << cellU <<
":" << cellV <<
":" << celltype <<
" wt " << wt;
1706 double xx(0),
yy(0);
1715 return std::make_pair(
xx,
yy);
1724 edm::LogVerbatim(
"HGCalGeom") <<
"Layer " << lay <<
":" << ll <<
" Rotation " << rotx <<
" U:V " <<
waferU <<
":" 1728 std::pair<double, double> xy0 = (rotx) ?
getXY(lay,
xy.first,
xy.second,
false) :
xy;
1731 edm::LogVerbatim(
"HGCalGeom") <<
"Without and with rotation " <<
xy.first <<
":" <<
xy.second <<
":" << xy0.first
1732 <<
":" << xy0.second;
1738 if (kk < hgpar_->waferInfoMap_.size()) {
1740 std::advance(itr,
kk);
1747 if (kk < hgpar_->waferInfoMap_.size()) {
1749 std::advance(itr,
kk);
1750 return std::make_tuple(itr->second.type, itr->second.part, itr->second.orient, itr->second.cassette);
1752 return std::make_tuple(0, 0, 0, 0);
1758 return std::make_tuple(itr->second.type, itr->second.part, itr->second.orient, itr->second.cassette);
1760 return std::make_tuple(0, 0, 0, 0);
1764 HepGeom::Point3D<float>& loc,
const DetId&
id,
bool useWafer,
bool reco,
bool debug)
const {
1772 auto xy =
getXY(detid.
layer(), (
x + loc.x()), (
y + loc.y()),
false);
1774 double xx = (detid.
zside() < 0) ? -
xy.first :
xy.first;
1781 for (
unsigned int i = 0;
i <
layers(
true); ++
i) {
1797 wafer = (itr->second)[ity];
1824 type = (itr->second).type;
1840 type = (itr->second).type;
1896 bool withinList(
true);
1902 rotn = (itr->second).
orient;
1910 rotn = (itr->second).
second;
1933 <<
" Index " << std::hex <<
wl <<
std::dec <<
":" << withinList <<
" Type " <<
type 1934 <<
" Rotation " << rotn;
1936 return std::make_pair(
type, rotn);
1953 if (
index.first < 0)
1960 double xx,
double yy,
const double& cellR,
const std::vector<double>&
posX,
const std::vector<double>&
posY)
const {
1962 const double tol(0.00001);
1964 for (
unsigned int k = 0;
k <
posX.size(); ++
k) {
1967 if (
dx <= (cellR + tol) &&
dy <= (cellY + tol)) {
1968 double xmax = (
dy <= 0.5 * cellY) ? cellR : (cellR - (
dy - 0.5 * cellY) /
tan30deg_);
1969 if (
dx <= (
xmax + tol)) {
1979 double xloc,
double yloc,
int cellType,
int place,
int part,
int& cellU,
int& cellV,
bool extend,
bool debug)
const {
1994 double delY = 2 *
rmax_ / (3 * ncell);
1995 double delX = 0.5 * delY *
sqrt3_;
1996 double delYT = (extend) ? (2 *
rmaxT_ / (3 * ncell)) : delY;
1997 double delXT = 0.5 * delYT *
sqrt3_;
1998 double v0 = ((xloc / delY - 1.0) / 1.5);
1999 int cv0 = (
v0 > 0) ? (ncell + static_cast<int>(
v0 + 0.5)) : (ncell - static_cast<int>(-
v0 + 0.5));
2000 double u0 = (0.5 * yloc / delX + 0.5 * cv0);
2001 int cu0 = (u0 > 0) ? (ncell / 2 + static_cast<int>(u0 + 0.5)) : (ncell / 2 - static_cast<int>(-u0 + 0.5));
2004 if (cv0 - cu0 >= ncell)
2005 cv0 = cu0 + ncell - 1;
2008 << delX <<
":" << delY <<
" u0 " << u0 <<
":" << cu0 <<
" v0 " <<
v0 <<
":" << cv0;
2011 for (
int i1 = 0;
i1 < 3; ++
i1) {
2013 for (
int i2 = 0;
i2 < 3; ++
i2) {
2015 if (((cellV - cellU) < ncell) && ((cellU - cellV) <= ncell) && (cellU >= 0) && (cellV >= 0) &&
2016 (cellU < 2 * ncell) && (cellV < 2 * ncell)) {
2017 double xc = (1.5 * (cellV - ncell) + 1.0) * delY;
2018 double yc = (2 * cellU - cellV - ncell) * delX;
2020 ((
std::abs(xloc - xc) <= 0.5 * delYT) ||
2024 <<
"cellHex: local " << xc <<
":" << yc <<
" difference " <<
std::abs(xloc - xc) <<
":" 2026 <<
":" << delY <<
" (u,v) = (" << cellU <<
"," << cellV <<
")";
2045 return std::make_pair(-1, 0);
2056 return std::make_pair(indx, cell);
2097 edm::LogVerbatim(
"HGCalGeom") <<
"Input " << lay <<
":" << wafer <<
":" << cell <<
" Position " <<
x <<
":" <<
y 2109 <<
" part " << partn.first <<
":" << partn.second;
2115 <<
" Result " <<
result <<
" from goodCell";
2119 int kndx = cellV * 100 + cellU;
2127 edm::LogVerbatim(
"HGCalGeom") <<
"Fine " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" <<
y <<
":" 2137 edm::LogVerbatim(
"HGCalGeom") <<
"Coarse " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" <<
y <<
":" 2153 <<
":" << cellV <<
" Position " <<
x <<
":" <<
y <<
":" <<
rr <<
" Compare Limits " 2155 <<
" from Radius Limits";
2163 <<
" N " <<
N <<
" part " << partn.first <<
":" << partn.second <<
" Result " 2164 <<
result <<
" from goodCell";
2178 <<
waferV <<
") " << indx;
2196 edm::LogVerbatim(
"HGCalGeom") <<
"WaferInLayerTest: Layer " << lay <<
" wafer " << wafer <<
" index " << indx
2203 edm::LogVerbatim(
"HGCalGeom") <<
"WaferInLayerTest: Layer " << lay <<
" wafer " << wafer <<
" R-limits " 2232 return std::make_pair(
x,
y);
2236 double xx(0),
yy(0);
2247 return std::make_pair(
xx,
yy);
std::vector< int > iradMaxBH_
bool maskCell(const DetId &id, int corners) const
std::pair< double, double > rangeRLayer(int lay, bool reco) const
double waferZ(int layer, bool reco) const
std::vector< double > waferPosY_
Log< level::Info, true > LogVerbatim
std::vector< int > layer_
static constexpr int scintillatorCassette
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
static constexpr double tol_
void waferFromPosition(const double x, const double y, int &wafer, int &icell, int &celltyp) const
std::pair< double, double > rangeZ(bool reco) const
std::vector< int > depthLayerF_
std::vector< int > depth_
std::vector< double > zFrontMin_
std::vector< double > moduleCellR_
std::pair< int, int > tileRings(int layer) const
unsigned int layersInit(bool reco) const
hgtrap getModule(unsigned int k, bool reco) const
static constexpr int32_t cellPlacementOld
bool isValidCell(int layindex, int wafer, int cell) const
static int getType(int index, const HGCalParameters::waferInfo_map &wafers)
layer_map copiesInLayers_
static constexpr int k_OffsetRotation
std::vector< std::pair< double, double > > layerRotV_
int getPhiBins(int lay) const
HGCalCassette hgcassette_
int layer() const
get the layer #
bool cassetteShiftScintillator(int zside, int layer, int iphi) const
std::pair< double, double > cellEtaPhiTrap(int type, int irad) const
std::vector< bool > cellCoarseHalf_
static constexpr int32_t WaferHD200
int scintType(const int layer) const
std::vector< bool > cellFineHalf_
static std::pair< int32_t, int32_t > cellType(int32_t u, int32_t v, int32_t ncell, int32_t placementIndex)
std::pair< double, double > waferParameters(bool reco) const
bool waferInLayerTest(int wafer, int lay, bool full) const
static int32_t getUnpackedU(int id)
std::vector< int > moduleLayR_
bool waferFullInLayer(int wafer, int lay, bool reco) const
int32_t maxWafersPerLayer_
double distFromEdgeTrap(double x, double y, double z) const
std::unique_ptr< HGCalCellUV > hgcellUV_
Simrecovecs max_modules_layer_
HGCalParameters::hgtrap getModule(unsigned int k, bool hexType, bool reco) const
int32_t waferU(const int32_t index)
HGCalParameters::waferInfo waferInfo(int lay, int waferU, int waferV) const
int32_t waferLayer(const int32_t index)
bool trapezoidFile() const
constexpr NumType convertRadToDeg(NumType radians)
bool isValidHex(int lay, int mod, int cell, bool reco) const
bool tileRingEdge(double rho, int layer, int ring) const
static bool goodCell(int u, int v, int N, int type, int rotn)
static constexpr int32_t WaferOut
Sin< T >::type sin(const T &t)
std::pair< double, double > getShift(int layer, int zside, int cassette, bool scnt=false) const
static constexpr int32_t WaferThree
std::vector< double > cellFineY_
static constexpr int32_t WaferLD300
std::pair< int, int > getREtaRange(int lay) const
int lastLayer(bool reco) const
static int getPartial(int index, const HGCalParameters::waferInfo_map &wafers)
static int32_t getUnpackedV(int id)
std::pair< double, double > getXY(int layer, double x, double y, bool forwd) const
bool waferHexagon8() const
std::pair< int, int > waferTypeRotation(int layer, int waferU, int waferV, bool fromFile, bool debug) const
int modulesInit(int lay, bool reco) const
std::unordered_map< int32_t, bool > waferIn_
int layerFromIndex(int index, bool reco) const
std::vector< uint32_t > trformIndex_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int32_t cellType(int type, int waferU, int waferV, int iz, int fwdBack, int orient) const
std::vector< int > layerGroupM_
bool waferHexagon6() const
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart) const
hgtrform getTrForm(unsigned int k) const
static constexpr uint32_t k_CornerSize
std::pair< double, double > getRangeR(int, bool reco) const
static int getOrient(int index, const HGCalParameters::waferInfo_map &wafers)
wafer_map wafersInLayers_
bool waferInLayer(int wafer, int lay, bool reco) const
U second(std::pair< T, U > const &p)
double scintCellSize(const int layer) const
HGCalParameters::tileInfo tileInfo(int zside, int layer, int ring) const
std::vector< double > cellCoarseX_
static constexpr int scintillatorFile
std::map< int, HGCWaferParam > waferLayer_
int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi)
std::vector< std::pair< int, int > > tileRingRange_
constexpr int32_t waferV() const
static constexpr int32_t WaferFull
std::vector< int > firstModule_
unsigned int waferFileSize() const
std::unique_ptr< HGCalCell > hgcell_
int getTypeHex(int layer, int waferU, int waferV) const
static constexpr int32_t WaferHalf
bool isHalfCell(int waferType, int cell) const
bool waferHexagon8Fine() const
int maxCells(bool reco) const
std::vector< double > cellSize_
std::tuple< int, int, int, int > waferFileInfoFromIndex(int kk) const
std::vector< int > waferUVMaxLayer_
std::tuple< int, int, int, int > waferFileInfo(unsigned int kk) const
std::array< int, 5 > assignCellHex(float x, float y, int zside, int lay, bool reco, bool extend, bool debug) const
int waferFileIndex(unsigned int kk) const
std::vector< int > layerIndex_
std::vector< double > yLayerHex_
HGCalDDDConstants(const HGCalParameters *hp, const std::string &name)
static const float tolmin
int layerIndex(int lay, bool reco) const
std::vector< double > rMaxFront_
Cos< T >::type cos(const T &t)
constexpr int32_t zside() const
get the z-side of the cell (1/-1)
bool cellInLayer(int waferU, int waferV, int cellU, int cellV, int lay, int zside, bool reco) const
static constexpr int32_t WaferOrient0
int getUVMax(int type) const
bool isValidCell8(int lay, int waferU, int waferV, int cellU, int cellV, int type) const
Abs< T >::type abs(const T &t)
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
std::pair< int, float > getIndex(int lay, bool reco) const
static constexpr int32_t WaferHD120
static int getCassette(int index, const HGCalParameters::waferInfo_map &wafers)
bool isValidTrap(int zside, int lay, int ieta, int iphi) const
bool waferVirtual(int layer, int waferU, int waferV) const
int tileCount(int layer, int ring) const
std::pair< int, int > assignCell(float x, float y, int lay, int subSec, bool reco) const
std::vector< double > slopeTop_
std::vector< HGCalParameters::hgtrap > getModules() const
double mouseBite(bool reco) const
unsigned int layers(bool reco) const
static constexpr int32_t WaferCorner0
bool tileTrapezoid() const
std::pair< int, int > tileType(int layer, int ring, int phi) const
bool tilePhiEdge(double phi, int layer, int iphi) const
std::pair< float, float > locateCellTrap(int zside, int lay, int ieta, int iphi, bool reco, bool debug) const
std::vector< double > rMinLayHex_
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
int getTypeTrap(int layer) const
void setParameter(int cassette, const std::vector< double > &shifts, bool both=true)
int32_t tileCassette(int32_t, int32_t, int32_t, int32_t)
int type() const
get the type
double cellSizeHex(int type) const
std::vector< double > zLayerHex_
std::vector< int > layerType_
std::pair< double, double > rangeR(double z, bool reco) const
std::pair< double, double > waferPosition(int wafer, bool reco) const
std::vector< double > rMaxLayHex_
std::vector< double > slopeMin_
static constexpr int32_t WaferCenterR
std::vector< int > lastModule_
std::array< int, 4 > waferMax_
static constexpr double k_ScaleToDDD
int numberCellsHexagon(int wafer) const
std::vector< double > radiusMixBoundary_
std::array< int, 3 > assignCellTrap(float x, float y, float z, int lay, bool reco) const
bool tileExist(int zside, int layer, int ring, int phi) const
std::vector< double > cellThickness_
GlobalPoint waferLocal2Global(HepGeom::Point3D< float > &loc, const DetId &id, bool useWafer, bool reco, bool debug) const
std::vector< int > layerGroup_
int numberCells(bool reco) const
std::vector< double > moduleCellS_
std::pair< float, float > locateCellHex(int cell, int wafer, bool reco) const
double cellThickness(int layer, int waferU, int waferV) const
int waferType(DetId const &id, bool fromFile) const
wafer_map cellCoarseIndex_
std::pair< int, int > rowColumnWafer(const int wafer) const
unsigned int getTrFormN() const
constexpr int32_t layer() const
get the layer #
HGCalParameters::hgtrform getTrForm(unsigned int k) const
std::vector< double > rMinFront_
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
std::vector< int > iradMinBH_
bool waferHexagon8File() const
std::vector< double > cellFineX_
int maxRows(int lay, bool reco) const
const HGCalGeometryMode::GeometryMode mode_
int32_t waferIndex(int wafer, int index) const
static constexpr double k_ScaleFromDDD
std::vector< HGCalParameters::hgtrform > getTrForms() const
std::vector< int > layerGroupO_
int getLayer(double z, bool reco) const
#define TYPELOOKUP_DATA_REG(_dataclass_)
bool cassetteShiftSilicon(int zside, int layer, int waferU, int waferV) const
std::array< int, 3 > HGCWaferParam
bool cassetteMode() const
int32_t waferV(const int32_t index)
int waferTypeL(int wafer) const
std::vector< int > waferCopy_
std::vector< double > cassetteShift_
bool tileExist(const int32_t *hex, int32_t zside, int32_t phi)
static unsigned int const shift
std::vector< int > depthIndex_
static constexpr double tan30deg_
double guardRingOffset(bool reco) const
std::unique_ptr< HGCalCellOffset > cellOffset_
int cassetteTile(int iphi) const
std::vector< double > zFrontTop_
double sensorSizeOffset(bool reco) const
std::vector< double > radiusLayer_[2]
std::array< uint32_t, 2 > tot_layers_
static constexpr int32_t WaferFive
std::vector< int > waferTypeT_
int modules(int lay, bool reco) const
static constexpr int32_t WaferCornerMin
int modifyUV(int uv, int type1, int type2) const
std::vector< double > cellCoarseY_
Log< level::Warning, false > LogWarning
constexpr int32_t waferU() const
waferInfo_map waferInfoMap_
constexpr int32_t type() const
get the type
__host__ __device__ V wmin
std::pair< float, float > localToGlobal8(int zside, int lay, int waferU, int waferV, double localX, double localY, bool reco, bool debug) const
const HGCalParameters * hgpar_
std::vector< double > waferPosX_
T mod(const T &a, const T &b)
int scintCells(const int layer) const
static constexpr int32_t WaferLD200
tileInfo_map tileInfoMap_
if(threadIdxLocalY==0 &&threadIdxLocalX==0)
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
int partialWaferType(int lay, int waferU, int waferV) const
std::vector< int > waferTypeL_
std::vector< double > xLayerHex_
std::pair< double, double > waferPositionNoRot(int lay, int waferU, int waferV, bool reco, bool debug) const
double distFromEdgeHex(double x, double y, double z) const
int layerType(int lay) const
int waferFromCopy(int copy) const
__host__ __device__ V V wmax
static constexpr int32_t layerFrontBack(int32_t layerOrient)
static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners)