25 using namespace geant_units::operators;
29 sqrt3_(std::
sqrt(3.0)),
49 for (
int simreco = 0; simreco < 2; ++simreco) {
73 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants initialized for " << name <<
" with " <<
layers(
false) <<
":"
79 int wminT(9999999), wmaxT(-9999999), kount1(0), kount2(0);
82 int wmin(9999999),
wmax(-9999999), kount(0);
83 for (
int wafer = 0; wafer <
sectors(); ++wafer) {
108 int lay1 =
getIndex(lay0,
true).first;
109 edm::LogVerbatim(
"HGCalGeom") <<
"Index " <<
i <<
" Layer " << lay0 <<
":" << lay1 <<
" Wafer " <<
wmin <<
":"
110 <<
wmax <<
":" << kount;
115 waferMax_ = std::array<int, 4>{{wminT, wmaxT, kount1, kount2}};
117 edm::LogVerbatim(
"HGCalGeom") <<
"Overall wafer statistics: " << wminT <<
":" << wmaxT <<
":" << kount1 <<
":"
128 return std::make_pair(-1, -1);
138 <<
" ***** ERROR *****";
139 return std::make_pair(-1, -1);
145 return std::make_pair(wafer,
152 return std::make_pair(wafer,
160 return std::make_pair(-1, -1);
165 float x,
float y,
int lay,
bool reco,
bool extend,
bool debug)
const {
172 edm::LogVerbatim(
"HGCalGeom") <<
"assignCellHex x " << x <<
":" << xx <<
" y " << y <<
":" << yy <<
" Lay " << lay;
174 waferFromPosition(xx, yy, lay,
waferU,
waferV, cellU, cellV,
waferType, wt, extend, debug);
180 int irad(-1), iphi(-1),
type(-1);
181 const auto& indx =
getIndex(layer, reco);
183 return std::array<int, 3>{{irad, iphi, type}};
184 double xx = (z > 0) ? x : -x;
186 double phi = (r == 0. ? 0. : std::atan2(y, xx));
193 iphi = 1 + (int)(phi / indx.second);
195 edm::LogVerbatim(
"HGCalGeom") <<
"assignCellTrap Input " << x <<
":" << y <<
":" << z <<
":" << layer <<
":" << reco
196 <<
" x|r " << xx <<
":" << r <<
" phi " << phi <<
" o/p " << irad <<
":" << iphi <<
":"
199 return std::array<int, 3>{{irad, iphi, type}};
209 return std::make_pair(
dr, df);
213 const auto& indx =
getIndex(lay,
true);
214 if (indx.first >= 0) {
218 double rpos =
sqrt(
xy.first *
xy.first +
xy.second *
xy.second);
219 return ((rpos >=
hgpar_->
rMinLayHex_[indx.first]) && (rpos <= hgpar_->rMaxLayHex_[indx.first]));
235 thick = 100.0 * (type + 1);
242 int indx = ((
waferHexagon8()) ? ((type >= 1) ? 1 : 0) : ((type == 1) ? 1 : 0));
255 else if (cellV - cellU == N - 1)
259 }
else if (cellV == 0) {
260 if (cellU - cellV == N)
264 }
else if (cellU - cellV == N) {
265 if (cellU == 2 * N - 1)
269 }
else if (cellU == 2 * N - 1) {
270 if (cellV == 2 * N - 1)
274 }
else if (cellV == 2 * N - 1) {
275 if (cellV - cellU == N - 1)
279 }
else if (cellV - cellU == N - 1) {
281 }
else if ((cellU > 2 * N - 1) || (cellV > 2 * N - 1) || (cellV >= (cellU + N)) || (cellU > (cellV + N))) {
305 for (
int k = 0;
k < sizew; ++
k) {
327 edm::LogVerbatim(
"HGCalGeom") <<
"DistFromEdgeHex: Local " << xx <<
":" << yy <<
" wafer " << wafer <<
" flag "
338 double xx = (z < 0) ? -x : x;
341 double phi = (r == 0. ? 0. : std::atan2(y, xx));
351 int iphi = 1 + (int)(phi / cell);
352 double dphi =
std::max(0.0, (0.5 * cell -
std::abs(phi - (iphi - 0.5) * cell)));
355 edm::LogVerbatim(
"HGCalGeom") <<
"DistFromEdgeTrap: Global " << x <<
":" << y <<
":" << z <<
" Layer " << lay
356 <<
" Index " << indx <<
":" << type <<
" xx " << xx <<
" R " << r <<
":" << irad <<
":"
358 <<
" Phi " << phi <<
":" << iphi <<
":" << (iphi - 0.5) * cell <<
" cell " << cell
359 <<
" Dphi " << dphi <<
" Dist " << dist <<
":" << r * dphi;
369 auto itr = std::find_if(zLayerHex.begin() + 1, zLayerHex.end(), [&
k, &zz, &zLayerHex](
double zLayer) {
371 return zz < 0.5 * (zLayerHex[k - 1] + zLayerHex[
k]);
373 int lay = (itr == zLayerHex.end()) ? static_cast<int>(zLayerHex.size()) : k;
390 <<
" ***** ERROR *****";
401 std::vector<HGCalParameters::hgtrap> mytrs;
410 int irmin(0), irmax(0);
418 return std::make_pair(irmin, irmax);
422 std::vector<HGCalParameters::hgtrform> mytrs;
460 double x1(x0), y1(y0);
470 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants: Layer " << layer <<
":" << ll <<
" mode " << forwd <<
" x " << x
471 <<
":" << x0 <<
":" << x1 <<
" y " << y <<
":" << y0 <<
":" << y1;
473 return std::make_pair(x0, y0);
477 if (waferType < 1 || cell < 0)
484 bool result(
false), resultMod(
false);
490 const int32_t lay_idx = reco ? (lay - 1) * 3 + 1 : lay;
492 auto moditr = the_modules.find(copyNumber);
493 result = resultMod = (moditr != the_modules.end());
496 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants: Layer " << lay <<
":" << lay_idx <<
" Copy " << copyNumber
497 <<
":" << mod <<
" Flag " <<
result;
500 if (moditr->second >= 0) {
502 edm::LogWarning(
"HGCalGeom") <<
"Module no. out of bound for " << mod <<
" to be compared with "
506 result = (cell >= 0 && cell <= cellmax);
517 << (lay > 0 && (lay <= (int)(
layers(reco)))) <<
" Module " << mod <<
":" << resultMod
518 <<
" Cell " << cell <<
":" << cellmax <<
":" << (cell >= 0 && cell <= cellmax) <<
":"
529 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:WaferType " << layer <<
":" << modU <<
":" << modV
538 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:WaferInfoMap " << layer <<
":" << modU <<
":"
546 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:WaferIn " << jtr->first <<
":" << jtr->second;
576 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants::isValidHex8:Cell " << cellU <<
":" << cellV <<
":" << N
577 <<
" Tests " << (cellU >= 0) <<
":" << (cellU < 2 * N) <<
":" << (cellV >= 0) <<
":"
578 << (cellV < 2 * N) <<
":" << ((cellV - cellU) < N) <<
":" << ((cellU - cellV) <= N);
580 if ((cellU < 0) || (cellU >= 2 *
N) || (cellV < 0) || (cellV >= 2 *
N))
582 if (((cellV - cellU) >=
N) || ((cellU - cellV) >
N))
585 return isValidCell8(layer, modU, modV, cellU, cellV, type);
590 const auto& indx =
getIndex(layer,
true);
594 (iphi <= hgpar_->scintCells(layer)));
620 double x(localX),
y(localY);
625 <<
" Local (" <<
x <<
":" << y <<
") Reco " << reco;
634 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer " <<
x <<
":" << y <<
" by addong " <<
xy.first <<
":" <<
xy.second;
635 return (rotx ?
getXY(lay,
x, y,
false) : std::make_pair(
x, y));
640 float x(999999.),
y(999999.);
644 return std::make_pair(
x, y);
659 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell (Wafer) " << x0 <<
":" << y0 <<
" Final " <<
x <<
":" <<
y;
666 return std::make_pair(
x, y);
680 << waferU <<
":" << waferV <<
":" << indx <<
":"
685 int kndx = cellV * 100 + cellU;
694 edm::LogVerbatim(
"HGCalGeom") <<
"Fine " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
705 edm::LogVerbatim(
"HGCalGeom") <<
"Coarse " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
719 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer " <<
x <<
":" << y <<
" by addong " <<
xy.first <<
":" <<
xy.second;
722 return (rotx ?
getXY(lay,
x, y,
false) : std::make_pair(
x, y));
732 double xpos = xyoff.first + ((-2 *
id.waferU() +
id.waferV()) * r);
733 double ypos = xyoff.second + (1.5 *
id.waferV() *
R);
736 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell " <<
id <<
" Lay " << lay <<
" r:R " << r <<
":" << R <<
" N "
737 << ncells <<
":" << n2 <<
" Off " << xyoff.first <<
":" << xyoff.second <<
" Pos "
738 << xpos <<
":" << ypos;
742 xpos += ((1.5 * (
id.cellV() - ncells) + 1.0) * R1);
743 ypos += ((
id.cellU() - 0.5 *
id.cellV() - n2) * 2 * r1);
746 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell r1:R1 " << r1 <<
":" << R1 <<
" dx:dy "
747 << ((1.5 * (
id.cellV() - ncells) + 1.0) * R1) <<
":"
748 << ((
id.cellU() - 0.5 *
id.cellV() - n2) * 2 * r1) <<
" Pos " << xpos <<
":" << ypos;
750 std::pair<double, double>
xy =
getXY(
id.
layer(), xpos, ypos,
true);
751 return std::make_pair(xy.first *
id.zside(), xy.second);
755 int lay(
id.
layer()), iphi(
id.iphi()), ir(
id.iradiusAbs());
757 int type = (
id.type() > 0) ? 1 : 0;
763 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell lay:ir:iphi:type " << lay <<
":" << ir <<
":" << iphi <<
":" << type
765 << (r *
cos(phi) *
id.zside()) <<
":" << (r *
sin(phi));
767 return std::make_pair(r *
cos(phi) *
id.
zside(), r *
sin(phi));
783 return std::make_pair(
x, y);
788 const auto& indx =
getIndex(lay, reco);
789 if (indx.first >= 0) {
792 double phi = (iphi - 0.5) * indx.second;
797 edm::LogVerbatim(
"HGCalGeom") <<
"locateCellTrap:: Input " << lay <<
":" << irad <<
":" << iphi <<
":" << reco
799 <<
hgpar_->
iradMaxBH_[indx.first] <<
" Type " << type <<
" Z " << indx.first <<
":"
800 << z <<
" phi " << phi <<
" R " << r <<
":" << range.first <<
":" << range.second;
813 return std::make_pair(
x, y);
858 for (
unsigned int i = 0;
i <
layers(reco); ++
i) {
871 unsigned int cells(0);
923 return (((type1 == type2) || (type1 * type2 != 0)) ? uv : ((type1 == 0) ? (2 * uv + 1) / 3 : (3 * uv) / 2));
958 for (
unsigned k = 0;
k < nlayer; ++
k) {
960 cells = std::accumulate(ncells.begin(), ncells.end(),
cells);
969 std::vector<int> ncell;
977 ncell.emplace_back((
int)(cell));
983 ncell.emplace_back(nphi);
991 ncell.emplace_back(cell);
1022 double rmin(0), rmax(0), zz(0);
1043 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:rangeR: " << z <<
":" << zz <<
" R " << rmin <<
":" << rmax;
1045 return std::make_pair(rmin, rmax);
1049 double rmin(0), rmax(0);
1060 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:rangeR: " << lay <<
":" <<
index.first <<
" R " << rmin <<
":"
1063 return std::make_pair(rmin, rmax);
1076 return std::make_pair(zmin, zmax);
1087 return std::make_pair(row, col);
1092 return std::make_pair(cell, lay);
1097 edm::LogWarning(
"HGCalGeom") <<
"Wrong Layer # " << lay <<
" not in the list ***** ERROR *****";
1098 return std::make_pair(-1, -1);
1102 <<
" ***** ERROR *****";
1103 return std::make_pair(-1, -1);
1110 }
else if (type == 2) {
1115 return std::make_pair(kx, depth);
1120 int laymin(layer), laymax(layer), ringmin(ring), ringmax(ring), kount(0);
1125 for (
int lay = laymin; lay <= laymax; ++lay) {
1131 for (
int rin = ringmin; rin <= ringmax; ++rin) {
1135 for (
int k = 0;
k < 4; ++
k) {
1136 std::bitset<24>
b(itr->second.hex[
k]);
1149 for (
int k = 0;
k < ncopies; ++
k) {
1159 edm::LogVerbatim(
"HGCalGeom") <<
"Cannot find " << copy <<
" in a list of " << ncopies <<
" members";
1160 for (
int k = 0;
k < ncopies; ++
k)
1176 for (
int k = 0;
k < size_; ++
k) {
1189 if (wafer < size_) {
1202 edm::LogWarning(
"HGCalGeom") <<
"Cannot get wafer type corresponding to " << x <<
":" << y <<
" " << xx <<
":"
1207 edm::LogVerbatim(
"HGCalGeom") <<
"Position " << x <<
":" << y <<
" Wafer " << wafer <<
":" << size_ <<
" XX " << xx
1208 <<
":" << yy <<
" Cell " << icell <<
" Type " << celltyp;
1224 cellU = cellV = celltype = 0;
1229 double xx(0), yy(0);
1231 std::pair<double, double>
xy =
1241 edm::LogVerbatim(
"HGCalGeom") <<
"waferFromPosition:: Layer " << layer <<
":" << ll <<
" Rot " << rotx <<
" X " << x
1242 <<
":" << xx <<
" Y " << y <<
":" << yy;
1249 if (dx <= rmax && dy <= hexside) {
1250 if ((dy <= 0.5 * hexside) || (dx *
tan30deg_ <= (hexside - dy))) {
1263 edm::LogVerbatim(
"HGCalGeom") <<
"WaferFromPosition:: Input " << layer <<
":" << ll <<
":"
1270 << waferV <<
":" << celltype;
1279 cellHex(xx, yy, celltype, cellU, cellV, extend, debug);
1288 if ((celltype < 0) &&
debug) {
1291 edm::LogVerbatim(
"HGCalGeom") <<
"waferfFromPosition: Bad type for X " << x <<
":" << x1 <<
":" << xx <<
" Y " << y
1292 <<
":" << y1 <<
":" << yy <<
" Wafer " << waferU <<
":" << waferV <<
" Cell " << cellU
1299 << dx *
tan30deg_ <<
":" << hexside - dy <<
" Paramerers " << rmax <<
":"
1306 const auto& indx =
getIndex(lay, reco);
1313 const auto& indx =
getIndex(lay, reco);
1327 double xx(0), yy(0);
1336 return std::make_pair(xx, yy);
1345 edm::LogVerbatim(
"HGCalGeom") <<
"Layer " << lay <<
":" << ll <<
" Rotation " << rotx <<
" U:V " << waferU <<
":"
1349 std::pair<double, double> xy0 = (rotx) ?
getXY(lay,
xy.first,
xy.second,
false) :
xy;
1352 edm::LogVerbatim(
"HGCalGeom") <<
"Without and with rotation " <<
xy.first <<
":" <<
xy.second <<
":" << xy0.first
1353 <<
":" << xy0.second;
1376 type = (itr->second).type;
1392 type = (itr->second).type;
1407 int type(-1),
part(-1), orient(-1);
1413 orient = (itr->second).orient;
1422 orient = (itr->second).
second;
1441 return std::make_tuple(
type,
part, orient);
1448 bool withinList(
true);
1454 rotn = (itr->second).orient;
1462 rotn = (itr->second).
second;
1484 edm::LogVerbatim(
"HGCalGeom") <<
"waferTypeRotation: Layer " << layer <<
" Wafer " << waferU <<
":" << waferV
1485 <<
" Index " << std::hex << wl <<
std::dec <<
":" << withinList <<
" Type " <<
type
1486 <<
" Rotation " << rotn;
1488 return std::make_pair(
type, rotn);
1505 if (
index.first < 0)
1514 for (
unsigned int i = 0;
i <
layers(
true); ++
i) {
1529 unsigned ity = (type > 0 && type <= 2) ? type : 0;
1530 wafer = (itr->second)[ity];
1540 double xx,
double yy,
const double& cellR,
const std::vector<double>& posX,
const std::vector<double>& posY)
const {
1542 const double tol(0.00001);
1544 for (
unsigned int k = 0;
k < posX.size(); ++
k) {
1547 if (dx <= (cellR + tol) && dy <= (cellY + tol)) {
1548 double xmax = (dy <= 0.5 * cellY) ? cellR : (cellR - (dy - 0.5 * cellY) /
tan30deg_);
1549 if (dx <= (xmax + tol)) {
1559 double xloc,
double yloc,
int cellType,
int& cellU,
int& cellV,
bool extend,
bool debug)
const {
1561 double Rc = 2 *
rmax_ / (3 * N);
1562 double rc = 0.5 * Rc *
sqrt3_;
1563 double RcT = (extend) ? (2 *
rmaxT_ / (3 * N)) : Rc;
1564 double rcT = 0.5 * RcT *
sqrt3_;
1565 double v0 = ((xloc / Rc - 1.0) / 1.5);
1566 int cv0 = (v0 > 0) ? (N + (
int)(v0 + 0.5)) : (N - (
int)(-v0 + 0.5));
1567 double u0 = (0.5 * yloc / rc + 0.5 * cv0);
1568 int cu0 = (u0 > 0) ? (N / 2 + (
int)(u0 + 0.5)) : (N / 2 - (
int)(-u0 + 0.5));
1575 edm::LogVerbatim(
"HGCalGeom") <<
"cellHex: input " << xloc <<
":" << yloc <<
":" << cellType <<
" parameter " << rc
1576 <<
":" << Rc <<
" u0 " << u0 <<
":" << cu0 <<
" v0 " << v0 <<
":" << cv0;
1579 static constexpr
int shift[3] = {0, 1, -1};
1580 for (
int i1 = 0; i1 < 3; ++i1) {
1581 cellU = cu0 + shift[i1];
1582 for (
int i2 = 0; i2 < 3; ++i2) {
1583 cellV = cv0 + shift[i2];
1584 if (((cellV - cellU) < N) && ((cellU - cellV) <= N) && (cellU >= 0) && (cellV >= 0) && (cellU < 2 * N) &&
1586 double xc = (1.5 * (cellV -
N) + 1.0) * Rc;
1587 double yc = (2 * cellU - cellV -
N) * rc;
1593 <<
"cellHex: local " << xc <<
":" << yc <<
" difference " <<
std::abs(xloc - xc) <<
":"
1594 <<
std::abs(yloc - yc) <<
":" << sqrt3_ * (Rc -
std::abs(yloc - yc)) <<
" comparator " << rc <<
":"
1595 << Rc <<
" (u,v) = (" << cellU <<
"," << cellV <<
")";
1614 return std::make_pair(-1, 0);
1625 return std::make_pair(indx, cell);
1660 double rr =
sqrt(x * x + y * y);
1665 edm::LogVerbatim(
"HGCalGeom") <<
"Input " << lay <<
":" << wafer <<
":" << cell <<
" Position " << x <<
":" << y
1674 int kndx = cellV * 100 + cellU;
1682 edm::LogVerbatim(
"HGCalGeom") <<
"Fine " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
1692 edm::LogVerbatim(
"HGCalGeom") <<
"Coarse " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
1700 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer (" << waferU <<
"," << waferV <<
") " <<
x <<
":" <<
y;
1706 edm::LogVerbatim(
"HGCalGeom") <<
"Input " << lay <<
":" << ll <<
":" << waferU <<
":" << waferV <<
":" << cellU <<
":"
1707 << cellV <<
" Position " <<
x <<
":" << y <<
":" << rr <<
" Compare Limits "
1715 edm::LogVerbatim(
"HGCalGeom") <<
"Input " << lay <<
":" << waferU <<
":" << waferV <<
":" << cellU <<
":" << cellV
1716 <<
" N " << N <<
" part " << partn.first <<
":" << partn.second <<
" Result "
1729 edm::LogVerbatim(
"HGCalGeom") <<
"WaferIndex for " << wafer <<
":" << index <<
" (" << layer <<
":" << waferU <<
":"
1730 << waferV <<
") " << indx;
1748 edm::LogVerbatim(
"HGCalGeom") <<
"WaferInLayerTest: Layer " << lay <<
" wafer " << wafer <<
" index " << indx
1755 edm::LogVerbatim(
"HGCalGeom") <<
"WaferInLayerTest: Layer " << lay <<
" wafer " << wafer <<
" R-limits "
1757 << corner.first <<
":" << corner.second <<
" In " <<
in;
1782 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer " << x <<
":" << y <<
":" <<
xy.first <<
":" <<
xy.second;
1784 return std::make_pair(x, y);
1788 double xx(0), yy(0);
1799 return std::make_pair(xx, yy);
std::vector< int > iradMaxBH_
bool isHalfCell(int waferType, int cell) const
std::vector< double > waferPosY_
Log< level::Info, true > LogVerbatim
std::vector< int > layer_
std::vector< int > depthLayerF_
bool isValidTrap(int lay, int ieta, int iphi) const
std::vector< int > depth_
std::vector< double > zFrontMin_
std::vector< double > moduleCellR_
int getTypeTrap(int layer) const
layer_map copiesInLayers_
int getLayer(double z, bool reco) const
std::vector< std::pair< double, double > > layerRotV_
std::vector< HGCalParameters::hgtrap > getModules() const
bool waferHexagon6() const
std::vector< bool > cellCoarseHalf_
std::vector< bool > cellFineHalf_
uint16_t *__restrict__ id
int scintType(const int layer) const
void waferFromPosition(const double x, const double y, int &wafer, int &icell, int &celltyp) const
int type() const
get the type
static int32_t getUnpackedU(int id)
std::vector< int > moduleLayR_
double cellSizeHex(int type) const
int32_t maxWafersPerLayer_
HGCalParameters::hgtrform getTrForm(unsigned int k) const
Simrecovecs max_modules_layer_
int lastLayer(bool reco) const
std::pair< int, int > waferTypeRotation(int layer, int waferU, int waferV, bool fromFile=false, bool debug=false) const
double cellThickness(int layer, int waferU, int waferV) const
unsigned int layersInit(bool reco) const
int32_t waferU(const int32_t index)
int32_t waferLayer(const int32_t index)
constexpr NumType convertRadToDeg(NumType radians)
static bool goodCell(int u, int v, int N, int type, int rotn)
Sin< T >::type sin(const T &t)
bool cellInLayer(int waferU, int waferV, int cellU, int cellV, int lay, bool reco) const
int maxRows(int lay, bool reco) const
int getTypeHex(int layer, int waferU, int waferV) const
std::vector< double > cellFineY_
unsigned int waferFileSize() const
constexpr uint16_t localY(uint16_t py)
static int32_t getUnpackedV(int id)
bool waferInLayerTest(int wafer, int lay, bool full) const
std::unordered_map< int32_t, bool > waferIn_
int modulesInit(int lay, bool reco) const
std::pair< float, float > locateCell(int cell, int lay, int type, 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)
bool isValidHex(int lay, int mod, int cell, bool reco) const
std::vector< int > layerGroupM_
bool isValidCell8(int lay, int waferU, int waferV, int cellU, int cellV, int type) const
double scintCellSize(const int layer) const
int cellHex(double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
int32_t waferIndex(int wafer, int index) const
int layerIndex(int lay, bool reco) const
static constexpr uint32_t k_CornerSize
constexpr std::array< uint8_t, layerIndexSize > layer
const uint16_t range(const Frame &aFrame)
wafer_map wafersInLayers_
HGCalGeomTools geomTools_
std::pair< float, float > locateCellHex(int cell, int wafer, bool reco) const
U second(std::pair< T, U > const &p)
std::vector< double > cellCoarseX_
static constexpr int scintillatorFile
std::pair< double, double > rangeR(double z, bool reco) const
std::map< int, HGCWaferParam > waferLayer_
int32_t tileIndex(int32_t layer, int32_t ring, int32_t phi)
std::vector< std::pair< int, int > > tileRingRange_
int modules(int lay, bool reco) const
std::vector< int > firstModule_
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
int getType(double xpos, double ypos, double zpos)
unsigned int getTrFormN() const
double distFromEdgeTrap(double x, double y, double z) const
std::pair< double, double > rangeZ(bool reco) const
unsigned int layers(bool reco) const
int numberCellsHexagon(int wafer) const
std::vector< double > cellSize_
std::vector< int > waferUVMaxLayer_
std::vector< HGCalParameters::hgtrform > getTrForms() const
int layer() const
get the layer #
std::pair< double, double > cellEtaPhiTrap(int type, int irad) const
std::vector< int > layerIndex_
double mouseBite(bool reco) const
std::vector< double > yLayerHex_
hgtrform getTrForm(unsigned int k) const
int type() const
get the type
std::pair< int, float > getIndex(int lay, bool reco) const
int layer() const
get the layer #
HGCalDDDConstants(const HGCalParameters *hp, const std::string &name)
std::pair< float, float > locateCellTrap(int lay, int ieta, int iphi, bool reco) const
if(conf_.getParameter< bool >("UseStripCablingDB"))
std::pair< float, float > localToGlobal8(int lay, int waferU, int waferV, double localX, double localY, bool reco, bool debug) const
std::vector< double > rMaxFront_
Cos< T >::type cos(const T &t)
bool tileTrapezoid() const
int scintCells(const int layer) const
hgtrap getModule(unsigned int k, bool reco) const
Abs< T >::type abs(const T &t)
uint16_t const *__restrict__ x
std::vector< double > slopeTop_
std::vector< int > layerCenter_
bool isValidCell(int layindex, int wafer, int cell) const
int waferTypeL(int wafer) const
int getPhiBins(int lay) const
std::vector< double > rMinLayHex_
int32_t waferIndex(int32_t layer, int32_t waferU, int32_t waferV, bool old=false)
HGCalTypes::CellType cellType(int type, int waferU, int waferV) const
std::pair< int, int > getREtaRange(int lay) const
std::pair< int, int > rowColumnWafer(const int wafer) const
std::vector< double > zLayerHex_
double waferZ(int layer, bool reco) const
std::vector< int > layerType_
#define TYPELOOKUP_DATA_REG(_dataclass_)
std::pair< double, double > getXY(int layer, double x, double y, bool forwd) const
bool waferVirtual(int layer, int waferU, int waferV) const
std::vector< double > rMaxLayHex_
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ cells
std::vector< double > slopeMin_
Basic2DVector< T > xy() const
std::vector< int > lastModule_
std::array< int, 4 > waferMax_
int waferFromCopy(int copy) const
static constexpr double k_ScaleToDDD
std::vector< double > radiusMixBoundary_
std::vector< double > cellThickness_
std::vector< int > layerGroup_
constexpr uint16_t localX(uint16_t px)
std::vector< double > moduleCellS_
bool maskCell(const DetId &id, int corners) const
std::array< int, 5 > assignCellHex(float x, float y, int lay, bool reco, bool extend=false, bool debug=false) const
int numberCells(bool reco) const
wafer_map cellCoarseIndex_
bool waferFullInLayer(int wafer, int lay, bool reco) const
bool isValidHex8(int lay, int waferU, int waferV, bool fullAndPart=false) const
std::vector< double > rMinFront_
std::vector< int > iradMinBH_
std::vector< double > cellFineX_
const HGCalGeometryMode::GeometryMode mode_
static constexpr double k_ScaleFromDDD
std::pair< double, double > waferParameters(bool reco) const
std::vector< int > layerGroupO_
static constexpr int k_OffsetRotation
__host__ __device__ constexpr RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
std::array< int, 3 > HGCWaferParam
int32_t waferV(const int32_t index)
std::vector< int > waferCopy_
bool waferHexagon8() const
int tileCount(int layer, int ring) const
static unsigned int const shift
std::vector< int > depthIndex_
std::pair< double, double > waferPosition(int wafer, bool reco) const
std::pair< int, int > assignCell(float x, float y, int lay, int subSec, bool reco) const
static constexpr double tan30deg_
std::array< int, 3 > assignCellTrap(float x, float y, float z, int lay, bool reco) const
std::vector< double > zFrontTop_
std::vector< double > radiusLayer_[2]
std::array< uint32_t, 2 > tot_layers_
std::vector< int > waferTypeT_
static constexpr int32_t WaferCornerMin
std::vector< double > cellCoarseY_
Log< level::Warning, false > LogWarning
waferInfo_map waferInfoMap_
HGCalParameters::hgtrap getModule(unsigned int k, bool hexType, bool reco) const
std::pair< double, double > waferPositionNoRot(int lay, int waferU, int waferV, bool reco, bool debug=false) const
__host__ __device__ V wmin
const HGCalParameters * hgpar_
int layerFromIndex(int index, bool reco) const
int maxCells(bool reco) const
std::vector< double > waferPosX_
int modifyUV(int uv, int type1, int type2) const
T mod(const T &a, const T &b)
tileInfo_map tileInfoMap_
std::vector< int > waferTypeL_
std::vector< double > xLayerHex_
std::pair< double, double > rangeRLayer(int lay, bool reco) const
tuple size
Write out results.
int getUVMax(int type) const
double distFromEdgeHex(double x, double y, double z) const
bool waferInLayer(int wafer, int lay, bool reco) const
int waferType(DetId const &id, bool fromFile=false) const
constexpr Detector det() const
get the detector field from this detid
__host__ __device__ V V wmax
static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners)