Skip to content

Commit

Permalink
Code check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Nov 5, 2023
1 parent 65746bd commit 22b5a7b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Geometry/CaloTopology/src/HGCalTopology.cc
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ bool HGCalTopology::valid(const DetId& idin) const {
HGCalTopology::DecodedDetId id = decode(idin);
bool flag;
if (waferHexagon6()) {
flag = (idin.det() == det_ && idin.subdetId() == static_cast<int>(subdet_) && id.iCell1 >= 0 && id.iCell1 < cells_ &&
id.iLay > 0 && id.iLay <= layers_ && id.iSec1 >= 0 && id.iSec1 <= sectors_);
flag = (idin.det() == det_ && idin.subdetId() == static_cast<int>(subdet_) && id.iCell1 >= 0 &&
id.iCell1 < cells_ && id.iLay > 0 && id.iLay <= layers_ && id.iSec1 >= 0 && id.iSec1 <= sectors_);
if (flag)
flag = hdcons_.isValidHex(id.iLay, id.iSec1, id.iCell1, true);
} else if (tileTrapezoid()) {
Expand Down
4 changes: 2 additions & 2 deletions Geometry/CaloTopology/test/HGCalTopologyTester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ void HGCalTopologyTester::doTest(const HGCalTopology& topology) {
for (unsigned int i = 0; i < type_.size(); ++i) {
DetId id;
if (topology.isHFNose()) {
id = HFNoseDetId(1, type_[i], layer_[i], sec1_[i], sec2_[i], cell1_[i], cell2_[i]);
id = HFNoseDetId(1, type_[i], layer_[i], sec1_[i], sec2_[i], cell1_[i], cell2_[i]);
} else if (detectorName_ == "HGCalEESensitive") {
id = HGCSiliconDetId(DetId::HGCalEE, 1, type_[i], layer_[i], sec1_[i], sec2_[i], cell1_[i], cell2_[i]);
id = HGCSiliconDetId(DetId::HGCalEE, 1, type_[i], layer_[i], sec1_[i], sec2_[i], cell1_[i], cell2_[i]);
} else if (detectorName_ == "HGCalHESiliconSensitive") {
id = HGCSiliconDetId(DetId::HGCalHSi, 1, type_[i], layer_[i], sec1_[i], sec2_[i], cell1_[i], cell2_[i]);
} else if (detectorName_ == "HGCalHEScintillatorSensitive") {
Expand Down
19 changes: 11 additions & 8 deletions Geometry/HGCalGeometry/src/HGCalGeometry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ void HGCalGeometry::newCell(
m_validIds.emplace_back(idc);
#ifdef EDM_ML_DEBUG
++cellSelect;
if (idc.det() == DetId::Forward)
edm::LogVerbatim("HGCalGeom") << "Valid Id [" << u << ", " << v << "] " << HFNoseDetId(idc);
else
edm::LogVerbatim("HGCalGeom") << "Valid Id [" << u << ", " << v << "] " << HGCSiliconDetId(idc);
if (idc.det() == DetId::Forward)
edm::LogVerbatim("HGCalGeom") << "Valid Id [" << u << ", " << v << "] " << HFNoseDetId(idc);
else
edm::LogVerbatim("HGCalGeom") << "Valid Id [" << u << ", " << v << "] " << HGCSiliconDetId(idc);
#endif
}
}
Expand Down Expand Up @@ -224,10 +224,13 @@ GlobalPoint HGCalGeometry::getPosition(const DetId& detid, bool debug) const {
<< " Global " << glob;
} else {
if (debug) {
if (detid.det() == DetId::Forward)
edm::LogVerbatim("HGCalGeom") << "getPosition for " << HFNoseDetId(detid) << " Layer " << id.iLay << " Wafer " << id.iSec1 << ":" << id.iSec2 << " Cell " << id.iCell1 << ":" << id.iCell2;
else
edm::LogVerbatim("HGCalGeom") << "getPosition for " << HGCSiliconDetId(detid) << " Layer " << id.iLay << " Wafer " << id.iSec1 << ":" << id.iSec2 << " Cell " << id.iCell1 << ":" << id.iCell2;
if (detid.det() == DetId::Forward)
edm::LogVerbatim("HGCalGeom") << "getPosition for " << HFNoseDetId(detid) << " Layer " << id.iLay << " Wafer "
<< id.iSec1 << ":" << id.iSec2 << " Cell " << id.iCell1 << ":" << id.iCell2;
else
edm::LogVerbatim("HGCalGeom") << "getPosition for " << HGCSiliconDetId(detid) << " Layer " << id.iLay
<< " Wafer " << id.iSec1 << ":" << id.iSec2 << " Cell " << id.iCell1 << ":"
<< id.iCell2;
}
xy = m_topology.dddConstants().locateCell(
id.zSide, id.iLay, id.iSec1, id.iSec2, id.iCell1, id.iCell2, true, true, false, debug);
Expand Down

0 comments on commit 22b5a7b

Please sign in to comment.