Skip to content

Commit

Permalink
GeoHandler: store TGeoVolumes in deterministic order
Browse files Browse the repository at this point in the history
  • Loading branch information
andresailer committed May 30, 2024
1 parent 5236ba6 commit 704911a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DDCore/include/DD4hep/GeoHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ namespace dd4hep {
*/
class GeometryInfo {
public:
std::set<TGeoShape*> solids;
std::vector<TGeoShape*> solids;
std::set<TGeoShape*> solid_set;
std::set<Volume> volumeSet;
std::vector<Volume> volumes;
std::set<VisAttr> vis;
Expand Down
4 changes: 3 additions & 1 deletion DDCore/src/GeoHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 704911a

Please sign in to comment.