From 3a7667e240c198ce7fe35bc6a0f9fb9e04e6ee77 Mon Sep 17 00:00:00 2001 From: Fabio Cossutti Date: Fri, 27 Oct 2023 15:13:23 +0200 Subject: [PATCH] Minimal set of vetos to keep ol behaviour also on I15 scenario, caching logical name value as suggested by D. Lange --- .../plugins/DDCmsMTDConstruction.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Geometry/MTDNumberingBuilder/plugins/DDCmsMTDConstruction.cc b/Geometry/MTDNumberingBuilder/plugins/DDCmsMTDConstruction.cc index e9b9deae12305..88afeda6f29a1 100644 --- a/Geometry/MTDNumberingBuilder/plugins/DDCmsMTDConstruction.cc +++ b/Geometry/MTDNumberingBuilder/plugins/DDCmsMTDConstruction.cc @@ -26,12 +26,13 @@ class DDNameFilter : public DDFilter { void veto(const std::string& veto) { veto_.emplace_back(veto); } bool accept(const DDExpandedView& ev) const final { + std::string currentName(ev.logicalPart().name().fullname()); for (const auto& test : veto_) { - if (ev.logicalPart().name().fullname().find(test) != std::string::npos) + if (currentName.find(test) != std::string::npos) return false; } for (const auto& test : allowed_) { - if (ev.logicalPart().name().fullname().find(test) != std::string::npos) + if (currentName.find(test) != std::string::npos) return true; } return false; @@ -49,6 +50,11 @@ std::unique_ptr DDCmsMTDConstruction::construct(const DDComp filter.add("btl:"); filter.add("etl:"); + std::vector volnames = {"FSide", "SupportPlate"}; + for (auto const& theVol : volnames) { + filter.veto(theVol); + } + DDFilteredView fv(cpv, filter); CmsMTDStringToEnum theCmsMTDStringToEnum;