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 29, 2024
1 parent da374ac commit a2aba42
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 @@ -67,7 +67,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 a2aba42

Please sign in to comment.