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_);
47 edm::LogVerbatim(
"HGCalGeomX") <<
"h1 " << h1 <<
" h2 " << h2 <<
" H " <<
H <<
" cutarea1 " << cutArea1
48 <<
" cutarea2 " << cutArea2 <<
" cutarea3 " << cutArea3 <<
" " <<
cellX_[
k]
49 <<
" " << guardRingSizeOffset_;
56 double y3_3 =
cellX_[
k] * 11.0 / 12.0;
59 double y1 = 5.0 *
cellX_[
k] / 12.0 - guardRingOffset_ / 4.0;
61 double y2 = -(0.5 *
cellX_[
k] - 0.5 * guardRingOffset_) * 0.5;
62 double x3 = (A1 * x3_1 + A2 * x3_2 + A3 * x3_3) / cutArea3;
63 double y3 = (A1 * y3_1 + A2 * y3_2 + A3 * y3_3) / cutArea3;
64 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2 - cutArea3;
66 ((5.0 *
sqrt3_ *
cellX_[
k] / 132.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
69 ((19.0 *
cellX_[
k] / 132.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
72 double xMag = 0.5 * xMag1 +
sqrt3By2_ * yMag1;
73 double yMag =
sqrt3By2_ * xMag1 - 0.5 * yMag1;
75 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
81 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
88 for (
int i = 0;
i < 6; ++
i) {
94 double H = mouseBiteCut_ + guardRingOffset_ - (1 /
sqrt3By2_ * guardRingOffset_);
107 std::pow(guardRingOffset_, 2) / 18) /
111 double x3_1 = -(
cellX_[
k] - guardRingOffset_ - 2 * (mouseBiteCut_ - guardRingOffset_) / 3) *
sqrt3By2_;
112 double y3_1 = 0.5 * (
cellX_[
k] - guardRingOffset_ - 2 * (mouseBiteCut_ - guardRingOffset_) / 3);
114 double y3_2 = -(
cellX_[
k] / 4 + 4 *
h / 6);
115 double A1 =
sqrt3_ *
std::pow((mouseBiteCut_ - guardRingOffset_), 2);
119 double y1 = 0.5 *
cellX_[
k] - 0.5 * guardRingOffset_;
122 double x3 = (A1 * x3_1 - A2 * x3_2) / (A1 - A2);
123 double y3 = (A1 * y3_1 - A2 * y3_2) / (A1 - A2);
124 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2 - cutArea3;
125 double xMag1 = ((0.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) / (
cellArea[
k][
j]);
126 double yMag1 = ((-5 *
cellX_[
k] / 42) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
129 double xMag = -0.5 * xMag1 -
sqrt3By2_ * yMag1;
130 double yMag =
sqrt3By2_ * xMag1 - 0.5 * yMag1;
132 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
138 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
144 for (
int i = 0;
i < 6; ++
i) {
154 double offMag = (((-2.0 / 15.0) * totalArea *
cellX_[
k]) - ((
cellX_[
k] - (0.5 * guardRingOffset_)) * cutArea)) /
159 std::array<double, 6> tempOffsetX = {
160 {-0.5 * offMag, -offMag, -0.5 * offMag, 0.5 * offMag, offMag, 0.5 * offMag}};
161 std::array<double, 6> tempOffsetY = {
163 for (
int i = 0;
i < 6; ++
i) {
173 (((5.0 / 42.0) * totalArea *
cellX_[
k]) - ((
cellX_[
k] - (0.5 * guardRingOffset_))) * (cutArea)) /
178 std::array<double, 6> tempOffsetX = {
179 {-0.5 * offMag, -offMag, -0.5 * offMag, 0.5 * offMag, offMag, 0.5 * offMag}};
180 std::array<double, 6> tempOffsetY = {
182 for (
int i = 0;
i < 6; ++
i) {
187 double H = mouseBiteCut_ + guardRingOffset_ - (1 /
sqrt3By2_ * guardRingOffset_);
192 double cutArea1 = (
sqrt3_ *
cellX_[
k] * guardRingSizeOffset_);
196 double y1 = -(0.5 *
cellX_[
k] - 0.5 * guardRingOffset_) * 0.5;
199 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2;
201 edm::LogVerbatim(
"HGCalGeomX") <<
"trunMB h " <<
h <<
" tot " << totalArea <<
" cutArea1 " << cutArea1
202 <<
" cutArea2 " << cutArea2;
206 double yMag1 = ((
cellX_[
k] / 15.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) / (
cellArea[
k][
j]);
207 double xMag = -yMag1;
208 double yMag = -xMag1;
210 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
216 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
222 for (
int i = 0;
i < 6; ++
i) {
240 for (
int i = 0;
i < 6; ++
i) {
246 double H = mouseBiteCut_ + guardRingOffset_ - (1 /
sqrt3By2_ * guardRingOffset_);
250 double cutArea1 = (
sqrt3_ *
cellX_[
k] * guardRingSizeOffset_);
254 double y1 = (0.5 *
cellX_[
k] - 0.25 * guardRingOffset_);
257 cellArea[
k][
j] = totalArea - cutArea1 - cutArea2;
259 edm::LogVerbatim(
"HGCalGeomX") <<
H <<
"trunMB h " <<
h <<
" tot " << totalArea <<
" cutArea1 " << cutArea1
260 <<
" cutArea2 " << cutArea2;
264 double yMag1 = ((10.0 *
cellX_[
k] / 168.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) / (
cellArea[
k][
j]);
267 double yMag = -xMag1;
269 std::array<double, 6> tempOffsetX = {{(
sqrt3By2_ * xMag - 0.5 * yMag),
275 std::array<double, 6> tempOffsetY = {{(0.5 * xMag +
sqrt3By2_ * yMag),
281 for (
int i = 0;
i < 6; ++
i) {
296 double xMag = ((-2.0 *
sqrt3_ *
cellX_[
k] / 9.0) * totalArea - (cutArea *
x1)) /
300 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
306 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
313 for (
int i = 0;
i < 6; ++
i) {
319 double cutArea1 = (
sqrt3By2_ *
cellX_[
k] * guardRingSizeOffset_) - guardRingOffset_ * guardRingSizeOffset_;
320 double cutArea2 = (3 *
cellX_[
k] * guardRingOffset_) / 2 -
std::pow(guardRingOffset_, 2) / (2 *
sqrt3_);
323 double y1 = (0.5 *
cellX_[
k] - 0.5 * guardRingOffset_);
330 double xMag1 = ((-7 *
sqrt3_ *
cellX_[
k] / 30) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
332 double yMag = ((-2 *
cellX_[
k] / 15) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
334 double xMag = -xMag1;
336 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
342 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
348 for (
int i = 0;
i < 6; ++
i) {
359 double y1 = -(
cellX_[
k] - guardRingOffset_ / 2);
364 double xMag = ((-5 *
sqrt3_ *
cellX_[
k] / 21.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
366 double yMag = ((-5 *
cellX_[
k] / 42.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
369 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
375 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
382 for (
int i = 0;
i < 6; ++
i) {
394 (
std::pow(guardRingOffset_, 2) / 18)) /
401 double y2_0 = guardRingOffset_ / 2;
410 double y3 = -(
cellX_[
k] -
sqrt3_ * (mouseBiteCut_ - (guardRingOffset_ /
sqrt3By2_)) / 3 - guardRingOffset_);
413 double xMag = ((
sqrt3_ *
cellX_[
k] / 8) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
415 double yMag = ((-1 *
cellX_[
k] / 8) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
418 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
424 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
431 for (
int i = 0;
i < 6; ++
i) {
437 for (
int i = 0;
i < 6; ++
i) {
447 double cutArea2 = (4 *
cellX_[
k] * guardRingOffset_);
451 (
std::pow(guardRingOffset_, 2) / 18)) /
462 double y3 = 3.5 *
cellX_[
k] - (5 * mouseBiteCut_) / 3 *
sqrt3_;
466 ((-9 *
cellX_[
k] / (
sqrt3_ * 92)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
469 ((199 *
cellX_[
k] / (
sqrt3_ * 276)) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
472 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
478 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
484 for (
int i = 0;
i < 6; ++
i) {
490 for (
int i = 0;
i < 6; ++
i) {
498 double cutArea1 = (
cellX_[
k] * guardRingOffset_);
506 double y2 = 0.5 *
cellX_[
k] - guardRingOffset_ / 2;
508 double y3 = 0.5 *
cellX_[
k] - guardRingOffset_ -
h / 3;
511 double xMag = ((0.0) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
513 double yMag = ((-2 *
cellX_[
k] / 15) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
516 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
522 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
528 for (
int i = 0;
i < 6; ++
i) {
534 for (
int i = 0;
i < 6; ++
i) {
547 std::pow(guardRingOffset_, 2) / 18) /
552 double y1 = 0.5 *
cellX_[
k] - guardRingOffset_ / 2;
559 double xMag = -((-
sqrt3_ *
cellX_[
k] / 9) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
561 double yMag = ((-
cellX_[
k] / 15) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
564 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
570 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
576 for (
int i = 0;
i < 6; ++
i) {
581 for (
int i = 0;
i < 6; ++
i) {
590 double cutArea1 = (3 *
cellX_[
k] * guardRingOffset_);
592 double cutArea3 =
std::pow((mouseBiteCut_ - guardRingOffset_), 2) /
sqrt3_;
602 double h = (mouseBiteCut_ - guardRingOffset_) /
sqrt3By2_;
604 double y3 = 5 *
h / 6 - 5 *
cellX_[
k] / 2;
608 ((-2 *
cellX_[
k] / (7 *
sqrt3_)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
610 double yMag = ((-
cellX_[
k] / 3) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
613 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
619 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
625 for (
int i = 0;
i < 6; ++
i) {
630 for (
int i = 0;
i < 6; ++
i) {
639 double cutArea1 = (2 *
cellX_[
k] * guardRingOffset_);
643 double x1 = -guardRingOffset_ / 2;
646 double y2 = -(
cellX_[
k] - 0.5 * guardRingOffset_);
648 ((mouseBiteCut_ - guardRingOffset_) -
sqrt3_ *
cellX_[
k] / 8);
652 ((mouseBiteCut_ - guardRingOffset_) -
sqrt3_ *
cellX_[
k] / 8);
655 double xMag = (-(
cellX_[
k] / (
sqrt3_)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2) - (cutArea3 * x3)) /
657 double yMag = ((-5 *
cellX_[
k] / 42) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2) - (cutArea3 * y3)) /
660 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
666 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
672 for (
int i = 0;
i < 6; ++
i) {
677 for (
int i = 0;
i < 6; ++
i) {
686 double cutArea1 = (4 *
cellX_[
k] * guardRingOffset_) /
sqrt3_;
691 double y1 = -(0.5 *
cellX_[
k] - 0.5 * guardRingOffset_);
693 (
std::pow(guardRingOffset_, 2) / 18)) /
702 double xMag = ((25 *
sqrt3_ *
cellX_[
k] / 148) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
704 double yMag = ((73 *
cellX_[
k] / 444) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
707 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
713 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
719 for (
int i = 0;
i < 6; ++
i) {
724 for (
int i = 0;
i < 6; ++
i) {
733 double cutArea1 = (5 *
cellX_[
k] * guardRingOffset_) / (2 *
sqrt3_);
738 double y1 =
cellX_[
k] - 0.5 * guardRingOffset_;
740 (
std::pow(guardRingOffset_, 2) / 18.0)) /
749 double xMag = ((47.0 *
cellX_[
k] / (528.0 *
sqrt3_)) * totalArea - (cutArea1 *
x1) - (cutArea2 *
x2)) /
751 double yMag = ((47.0 *
cellX_[
k] / 528.0) * totalArea - (cutArea1 *
y1) - (cutArea2 *
y2)) /
754 std::array<double, 6> tempOffsetX = {{(-
sqrt3By2_ * xMag - 0.5 * yMag),
760 std::array<double, 6> tempOffsetY = {{(0.5 * xMag -
sqrt3By2_ * yMag),
766 for (
int i = 0;
i < 6; ++
i) {
771 for (
int i = 0;
i < 6; ++
i) {
782 edm::LogVerbatim(
"HGCalGeom") <<
"HGCalCellOffset initialized with waferSize " << waferSize <<
" number of cells " 783 << nFine <<
":" << nCoarse <<
" Guardring offset " << guardRingOffset_ <<
" Mousebite " 791 double x_off(0), y_off(0);
793 int cellPos = cell.first;
794 int cellType = cell.second;
813 return std::make_pair(x_off, y_off);
817 int32_t u, int32_t
v, int32_t placementIndex, int32_t
type, int32_t partialType) {
821 double x_off =
offset.first;
822 double y_off =
offset.second;
824 int cellPos = cell.first;
825 int cellType = cell.second;
870 return std::make_pair(x_off, y_off);
878 int cellType = cell.second;
884 int32_t u, int32_t
v, int32_t placementIndex, int32_t
type, int32_t partialType,
bool reco) {
890 int cellPos = cell.first;
891 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