From c54b5e0137beec41c036e29356d5e59103cab00b Mon Sep 17 00:00:00 2001 From: Ianna Osborne Date: Fri, 23 Oct 2020 08:27:05 +0200 Subject: [PATCH 1/4] close geometry --- Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml | 2 +- SimG4Core/Geometry/src/DDG4ProductionCuts.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml index cbca38ef861f3..d700cc305ede2 100644 --- a/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml +++ b/Geometry/CMSCommonData/data/dd4hep/cmsExtendedGeometry2021.xml @@ -1,7 +1,7 @@ - + diff --git a/SimG4Core/Geometry/src/DDG4ProductionCuts.cc b/SimG4Core/Geometry/src/DDG4ProductionCuts.cc index 23f66e0c14f67..d954442ad0e4f 100644 --- a/SimG4Core/Geometry/src/DDG4ProductionCuts.cc +++ b/SimG4Core/Geometry/src/DDG4ProductionCuts.cc @@ -114,7 +114,7 @@ void DDG4ProductionCuts::dd4hepInitialize() { for (auto const& it : *dd4hepMap_) { for (auto const& fit : specs) { for (auto const& pit : fit.second->paths) { - if (dd4hep::dd::compareEqual(dd4hep::dd::noNamespace(it.first.name()), dd4hep::dd::realTopName(pit))) { + if (dd4hep::dd::compareEqualName(dd4hep::dd::realTopName(pit), dd4hep::dd::noNamespace(it.first.name()))) { dd4hepVec_.emplace_back(std::make_pair(&*it.second, &*fit.second)); } } From 9df3e367c8cebf3b2bc60750367023f1ed3b677b Mon Sep 17 00:00:00 2001 From: Ianna Osborne Date: Fri, 23 Oct 2020 08:45:03 +0200 Subject: [PATCH 2/4] code format --- SimG4Core/Geometry/src/DDG4ProductionCuts.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SimG4Core/Geometry/src/DDG4ProductionCuts.cc b/SimG4Core/Geometry/src/DDG4ProductionCuts.cc index d954442ad0e4f..7f987c3fc13b7 100644 --- a/SimG4Core/Geometry/src/DDG4ProductionCuts.cc +++ b/SimG4Core/Geometry/src/DDG4ProductionCuts.cc @@ -114,7 +114,7 @@ void DDG4ProductionCuts::dd4hepInitialize() { for (auto const& it : *dd4hepMap_) { for (auto const& fit : specs) { for (auto const& pit : fit.second->paths) { - if (dd4hep::dd::compareEqualName(dd4hep::dd::realTopName(pit), dd4hep::dd::noNamespace(it.first.name()))) { + if (dd4hep::dd::compareEqualName(dd4hep::dd::realTopName(pit), dd4hep::dd::noNamespace(it.first.name()))) { dd4hepVec_.emplace_back(std::make_pair(&*it.second, &*fit.second)); } } From c220d42c61ce710a06117061de87772d71097bd3 Mon Sep 17 00:00:00 2001 From: Ianna Osborne Date: Fri, 23 Oct 2020 11:34:40 +0200 Subject: [PATCH 3/4] account for namespace --- Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc b/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc index 1ad4b4d32e394..d8612eca7f4d4 100644 --- a/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc +++ b/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc @@ -27,7 +27,7 @@ uint32_t EcalBarrelNumberingScheme::getUnitID(const EcalBaseNumber& baseNumber) return 0; } - const std::string& cryName(baseNumber.getLevelName(0).substr(0, 7)); // name of crystal volume + const std::string& cryName(baseNumber.getLevelName(0).substr(7, 14)); // name of crystal volume const int cryType(::atoi(cryName.c_str() + 5)); From ba6f3b3ae5768d1d71ff11aa5e0948e2bc4cbe6d Mon Sep 17 00:00:00 2001 From: Ianna Osborne Date: Fri, 23 Oct 2020 17:09:41 +0200 Subject: [PATCH 4/4] revert the change --- Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc b/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc index d8612eca7f4d4..1ad4b4d32e394 100644 --- a/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc +++ b/Geometry/EcalCommonData/src/EcalBarrelNumberingScheme.cc @@ -27,7 +27,7 @@ uint32_t EcalBarrelNumberingScheme::getUnitID(const EcalBaseNumber& baseNumber) return 0; } - const std::string& cryName(baseNumber.getLevelName(0).substr(7, 14)); // name of crystal volume + const std::string& cryName(baseNumber.getLevelName(0).substr(0, 7)); // name of crystal volume const int cryType(::atoi(cryName.c_str() + 5));