52 mask = !((u > 2 *
v) && (
v <
n));
54 mask = ((u >=
n) && (
v >=
n) && ((u +
v) > (3 *
n - 2)));
62 mask = ((u >=
n) && (u >
v) && ((2 * u -
v) > 2 *
n));
68 mask = !((u < n) && (v > u) && (
v > (2 * u - 1)));
70 mask = ((u > 2 *
v) && (
v <
n));
76 mask = !((
v >= u) && ((2 *
v - u) > (2 *
n - 2)));
84 mask = !((u >=
n) && (
v >=
n) && ((u +
v) > (3 *
n - 2)));
86 mask = ((u < n) && (v > u) && (
v > (2 * u - 1)));
92 mask = !((u >=
n) && (u >
v) && ((2 * u -
v) > 2 *
n));
94 mask = ((
v >= u) && ((2 *
v - u) > (2 *
n - 2)));
102 edm::LogVerbatim(
"HGCalGeom") <<
"Corners: " << ncor <<
":" << fcor <<
" N " <<
n <<
" u " << u <<
" v " <<
v 113 int n3 = (
n + 1) / 3;
127 good = ((
v + u) < (3 *
n));
131 int v2 = (
v + 1) / 2;
132 good = ((u - v2) <=
n);
136 int u2 = (u - 1) / 2;
141 good = ((
v + u) >=
n - 1);
155 good = (
v < (3 * n2));
159 good = (u < (3 * n2));
163 good = ((u -
v) <= n2);
171 good = (u >= n2 - 1);
175 good = ((
v - u) < n2);
184 good = (
v < (5 * n4));
188 good = (u <= (5 * n4));
192 good = ((u -
v) <= n4);
196 good = (
v >= (3 * n4 - 1));
200 good = (u >= (3 * n4));
204 good = ((
v - u) <= n4);
242 good = ((u +
v) <= (2 *
n));
246 good = ((2 * u -
v) <= (
n + 1));
250 good = ((2 *
v - u) >= (
n - 2));
254 good = ((u +
v) >= (2 *
n - 2));
258 good = ((2 * u -
v) >= (
n - 1));
262 good = ((2 *
v - u) <=
n);
275 good = ((2 * u -
v) <= 1);
279 int u2 = ((u > 0) ? (u / 2) : 0);
281 good = (uv >= (
n - 1));
285 good = ((
v + u) >= (3 *
n - 2));
290 good = (uv >= (2 *
n - 1));
304 good = ((u +
v) <= (4 * n3 + 1));
308 good = ((2 * u -
v) <= n2);
312 int u2 = ((u + 1) / 2);
313 good = ((
v -
u2) >= (3 * n4 - 1));
317 good = ((u +
v) >= (5 * n2 - 1));
321 good = ((2 * u -
v) >= (3 * n2));
325 int u2 = (u + 1) / 2;
335 good = ((2 *
v - u) <= (3 * n2));
339 good = ((u +
v) < (5 * n2));
343 good = ((2 * u -
v) >= (3 * n2));
347 good = ((2 *
v - u) >= n3);
351 good = ((u +
v) > (4 * n3));
355 good = ((2 * u -
v) >= n2);
364 good = (
v <= (3 * n4));
368 good = (u <= (3 * n4));
372 good = ((
v - u) >= n4 - 1);
376 good = (
v >= (5 * n4 - 1));
380 good = (u >= (5 * n4 - 1));
384 good = ((u -
v) >= n4);
392 edm::LogVerbatim(
"HGCalGeom") <<
"u|v " << u <<
":" <<
v <<
" N " <<
n <<
" type " <<
type <<
" rot " << rotn
461 edm::LogVerbatim(
"HGCalGeom") <<
"u|v " << u <<
":" <<
v <<
" WaferType " << waferType <<
" good " <<
good;
479 newrotn = rot1[rotn];
488 newrotn = rot2[rotn];
496 newrotn = rot3[rotn];
513 const bool& v17OrLess,
528 static constexpr
int corners = 6;
529 static constexpr
int base = 10;
530 double rin2 = rin * rin;
531 double rout2 = rout * rout;
544 double xc[corners], yc[corners];
545 for (
int k = 0;
k < corners; ++
k) {
546 xc[
k] = xpos + dx0[
k];
547 yc[
k] = ypos + dy0[
k];
548 double rpos2 = (xc[
k] * xc[
k] + yc[
k] * yc[
k]);
549 if (rpos2 <= rout2 && rpos2 >= rin2) {
551 iok = iok *
base + 1;
557 edm::LogVerbatim(
"HGCalGeom") <<
"I/p " << xpos <<
":" << ypos <<
":" << delX <<
":" << delY <<
":" << rin <<
":" 558 << rout <<
":" << wType <<
":" <<
mode <<
" Corners " << ncor <<
" iok " << iok;
560 static constexpr
int ipat5[corners] = {101111, 110111, 111011, 111101, 111110, 11111};
561 static constexpr
int ipat4[corners] = {100111, 110011, 111001, 111100, 11110, 1111};
562 static constexpr
int ipat3[corners] = {100011, 110001, 111000, 11100, 1110, 111};
563 static constexpr
int ipat2[corners] = {11, 100001, 110000, 11000, 1100, 110};
588 double dx3[corners] = {
590 double dy3[corners] = {-c88 * delY, -c27 * delY, c61 * delY, c88 * delY, c27 * delY, -c61 * delY};
591 double dx4[corners] = {
593 double dy4[corners] = {c88 * delY, c61 * delY, -c27 * delY, -c88 * delY, -c61 * delY, c27 * delY};
606 double dx6[corners] = {
608 double dy6[corners] = {c61 * delY, -c27 * delY, -c88 * delY, -c61 * delY, c27 * delY, c88 * delY};
609 double dx7[corners] = {
611 double dy7[corners] = {c88 * delY, c27 * delY, -c61 * delY, -c88 * delY, -c27 * delY, c61 * delY};
612 double dx8[corners] = {
614 double dy8[corners] = {-c61 * delY, c27 * delY, c88 * delY, c61 * delY, -c27 * delY, -c88 * delY};
615 double dx9[corners] = {
617 double dy9[corners] = {-c88 * delY, -c61 * delY, c27 * delY, c88 * delY, c61 * delY, -c27 * delY};
621 rotn =
static_cast<int>(
std::find(ipat5, ipat5 + 6, iok) - ipat5);
624 rotn =
static_cast<int>(
std::find(ipat4, ipat4 + 6, iok) - ipat4);
626 double rpos12 = ((xpos + dx1[rotn]) * (xpos + dx1[rotn]) + (ypos + dy1[rotn]) * (ypos + dy1[rotn]));
628 if (rpos12 <= rout2 && rpos12 >= rin2) {
629 rpos22 = ((xpos + dx2[rotn]) * (xpos + dx2[rotn]) + (ypos + dy2[rotn]) * (ypos + dy2[rotn]));
630 if (rpos22 <= rout2 && rpos22 >= rin2)
637 rpos12 = ((xpos + dx3[rotn]) * (xpos + dx3[rotn]) + (ypos + dy3[rotn]) * (ypos + dy3[rotn]));
638 if (rpos12 <= rout2 && rpos12 >= rin2) {
639 rpos22 = ((xpos + dx4[rotn]) * (xpos + dx4[rotn]) + (ypos + dy4[rotn]) * (ypos + dy4[rotn]));
640 if (rpos22 <= rout2 && rpos22 >= rin2)
648 rotn =
static_cast<int>(
std::find(ipat3, ipat3 + 6, iok) - ipat3);
650 double rpos12 = ((xpos + dx7[rotn]) * (xpos + dx7[rotn]) + (ypos + dy7[rotn]) * (ypos + dy7[rotn]));
652 if (rpos12 <= rout2 && rpos12 >= rin2) {
653 rpos22 = ((xpos + dx8[rotn]) * (xpos + dx8[rotn]) + (ypos + dy8[rotn]) * (ypos + dy8[rotn]));
654 if (rpos22 <= rout2 && rpos22 >= rin2)
661 rpos12 = ((xpos + dx1[rotn]) * (xpos + dx1[rotn]) + (ypos + dy1[rotn]) * (ypos + dy1[rotn]));
662 if (rpos12 <= rout2 && rpos12 >= rin2) {
663 rpos22 = ((xpos + dx5[rotn]) * (xpos + dx5[rotn]) + (ypos + dy5[rotn]) * (ypos + dy5[rotn]));
664 if (rpos22 <= rout2 && rpos22 >= rin2)
672 rpos12 = ((xpos + dx3[rotn]) * (xpos + dx3[rotn]) + (ypos + dy3[rotn]) * (ypos + dy3[rotn]));
673 if (rpos12 <= rout2 && rpos12 >= rin2) {
674 rpos22 = ((xpos + dx6[rotn]) * (xpos + dx6[rotn]) + (ypos + dy6[rotn]) * (ypos + dy6[rotn]));
675 if (rpos22 <= rout2 && rpos22 >= rin2)
683 rotn =
static_cast<int>(
std::find(ipat2, ipat2 + 6, iok) - ipat2);
685 double rpos12 = ((xpos + dx7[rotn]) * (xpos + dx7[rotn]) + (ypos + dy7[rotn]) * (ypos + dy7[rotn]));
687 if (rpos12 <= rout2 && rpos12 >= rin2) {
688 rpos22 = ((xpos + dx9[rotn]) * (xpos + dx9[rotn]) + (ypos + dy9[rotn]) * (ypos + dy9[rotn]));
689 if (rpos22 <= rout2 && rpos22 >= rin2)
702 edm::LogVerbatim(
"HGCalGeom") <<
"I/p " << xpos <<
":" << ypos <<
":" << delX <<
":" << delY <<
":" << rin <<
":" 703 << rout <<
":" << wType <<
":" <<
mode <<
" o/p " << iok <<
":" << ncor <<
":" <<
type 716 const bool& v17OrLess,
733 double rin2 = rin * rin;
734 double rout2 = rout * rout;
738 static constexpr
int base = 10;
739 static constexpr
int base2 = 100;
764 double dx2[corner2] = {c22 * delX,
776 double dy2[corner2] = {-c88 * delY,
792 static constexpr
int nc0[corners] = {450, 150, 201, 312, 423, 534};
794 for (
int k1 = 0; k1 < 3; ++k1) {
796 double xc1 = xpos + dx0[
k];
797 double yc1 = ypos + dy0[
k];
798 rpos2 = (xc1 * xc1 + yc1 * yc1);
799 if ((rpos2 > rout2) || (rpos2 < rin2)) {
809 static constexpr
int nc10[corners] = {450, 150, 201, 312, 423, 534};
810 static constexpr
int nc11[corners] = {700, 902, 1104, 106, 308, 510};
812 for (
int k1 = 0; k1 < 3; ++k1) {
814 double xc1 = xpos + dx0[
k];
815 double yc1 = ypos + dy0[
k];
816 rpos2 = (xc1 * xc1 + yc1 * yc1);
817 if ((rpos2 > rout2) || (rpos2 < rin2)) {
825 for (
int k1 = 0; k1 < 2; ++k1) {
827 double xc1 = xpos + dx2[
k];
828 double yc1 = ypos + dy2[
k];
829 rpos2 = (xc1 * xc1 + yc1 * yc1);
830 if ((rpos2 > rout2) || (rpos2 < rin2)) {
840 static constexpr
int nc20[corners] = {450, 150, 201, 312, 423, 534};
841 static constexpr
int nc21[corners] = {30, 14, 25, 30, 41, 52};
843 for (
int k1 = 0; k1 < 3; ++k1) {
845 double xc1 = xpos + dx0[
k];
846 double yc1 = ypos + dy0[
k];
847 rpos2 = (xc1 * xc1 + yc1 * yc1);
848 if ((rpos2 > rout2) || (rpos2 < rin2)) {
856 for (
int k1 = 0; k1 < 2; ++k1) {
858 double xc1 = xpos + dx1[
k];
859 double yc1 = ypos + dy1[
k];
860 rpos2 = (xc1 * xc1 + yc1 * yc1);
861 if ((rpos2 > rout2) || (rpos2 < rin2)) {
871 static constexpr
int nc3[corners] = {3450, 1450, 2501, 3012, 4123, 5234};
873 for (
int k1 = 0; k1 < 4; ++k1) {
875 double xc1 = xpos + dx0[
k];
876 double yc1 = ypos + dy0[
k];
877 rpos2 = (xc1 * xc1 + yc1 * yc1);
878 if ((rpos2 > rout2) || (rpos2 < rin2)) {
888 static constexpr
int nc40[corners] = {3450, 1450, 2501, 3012, 4123, 5234};
889 static constexpr
int nc41[corners] = {500, 702, 904, 1106, 108, 310};
891 for (
int k1 = 0; k1 < 4; ++k1) {
893 double xc1 = xpos + dx0[
k];
894 double yc1 = ypos + dy0[
k];
895 rpos2 = (xc1 * xc1 + yc1 * yc1);
896 if ((rpos2 > rout2) || (rpos2 < rin2)) {
904 for (
int k1 = 0; k1 < 2; ++k1) {
906 double xc1 = xpos + dx2[
k];
907 double yc1 = ypos + dy2[
k];
908 rpos2 = (xc1 * xc1 + yc1 * yc1);
909 if ((rpos2 > rout2) || (rpos2 < rin2)) {
919 static constexpr
int nc50[corners] = {3450, 1450, 2501, 3012, 4123, 5234};
920 static constexpr
int nc51[corners] = {20, 13, 24, 35, 40, 51};
922 for (
int k1 = 0; k1 < 4; ++k1) {
924 double xc1 = xpos + dx0[
k];
925 double yc1 = ypos + dy0[
k];
926 rpos2 = (xc1 * xc1 + yc1 * yc1);
927 if ((rpos2 > rout2) || (rpos2 < rin2)) {
935 for (
int k1 = 0; k1 < 2; ++k1) {
937 double xc1 = xpos + dx1[
k];
938 double yc1 = ypos + dy1[
k];
939 rpos2 = (xc1 * xc1 + yc1 * yc1);
940 if ((rpos2 > rout2) || (rpos2 < rin2)) {
950 static constexpr
int nc6[corners] = {23450, 13450, 24501, 35012, 40123, 51234};
952 for (
int k1 = 0; k1 < 5; ++k1) {
954 double xc1 = xpos + dx0[
k];
955 double yc1 = ypos + dy0[
k];
956 rpos2 = (xc1 * xc1 + yc1 * yc1);
957 if ((rpos2 > rout2) || (rpos2 < rin2)) {
966 static constexpr
int nc60[corners] = {450, 150, 201, 312, 423, 534};
967 static constexpr
int nc61[corners] = {601, 803, 1005, 7, 209, 411};
969 for (
int k1 = 0; k1 < 3; ++k1) {
971 double xc1 = xpos + dx0[
k];
972 double yc1 = ypos + dy0[
k];
973 rpos2 = (xc1 * xc1 + yc1 * yc1);
974 if ((rpos2 > rout2) || (rpos2 < rin2)) {
982 for (
int k1 = 0; k1 < 2; ++k1) {
984 double xc1 = xpos + dx2[
k];
985 double yc1 = ypos + dy2[
k];
986 rpos2 = (xc1 * xc1 + yc1 * yc1);
987 if ((rpos2 > rout2) || (rpos2 < rin2)) {
997 static constexpr
int nc70[corners] = {45, 50, 1, 12, 23, 34};
998 static constexpr
int nc71[corners] = {611, 801, 1003, 5, 207, 409};
1000 for (
int k1 = 0; k1 < 2; ++k1) {
1002 double xc1 = xpos + dx0[
k];
1003 double yc1 = ypos + dy0[
k];
1004 rpos2 = (xc1 * xc1 + yc1 * yc1);
1005 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1013 for (
int k1 = 0; k1 < 2; ++k1) {
1015 double xc1 = xpos + dx2[
k];
1016 double yc1 = ypos + dy2[
k];
1017 rpos2 = (xc1 * xc1 + yc1 * yc1);
1018 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1028 for (
int k = 0;
k < corners; ++
k) {
1029 double xc1 = xpos + dx0[
k];
1030 double yc1 = ypos + dy0[
k];
1031 rpos2 = (xc1 * xc1 + yc1 * yc1);
1032 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1043 <<
":" << xpos <<
":" << ypos <<
":" << delX <<
":" << delY <<
":" << rin <<
":" 1044 << rout <<
":" <<
part <<
":" << rotn <<
" Results " <<
ok <<
":" << ncf <<
" R " 1045 << rin2 <<
":" << rout2 <<
":" << rpos2;
1052 const double& waferSize,
1056 const bool& v17OrLess) {
1058 std::vector<std::pair<double, double> >
xy;
1095 double delX = 0.5 * waferSize;
1194 double offsetx[48] = {0.0,
1292 int np[7] = {0, 1, 2, 3, 4, 5, 0};
1293 for (
int k = 0;
k < 7; ++
k)
1294 xy.push_back(std::make_pair((xpos +
dx[
np[
k]] + offsetx[
np[
k]]), (ypos +
dy[
np[
k]] + offsety[
np[
k]])));
1296 int np[6][6] = {{0, 2, 3, 4, 5, 0},
1301 {5, 1, 2, 3, 4, 5}};
1302 for (
int k = 0;
k < 6; ++
k) {
1312 {0, 3, 4, 5, 0}, {1, 4, 5, 0, 1}, {2, 5, 0, 1, 2}, {3, 0, 1, 2, 3}, {4, 1, 2, 3, 4}, {5, 2, 3, 4, 5}};
1313 for (
int k = 0;
k < 5; ++
k) {
1322 int np[6][4] = {{0, 4, 5, 0}, {1, 5, 0, 1}, {2, 0, 1, 2}, {3, 1, 2, 3}, {4, 2, 3, 4}, {5, 3, 4, 5}};
1323 for (
int k = 0;
k < 4; ++
k) {
1332 int np[6][7] = {{24, 32, 3, 4, 5, 0, 24},
1333 {25, 33, 4, 5, 0, 1, 25},
1334 {26, 34, 5, 0, 1, 2, 26},
1335 {27, 35, 0, 1, 2, 3, 27},
1336 {28, 30, 1, 2, 3, 4, 28},
1337 {29, 31, 2, 3, 4, 5, 29}};
1338 for (
int k = 0;
k < 7; ++
k) {
1347 int np[6][6] = {{6, 9, 4, 5, 0, 6},
1348 {7, 10, 5, 0, 1, 7},
1349 {8, 11, 0, 1, 2, 8},
1351 {10, 7, 2, 3, 4, 10},
1352 {11, 8, 3, 4, 5, 11}};
1353 for (
int k = 0;
k < 6; ++
k) {
1362 int np[6][7] = {{36, 42, 3, 4, 5, 0, 36},
1363 {37, 43, 4, 5, 0, 1, 37},
1364 {38, 44, 5, 0, 1, 2, 38},
1365 {39, 45, 0, 1, 2, 3, 39},
1366 {40, 46, 1, 2, 3, 4, 40},
1367 {41, 47, 2, 3, 4, 5, 41}};
1368 for (
int k = 0;
k < 7; ++
k) {
1377 int np[6][6] = {{12, 19, 4, 5, 0, 12},
1378 {13, 20, 5, 0, 1, 13},
1379 {14, 21, 0, 1, 2, 14},
1380 {15, 22, 1, 2, 3, 15},
1381 {16, 23, 2, 3, 4, 16},
1382 {17, 18, 3, 4, 5, 17}};
1383 for (
int k = 0;
k < 6; ++
k) {
1392 int np[6][6] = {{22, 15, 4, 5, 0, 22},
1393 {23, 16, 5, 0, 1, 23},
1394 {18, 17, 0, 1, 2, 18},
1395 {19, 12, 1, 2, 3, 19},
1396 {20, 13, 2, 3, 4, 20},
1397 {21, 14, 3, 4, 5, 21}};
1398 for (
int k = 0;
k < 6; ++
k) {
1407 int np[6][5] = {{45, 39, 4, 5, 45},
1412 {44, 38, 3, 4, 44}};
1413 for (
int k = 0;
k < 5; ++
k) {
1424 << xpos <<
":" << ypos <<
" O/p having " <<
xy.size() <<
" points:";
1425 std::ostringstream st1;
1426 for (
unsigned int i = 0;
i <
xy.size(); ++
i)
1435 const double& waferSize,
1439 const bool& v17OrLess) {
1440 std::vector<std::pair<double, double> >
xy;
1476 double delX = 0.5 * waferSize;
1603 double offsetx[60] = {0.0,
1725 int np[7] = {0, 1, 2, 3, 4, 5, 0};
1726 for (
int k = 0;
k < 7; ++
k)
1727 xy.push_back(std::make_pair((xpos +
dx[
np[
k]] + offsetx[
np[
k]]), (ypos +
dy[
np[
k]] + offsety[
np[
k]])));
1729 int np[12][5] = {{0, 1, 4, 5, 0},
1741 for (
int k = 0;
k < 5; ++
k) {
1742 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1743 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1746 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1750 int np[12][5] = {{1, 2, 3, 4, 1},
1762 for (
int k = 0;
k < 5; ++
k) {
1763 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1764 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1767 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1771 int np[12][6] = {{0, 1, 2, 8, 11, 0},
1773 {2, 3, 4, 10, 7, 2},
1774 {3, 4, 5, 11, 8, 3},
1776 {5, 0, 1, 7, 10, 5},
1778 {5, 11, 8, 3, 4, 5},
1779 {4, 10, 7, 2, 3, 4},
1781 {2, 8, 11, 0, 1, 2},
1782 {1, 7, 10, 5, 0, 1}};
1783 for (
int k = 0;
k < 6; ++
k) {
1784 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1785 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1788 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1792 int np[12][6] = {{5, 11, 8, 3, 4, 5},
1794 {1, 7, 10, 5, 0, 1},
1795 {2, 8, 11, 0, 1, 2},
1797 {4, 10, 7, 2, 3, 4},
1799 {0, 1, 2, 8, 11, 0},
1800 {5, 0, 1, 7, 10, 5},
1802 {3, 4, 5, 11, 8, 3},
1803 {2, 3, 4, 10, 7, 2}};
1804 for (
int k = 0;
k < 6; ++
k) {
1805 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1806 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1809 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1813 int np[12][6] = {{0, 1, 2, 57, 53, 0},
1814 {1, 2, 3, 58, 48, 1},
1815 {2, 3, 4, 59, 49, 2},
1816 {3, 4, 5, 54, 50, 3},
1817 {4, 5, 0, 55, 51, 4},
1818 {5, 0, 1, 56, 52, 5},
1819 {0, 1, 3, 58, 53, 0},
1820 {5, 0, 2, 57, 52, 5},
1821 {4, 5, 1, 56, 51, 4},
1822 {3, 4, 0, 55, 50, 3},
1823 {2, 3, 5, 54, 49, 2},
1824 {1, 2, 4, 59, 48, 1}};
1825 for (
int k = 0;
k < 6; ++
k) {
1826 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1827 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1830 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1834 int np[12][4] = {{41, 45, 4, 41},
1846 for (
int k = 0;
k < 4; ++
k) {
1847 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1848 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1851 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1855 int np[12][5] = {{0, 34, 28, 5, 0},
1867 for (
int k = 0;
k < 5; ++
k) {
1868 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1869 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1872 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1876 int np[12][7] = {{1, 2, 3, 4, 28, 34, 1},
1877 {2, 3, 4, 5, 29, 35, 2},
1878 {3, 4, 5, 0, 24, 30, 3},
1879 {4, 5, 0, 1, 25, 31, 4},
1880 {5, 0, 1, 2, 26, 32, 5},
1881 {0, 1, 2, 3, 27, 33, 0},
1882 {5, 29, 35, 2, 3, 4, 5},
1883 {4, 28, 34, 1, 2, 3, 4},
1884 {3, 27, 33, 0, 1, 2, 3},
1885 {2, 26, 32, 5, 0, 1, 2},
1886 {1, 25, 31, 4, 5, 0, 1},
1887 {0, 24, 30, 3, 4, 5, 0}};
1888 for (
int k = 0;
k < 7; ++
k) {
1889 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1890 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1893 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1897 int np[12][6] = {{0, 1, 2, 14, 21, 0},
1898 {1, 2, 3, 15, 22, 1},
1899 {2, 3, 4, 16, 23, 2},
1900 {3, 4, 5, 17, 18, 3},
1901 {4, 5, 0, 12, 19, 4},
1902 {5, 0, 1, 13, 20, 5},
1903 {0, 12, 19, 4, 5, 0},
1904 {5, 17, 18, 3, 4, 5},
1905 {4, 16, 23, 2, 3, 4},
1906 {3, 15, 22, 1, 2, 3},
1907 {2, 14, 21, 0, 1, 2},
1908 {1, 13, 20, 5, 0, 1}};
1909 for (
int k = 0;
k < 6; ++
k) {
1910 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1911 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1914 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1918 int np[12][6] = {{5, 17, 18, 3, 4, 5},
1919 {0, 12, 19, 4, 5, 0},
1920 {1, 13, 20, 5, 0, 1},
1921 {2, 14, 21, 0, 1, 2},
1922 {3, 15, 22, 1, 2, 3},
1923 {4, 16, 23, 2, 3, 4},
1924 {1, 2, 3, 15, 22, 1},
1925 {0, 1, 2, 14, 21, 0},
1926 {5, 0, 1, 13, 20, 5},
1927 {4, 5, 0, 12, 19, 4},
1928 {3, 4, 5, 17, 18, 3},
1929 {2, 3, 4, 16, 23, 2}};
1930 for (
int k = 0;
k < 6; ++
k) {
1931 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1932 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1935 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1939 int np[12][6] = {{0, 1, 2, 18, 17, 0},
1940 {1, 2, 3, 19, 12, 1},
1941 {2, 3, 4, 20, 13, 2},
1942 {3, 4, 5, 21, 14, 3},
1943 {4, 5, 0, 22, 15, 4},
1944 {5, 0, 1, 23, 16, 5},
1945 {0, 22, 15, 4, 5, 0},
1946 {5, 21, 14, 3, 4, 5},
1947 {4, 20, 13, 2, 3, 4},
1948 {3, 19, 12, 1, 2, 3},
1949 {2, 18, 17, 0, 1, 2},
1950 {1, 23, 16, 5, 0, 1}};
1951 for (
int k = 0;
k < 6; ++
k) {
1952 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1953 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1956 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1961 edm::LogVerbatim(
"HGCalGeom") <<
"I/p: " <<
part <<
":" << place <<
":" << delX <<
":" << delY <<
":" << xpos <<
":" 1962 << ypos <<
" O/p having " <<
xy.size() <<
" points:";
1963 std::ostringstream st1;
1964 for (
unsigned int i = 0;
i <
xy.size(); ++
i)
static constexpr std::array< int, 3 > edgeWaferHDBottom
static constexpr std::array< int, 3 > edgeWaferLDFive
Log< level::Info, true > LogVerbatim
static constexpr double c27O
static constexpr int32_t WaferHalf2
static constexpr std::array< int, 3 > edgeWaferLDLeft
static constexpr int32_t WaferFive2
static constexpr std::array< int, 3 > edgeWaferLDTop
auto const good
min quality of good
static constexpr std::array< int, 3 > edgeWaferHDLeft
static constexpr double c77O
static constexpr int k_OffsetRotation
static constexpr int32_t WaferSizeMax
static constexpr int32_t WaferLDThree
static constexpr std::array< int, 3 > edgeWaferLDThree
static bool goodCell(int u, int v, int N, int type, int rotn)
static constexpr int32_t WaferOut
static constexpr int32_t WaferThree
static constexpr double c50
static constexpr int32_t WaferHDFive
static constexpr double c88
static int getRotation(int zside, int type, int rotn)
static constexpr double c27
static constexpr double c10
static constexpr double sin_60_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static constexpr int32_t WaferSemi2
static std::vector< std::pair< double, double > > waferXY(const int &part, const int &orient, const int &zside, const double &waferSize, const double &offset, const double &xpos, const double &ypos, const bool &v17)
static constexpr int32_t WaferHDLeft
U second(std::pair< T, U > const &p)
static constexpr int32_t WaferFull
static constexpr int32_t WaferHalf
static constexpr int32_t WaferLDBottom
static constexpr double tan_60_
static constexpr int32_t WaferCorner1
static std::pair< int, int > getTypeMode(const double &xpos, const double &ypos, const double &delX, const double &delY, const double &rin, const double &rout, const int &waferType, const int &mode, const bool &v17, const bool &debug=false)
static constexpr double c22O
static constexpr int32_t WaferCorner5
static constexpr int32_t WaferLDRight
static constexpr int32_t WaferCorner4
static constexpr int32_t WaferCornerMax
static constexpr int32_t WaferCorner2
static constexpr int32_t WaferLDFive
static constexpr int32_t WaferCorner0
static constexpr int32_t WaferLDLeft
static constexpr double c00
static constexpr int32_t WaferHDBottom
static constexpr int32_t WaferCorner3
static constexpr std::array< int, 3 > edgeWaferHDTop
static constexpr double c88O
static bool goodTypeMode(const double &xpos, const double &ypos, const double &delX, const double &delY, const double &rin, const double &rout, const int &part, const int &rotn, const bool &v17, const bool &debug=false)
static constexpr int32_t WaferHDRight
static constexpr int32_t WaferChopTwoM
static constexpr std::array< int, 3 > edgeWaferLDRight
static constexpr double c77
static constexpr double c61
static constexpr double cos_60_
static constexpr double c61O
static constexpr int32_t WaferLDTop
static constexpr double c75
static constexpr double c22
static constexpr std::array< int, 3 > edgeWaferHDFive
static constexpr int32_t WaferHDTop
static constexpr int32_t WaferFive
static constexpr int32_t WaferSemi
static constexpr std::array< int, 3 > edgeWaferHDRight
static constexpr std::array< int, 3 > edgeWaferLDBottom
static constexpr int32_t WaferChopTwo
static bool maskCell(int u, int v, int N, int ncor, int fcor, int corners)