diff --git a/SimG4CMS/Calo/src/HGCalSD.cc b/SimG4CMS/Calo/src/HGCalSD.cc index 32e20d698e1e6..cf9bb067f4a86 100644 --- a/SimG4CMS/Calo/src/HGCalSD.cc +++ b/SimG4CMS/Calo/src/HGCalSD.cc @@ -156,6 +156,9 @@ uint32_t HGCalSD::setDetUnitId(const G4Step* aStep) { moduleLev = 2; } int module = touch->GetReplicaNumber(moduleLev); + if (verbose_ && (cell == -1)) + edm::LogVerbatim("HGCSim") << "Top " << touch->GetVolume(0)->GetName() << " Module " + << touch->GetVolume(moduleLev)->GetName(); #ifdef EDM_ML_DEBUG edm::LogVerbatim("HGCSim") << "DepthsTop: " << touch->GetHistoryDepth() << ":" << levelT1_ << ":" << levelT2_ << ":" << useSimWt_ << " name " << touch->GetVolume(0)->GetName() << " layer:module:cell " diff --git a/SimG4CMS/Calo/test/python/Sim2026_cfg.py b/SimG4CMS/Calo/test/python/Sim2026_cfg.py index 0d900f095482a..7e0a60e0da18f 100644 --- a/SimG4CMS/Calo/test/python/Sim2026_cfg.py +++ b/SimG4CMS/Calo/test/python/Sim2026_cfg.py @@ -83,6 +83,8 @@ if 'MessageLogger' in process.__dict__: process.MessageLogger.G4cerr=dict() process.MessageLogger.HitStudy=dict() + process.MessageLogger.HGCSim=dict() +# process.MessageLogger.SensitiveDetector=dict() process.Timing = cms.Service("Timing") diff --git a/SimG4Core/Geometry/src/SensitiveDetectorCatalog.cc b/SimG4Core/Geometry/src/SensitiveDetectorCatalog.cc index 06047cf98856f..063fe4d75aaff 100644 --- a/SimG4Core/Geometry/src/SensitiveDetectorCatalog.cc +++ b/SimG4Core/Geometry/src/SensitiveDetectorCatalog.cc @@ -1,15 +1,15 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "SimG4Core/Geometry/interface/SensitiveDetectorCatalog.h" -#define DEBUG +#define EDM_ML_DEBUG #include void SensitiveDetectorCatalog::insert(const std::string &cN, const std::string &rN, const std::string &lvN) { theClassNameMap[cN].insert(rN); theROUNameMap[rN].insert(lvN); -#ifdef DEBUG - edm::LogVerbatim("SimG4CoreGeometry") << "SenstiveDetectorCatalog: insert (" << cN << "," << rN << "," << lvN << ")\n" +#ifdef EDM_ML_DEBUG + edm::LogVerbatim("SensitiveDetector") << "SenstiveDetectorCatalog: insert (" << cN << "," << rN << "," << lvN << ")\n" << " has " << readoutNames().size() << " ROUs " << readoutNames().front() << "\n" << " has " << classNames().size() << " classes " @@ -60,8 +60,8 @@ std::vector SensitiveDetectorCatalog::classNames() const { } void SensitiveDetectorCatalog::printMe() const { - edm::LogVerbatim("SimG4CoreGeometry") << "Class names map size is: " << theClassNameMap.size() << "\n"; - edm::LogVerbatim("SimG4CoreGeometry").log([&](auto &log) { + edm::LogVerbatim("SensitiveDetector") << "Class names map size is: " << theClassNameMap.size() << "\n"; + edm::LogVerbatim("SensitiveDetector").log([&](auto &log) { int i(0); for (const auto &cn : theClassNameMap) { log << "#" << ++i << ": " << cn.first << " has " << cn.second.size() << " class names:\n"; @@ -71,20 +71,20 @@ void SensitiveDetectorCatalog::printMe() const { } log << "\n"; }); - edm::LogVerbatim("SimG4CoreGeometry") << "\nROU names map: " << theROUNameMap.size() << "\n"; - edm::LogVerbatim("SimG4CoreGeometry").log([&](auto &log) { + edm::LogVerbatim("SensitiveDetector") << "\nROU names map: " << theROUNameMap.size() << "\n"; + edm::LogVerbatim("SensitiveDetector").log([&](auto &log) { int i(0); for (const auto &rn : theROUNameMap) { log << "#" << ++i << ": " << rn.first << " has " << rn.second.size() << " ROU names:\n"; for (const auto &rnv : rn.second) - log << rnv << ", "; + log << rnv << "\n "; log << "\n"; } log << "\n"; }); - edm::LogVerbatim("SimG4CoreGeometry") << "\n========== Here are the accessors =================\n"; - edm::LogVerbatim("SimG4CoreGeometry").log([&](auto &log) { + edm::LogVerbatim("SensitiveDetector") << "\n========== Here are the accessors =================\n"; + edm::LogVerbatim("SensitiveDetector").log([&](auto &log) { for (auto c : classNames()) { log << "ClassName:" << c << "\n"; for (auto r : readoutNames({c.data(), c.size()})) { diff --git a/SimG4Core/SensitiveDetector/src/SensitiveDetector.cc b/SimG4Core/SensitiveDetector/src/SensitiveDetector.cc index c2bca478d1e87..b1e65b28ddc2b 100644 --- a/SimG4Core/SensitiveDetector/src/SensitiveDetector.cc +++ b/SimG4Core/SensitiveDetector/src/SensitiveDetector.cc @@ -30,9 +30,10 @@ SensitiveDetector::SensitiveDetector(const std::string& iname, const SensitiveDe std::stringstream ss; for (auto& lvname : lvNames) { this->AssignSD({lvname.data(), lvname.size()}); - ss << " " << lvname; + ss << " " << lvname << "\n"; } - edm::LogVerbatim("SensitiveDetector") << " <" << iname << "> : Assigns SD to LVs " << ss.str(); + edm::LogVerbatim("SensitiveDetector") << " <" << iname << "> : Assigns SD to " << lvNames.size() << " LVs " + << ss.str(); } SensitiveDetector::~SensitiveDetector() {}