From 704911ae2c6c88f0e0d53e487256876f5ca20259 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Wed, 29 May 2024 18:21:30 +0200 Subject: [PATCH] GeoHandler: store TGeoVolumes in deterministic order --- DDCore/include/DD4hep/GeoHandler.h | 3 ++- DDCore/src/GeoHandler.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DDCore/include/DD4hep/GeoHandler.h b/DDCore/include/DD4hep/GeoHandler.h index 6abb8fd91..b138d2547 100644 --- a/DDCore/include/DD4hep/GeoHandler.h +++ b/DDCore/include/DD4hep/GeoHandler.h @@ -59,7 +59,8 @@ namespace dd4hep { */ class GeometryInfo { public: - std::set solids; + std::vector solids; + std::set solid_set; std::set volumeSet; std::vector volumes; std::set vis; diff --git a/DDCore/src/GeoHandler.cpp b/DDCore/src/GeoHandler.cpp index 38a10f5f6..8cd4fee14 100644 --- a/DDCore/src/GeoHandler.cpp +++ b/DDCore/src/GeoHandler.cpp @@ -44,7 +44,9 @@ namespace { collectSolid(geo, name + "_left", name + "_left", boolean->GetLeftShape(), boolean->GetLeftMatrix()); collectSolid(geo, name + "_right", name + "_right", boolean->GetRightShape(), boolean->GetRightMatrix()); } - geo.solids.emplace(shape); + if(geo.solid_set.emplace(shape).second) { + geo.solids.push_back(shape); + } geo.trafos.emplace_back(node, matrix); } }