Skip to content

Commit

Permalink
Use cornersize variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Nov 1, 2018
1 parent d34f346 commit 58e146c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Geometry/HGCalCommonData/src/HGCalDDDConstants.cc
Expand Up @@ -697,7 +697,7 @@ std::pair<float,float> HGCalDDDConstants::locateCellTrap(int lay, int irad,

bool HGCalDDDConstants::maskCell(const DetId& detId, int corners) const {
bool mask(false);
if (corners > 2 && corners < 6) {
if (corners > 2 && corners < (int)(HGCalParameters::k_CornerSize)) {
if ((mode_ == HGCalGeometryMode::Hexagon8) ||
(mode_ == HGCalGeometryMode::Hexagon8Full)) {
int N(0), layer(0), waferU(0), waferV(0), u(0), v(0);
Expand Down
8 changes: 4 additions & 4 deletions Geometry/HGCalCommonData/src/HGCalGeomParameters.cc
Expand Up @@ -914,7 +914,7 @@ void HGCalGeomParameters::loadWaferHexagon(HGCalParameters& php) {
}
if ((!cornerAll) && (nCorner > 0)) {
if ((nCorner > 1) && (firstCorner == 0) && (firstMiss < nCorner)) {
firstCorner = firstMiss+6-nCorner;
firstCorner = firstMiss+HGCalParameters::k_CornerSize-nCorner;
}
int wl = HGCalWaferIndex::waferIndex(php.layer_[il],copy,0,true);
waferTypes[wl] = std::make_pair(nCorner,firstCorner);
Expand Down Expand Up @@ -1026,7 +1026,7 @@ void HGCalGeomParameters::loadWaferHexagon8(HGCalParameters& php) {
++lpos;
#ifdef EDM_ML_DEBUG
indtypes.emplace_back(kndx);
int corners[6];
int corners[HGCalParameters::k_CornerSize];
#endif
bool cornerOne(false), cornerAll(true);
int nCorner(0), firstCorner(-1), firstMiss(-1);
Expand All @@ -1052,7 +1052,7 @@ void HGCalGeomParameters::loadWaferHexagon8(HGCalParameters& php) {
<< php.rMaxLayHex_[i] << " u "
<< u << " v " << v << " with "
<< nCorner << " corners";
for (int k=0; k<6; ++k) {
for (uint32_t k=0; k<HGCalParameters::k_CornerSize; ++k) {
double rpos = std::sqrt(xc[k]*xc[k]+yc[k]*yc[k]);
edm::LogVerbatim("HGCalGeom") << "[" << k << "] x " << xc[k]
<< " y " << yc[k] << " R " << rpos;
Expand All @@ -1064,7 +1064,7 @@ void HGCalGeomParameters::loadWaferHexagon8(HGCalParameters& php) {
}
if ((!cornerAll) && (nCorner > 0)) {
if ((nCorner > 1) && (firstCorner == 0) && (firstMiss < nCorner)) {
firstCorner = firstMiss+6-nCorner;
firstCorner = firstMiss+HGCalParameters::k_CornerSize-nCorner;
}
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("HGCalGeom") << "Layer " << lay << " u|v " << u
Expand Down

0 comments on commit 58e146c

Please sign in to comment.