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 delX,
double delY,
double xpos,
double ypos) {
1078 std::vector<std::pair<double, double> >
xy;
1119 int np[7] = {0, 1, 2, 3, 4, 5, 0};
1120 for (
int k = 0;
k < 7; ++
k)
1121 xy.push_back(std::make_pair((xpos +
dx[
np[
k]]), (ypos +
dy[
np[
k]])));
1123 int np[6][6] = {{0, 2, 3, 4, 5, 0},
1128 {5, 1, 2, 3, 4, 5}};
1129 for (
int k = 0;
k < 6; ++
k) {
1138 {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}};
1139 for (
int k = 0;
k < 5; ++
k) {
1147 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}};
1148 for (
int k = 0;
k < 4; ++
k) {
1156 int np[6][7] = {{6, 8, 3, 4, 5, 0, 6},
1157 {7, 9, 4, 5, 0, 1, 7},
1158 {8, 10, 5, 0, 1, 2, 8},
1159 {9, 11, 0, 1, 2, 3, 9},
1160 {10, 6, 1, 2, 3, 4, 10},
1161 {11, 7, 2, 3, 4, 5, 11}};
1162 for (
int k = 0;
k < 7; ++
k) {
1170 int np[6][6] = {{6, 9, 4, 5, 0, 6},
1171 {7, 10, 5, 0, 1, 7},
1172 {8, 11, 0, 1, 2, 8},
1174 {10, 7, 2, 3, 4, 10},
1175 {11, 8, 3, 4, 5, 11}};
1176 for (
int k = 0;
k < 6; ++
k) {
1184 int np[6][7] = {{12, 18, 3, 4, 5, 0, 12},
1185 {13, 19, 4, 5, 0, 1, 13},
1186 {14, 20, 5, 0, 1, 2, 14},
1187 {15, 21, 0, 1, 2, 3, 15},
1188 {16, 22, 1, 2, 3, 4, 16},
1189 {17, 23, 2, 3, 4, 5, 17}};
1190 for (
int k = 0;
k < 7; ++
k) {
1198 int np[6][6] = {{12, 19, 4, 5, 0, 12},
1199 {13, 20, 5, 0, 1, 13},
1200 {14, 21, 0, 1, 2, 14},
1201 {15, 22, 1, 2, 3, 15},
1202 {16, 23, 2, 3, 4, 16},
1203 {17, 18, 3, 4, 5, 17}};
1204 for (
int k = 0;
k < 6; ++
k) {
1212 int np[6][6] = {{22, 15, 4, 5, 0, 22},
1213 {23, 16, 5, 0, 1, 23},
1214 {18, 17, 0, 1, 2, 18},
1215 {19, 12, 1, 2, 3, 19},
1216 {20, 13, 2, 3, 4, 20},
1217 {21, 14, 3, 4, 5, 21}};
1218 for (
int k = 0;
k < 6; ++
k) {
1226 int np[6][5] = {{21, 15, 4, 5, 21},
1231 {20, 14, 3, 4, 20}};
1232 for (
int k = 0;
k < 5; ++
k) {
1242 << xpos <<
":" << ypos <<
" O/p having " <<
xy.size() <<
" points:";
1243 std::ostringstream st1;
1244 for (
unsigned int i = 0;
i <
xy.size(); ++
i)
1252 int part,
int place,
double waferSize,
double offset,
double xpos,
double ypos) {
1253 std::vector<std::pair<double, double> >
xy;
1282 double delX = 0.5 * waferSize;
1303 double offsetx[36] = {0.0,
1377 int np[7] = {0, 1, 2, 3, 4, 5, 0};
1378 for (
int k = 0;
k < 7; ++
k)
1379 xy.push_back(std::make_pair((xpos +
dx[
np[
k]] + offsetx[
np[
k]]), (ypos +
dy[
np[
k]] + offsety[
np[
k]])));
1381 int np[12][5] = {{0, 1, 4, 5, 0},
1393 for (
int k = 0;
k < 5; ++
k) {
1394 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1395 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1398 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1402 int np[12][5] = {{1, 2, 3, 4, 1},
1414 for (
int k = 0;
k < 5; ++
k) {
1415 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1416 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1419 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1423 int np[12][6] = {{0, 1, 2, 8, 11, 0},
1425 {2, 3, 4, 10, 7, 2},
1426 {3, 4, 5, 11, 8, 3},
1428 {5, 0, 1, 7, 10, 5},
1430 {5, 11, 8, 3, 4, 5},
1431 {4, 10, 7, 2, 3, 4},
1433 {2, 8, 11, 0, 1, 2},
1434 {1, 7, 10, 5, 0, 1}};
1435 for (
int k = 0;
k < 6; ++
k) {
1436 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1437 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1440 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1444 int np[12][6] = {{5, 11, 8, 3, 4, 5},
1446 {1, 7, 10, 5, 0, 1},
1447 {2, 8, 11, 0, 1, 2},
1449 {4, 10, 7, 2, 3, 4},
1451 {0, 1, 2, 8, 11, 0},
1452 {5, 0, 1, 7, 10, 5},
1454 {3, 4, 5, 11, 8, 3},
1455 {2, 3, 4, 10, 7, 2}};
1456 for (
int k = 0;
k < 6; ++
k) {
1457 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1458 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1461 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1465 int np[12][6] = {{0, 1, 2, 3, 5, 0},
1476 {1, 2, 4, 5, 0, 1}};
1477 for (
int k = 0;
k < 6; ++
k) {
1478 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1479 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1482 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1486 int np[12][4] = {{5, 3, 4, 5},
1498 for (
int k = 0;
k < 4; ++
k) {
1499 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1500 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1503 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1507 int np[12][5] = {{0, 34, 28, 5, 0},
1519 for (
int k = 0;
k < 5; ++
k) {
1520 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1521 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1524 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1528 int np[12][7] = {{1, 2, 3, 4, 28, 34, 1},
1529 {2, 3, 4, 5, 29, 35, 2},
1530 {3, 4, 5, 0, 24, 30, 3},
1531 {4, 5, 0, 1, 25, 31, 4},
1532 {5, 0, 1, 2, 26, 32, 5},
1533 {0, 1, 2, 3, 27, 33, 0},
1534 {5, 29, 35, 2, 3, 4, 5},
1535 {4, 28, 34, 1, 2, 3, 4},
1536 {3, 27, 33, 0, 1, 2, 3},
1537 {2, 26, 32, 5, 0, 1, 2},
1538 {1, 25, 31, 4, 5, 0, 1},
1539 {0, 24, 30, 3, 4, 5, 0}};
1540 for (
int k = 0;
k < 7; ++
k) {
1541 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1542 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1545 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1549 int np[12][6] = {{0, 1, 2, 14, 21, 0},
1550 {1, 2, 3, 15, 22, 1},
1551 {2, 3, 4, 16, 23, 2},
1552 {3, 4, 5, 17, 18, 3},
1553 {4, 5, 0, 12, 19, 4},
1554 {5, 0, 1, 13, 20, 5},
1555 {0, 12, 19, 4, 5, 0},
1556 {5, 17, 18, 3, 4, 5},
1557 {4, 16, 23, 2, 3, 4},
1558 {3, 15, 22, 1, 2, 3},
1559 {2, 14, 21, 0, 1, 2},
1560 {1, 13, 20, 5, 0, 1}};
1561 for (
int k = 0;
k < 6; ++
k) {
1562 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1563 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1566 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1570 int np[12][6] = {{5, 17, 18, 3, 4, 5},
1571 {0, 12, 19, 4, 5, 0},
1572 {1, 13, 20, 5, 0, 1},
1573 {2, 14, 21, 0, 1, 2},
1574 {3, 15, 22, 1, 2, 3},
1575 {4, 16, 23, 2, 3, 4},
1576 {1, 2, 3, 15, 22, 1},
1577 {0, 1, 2, 14, 21, 0},
1578 {5, 0, 1, 13, 20, 5},
1579 {4, 5, 0, 12, 19, 4},
1580 {3, 4, 5, 17, 18, 3},
1581 {2, 3, 4, 16, 23, 2}};
1582 for (
int k = 0;
k < 6; ++
k) {
1583 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1584 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1587 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1591 int np[12][6] = {{0, 1, 2, 18, 17, 0},
1592 {1, 2, 3, 19, 12, 1},
1593 {2, 3, 4, 20, 13, 2},
1594 {3, 4, 5, 21, 14, 3},
1595 {4, 5, 0, 22, 15, 4},
1596 {5, 0, 1, 23, 16, 5},
1597 {0, 22, 15, 4, 5, 0},
1598 {5, 21, 14, 3, 4, 5},
1599 {4, 20, 13, 2, 3, 4},
1600 {3, 19, 12, 1, 2, 3},
1601 {2, 18, 17, 0, 1, 2},
1602 {1, 23, 16, 5, 0, 1}};
1603 for (
int k = 0;
k < 6; ++
k) {
1604 xy.push_back(std::make_pair((xpos +
dx[
np[place][
k]] + offsetx[
np[place][
k]]),
1605 (ypos +
dy[
np[place][
k]] + offsety[
np[place][
k]])));
1608 <<
":" <<
dy[
np[place][
k]] + offsety[
np[place][
k]];
1613 edm::LogVerbatim(
"HGCalGeom") <<
"I/p: " <<
part <<
":" << place <<
":" << delX <<
":" << delY <<
":" << xpos <<
":" 1614 << ypos <<
" O/p having " <<
xy.size() <<
" points:";
1615 std::ostringstream st1;
1616 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 std::vector< std::pair< double, double > > waferXY(int part, int orient, int zside, double delX, double delY, double xpos, double ypos)
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 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)