7 for (
int k = 0;
k < 2; ++
k) {
17 switch (placementIndex) {
67 return std::make_pair(
x, y);
77 const std::vector<double> fcos = {1.0, 0.5, -0.5, -1.0, -0.5, 0.5};
79 x = x0 * fcos[placementIndex] - y0 * fsin[placementIndex];
80 y = x0 * fsin[placementIndex] + y0 * fcos[placementIndex];
84 const std::vector<double> fcos = {0.5, 1.0, 0.5, -0.5, -1.0, -0.5};
91 return std::make_pair(
x, y);
99 const std::vector<int> itype0 = {0, 7, 8, 9, 10, 11, 6, 3, 4, 5, 4, 5, 3};
100 const std::vector<int> itype1 = {0, 0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 1, 2};
101 const std::vector<int> itype2 = {0, 11, 6, 7, 8, 9, 10, 5, 3, 4, 3, 4, 5};
102 const std::vector<int> itype3 = {0, 4, 5, 0, 1, 2, 3, 2, 0, 1, 2, 0, 1};
103 const std::vector<int> itype4 = {0, 9, 10, 11, 6, 7, 8, 4, 5, 3, 5, 3, 4};
104 const std::vector<int> itype5 = {0, 2, 3, 4, 5, 0, 1, 1, 2, 0, 1, 2, 0};
105 if (u == 0 && v == 0) {
108 }
else if (u == 0 && (v - u) == (
ncell_[type] - 1)) {
111 }
else if ((v - u) == (
ncell_[type] - 1) && v == (2 *
ncell_[type] - 1)) {
114 }
else if (u == (2 *
ncell_[type] - 1) && v == (2 *
ncell_[type] - 1)) {
117 }
else if (u == (2 *
ncell_[type] - 1) && (u - v) ==
ncell_[type]) {
120 }
else if ((u - v) ==
ncell_[type] && v == 0) {
126 }
else if ((v - u) == (
ncell_[type] - 1)) {
129 }
else if (v == (2 *
ncell_[type] - 1)) {
132 }
else if (u == (2 *
ncell_[type] - 1)) {
135 }
else if ((u - v) ==
ncell_[type]) {
142 switch (placementIndex) {
144 cell = itype0[cellx];
147 cell = itype1[cellx];
150 cell = itype2[cellx];
153 cell = itype3[cellx];
156 cell = itype4[cellx];
159 cell = itype5[cellx];
163 const std::vector<int> itype0 = {0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 0, 1, 2};
164 const std::vector<int> itype1 = {0, 8, 9, 10, 11, 6, 7, 4, 5, 3, 4, 5, 3};
165 const std::vector<int> itype2 = {0, 3, 4, 5, 0, 1, 2, 2, 0, 1, 1, 2, 0};
166 const std::vector<int> itype3 = {0, 10, 11, 6, 7, 8, 9, 5, 3, 4, 5, 3, 4};
167 const std::vector<int> itype4 = {0, 5, 0, 1, 2, 3, 4, 0, 1, 2, 2, 0, 1};
168 const std::vector<int> itype5 = {0, 6, 7, 8, 9, 10, 11, 3, 4, 5, 3, 4, 5};
169 if (u == 0 && v == 0) {
172 }
else if (v == 0 && (u - v) == (
ncell_[type])) {
175 }
else if ((u - v) == (
ncell_[type]) && u == (2 *
ncell_[type] - 1)) {
178 }
else if (u == (2 *
ncell_[type] - 1) && v == (2 *
ncell_[type] - 1)) {
181 }
else if (v == (2 *
ncell_[type] - 1) && (v - u) == (
ncell_[type] - 1)) {
184 }
else if ((v - u) == (
ncell_[type] - 1) && u == 0) {
190 }
else if ((u - v) ==
ncell_[type]) {
193 }
else if (u == (2 *
ncell_[type] - 1)) {
196 }
else if (v == (2 *
ncell_[type] - 1)) {
199 }
else if ((v - u) == (
ncell_[type] - 1)) {
206 switch (placementIndex) {
208 cell = itype0[cellx];
211 cell = itype1[cellx];
214 cell = itype2[cellx];
217 cell = itype3[cellx];
220 cell = itype4[cellx];
223 cell = itype5[cellx];
227 return std::make_pair(cell, cellt);
static constexpr int32_t fullCell
std::pair< int32_t, int32_t > HGCalCellUV2Cell(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t cellPlacementIndex8
static constexpr int32_t cellPlacementIndex3
static constexpr int32_t cellPlacementIndex10
static constexpr int32_t cellPlacementIndex0
std::pair< double, double > HGCalCellUV2XY2(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t cellPlacementIndex9
static int32_t HGCalCellPlacementIndex(int32_t iz, int32_t fwdBack, int32_t orient)
HGCalCell(double waferSize, int32_t nFine, int32_t nCoarse)
std::pair< double, double > HGCalCellUV2XY1(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t cellPlacementIndex7
static constexpr int32_t truncatedCell
static constexpr int32_t extendedCell
static constexpr int32_t cellPlacementIndex11
static constexpr int32_t cornerCell
static constexpr int32_t cellPlacementIndex4
static constexpr int32_t cellPlacementIndex1
static constexpr int32_t cellPlacementIndex6
static constexpr int32_t cellPlacementIndex2
static constexpr int32_t cellPlacementExtra