Skip to content

Commit

Permalink
Backport cms-sw#40644 to complete v17 definition of HGCal with differ…
Browse files Browse the repository at this point in the history
…ent lateral sizes of the components inside a silicon module
  • Loading branch information
Sunanda authored and AdrianoDee committed Mar 6, 2023
1 parent c388b01 commit 022a981
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HGCalGeom") << "DDHGCalWaferPartialRotated:Layer " << l << ":" << i << " T " << layerThick[i]
<< " Size offset " << layerSizeOff[i] << " Copy " << copyNumber[i]
<< " Partial type " << partialTypes[k];
<< " Partial type " << partialTypes_[k];
#endif
if (copyNumber[i] == 1) {
if (layerType[i] > 0) {
Expand Down
90 changes: 46 additions & 44 deletions Geometry/HGCalCommonData/src/HGCalWaferMask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1277,10 +1277,12 @@ std::vector<std::pair<double, double> > HGCalWaferMask::waferXY(
Depending on the wafer type and placement index, the corners
are chosen in the variable *np*
The points 24-35 are the same as points 12-23 with different offset
*/
double Sin_60 = std::sqrt(3.0) / 2.0;
double Cos_60 = 0.5;
double Tan_60 = Sin_60 / Cos_60;
double delX = 0.5 * waferSize;
double delY = delX / sin_60_;
double delY = delX / Sin_60;
double dx[36] = {HGCalTypes::c00 * delX, HGCalTypes::c10 * delX, HGCalTypes::c10 * delX, HGCalTypes::c00 * delX,
-HGCalTypes::c10 * delX, -HGCalTypes::c10 * delX, HGCalTypes::c50 * delX, HGCalTypes::c10 * delX,
HGCalTypes::c50 * delX, -HGCalTypes::c50 * delX, -HGCalTypes::c10 * delX, -HGCalTypes::c50 * delX,
Expand All @@ -1306,23 +1308,23 @@ std::vector<std::pair<double, double> > HGCalWaferMask::waferXY(
0.0,
offset,
offset,
-offset * cos_60_,
-offset * Cos_60,
-offset,
-offset * cos_60_,
offset * cos_60_,
-offset * Cos_60,
offset * Cos_60,
offset,
offset * cos_60_,
-offset * cos_60_,
offset * Cos_60,
-offset * Cos_60,
-offset,
-offset * cos_60_,
offset * cos_60_,
-offset * Cos_60,
offset * Cos_60,
offset,
offset * cos_60_,
-offset * cos_60_,
offset * cos_60_,
offset * Cos_60,
-offset * Cos_60,
offset * Cos_60,
offset,
offset * cos_60_,
-offset * cos_60_,
offset * Cos_60,
-offset * Cos_60,
-offset,
0.0,
-offset,
Expand All @@ -1336,42 +1338,42 @@ std::vector<std::pair<double, double> > HGCalWaferMask::waferXY(
0.0,
-offset,
-offset};
double offsety[36] = {offset / sin_60_,
offset / tan_60_,
-offset / tan_60_,
-offset / sin_60_,
-offset / tan_60_,
offset / tan_60_,
offset * sin_60_,
double offsety[36] = {offset / Sin_60,
offset / Tan_60,
-offset / Tan_60,
-offset / Sin_60,
-offset / Tan_60,
offset / Tan_60,
offset * Sin_60,
0.0,
-offset * sin_60_,
-offset * sin_60_,
-offset * Sin_60,
-offset * Sin_60,
0.0,
offset * sin_60_,
offset * sin_60_,
offset * Sin_60,
offset * Sin_60,
0.0,
-offset * sin_60_,
-offset * sin_60_,
-offset * Sin_60,
-offset * Sin_60,
0.0,
offset * sin_60_,
-offset * sin_60_,
-offset * sin_60_,
offset * Sin_60,
-offset * Sin_60,
-offset * Sin_60,
0.0,
offset * sin_60_,
offset * sin_60_,
offset * Sin_60,
offset * Sin_60,
0.0,
offset / sin_60_,
offset / tan_60_,
-offset / tan_60_,
-offset / sin_60_,
-offset / tan_60_,
offset / tan_60_,
-offset / sin_60_,
-offset / tan_60_,
offset / tan_60_,
offset / sin_60_,
offset / tan_60_,
-offset / tan_60_};
offset / Sin_60,
offset / Tan_60,
-offset / Tan_60,
-offset / Sin_60,
-offset / Tan_60,
offset / Tan_60,
-offset / Sin_60,
-offset / Tan_60,
offset / Tan_60,
offset / Sin_60,
offset / Tan_60,
-offset / Tan_60};

if (part == HGCalTypes::WaferFull) {
int np[7] = {0, 1, 2, 3, 4, 5, 0};
Expand Down

0 comments on commit 022a981

Please sign in to comment.