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)) {
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) {
184 }
else if ((
v - u) == (
ncell_[
type] - 1) && u == 0) {
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);
239 return std::make_pair(
orient, frontBackZside);
323 if (u == 0 &&
v == 0) {
326 }
else if (u == 0 && (
v - u) == (ncell - 1)) {
329 }
else if ((
v - u) == (ncell - 1) &&
v == (2 * ncell - 1)) {
332 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
335 }
else if (u == (2 * ncell - 1) && (u -
v) == ncell) {
338 }
else if ((u -
v) == ncell &&
v == 0) {
344 }
else if ((
v - u) == (ncell - 1)) {
347 }
else if (
v == (2 * ncell - 1)) {
350 }
else if (u == (2 * ncell - 1)) {
353 }
else if ((u -
v) == ncell) {
360 switch (placementIndex) {
362 cell = itype0[cellx];
365 cell = itype1[cellx];
368 cell = itype2[cellx];
371 cell = itype3[cellx];
374 cell = itype4[cellx];
377 cell = itype5[cellx];
459 if (u == 0 &&
v == 0) {
462 }
else if (
v == 0 && (u -
v) == (ncell)) {
465 }
else if ((u -
v) == (ncell) && u == (2 * ncell - 1)) {
468 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
471 }
else if (
v == (2 * ncell - 1) && (
v - u) == (ncell - 1)) {
474 }
else if ((
v - u) == (ncell - 1) && u == 0) {
480 }
else if ((u -
v) == ncell) {
483 }
else if (u == (2 * ncell - 1)) {
486 }
else if (
v == (2 * ncell - 1)) {
489 }
else if ((
v - u) == (ncell - 1)) {
496 switch (placementIndex) {
498 cell = itype0[cellx];
501 cell = itype1[cellx];
504 cell = itype2[cellx];
507 cell = itype3[cellx];
510 cell = itype4[cellx];
513 cell = itype5[cellx];
517 return std::make_pair(cell, cellt);
static int32_t cellPlacementIndex(int32_t iz, int32_t frontBack, int32_t orient)
static constexpr int32_t fullCell
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 topCorner
static constexpr int32_t cellPlacementIndex3
static constexpr int32_t leftEdge
static constexpr int32_t cellPlacementIndex10
std::pair< int32_t, int32_t > cellUV2Cell(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t cellPlacementIndex0
static constexpr int32_t topLeftCorner
static std::pair< int32_t, int32_t > cellOrient(int32_t placementIndex)
static constexpr int32_t bottomLeftCorner
static constexpr int32_t topRightCorner
static constexpr int32_t bottomRightEdge
static constexpr int32_t cellPlacementIndex9
HGCalCell(double waferSize, int32_t nFine, int32_t nCoarse)
static constexpr int32_t bottomLeftEdge
static constexpr int32_t cellPlacementIndex7
static constexpr int32_t bottomRightCorner
static constexpr int32_t truncatedCell
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
std::pair< double, double > cellUV2XY2(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
static constexpr int32_t rightEdge
static constexpr int32_t bottomCorner
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 topLeftEdge
static constexpr int32_t cellPlacementExtra