Skip to content

Commit

Permalink
Minimal set of vetos to keep ol behaviour also on I15 scenario, cachi…
Browse files Browse the repository at this point in the history
…ng logical name value as suggested by D. Lange
  • Loading branch information
fabiocos committed Oct 27, 2023
1 parent a427727 commit 3a7667e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Geometry/MTDNumberingBuilder/plugins/DDCmsMTDConstruction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -49,6 +50,11 @@ std::unique_ptr<GeometricTimingDet> DDCmsMTDConstruction::construct(const DDComp
filter.add("btl:");
filter.add("etl:");

std::vector<std::string> volnames = {"FSide", "SupportPlate"};
for (auto const& theVol : volnames) {
filter.veto(theVol);
}

DDFilteredView fv(cpv, filter);

CmsMTDStringToEnum theCmsMTDStringToEnum;
Expand Down

0 comments on commit 3a7667e

Please sign in to comment.