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 adding " <<
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);
675 bool rotx = (norot) ?
false
680 << waferU <<
":" << waferV <<
":" << indx <<
":"
684 int kndx = cellV * 100 + cellU;
692 edm::LogVerbatim(
"HGCalGeom") <<
"Fine " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
701 edm::LogVerbatim(
"HGCalGeom") <<
"Coarse " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
713 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer " <<
x <<
":" << y <<
" by adding " <<
xy.first <<
":" <<
xy.second;
715 return (rotx ?
getXY(lay,
x, y,
false) : std::make_pair(
x, y));
725 double xpos = xyoff.first + ((-2 *
id.waferU() +
id.waferV()) * r);
726 double ypos = xyoff.second + (1.5 *
id.waferV() *
R);
729 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell " <<
id <<
" Lay " << lay <<
" r:R " << r <<
":" << R <<
" N "
730 << ncells <<
":" << n2 <<
" Off " << xyoff.first <<
":" << xyoff.second <<
" Pos "
731 << xpos <<
":" << ypos;
735 xpos += ((1.5 * (
id.cellV() - ncells) + 1.0) * R1);
736 ypos += ((
id.cellU() - 0.5 *
id.cellV() - n2) * 2 * r1);
739 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell r1:R1 " << r1 <<
":" << R1 <<
" dx:dy "
740 << ((1.5 * (
id.cellV() - ncells) + 1.0) * R1) <<
":"
741 << ((
id.cellU() - 0.5 *
id.cellV() - n2) * 2 * r1) <<
" Pos " << xpos <<
":" << ypos;
743 std::pair<double, double>
xy =
getXY(
id.
layer(), xpos, ypos,
true);
744 return std::make_pair(xy.first *
id.zside(), xy.second);
748 int lay(
id.
layer()), iphi(
id.iphi()), ir(
id.iradiusAbs());
750 int type = (
id.type() > 0) ? 1 : 0;
756 edm::LogVerbatim(
"HGCalGeom") <<
"LocateCell lay:ir:iphi:type " << lay <<
":" << ir <<
":" << iphi <<
":" << type
758 << (r *
cos(phi) *
id.zside()) <<
":" << (r *
sin(phi));
760 return std::make_pair(r *
cos(phi) *
id.
zside(), r *
sin(phi));
776 return std::make_pair(
x, y);
781 const auto& indx =
getIndex(lay, reco);
782 if (indx.first >= 0) {
785 double phi = (iphi - 0.5) * indx.second;
790 edm::LogVerbatim(
"HGCalGeom") <<
"locateCellTrap:: Input " << lay <<
":" << irad <<
":" << iphi <<
":" << reco
792 <<
hgpar_->
iradMaxBH_[indx.first] <<
" Type " << type <<
" Z " << indx.first <<
":"
793 << z <<
" phi " << phi <<
" R " << r <<
":" << range.first <<
":" << range.second;
806 return std::make_pair(
x, y);
851 for (
unsigned int i = 0;
i <
layers(reco); ++
i) {
864 unsigned int cells(0);
916 return (((type1 == type2) || (type1 * type2 != 0)) ? uv : ((type1 == 0) ? (2 * uv + 1) / 3 : (3 * uv) / 2));
951 for (
unsigned k = 0;
k < nlayer; ++
k) {
953 cells = std::accumulate(ncells.begin(), ncells.end(),
cells);
962 std::vector<int> ncell;
970 ncell.emplace_back((
int)(cell));
976 ncell.emplace_back(nphi);
984 ncell.emplace_back(cell);
1015 double rmin(0), rmax(0), zz(0);
1036 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:rangeR: " << z <<
":" << zz <<
" R " << rmin <<
":" << rmax;
1038 return std::make_pair(rmin, rmax);
1042 double rmin(0), rmax(0);
1053 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalDDDConstants:rangeR: " << lay <<
":" <<
index.first <<
" R " << rmin <<
":"
1056 return std::make_pair(rmin, rmax);
1069 return std::make_pair(zmin, zmax);
1080 return std::make_pair(row, col);
1085 return std::make_pair(cell, lay);
1090 edm::LogWarning(
"HGCalGeom") <<
"Wrong Layer # " << lay <<
" not in the list ***** ERROR *****";
1091 return std::make_pair(-1, -1);
1095 <<
" ***** ERROR *****";
1096 return std::make_pair(-1, -1);
1103 }
else if (type == 2) {
1108 return std::make_pair(kx, depth);
1113 int laymin(layer), laymax(layer), ringmin(ring), ringmax(ring), kount(0);
1118 for (
int lay = laymin; lay <= laymax; ++lay) {
1124 for (
int rin = ringmin; rin <= ringmax; ++rin) {
1128 for (
int k = 0;
k < 4; ++
k) {
1129 std::bitset<24>
b(itr->second.hex[
k]);
1142 for (
int k = 0;
k < ncopies; ++
k) {
1152 edm::LogVerbatim(
"HGCalGeom") <<
"Cannot find " << copy <<
" in a list of " << ncopies <<
" members";
1153 for (
int k = 0;
k < ncopies; ++
k)
1169 for (
int k = 0;
k < size_; ++
k) {
1182 if (wafer < size_) {
1195 edm::LogWarning(
"HGCalGeom") <<
"Cannot get wafer type corresponding to " << x <<
":" << y <<
" " << xx <<
":"
1200 edm::LogVerbatim(
"HGCalGeom") <<
"Position " << x <<
":" << y <<
" Wafer " << wafer <<
":" << size_ <<
" XX " << xx
1201 <<
":" << yy <<
" Cell " << icell <<
" Type " << celltyp;
1217 cellU = cellV = celltype = 0;
1222 double xx(0), yy(0);
1224 std::pair<double, double>
xy =
1234 edm::LogVerbatim(
"HGCalGeom") <<
"waferFromPosition:: Layer " << layer <<
":" << ll <<
" Rot " << rotx <<
" X " << x
1235 <<
":" << xx <<
" Y " << y <<
":" << yy;
1242 if (dx <= rmax && dy <= hexside) {
1243 if ((dy <= 0.5 * hexside) || (dx *
tan30deg_ <= (hexside - dy))) {
1256 edm::LogVerbatim(
"HGCalGeom") <<
"WaferFromPosition:: Input " << layer <<
":" << ll <<
":"
1263 << waferV <<
":" << celltype;
1272 cellHex(xx, yy, celltype, cellU, cellV, extend, debug);
1281 if ((celltype < 0) &&
debug) {
1284 edm::LogVerbatim(
"HGCalGeom") <<
"waferfFromPosition: Bad type for X " << x <<
":" << x1 <<
":" << xx <<
" Y " << y
1285 <<
":" << y1 <<
":" << yy <<
" Wafer " << waferU <<
":" << waferV <<
" Cell " << cellU
1292 << dx *
tan30deg_ <<
":" << hexside - dy <<
" Paramerers " << rmax <<
":"
1299 const auto& indx =
getIndex(lay, reco);
1306 const auto& indx =
getIndex(lay, reco);
1320 double xx(0), yy(0);
1329 return std::make_pair(xx, yy);
1338 edm::LogVerbatim(
"HGCalGeom") <<
"Layer " << lay <<
":" << ll <<
" Rotation " << rotx <<
" U:V " << waferU <<
":"
1342 std::pair<double, double> xy0 = (rotx) ?
getXY(lay,
xy.first,
xy.second,
false) :
xy;
1345 edm::LogVerbatim(
"HGCalGeom") <<
"Without and with rotation " <<
xy.first <<
":" <<
xy.second <<
":" << xy0.first
1346 <<
":" << xy0.second;
1369 type = (itr->second).type;
1385 type = (itr->second).type;
1400 int type(-1),
part(-1), orient(-1);
1406 orient = (itr->second).orient;
1415 orient = (itr->second).
second;
1434 return std::make_tuple(
type,
part, orient);
1441 bool withinList(
true);
1447 rotn = (itr->second).orient;
1455 rotn = (itr->second).
second;
1477 edm::LogVerbatim(
"HGCalGeom") <<
"waferTypeRotation: Layer " << layer <<
" Wafer " << waferU <<
":" << waferV
1478 <<
" Index " << std::hex << wl <<
std::dec <<
":" << withinList <<
" Type " <<
type
1479 <<
" Rotation " << rotn;
1481 return std::make_pair(
type, rotn);
1498 if (
index.first < 0)
1507 for (
unsigned int i = 0;
i <
layers(
true); ++
i) {
1522 unsigned ity = (type > 0 && type <= 2) ? type : 0;
1523 wafer = (itr->second)[ity];
1533 double xx,
double yy,
const double& cellR,
const std::vector<double>& posX,
const std::vector<double>& posY)
const {
1535 const double tol(0.00001);
1537 for (
unsigned int k = 0;
k < posX.size(); ++
k) {
1540 if (dx <= (cellR + tol) && dy <= (cellY + tol)) {
1541 double xmax = (dy <= 0.5 * cellY) ? cellR : (cellR - (dy - 0.5 * cellY) /
tan30deg_);
1542 if (dx <= (xmax + tol)) {
1552 double xloc,
double yloc,
int cellType,
int& cellU,
int& cellV,
bool extend,
bool debug)
const {
1554 double Rc = 2 *
rmax_ / (3 * N);
1555 double rc = 0.5 * Rc *
sqrt3_;
1556 double RcT = (extend) ? (2 *
rmaxT_ / (3 * N)) : Rc;
1557 double rcT = 0.5 * RcT *
sqrt3_;
1558 double v0 = ((xloc / Rc - 1.0) / 1.5);
1559 int cv0 = (v0 > 0) ? (N + (
int)(v0 + 0.5)) : (N - (
int)(-v0 + 0.5));
1560 double u0 = (0.5 * yloc / rc + 0.5 * cv0);
1561 int cu0 = (u0 > 0) ? (N / 2 + (
int)(u0 + 0.5)) : (N / 2 - (
int)(-u0 + 0.5));
1568 edm::LogVerbatim(
"HGCalGeom") <<
"cellHex: input " << xloc <<
":" << yloc <<
":" << cellType <<
" parameter " << rc
1569 <<
":" << Rc <<
" u0 " << u0 <<
":" << cu0 <<
" v0 " << v0 <<
":" << cv0;
1572 static constexpr
int shift[3] = {0, 1, -1};
1573 for (
int i1 = 0; i1 < 3; ++i1) {
1574 cellU = cu0 + shift[i1];
1575 for (
int i2 = 0; i2 < 3; ++i2) {
1576 cellV = cv0 + shift[i2];
1577 if (((cellV - cellU) < N) && ((cellU - cellV) <= N) && (cellU >= 0) && (cellV >= 0) && (cellU < 2 * N) &&
1579 double xc = (1.5 * (cellV -
N) + 1.0) * Rc;
1580 double yc = (2 * cellU - cellV -
N) * rc;
1586 <<
"cellHex: local " << xc <<
":" << yc <<
" difference " <<
std::abs(xloc - xc) <<
":"
1587 <<
std::abs(yloc - yc) <<
":" << sqrt3_ * (Rc -
std::abs(yloc - yc)) <<
" comparator " << rc <<
":"
1588 << Rc <<
" (u,v) = (" << cellU <<
"," << cellV <<
")";
1607 return std::make_pair(-1, 0);
1618 return std::make_pair(indx, cell);
1653 double rr =
sqrt(x * x + y * y);
1658 edm::LogVerbatim(
"HGCalGeom") <<
"Input " << lay <<
":" << wafer <<
":" << cell <<
" Position " << x <<
":" << y
1667 int kndx = cellV * 100 + cellU;
1675 edm::LogVerbatim(
"HGCalGeom") <<
"Fine " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
1685 edm::LogVerbatim(
"HGCalGeom") <<
"Coarse " << cellU <<
":" << cellV <<
":" << kndx <<
":" <<
x <<
":" << y <<
":"
1693 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer (" << waferU <<
"," << waferV <<
") " <<
x <<
":" <<
y;
1699 edm::LogVerbatim(
"HGCalGeom") <<
"Input " << lay <<
":" << ll <<
":" << waferU <<
":" << waferV <<
":" << cellU <<
":"
1700 << cellV <<
" Position " <<
x <<
":" << y <<
":" << rr <<
" Compare Limits "
1708 edm::LogVerbatim(
"HGCalGeom") <<
"Input " << lay <<
":" << waferU <<
":" << waferV <<
":" << cellU <<
":" << cellV
1709 <<
" N " << N <<
" part " << partn.first <<
":" << partn.second <<
" Result "
1722 edm::LogVerbatim(
"HGCalGeom") <<
"WaferIndex for " << wafer <<
":" << index <<
" (" << layer <<
":" << waferU <<
":"
1723 << waferV <<
") " << indx;
1741 edm::LogVerbatim(
"HGCalGeom") <<
"WaferInLayerTest: Layer " << lay <<
" wafer " << wafer <<
" index " << indx
1748 edm::LogVerbatim(
"HGCalGeom") <<
"WaferInLayerTest: Layer " << lay <<
" wafer " << wafer <<
" R-limits "
1750 << corner.first <<
":" << corner.second <<
" In " <<
in;
1775 edm::LogVerbatim(
"HGCalGeom") <<
"With wafer " << x <<
":" << y <<
":" <<
xy.first <<
":" <<
xy.second;
1777 return std::make_pair(x, y);
1781 double xx(0), yy(0);
1792 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
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
constexpr uint16_t localY(uint16_t py, uint16_t n)
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)