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];
518 static constexpr
int corners = 6;
519 static constexpr
int base = 10;
520 double rin2 = rin * rin;
521 double rout2 = rout * rout;
534 double xc[corners], yc[corners];
535 for (
int k = 0;
k < corners; ++
k) {
536 xc[
k] = xpos + dx0[
k];
537 yc[
k] = ypos + dy0[
k];
538 double rpos2 = (xc[
k] * xc[
k] + yc[
k] * yc[
k]);
539 if (rpos2 <= rout2 && rpos2 >= rin2) {
541 iok = iok *
base + 1;
547 edm::LogVerbatim(
"HGCalGeom") <<
"I/p " << xpos <<
":" << ypos <<
":" << delX <<
":" << delY <<
":" << rin <<
":" 548 << rout <<
":" << wType <<
":" <<
mode <<
" Corners " << ncor <<
" iok " << iok;
550 static constexpr
int ipat5[corners] = {101111, 110111, 111011, 111101, 111110, 11111};
551 static constexpr
int ipat4[corners] = {100111, 110011, 111001, 111100, 11110, 1111};
552 static constexpr
int ipat3[corners] = {100011, 110001, 111000, 11100, 1110, 111};
553 static constexpr
int ipat2[corners] = {11, 100001, 110000, 11000, 1100, 110};
665 rotn =
static_cast<int>(
std::find(ipat5, ipat5 + 6, iok) - ipat5);
668 rotn =
static_cast<int>(
std::find(ipat4, ipat4 + 6, iok) - ipat4);
670 double rpos12 = ((xpos + dx1[rotn]) * (xpos + dx1[rotn]) + (ypos + dy1[rotn]) * (ypos + dy1[rotn]));
672 if (rpos12 <= rout2 && rpos12 >= rin2) {
673 rpos22 = ((xpos + dx2[rotn]) * (xpos + dx2[rotn]) + (ypos + dy2[rotn]) * (ypos + dy2[rotn]));
674 if (rpos22 <= rout2 && rpos22 >= rin2)
681 rpos12 = ((xpos + dx3[rotn]) * (xpos + dx3[rotn]) + (ypos + dy3[rotn]) * (ypos + dy3[rotn]));
682 if (rpos12 <= rout2 && rpos12 >= rin2) {
683 rpos22 = ((xpos + dx4[rotn]) * (xpos + dx4[rotn]) + (ypos + dy4[rotn]) * (ypos + dy4[rotn]));
684 if (rpos22 <= rout2 && rpos22 >= rin2)
692 rotn =
static_cast<int>(
std::find(ipat3, ipat3 + 6, iok) - ipat3);
694 double rpos12 = ((xpos + dx7[rotn]) * (xpos + dx7[rotn]) + (ypos + dy7[rotn]) * (ypos + dy7[rotn]));
696 if (rpos12 <= rout2 && rpos12 >= rin2) {
697 rpos22 = ((xpos + dx8[rotn]) * (xpos + dx8[rotn]) + (ypos + dy8[rotn]) * (ypos + dy8[rotn]));
698 if (rpos22 <= rout2 && rpos22 >= rin2)
705 rpos12 = ((xpos + dx1[rotn]) * (xpos + dx1[rotn]) + (ypos + dy1[rotn]) * (ypos + dy1[rotn]));
706 if (rpos12 <= rout2 && rpos12 >= rin2) {
707 rpos22 = ((xpos + dx5[rotn]) * (xpos + dx5[rotn]) + (ypos + dy5[rotn]) * (ypos + dy5[rotn]));
708 if (rpos22 <= rout2 && rpos22 >= rin2)
716 rpos12 = ((xpos + dx3[rotn]) * (xpos + dx3[rotn]) + (ypos + dy3[rotn]) * (ypos + dy3[rotn]));
717 if (rpos12 <= rout2 && rpos12 >= rin2) {
718 rpos22 = ((xpos + dx6[rotn]) * (xpos + dx6[rotn]) + (ypos + dy6[rotn]) * (ypos + dy6[rotn]));
719 if (rpos22 <= rout2 && rpos22 >= rin2)
727 rotn =
static_cast<int>(
std::find(ipat2, ipat2 + 6, iok) - ipat2);
729 double rpos12 = ((xpos + dx7[rotn]) * (xpos + dx7[rotn]) + (ypos + dy7[rotn]) * (ypos + dy7[rotn]));
731 if (rpos12 <= rout2 && rpos12 >= rin2) {
732 rpos22 = ((xpos + dx9[rotn]) * (xpos + dx9[rotn]) + (ypos + dy9[rotn]) * (ypos + dy9[rotn]));
733 if (rpos22 <= rout2 && rpos22 >= rin2)
746 edm::LogVerbatim(
"HGCalGeom") <<
"I/p " << xpos <<
":" << ypos <<
":" << delX <<
":" << delY <<
":" << rin <<
":" 747 << rout <<
":" << wType <<
":" <<
mode <<
" o/p " << iok <<
":" << ncor <<
":" <<
type 753 double xpos,
double ypos,
double delX,
double delY,
double rin,
double rout,
int part,
int rotn,
bool debug) {
759 double rin2 = rin * rin;
760 double rout2 = rout * rout;
764 static constexpr
int base = 10;
765 static constexpr
int base2 = 100;
818 static constexpr
int nc0[corners] = {450, 150, 201, 312, 423, 534};
820 for (
int k1 = 0; k1 < 3; ++k1) {
822 double xc1 = xpos + dx0[
k];
823 double yc1 = ypos + dy0[
k];
824 rpos2 = (xc1 * xc1 + yc1 * yc1);
825 if ((rpos2 > rout2) || (rpos2 < rin2)) {
835 static constexpr
int nc10[corners] = {450, 150, 201, 312, 423, 534};
836 static constexpr
int nc11[corners] = {700, 902, 1104, 106, 308, 510};
838 for (
int k1 = 0; k1 < 3; ++k1) {
840 double xc1 = xpos + dx0[
k];
841 double yc1 = ypos + dy0[
k];
842 rpos2 = (xc1 * xc1 + yc1 * yc1);
843 if ((rpos2 > rout2) || (rpos2 < rin2)) {
851 for (
int k1 = 0; k1 < 2; ++k1) {
853 double xc1 = xpos + dx2[
k];
854 double yc1 = ypos + dy2[
k];
855 rpos2 = (xc1 * xc1 + yc1 * yc1);
856 if ((rpos2 > rout2) || (rpos2 < rin2)) {
866 static constexpr
int nc20[corners] = {450, 150, 201, 312, 423, 534};
867 static constexpr
int nc21[corners] = {30, 14, 25, 30, 41, 52};
869 for (
int k1 = 0; k1 < 3; ++k1) {
871 double xc1 = xpos + dx0[
k];
872 double yc1 = ypos + dy0[
k];
873 rpos2 = (xc1 * xc1 + yc1 * yc1);
874 if ((rpos2 > rout2) || (rpos2 < rin2)) {
882 for (
int k1 = 0; k1 < 2; ++k1) {
884 double xc1 = xpos + dx1[
k];
885 double yc1 = ypos + dy1[
k];
886 rpos2 = (xc1 * xc1 + yc1 * yc1);
887 if ((rpos2 > rout2) || (rpos2 < rin2)) {
897 static constexpr
int nc3[corners] = {3450, 1450, 2501, 3012, 4123, 5234};
899 for (
int k1 = 0; k1 < 4; ++k1) {
901 double xc1 = xpos + dx0[
k];
902 double yc1 = ypos + dy0[
k];
903 rpos2 = (xc1 * xc1 + yc1 * yc1);
904 if ((rpos2 > rout2) || (rpos2 < rin2)) {
914 static constexpr
int nc40[corners] = {3450, 1450, 2501, 3012, 4123, 5234};
915 static constexpr
int nc41[corners] = {500, 702, 904, 1106, 108, 310};
917 for (
int k1 = 0; k1 < 4; ++k1) {
919 double xc1 = xpos + dx0[
k];
920 double yc1 = ypos + dy0[
k];
921 rpos2 = (xc1 * xc1 + yc1 * yc1);
922 if ((rpos2 > rout2) || (rpos2 < rin2)) {
930 for (
int k1 = 0; k1 < 2; ++k1) {
932 double xc1 = xpos + dx2[
k];
933 double yc1 = ypos + dy2[
k];
934 rpos2 = (xc1 * xc1 + yc1 * yc1);
935 if ((rpos2 > rout2) || (rpos2 < rin2)) {
945 static constexpr
int nc50[corners] = {3450, 1450, 2501, 3012, 4123, 5234};
946 static constexpr
int nc51[corners] = {20, 13, 24, 35, 40, 51};
948 for (
int k1 = 0; k1 < 4; ++k1) {
950 double xc1 = xpos + dx0[
k];
951 double yc1 = ypos + dy0[
k];
952 rpos2 = (xc1 * xc1 + yc1 * yc1);
953 if ((rpos2 > rout2) || (rpos2 < rin2)) {
961 for (
int k1 = 0; k1 < 2; ++k1) {
963 double xc1 = xpos + dx1[
k];
964 double yc1 = ypos + dy1[
k];
965 rpos2 = (xc1 * xc1 + yc1 * yc1);
966 if ((rpos2 > rout2) || (rpos2 < rin2)) {
976 static constexpr
int nc6[corners] = {23450, 13450, 24501, 35012, 40123, 51234};
978 for (
int k1 = 0; k1 < 5; ++k1) {
980 double xc1 = xpos + dx0[
k];
981 double yc1 = ypos + dy0[
k];
982 rpos2 = (xc1 * xc1 + yc1 * yc1);
983 if ((rpos2 > rout2) || (rpos2 < rin2)) {
992 static constexpr
int nc60[corners] = {450, 150, 201, 312, 423, 534};
993 static constexpr
int nc61[corners] = {601, 803, 1005, 7, 209, 411};
995 for (
int k1 = 0; k1 < 3; ++k1) {
997 double xc1 = xpos + dx0[
k];
998 double yc1 = ypos + dy0[
k];
999 rpos2 = (xc1 * xc1 + yc1 * yc1);
1000 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1008 for (
int k1 = 0; k1 < 2; ++k1) {
1010 double xc1 = xpos + dx2[
k];
1011 double yc1 = ypos + dy2[
k];
1012 rpos2 = (xc1 * xc1 + yc1 * yc1);
1013 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1023 static constexpr
int nc70[corners] = {45, 50, 1, 12, 23, 34};
1024 static constexpr
int nc71[corners] = {611, 801, 1003, 5, 207, 409};
1025 int nc = nc70[rotn];
1026 for (
int k1 = 0; k1 < 2; ++k1) {
1028 double xc1 = xpos + dx0[
k];
1029 double yc1 = ypos + dy0[
k];
1030 rpos2 = (xc1 * xc1 + yc1 * yc1);
1031 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1039 for (
int k1 = 0; k1 < 2; ++k1) {
1041 double xc1 = xpos + dx2[
k];
1042 double yc1 = ypos + dy2[
k];
1043 rpos2 = (xc1 * xc1 + yc1 * yc1);
1044 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1054 for (
int k = 0;
k < corners; ++
k) {
1055 double xc1 = xpos + dx0[
k];
1056 double yc1 = ypos + dy0[
k];
1057 rpos2 = (xc1 * xc1 + yc1 * yc1);
1058 if ((rpos2 > rout2) || (rpos2 < rin2)) {
1069 <<
":" << xpos <<
":" << ypos <<
":" << delX <<
":" << delY <<
":" << rin <<
":" 1070 << rout <<
":" <<
part <<
":" << rotn <<
" Results " <<
ok <<
":" << ncf <<
" R " 1071 << rin2 <<
":" << rout2 <<
":" << rpos2;
1076 int part,
int ori,
int zside,
double waferSize,
double offset,
double xpos,
double ypos) {
1078 std::vector<std::pair<double, double> >
xy;
1106 double delX = 0.5 * waferSize;
1133 double offsetx[48] = {0.0,
1231 int np[7] = {0, 1, 2, 3, 4, 5, 0};
1232 for (
int k = 0;
k < 7; ++
k)
1233 xy.push_back(std::make_pair((xpos +
dx[
np[
k]] + offsetx[
np[
k]]), (ypos +
dy[
np[
k]] + offsety[
np[
k]])));
1235 int np[6][6] = {{0, 2, 3, 4, 5, 0},
1240 {5, 1, 2, 3, 4, 5}};
1241 for (
int k = 0;
k < 6; ++
k) {
1251 {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}};
1252 for (
int k = 0;
k < 5; ++
k) {
1261 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}};
1262 for (
int k = 0;
k < 4; ++
k) {
1271 int np[6][7] = {{24, 32, 3, 4, 5, 0, 24},
1272 {25, 33, 4, 5, 0, 1, 25},
1273 {26, 34, 5, 0, 1, 2, 26},
1274 {27, 35, 0, 1, 2, 3, 27},
1275 {28, 30, 1, 2, 3, 4, 28},
1276 {29, 31, 2, 3, 4, 5, 29}};
1277 for (
int k = 0;
k < 7; ++
k) {
1286 int np[6][6] = {{6, 9, 4, 5, 0, 6},
1287 {7, 10, 5, 0, 1, 7},
1288 {8, 11, 0, 1, 2, 8},
1290 {10, 7, 2, 3, 4, 10},
1291 {11, 8, 3, 4, 5, 11}};
1292 for (
int k = 0;
k < 6; ++
k) {
1301 int np[6][7] = {{36, 42, 3, 4, 5, 0, 36},
1302 {37, 43, 4, 5, 0, 1, 37},
1303 {38, 44, 5, 0, 1, 2, 38},
1304 {39, 45, 0, 1, 2, 3, 39},
1305 {40, 46, 1, 2, 3, 4, 40},
1306 {41, 47, 2, 3, 4, 5, 41}};
1307 for (
int k = 0;
k < 7; ++
k) {
1316 int np[6][6] = {{12, 19, 4, 5, 0, 12},
1317 {13, 20, 5, 0, 1, 13},
1318 {14, 21, 0, 1, 2, 14},
1319 {15, 22, 1, 2, 3, 15},
1320 {16, 23, 2, 3, 4, 16},
1321 {17, 18, 3, 4, 5, 17}};
1322 for (
int k = 0;
k < 6; ++
k) {
1331 int np[6][6] = {{22, 15, 4, 5, 0, 22},
1332 {23, 16, 5, 0, 1, 23},
1333 {18, 17, 0, 1, 2, 18},
1334 {19, 12, 1, 2, 3, 19},
1335 {20, 13, 2, 3, 4, 20},
1336 {21, 14, 3, 4, 5, 21}};
1337 for (
int k = 0;
k < 6; ++
k) {
1346 int np[6][5] = {{45, 39, 4, 5, 45},
1351 {44, 38, 3, 4, 44}};
1352 for (
int k = 0;
k < 5; ++
k) {
1363 << xpos <<
":" << ypos <<
" O/p having " <<
xy.size() <<
" points:";
1364 std::ostringstream st1;
1365 for (
unsigned int i = 0;
i <
xy.size(); ++
i)
1373 int part,
int place,
double waferSize,
double offset,
double xpos,
double ypos) {
1374 std::vector<std::pair<double, double> >
xy;
1401 double delX = 0.5 * waferSize;
1438 double offsetx[60] = {0.0,
1560 int np[7] = {0, 1, 2, 3, 4, 5, 0};
1561 for (
int k = 0;
k < 7; ++
k)
1562 xy.push_back(std::make_pair((xpos +
dx[
np[
k]] + offsetx[
np[
k]]), (ypos +
dy[
np[
k]] + offsety[
np[
k]])));
1564 int np[12][5] = {{0, 1, 4, 5, 0},
1576 for (
int k = 0;
k < 5; ++
k) {
1577 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1578 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1581 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1585 int np[12][5] = {{1, 2, 3, 4, 1},
1597 for (
int k = 0;
k < 5; ++
k) {
1598 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1599 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1602 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1606 int np[12][6] = {{0, 1, 2, 8, 11, 0},
1608 {2, 3, 4, 10, 7, 2},
1609 {3, 4, 5, 11, 8, 3},
1611 {5, 0, 1, 7, 10, 5},
1613 {5, 11, 8, 3, 4, 5},
1614 {4, 10, 7, 2, 3, 4},
1616 {2, 8, 11, 0, 1, 2},
1617 {1, 7, 10, 5, 0, 1}};
1618 for (
int k = 0;
k < 6; ++
k) {
1619 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1620 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1623 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1627 int np[12][6] = {{5, 11, 8, 3, 4, 5},
1629 {1, 7, 10, 5, 0, 1},
1630 {2, 8, 11, 0, 1, 2},
1632 {4, 10, 7, 2, 3, 4},
1634 {0, 1, 2, 8, 11, 0},
1635 {5, 0, 1, 7, 10, 5},
1637 {3, 4, 5, 11, 8, 3},
1638 {2, 3, 4, 10, 7, 2}};
1639 for (
int k = 0;
k < 6; ++
k) {
1640 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1641 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1644 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1648 int np[12][6] = {{0, 1, 2, 57, 53, 0},
1649 {1, 2, 3, 58, 48, 1},
1650 {2, 3, 4, 59, 49, 2},
1651 {3, 4, 5, 54, 50, 3},
1652 {4, 5, 0, 55, 51, 4},
1653 {5, 0, 1, 56, 52, 5},
1654 {0, 1, 3, 58, 53, 0},
1655 {5, 0, 2, 57, 52, 5},
1656 {4, 5, 1, 56, 51, 4},
1657 {3, 4, 0, 55, 50, 3},
1658 {2, 3, 5, 54, 49, 2},
1659 {1, 2, 4, 59, 48, 1}};
1660 for (
int k = 0;
k < 6; ++
k) {
1661 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1662 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1665 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1669 int np[12][4] = {{41, 45, 4, 41},
1681 for (
int k = 0;
k < 4; ++
k) {
1682 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1683 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1686 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1690 int np[12][5] = {{0, 34, 28, 5, 0},
1702 for (
int k = 0;
k < 5; ++
k) {
1703 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1704 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1707 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1711 int np[12][7] = {{1, 2, 3, 4, 28, 34, 1},
1712 {2, 3, 4, 5, 29, 35, 2},
1713 {3, 4, 5, 0, 24, 30, 3},
1714 {4, 5, 0, 1, 25, 31, 4},
1715 {5, 0, 1, 2, 26, 32, 5},
1716 {0, 1, 2, 3, 27, 33, 0},
1717 {5, 29, 35, 2, 3, 4, 5},
1718 {4, 28, 34, 1, 2, 3, 4},
1719 {3, 27, 33, 0, 1, 2, 3},
1720 {2, 26, 32, 5, 0, 1, 2},
1721 {1, 25, 31, 4, 5, 0, 1},
1722 {0, 24, 30, 3, 4, 5, 0}};
1723 for (
int k = 0;
k < 7; ++
k) {
1724 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1725 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1728 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1732 int np[12][6] = {{0, 1, 2, 14, 21, 0},
1733 {1, 2, 3, 15, 22, 1},
1734 {2, 3, 4, 16, 23, 2},
1735 {3, 4, 5, 17, 18, 3},
1736 {4, 5, 0, 12, 19, 4},
1737 {5, 0, 1, 13, 20, 5},
1738 {0, 12, 19, 4, 5, 0},
1739 {5, 17, 18, 3, 4, 5},
1740 {4, 16, 23, 2, 3, 4},
1741 {3, 15, 22, 1, 2, 3},
1742 {2, 14, 21, 0, 1, 2},
1743 {1, 13, 20, 5, 0, 1}};
1744 for (
int k = 0;
k < 6; ++
k) {
1745 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1746 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1749 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1753 int np[12][6] = {{5, 17, 18, 3, 4, 5},
1754 {0, 12, 19, 4, 5, 0},
1755 {1, 13, 20, 5, 0, 1},
1756 {2, 14, 21, 0, 1, 2},
1757 {3, 15, 22, 1, 2, 3},
1758 {4, 16, 23, 2, 3, 4},
1759 {1, 2, 3, 15, 22, 1},
1760 {0, 1, 2, 14, 21, 0},
1761 {5, 0, 1, 13, 20, 5},
1762 {4, 5, 0, 12, 19, 4},
1763 {3, 4, 5, 17, 18, 3},
1764 {2, 3, 4, 16, 23, 2}};
1765 for (
int k = 0;
k < 6; ++
k) {
1766 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1767 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1770 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1774 int np[12][6] = {{0, 1, 2, 18, 17, 0},
1775 {1, 2, 3, 19, 12, 1},
1776 {2, 3, 4, 20, 13, 2},
1777 {3, 4, 5, 21, 14, 3},
1778 {4, 5, 0, 22, 15, 4},
1779 {5, 0, 1, 23, 16, 5},
1780 {0, 22, 15, 4, 5, 0},
1781 {5, 21, 14, 3, 4, 5},
1782 {4, 20, 13, 2, 3, 4},
1783 {3, 19, 12, 1, 2, 3},
1784 {2, 18, 17, 0, 1, 2},
1785 {1, 23, 16, 5, 0, 1}};
1786 for (
int k = 0;
k < 6; ++
k) {
1787 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1788 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1791 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1796 edm::LogVerbatim(
"HGCalGeom") <<
"I/p: " <<
part <<
":" << place <<
":" << delX <<
":" << delY <<
":" << xpos <<
":" 1797 << ypos <<
" O/p having " <<
xy.size() <<
" points:";
1798 std::ostringstream st1;
1799 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 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 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(int part, int orient, int zside, double waferSize, double offset, double xpos, double ypos)
static constexpr int32_t WaferHDLeft
static bool goodTypeMode(double xpos, double ypos, double delX, double delY, double rin, double rout, int part, int rotn, bool debug=false)
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 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 int32_t WaferHDRight
static constexpr int32_t WaferChopTwoM
static constexpr std::array< int, 3 > edgeWaferLDRight
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, bool debug=false)
static constexpr double c77
static constexpr double c61
static constexpr double cos_60_
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)