12 for (
int k = 0;
k < 2; ++
k) {
17 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalCell initialized with waferSize " << waferSize <<
" number of cells " << nFine
26 switch (placementIndex) {
76 return std::make_pair(
x,
y);
86 const std::vector<double> fcos = {1.0, 0.5, -0.5, -1.0, -0.5, 0.5};
88 x = x0 * fcos[placementIndex] - y0 * fsin[placementIndex];
89 y = x0 * fsin[placementIndex] + y0 * fcos[placementIndex];
93 const std::vector<double> fcos = {0.5, 1.0, 0.5, -0.5, -1.0, -0.5};
100 return std::make_pair(
x,
y);
108 const std::vector<int> itype0 = {0, 7, 8, 9, 10, 11, 6, 3, 4, 5, 4, 5, 3};
109 const std::vector<int> itype1 = {0, 0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 1, 2};
110 const std::vector<int> itype2 = {0, 11, 6, 7, 8, 9, 10, 5, 3, 4, 3, 4, 5};
111 const std::vector<int> itype3 = {0, 4, 5, 0, 1, 2, 3, 2, 0, 1, 2, 0, 1};
112 const std::vector<int> itype4 = {0, 9, 10, 11, 6, 7, 8, 4, 5, 3, 5, 3, 4};
113 const std::vector<int> itype5 = {0, 2, 3, 4, 5, 0, 1, 1, 2, 0, 1, 2, 0};
114 if (u == 0 &&
v == 0) {
117 }
else if (u == 0 && (
v - u) == (
ncell_[
type] - 1)) {
151 switch (placementIndex) {
153 cell = itype0[cellx];
156 cell = itype1[cellx];
159 cell = itype2[cellx];
162 cell = itype3[cellx];
165 cell = itype4[cellx];
168 cell = itype5[cellx];
172 const std::vector<int> itype0 = {0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 0, 1, 2};
173 const std::vector<int> itype1 = {0, 8, 9, 10, 11, 6, 7, 4, 5, 3, 4, 5, 3};
174 const std::vector<int> itype2 = {0, 3, 4, 5, 0, 1, 2, 2, 0, 1, 1, 2, 0};
175 const std::vector<int> itype3 = {0, 10, 11, 6, 7, 8, 9, 5, 3, 4, 5, 3, 4};
176 const std::vector<int> itype4 = {0, 5, 0, 1, 2, 3, 4, 0, 1, 2, 2, 0, 1};
177 const std::vector<int> itype5 = {0, 6, 7, 8, 9, 10, 11, 3, 4, 5, 3, 4, 5};
178 if (u == 0 &&
v == 0) {
193 }
else if ((
v - u) == (
ncell_[
type] - 1) && u == 0) {
215 switch (placementIndex) {
217 cell = itype0[cellx];
220 cell = itype1[cellx];
223 cell = itype2[cellx];
226 cell = itype3[cellx];
229 cell = itype4[cellx];
232 cell = itype5[cellx];
236 return std::make_pair(cell, cellt);
248 return std::make_pair(
orient, frontBackZside);
332 if (u == 0 &&
v == 0) {
335 }
else if (u == 0 && (
v - u) == (ncell - 1)) {
338 }
else if ((
v - u) == (ncell - 1) &&
v == (2 * ncell - 1)) {
341 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
344 }
else if (u == (2 * ncell - 1) && (u -
v) == ncell) {
347 }
else if ((u -
v) == ncell &&
v == 0) {
356 }
else if (
v == ncell - 2) {
360 }
else if ((
v - u) == (ncell - 1)) {
366 }
else if (
v == 2 * ncell - 2) {
370 }
else if (
v == (2 * ncell - 1)) {
373 if (u == ncell + 1) {
376 }
else if (u == 2 * ncell - 2) {
380 }
else if (u == (2 * ncell - 1)) {
383 if (
v == 2 * ncell - 2) {
386 }
else if (
v == ncell + 1) {
390 }
else if ((u -
v) == ncell) {
393 if (u == 2 * ncell - 2) {
396 }
else if (u == ncell + 1) {
403 if (u == ncell - 1) {
411 switch (placementIndex) {
413 cell = itype0[cellx];
416 cell = itype1[cellx];
419 cell = itype2[cellx];
422 cell = itype3[cellx];
425 cell = itype4[cellx];
428 cell = itype5[cellx];
510 if (u == 0 &&
v == 0) {
513 }
else if (
v == 0 && (u -
v) == (ncell)) {
516 }
else if ((u -
v) == (ncell) && u == (2 * ncell - 1)) {
519 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
522 }
else if (
v == (2 * ncell - 1) && (
v - u) == (ncell - 1)) {
525 }
else if ((
v - u) == (ncell - 1) && u == 0) {
534 }
else if (u == ncell - 1) {
538 }
else if ((u -
v) == ncell) {
541 if (u == 2 * ncell - 2) {
544 }
else if (u == ncell + 1) {
548 }
else if (u == (2 * ncell - 1)) {
551 if (
v == 2 * ncell - 2) {
554 }
else if (
v == ncell + 1) {
558 }
else if (
v == (2 * ncell - 1)) {
561 if (u == ncell + 1) {
564 }
else if (u == 2 * ncell - 2) {
568 }
else if ((
v - u) == (ncell - 1)) {
574 }
else if (
v == 2 * ncell - 2) {
584 }
else if (
v == ncell - 2) {
589 switch (placementIndex) {
591 cell = itype0[cellx];
594 cell = itype1[cellx];
597 cell = itype2[cellx];
600 cell = itype3[cellx];
603 cell = itype4[cellx];
606 cell = itype5[cellx];
610 return std::make_pair(cell, cellt);
614 int32_t u, int32_t
v, int32_t ncell, int32_t placementIndex, int32_t partialType) {
616 int cellx = cell.first;
617 int cellt = cell.second;
620 if ((u == 7 &&
v == 14) || (u == 7 &&
v == 0)) {
622 if (u == 7 &&
v == 0) {
627 }
else if ((u == 8 &&
v == 15) || (u == 8 &&
v == 0)) {
629 if (u == 8 &&
v == 0) {
634 }
else if (u == 2 &&
v == 9) {
636 }
else if (u == 0 &&
v == 7) {
638 }
else if (u == 14 &&
v == 15) {
640 }
else if (u == 15 &&
v == 15) {
650 if (((u == 15 &&
v == 11) || (u == 7 &&
v == 7)) &&
658 }
else if ((u == 7 &&
v == 11) &&
666 }
else if (2 *
v - u == 7) {
673 }
else if (2 *
v - u == 15) {
680 std::cout << u <<
":" <<
v <<
" 1" << std::endl;
685 if ((u == 9 &&
v == 20) || (u == 9 &&
v == 0)) {
687 if (u == 9 &&
v == 0) {
692 }
else if ((u == 10 &&
v == 21) || (u == 10 &&
v == 0)) {
694 if (u == 10 &&
v == 0) {
702 }
else if (u == 10) {
707 if ((u == 10 &&
v == 7) || (u == 10 &&
v == 14)) {
714 }
else if ((u == 0 &&
v == 2) || (u == 0 &&
v == 9)) {
721 }
else if (2 *
v - u == 4) {
726 }
else if (2 *
v - u == 18) {
736 return std::make_pair(cellx, cellt);
static constexpr int32_t LDPartial0007Cell
Log< level::Info, true > LogVerbatim
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
static constexpr int32_t fullCell
static constexpr int32_t WaferPartLDOffset
static constexpr int32_t cellPlacementIndex8
static std::pair< int32_t, int32_t > cellType(int32_t u, int32_t v, int32_t ncell, int32_t placementIndex)
static constexpr int32_t WaferLDThree
static constexpr int32_t topCorner
static constexpr int32_t HDPartial1021Cell
static constexpr int32_t extendedMBCell
static constexpr int32_t cellPlacementIndex3
static constexpr int32_t leftEdge
static constexpr int32_t HDPartial0920Cell
static constexpr int32_t cellPlacementIndex10
static constexpr int32_t WaferHDFive
static constexpr int32_t truncatedMBCell
std::pair< int32_t, int32_t > cellUV2Cell(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t leftCell
static constexpr int32_t LDPartial0209Cell
static constexpr int32_t WaferHDLeft
static constexpr int32_t cellPlacementIndex0
static constexpr int32_t WaferPartLDCount
static constexpr int32_t topLeftCorner
static constexpr int32_t topCell
static std::pair< int32_t, int32_t > cellOrient(int32_t placementIndex)
static constexpr int32_t bottomLeftCorner
static constexpr int32_t WaferLDRight
static constexpr int32_t topRightCorner
static constexpr int32_t bottomRightEdge
static constexpr int32_t cellPlacementIndex9
static constexpr int32_t WaferLDFive
static constexpr int32_t WaferLDLeft
static constexpr int32_t halfCell
HGCalCell(double waferSize, int32_t nFine, int32_t nCoarse)
static constexpr int32_t LDPartial0714Cell
static constexpr int32_t LDPartial1515Cell
static constexpr int32_t bottomLeftEdge
static constexpr int32_t cellPlacementIndex7
static constexpr int32_t WaferPartHDOffset
static constexpr int32_t WaferHDRight
static constexpr int32_t bottomRightCorner
static constexpr int32_t truncatedCell
static constexpr int32_t halfTrunCell
static constexpr int32_t centralCell
std::pair< double, double > cellUV2XY1(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t extendedCell
static constexpr int32_t topRightEdge
static constexpr int32_t cellPlacementIndex11
static constexpr int32_t LDPartial0815Cell
std::pair< double, double > cellUV2XY2(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t LDPartial1415Cell
static constexpr int32_t halfExtCell
static constexpr int32_t rightEdge
static constexpr int32_t bottomCorner
static constexpr int32_t cornerCell
static constexpr int32_t rightCell
static constexpr int32_t cellPlacementIndex4
static constexpr int32_t cellPlacementIndex1
static constexpr int32_t cellPlacementIndex6
static constexpr int32_t cellPlacementIndex2
static constexpr int32_t topLeftEdge
static constexpr int32_t bottomCell
static constexpr int32_t WaferPartHDCount
static constexpr int32_t cellPlacementExtra