12 double guardRingOffset_,
17 hgcalcell_ = std::make_unique<HGCalCell>(waferSize, nFine, nCoarse);
18 double guardRingSizeOffset_ = guardRingOffset_ + sizeOffset_;
19 for (
int k = 0;
k < 2; ++
k) {
23 for (
int j = 0;
j < 6; ++
j) {
25 for (
int i = 0;
i < 6; ++
i) {
33 double H = mouseBiteCut_ + guardRingOffset_ - (1 /
sqrt3By2_ * guardRingOffset_);
52 double y3_3 =
cellX_[
k] * 11.0 / 12.0;
55 double y1 = 5.0 *
cellX_[
k] / 12.0 - guardRingOffset_ / 4.0;
57 double y2 = -(0.5 *
cellX_[
k] - 0.5 * guardRingOffset_) * 0.5;
58 double x3 = (A1 * x3_1 + A2 * x3_2 + A3 * x3_3) / cutArea3;
59 double y3 = (A1 * y3_1 + A2 * y3_2 + A3 * y3_3) / cutArea3;
60 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2 - cutArea3;
62 ((5.0 *
sqrt3_ *
cellX_[
k] / 132.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
65 ((19.0 *
cellX_[
k] / 132.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
68 double xMag = 0.5 * xMag1 +
sqrt3By2_ * yMag1;
69 double yMag =
sqrt3By2_ * xMag1 - 0.5 * yMag1;
71 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
77 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
84 for (
int i = 0;
i < 6; ++
i) {
90 double H = mouseBiteCut_ + guardRingOffset_ - (1 /
sqrt3By2_ * guardRingOffset_);
103 std::pow(guardRingOffset_, 2) / 18) /
107 double x3_1 = -(
cellX_[
k] - guardRingOffset_ - 2 * (mouseBiteCut_ - guardRingOffset_) / 3) *
sqrt3By2_;
108 double y3_1 = 0.5 * (
cellX_[
k] - guardRingOffset_ - 2 * (mouseBiteCut_ - guardRingOffset_) / 3);
110 double y3_2 = -(
cellX_[
k] / 4 + 4 *
h / 6);
111 double A1 =
sqrt3_ *
std::pow((mouseBiteCut_ - guardRingOffset_), 2);
115 double y1 = 0.5 *
cellX_[
k] - 0.5 * guardRingOffset_;
118 double x3 = (A1 * x3_1 - A2 * x3_2) / (A1 - A2);
119 double y3 = (A1 * y3_1 - A2 * y3_2) / (A1 - A2);
120 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2 - cutArea3;
121 double xMag1 = ((0.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) / (
cellArea[
k][
j]);
122 double yMag1 = ((-5 *
cellX_[
k] / 42) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
125 double xMag = -0.5 * xMag1 -
sqrt3By2_ * yMag1;
126 double yMag =
sqrt3By2_ * xMag1 - 0.5 * yMag1;
128 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
134 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
140 for (
int i = 0;
i < 6; ++
i) {
150 double offMag = (((-2.0 / 15.0) * totalArea *
cellX_[
k]) - ((
cellX_[
k] - (0.5 * guardRingOffset_)) * cutArea)) /
155 std::array<double, 6> tempOffsetX = {
156 {-0.5 * offMag, -offMag, -0.5 * offMag, 0.5 * offMag, offMag, 0.5 * offMag}};
157 std::array<double, 6> tempOffsetY = {
159 for (
int i = 0;
i < 6; ++
i) {
169 (((5.0 / 42.0) * totalArea *
cellX_[
k]) - ((
cellX_[
k] - (0.5 * guardRingOffset_))) * (cutArea)) /
174 std::array<double, 6> tempOffsetX = {
175 {-0.5 * offMag, -offMag, -0.5 * offMag, 0.5 * offMag, offMag, 0.5 * offMag}};
176 std::array<double, 6> tempOffsetY = {
178 for (
int i = 0;
i < 6; ++
i) {
183 double H = mouseBiteCut_ + guardRingOffset_ - (1 /
sqrt3By2_ * guardRingOffset_);
188 double cutArea1 = (
sqrt3_ *
cellX_[
k] * guardRingSizeOffset_);
192 double y1 = -(0.5 *
cellX_[
k] - 0.5 * guardRingOffset_) * 0.5;
195 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2;
199 double yMag1 = ((
cellX_[
k] / 15.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) / (
cellArea[
k][
j]);
200 double xMag = -yMag1;
201 double yMag = -xMag1;
203 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
209 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
215 for (
int i = 0;
i < 6; ++
i) {
233 for (
int i = 0;
i < 6; ++
i) {
239 double H = mouseBiteCut_ + guardRingOffset_ - (1 /
sqrt3By2_ * guardRingOffset_);
243 double cutArea1 = (
sqrt3_ *
cellX_[
k] * guardRingSizeOffset_);
247 double y1 = (0.5 *
cellX_[
k] - 0.25 * guardRingOffset_);
250 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2;
254 double yMag1 = ((10.0 *
cellX_[
k] / 168.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) / (
cellArea[
k][
j]);
257 double yMag = -xMag1;
259 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
265 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
271 for (
int i = 0;
i < 6; ++
i) {
286 double xMag = ((-2.0 *
sqrt3_ *
cellX_[
k] / 9.0) * totalArea - (cutArea *
x1)) /
290 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
296 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
303 for (
int i = 0;
i < 6; ++
i) {
309 double cutArea1 = (
sqrt3By2_ *
cellX_[
k] * guardRingSizeOffset_) - guardRingOffset_ * guardRingSizeOffset_;
310 double cutArea2 = (3 *
cellX_[
k] * guardRingOffset_) / 2 -
std::pow(guardRingOffset_, 2) / (2 *
sqrt3_);
313 double y1 = (0.5 *
cellX_[
k] - 0.5 * guardRingOffset_);
320 double xMag1 = ((-7 *
sqrt3_ *
cellX_[
k] / 30) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
322 double yMag = ((-2 *
cellX_[
k] / 15) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
324 double xMag = -xMag1;
326 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
332 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
338 for (
int i = 0;
i < 6; ++
i) {
349 double y1 = -(
cellX_[
k] - guardRingOffset_ / 2);
354 double xMag = ((-5 *
sqrt3_ *
cellX_[
k] / 21.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
356 double yMag = ((-5 *
cellX_[
k] / 42.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
359 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
365 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
372 for (
int i = 0;
i < 6; ++
i) {
384 (
std::pow(guardRingOffset_, 2) / 18)) /
391 double y2_0 = guardRingOffset_ / 2;
400 double y3 = -(
cellX_[
k] -
sqrt3_ * (mouseBiteCut_ - (guardRingOffset_ /
sqrt3By2_)) / 3 - guardRingOffset_);
403 double xMag = ((
sqrt3_ *
cellX_[
k] / 8) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
405 double yMag = ((-1 *
cellX_[
k] / 8) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
408 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
414 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
421 for (
int i = 0;
i < 6; ++
i) {
427 for (
int i = 0;
i < 6; ++
i) {
437 double cutArea2 = (4 *
cellX_[
k] * guardRingOffset_);
441 (
std::pow(guardRingOffset_, 2) / 18)) /
452 double y3 = 3.5 *
cellX_[
k] - (5 * mouseBiteCut_) / 3 *
sqrt3_;
456 ((-9 *
cellX_[
k] / (
sqrt3_ * 92)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
459 ((199 *
cellX_[
k] / (
sqrt3_ * 276)) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
462 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
468 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
474 for (
int i = 0;
i < 6; ++
i) {
480 for (
int i = 0;
i < 6; ++
i) {
488 double cutArea1 = (
cellX_[
k] * guardRingOffset_);
496 double y2 = 0.5 *
cellX_[
k] - guardRingOffset_ / 2;
498 double y3 = 0.5 *
cellX_[
k] - guardRingOffset_ -
h / 3;
501 double xMag = ((0.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
503 double yMag = ((-2 *
cellX_[
k] / 15) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
506 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
512 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
518 for (
int i = 0;
i < 6; ++
i) {
524 for (
int i = 0;
i < 6; ++
i) {
537 std::pow(guardRingOffset_, 2) / 18) /
542 double y1 = 0.5 *
cellX_[
k] - guardRingOffset_ / 2;
549 double xMag = -((-
sqrt3_ *
cellX_[
k] / 9) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
551 double yMag = ((-
cellX_[
k] / 15) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
554 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
560 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
566 for (
int i = 0;
i < 6; ++
i) {
571 for (
int i = 0;
i < 6; ++
i) {
580 double cutArea1 = (3 *
cellX_[
k] * guardRingOffset_);
582 double cutArea3 =
std::pow((mouseBiteCut_ - guardRingOffset_), 2) /
sqrt3_;
592 double h = (mouseBiteCut_ - guardRingOffset_) /
sqrt3By2_;
594 double y3 = 5 *
h / 6 - 5 *
cellX_[
k] / 2;
598 ((-2 *
cellX_[
k] / (7 *
sqrt3_)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
600 double yMag = ((-
cellX_[
k] / 3) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
603 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
609 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
615 for (
int i = 0;
i < 6; ++
i) {
620 for (
int i = 0;
i < 6; ++
i) {
629 double cutArea1 = (2 *
cellX_[
k] * guardRingOffset_);
633 double x1 = -guardRingOffset_ / 2;
636 double y2 = -(
cellX_[
k] - 0.5 * guardRingOffset_);
638 ((mouseBiteCut_ - guardRingOffset_) -
sqrt3_ *
cellX_[
k] / 8);
642 ((mouseBiteCut_ - guardRingOffset_) -
sqrt3_ *
cellX_[
k] / 8);
645 double xMag = (-(
cellX_[
k] / (
sqrt3_)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
647 double yMag = ((-5 *
cellX_[
k] / 42) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
650 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
656 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
662 for (
int i = 0;
i < 6; ++
i) {
667 for (
int i = 0;
i < 6; ++
i) {
676 double cutArea1 = (4 *
cellX_[
k] * guardRingOffset_) /
sqrt3_;
681 double y1 = -(0.5 *
cellX_[
k] - 0.5 * guardRingOffset_);
683 (
std::pow(guardRingOffset_, 2) / 18)) /
692 double xMag = ((25 *
sqrt3_ *
cellX_[
k] / 148) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
694 double yMag = ((73 *
cellX_[
k] / 444) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
697 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
703 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
709 for (
int i = 0;
i < 6; ++
i) {
714 for (
int i = 0;
i < 6; ++
i) {
723 double cutArea1 = (5 *
cellX_[
k] * guardRingOffset_) / (2 *
sqrt3_);
728 double y1 =
cellX_[
k] - 0.5 * guardRingOffset_;
730 (
std::pow(guardRingOffset_, 2) / 18.0)) /
739 double xMag = ((47.0 *
cellX_[
k] / (528.0 *
sqrt3_)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
741 double yMag = ((47.0 *
cellX_[
k] / 528.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
744 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
750 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
756 for (
int i = 0;
i < 6; ++
i) {
761 for (
int i = 0;
i < 6; ++
i) {
772 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalCellOffset initialized with waferSize " << waferSize <<
" number of cells " 773 << nFine <<
":" << nCoarse <<
" Guardring offset " << guardRingOffset_ <<
" Mousebite " 781 double x_off(0), y_off(0);
783 int cellPos = cell.first;
784 int cellType = cell.second;
803 return std::make_pair(x_off, y_off);
807 int32_t u, int32_t
v, int32_t placementIndex, int32_t
type, int32_t partialType) {
811 double x_off =
offset.first;
812 double y_off =
offset.second;
814 int cellPos = cell.first;
815 int cellType = cell.second;
837 std::cout << u <<
":" <<
v <<
" 2" << std::endl;
858 return std::make_pair(x_off, y_off);
866 int cellType = cell.second;
872 int32_t u, int32_t
v, int32_t placementIndex, int32_t
type, int32_t partialType,
bool reco) {
878 int cellPos = cell.first;
879 int cellType = cell.second;
static constexpr int32_t LDPartial0007Cell
Log< level::Info, true > LogVerbatim
static constexpr int32_t fullCell
static constexpr int32_t partiaclCellsPosOffset
std::pair< double, double > cellOffsetUV2XY1(int32_t u, int32_t v, int32_t placementIndex, int32_t type)
std::array< std::array< std::array< double, 6 >, 11 >, 2 > offsetPartialX
static constexpr int32_t HDPartial1021Cell
static constexpr int32_t extendedMBCell
static constexpr int32_t HDPartial0920Cell
double cellAreaPartial[2][11]
static constexpr int32_t partiaclWaferCellsOffset
static constexpr int32_t truncatedMBCell
static constexpr int32_t leftCell
static constexpr int32_t LDPartial0209Cell
static constexpr int32_t topCell
double cellAreaUV(int32_t u, int32_t v, int32_t placementIndex, int32_t type, bool reco)
static constexpr int32_t halfCell
static constexpr int32_t LDPartial0714Cell
static constexpr int32_t LDPartial1515Cell
static constexpr int32_t bottomLeftEdge
std::array< std::array< std::array< double, 6 >, 6 >, 2 > offsetY
static constexpr int32_t truncatedCell
static constexpr int32_t halfTrunCell
static constexpr int32_t extendedCell
static constexpr int32_t topRightEdge
std::unique_ptr< HGCalCell > hgcalcell_
static constexpr int32_t LDPartial0815Cell
static constexpr int32_t LDPartial1415Cell
static constexpr int32_t halfExtCell
static constexpr int32_t bottomCorner
static constexpr int32_t cornerCell
static constexpr int32_t rightCell
std::array< std::array< std::array< double, 6 >, 11 >, 2 > offsetPartialY
HGCalCellOffset(double waferSize, int32_t nFine, int32_t nCoarse, double guardRingOffset_, double mouseBiteCut_, double sizeOffset_)
static constexpr double k_ScaleToDDD2
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::array< std::array< std::array< double, 6 >, 6 >, 2 > offsetX
Power< A, B >::type pow(const A &a, const B &b)
static constexpr int32_t bottomCell
static constexpr int32_t cellPlacementExtra