10 for (
int k = 0;
k < 2; ++
k) {
15 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalCell initialized with waferSize " << waferSize <<
" number of cells " << nFine
24 switch (placementIndex) {
74 return std::make_pair(
x,
y);
84 const std::vector<double> fcos = {1.0, 0.5, -0.5, -1.0, -0.5, 0.5};
86 x = x0 * fcos[placementIndex] - y0 * fsin[placementIndex];
87 y = x0 * fsin[placementIndex] + y0 * fcos[placementIndex];
91 const std::vector<double> fcos = {0.5, 1.0, 0.5, -0.5, -1.0, -0.5};
98 return std::make_pair(
x,
y);
106 const std::vector<int> itype0 = {0, 7, 8, 9, 10, 11, 6, 3, 4, 5, 4, 5, 3};
107 const std::vector<int> itype1 = {0, 0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 1, 2};
108 const std::vector<int> itype2 = {0, 11, 6, 7, 8, 9, 10, 5, 3, 4, 3, 4, 5};
109 const std::vector<int> itype3 = {0, 4, 5, 0, 1, 2, 3, 2, 0, 1, 2, 0, 1};
110 const std::vector<int> itype4 = {0, 9, 10, 11, 6, 7, 8, 4, 5, 3, 5, 3, 4};
111 const std::vector<int> itype5 = {0, 2, 3, 4, 5, 0, 1, 1, 2, 0, 1, 2, 0};
112 if (u == 0 &&
v == 0) {
115 }
else if (u == 0 && (
v - u) == (
ncell_[
type] - 1)) {
149 switch (placementIndex) {
151 cell = itype0[cellx];
154 cell = itype1[cellx];
157 cell = itype2[cellx];
160 cell = itype3[cellx];
163 cell = itype4[cellx];
166 cell = itype5[cellx];
170 const std::vector<int> itype0 = {0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 0, 1, 2};
171 const std::vector<int> itype1 = {0, 8, 9, 10, 11, 6, 7, 4, 5, 3, 4, 5, 3};
172 const std::vector<int> itype2 = {0, 3, 4, 5, 0, 1, 2, 2, 0, 1, 1, 2, 0};
173 const std::vector<int> itype3 = {0, 10, 11, 6, 7, 8, 9, 5, 3, 4, 5, 3, 4};
174 const std::vector<int> itype4 = {0, 5, 0, 1, 2, 3, 4, 0, 1, 2, 2, 0, 1};
175 const std::vector<int> itype5 = {0, 6, 7, 8, 9, 10, 11, 3, 4, 5, 3, 4, 5};
176 if (u == 0 &&
v == 0) {
191 }
else if ((
v - u) == (
ncell_[
type] - 1) && u == 0) {
213 switch (placementIndex) {
215 cell = itype0[cellx];
218 cell = itype1[cellx];
221 cell = itype2[cellx];
224 cell = itype3[cellx];
227 cell = itype4[cellx];
230 cell = itype5[cellx];
234 return std::make_pair(cell, cellt);
246 return std::make_pair(
orient, frontBackZside);
330 if (u == 0 &&
v == 0) {
333 }
else if (u == 0 && (
v - u) == (ncell - 1)) {
336 }
else if ((
v - u) == (ncell - 1) &&
v == (2 * ncell - 1)) {
339 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
342 }
else if (u == (2 * ncell - 1) && (u -
v) == ncell) {
345 }
else if ((u -
v) == ncell &&
v == 0) {
351 }
else if ((
v - u) == (ncell - 1)) {
354 }
else if (
v == (2 * ncell - 1)) {
357 }
else if (u == (2 * ncell - 1)) {
360 }
else if ((u -
v) == ncell) {
367 switch (placementIndex) {
369 cell = itype0[cellx];
372 cell = itype1[cellx];
375 cell = itype2[cellx];
378 cell = itype3[cellx];
381 cell = itype4[cellx];
384 cell = itype5[cellx];
466 if (u == 0 &&
v == 0) {
469 }
else if (
v == 0 && (u -
v) == (ncell)) {
472 }
else if ((u -
v) == (ncell) && u == (2 * ncell - 1)) {
475 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
478 }
else if (
v == (2 * ncell - 1) && (
v - u) == (ncell - 1)) {
481 }
else if ((
v - u) == (ncell - 1) && u == 0) {
487 }
else if ((u -
v) == ncell) {
490 }
else if (u == (2 * ncell - 1)) {
493 }
else if (
v == (2 * ncell - 1)) {
496 }
else if ((
v - u) == (ncell - 1)) {
503 switch (placementIndex) {
505 cell = itype0[cellx];
508 cell = itype1[cellx];
511 cell = itype2[cellx];
514 cell = itype3[cellx];
517 cell = itype4[cellx];
520 cell = itype5[cellx];
524 return std::make_pair(cell, cellt);
Log< level::Info, true > LogVerbatim
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