Skip to content

Commit

Permalink
Code check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Oct 16, 2024
1 parent f045ec5 commit ec01e33
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions Geometry/ForwardGeometry/test/ZdcTopologyTester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ void ZdcTopologyTester::doTest(const ZdcTopology& topology) {
det = "HAD";
section = HcalZDCDetId::HAD;
} else if (idet == 2) {
det ="LUM";
det = "LUM";
section = HcalZDCDetId::LUM;
} else if (idet == 3) {
det = "RPD";
section = HcalZDCDetId::RPD;
}
for (int depth = 1; depth <= HcalZDCDetId::kDepTot; ++depth) {
for (int zside = 0; zside <= 1; ++zside) {
bool forward = (zside == 0) ? true : false;
const HcalZDCDetId id(section, forward, depth);
if (topology.valid(id))
++ndet;
bool forward = (zside == 0) ? true : false;
const HcalZDCDetId id(section, forward, depth);
if (topology.valid(id))
++ndet;
}
}
edm::LogVerbatim("HCalGeom") << "Number of valid cells in " << det << ": " << ndet;
}

// First test on movements along eta/phi directions
edm::LogVerbatim("HCalGeom") << "\nTest on movements along transverse/longiudnal directions"
<< "\n========================================================";
Expand All @@ -85,23 +85,23 @@ void ZdcTopologyTester::doTest(const ZdcTopology& topology) {
section = HcalZDCDetId::RPD;
for (int depth = 1; depth <= HcalZDCDetId::kDepTot; ++depth) {
for (int zside = 0; zside <= 1; ++zside) {
bool forward = (zside == 0) ? true : false;
const HcalZDCDetId id(section, forward, depth);
if (topology.valid(id)) {
std::vector<DetId> idT = topology.transverse(id);
std::vector<DetId> idL = topology.longitudinal(id);
edm::LogVerbatim("HCalGeom") << "Neighbours for : Tower " << id;
std::ostringstream st1;
st1 << " " << idT.size() << " sets transverse:";
for (auto& i : idT)
st1 << " " << (HcalZDCDetId)(i());
edm::LogVerbatim("HCalGeom") << st1.str();
std::ostringstream st2;
st2 << " " << idL.size() << " sets along Longitunal:";
for (auto& i : idL)
st2 << " " << (HcalZDCDetId)(i());
edm::LogVerbatim("HCalGeom") << st2.str();
}
bool forward = (zside == 0) ? true : false;
const HcalZDCDetId id(section, forward, depth);
if (topology.valid(id)) {
std::vector<DetId> idT = topology.transverse(id);
std::vector<DetId> idL = topology.longitudinal(id);
edm::LogVerbatim("HCalGeom") << "Neighbours for : Tower " << id;
std::ostringstream st1;
st1 << " " << idT.size() << " sets transverse:";
for (auto& i : idT)
st1 << " " << (HcalZDCDetId)(i());
edm::LogVerbatim("HCalGeom") << st1.str();
std::ostringstream st2;
st2 << " " << idL.size() << " sets along Longitunal:";
for (auto& i : idL)
st2 << " " << (HcalZDCDetId)(i());
edm::LogVerbatim("HCalGeom") << st2.str();
}
}
}
}
Expand All @@ -119,14 +119,14 @@ void ZdcTopologyTester::doTest(const ZdcTopology& topology) {
section = HcalZDCDetId::RPD;
for (int depth = 1; depth <= HcalZDCDetId::kDepTot; ++depth) {
for (int zside = 0; zside <= 1; ++zside) {
bool forward = (zside == 0) ? true : false;
HcalZDCDetId cell(section, forward, depth);
if (topology.valid(cell)) {
unsigned int dense = topology.detId2DenseIndex(DetId(cell));
DetId id = topology.denseId2detId(dense);
std::string cherr = (cell.rawId() != id.rawId()) ? " **** ERROR *****" : "";
edm::LogVerbatim("HCalGeom") << cell << " Dense " << std::hex << dense << std::dec << " o/p "
<< HcalZDCDetId(id) << cherr;
bool forward = (zside == 0) ? true : false;
HcalZDCDetId cell(section, forward, depth);
if (topology.valid(cell)) {
unsigned int dense = topology.detId2DenseIndex(DetId(cell));
DetId id = topology.denseId2detId(dense);
std::string cherr = (cell.rawId() != id.rawId()) ? " **** ERROR *****" : "";
edm::LogVerbatim("HCalGeom") << cell << " Dense " << std::hex << dense << std::dec << " o/p "
<< HcalZDCDetId(id) << cherr;
}
}
}
Expand Down

0 comments on commit ec01e33

Please sign in to comment.