8 for (
int k = 0;
k < 2; ++
k) {
12 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalCell initialized with waferSize " << waferSize <<
" number of cells " << nFine
20 switch (placementIndex) {
70 return std::make_pair(
x,
y);
80 const std::vector<double> fcos = {1.0, 0.5, -0.5, -1.0, -0.5, 0.5};
82 x = x0 * fcos[placementIndex] - y0 * fsin[placementIndex];
83 y = x0 * fsin[placementIndex] + y0 * fcos[placementIndex];
87 const std::vector<double> fcos = {0.5, 1.0, 0.5, -0.5, -1.0, -0.5};
94 return std::make_pair(
x,
y);
102 const std::vector<int> itype0 = {0, 7, 8, 9, 10, 11, 6, 3, 4, 5, 4, 5, 3};
103 const std::vector<int> itype1 = {0, 0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 1, 2};
104 const std::vector<int> itype2 = {0, 11, 6, 7, 8, 9, 10, 5, 3, 4, 3, 4, 5};
105 const std::vector<int> itype3 = {0, 4, 5, 0, 1, 2, 3, 2, 0, 1, 2, 0, 1};
106 const std::vector<int> itype4 = {0, 9, 10, 11, 6, 7, 8, 4, 5, 3, 5, 3, 4};
107 const std::vector<int> itype5 = {0, 2, 3, 4, 5, 0, 1, 1, 2, 0, 1, 2, 0};
108 if (u == 0 &&
v == 0) {
111 }
else if (u == 0 && (
v - u) == (
ncell_[
type] - 1)) {
145 switch (placementIndex) {
147 cell = itype0[cellx];
150 cell = itype1[cellx];
153 cell = itype2[cellx];
156 cell = itype3[cellx];
159 cell = itype4[cellx];
162 cell = itype5[cellx];
166 const std::vector<int> itype0 = {0, 1, 2, 3, 4, 5, 0, 1, 2, 0, 0, 1, 2};
167 const std::vector<int> itype1 = {0, 8, 9, 10, 11, 6, 7, 4, 5, 3, 4, 5, 3};
168 const std::vector<int> itype2 = {0, 3, 4, 5, 0, 1, 2, 2, 0, 1, 1, 2, 0};
169 const std::vector<int> itype3 = {0, 10, 11, 6, 7, 8, 9, 5, 3, 4, 5, 3, 4};
170 const std::vector<int> itype4 = {0, 5, 0, 1, 2, 3, 4, 0, 1, 2, 2, 0, 1};
171 const std::vector<int> itype5 = {0, 6, 7, 8, 9, 10, 11, 3, 4, 5, 3, 4, 5};
172 if (u == 0 &&
v == 0) {
187 }
else if ((
v - u) == (
ncell_[
type] - 1) && u == 0) {
209 switch (placementIndex) {
211 cell = itype0[cellx];
214 cell = itype1[cellx];
217 cell = itype2[cellx];
220 cell = itype3[cellx];
223 cell = itype4[cellx];
226 cell = itype5[cellx];
230 return std::make_pair(cell, cellt);
242 return std::make_pair(
orient, frontBackZside);
326 if (u == 0 &&
v == 0) {
329 }
else if (u == 0 && (
v - u) == (ncell - 1)) {
332 }
else if ((
v - u) == (ncell - 1) &&
v == (2 * ncell - 1)) {
335 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
338 }
else if (u == (2 * ncell - 1) && (u -
v) == ncell) {
341 }
else if ((u -
v) == ncell &&
v == 0) {
347 }
else if ((
v - u) == (ncell - 1)) {
350 }
else if (
v == (2 * ncell - 1)) {
353 }
else if (u == (2 * ncell - 1)) {
356 }
else if ((u -
v) == ncell) {
363 switch (placementIndex) {
365 cell = itype0[cellx];
368 cell = itype1[cellx];
371 cell = itype2[cellx];
374 cell = itype3[cellx];
377 cell = itype4[cellx];
380 cell = itype5[cellx];
462 if (u == 0 &&
v == 0) {
465 }
else if (
v == 0 && (u -
v) == (ncell)) {
468 }
else if ((u -
v) == (ncell) && u == (2 * ncell - 1)) {
471 }
else if (u == (2 * ncell - 1) &&
v == (2 * ncell - 1)) {
474 }
else if (
v == (2 * ncell - 1) && (
v - u) == (ncell - 1)) {
477 }
else if ((
v - u) == (ncell - 1) && u == 0) {
483 }
else if ((u -
v) == ncell) {
486 }
else if (u == (2 * ncell - 1)) {
489 }
else if (
v == (2 * ncell - 1)) {
492 }
else if ((
v - u) == (ncell - 1)) {
499 switch (placementIndex) {
501 cell = itype0[cellx];
504 cell = itype1[cellx];
507 cell = itype2[cellx];
510 cell = itype3[cellx];
513 cell = itype4[cellx];
516 cell = itype5[cellx];
520 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