Skip to content

[surface model] Fix overlap detection, partically with scenes

Severin Diederichs requested to merge overlap_detect_scenes into surface_model

After several changes in the code (e.g., handling of embedded and non-embedded surfaces) the overlap detection was broken (or never worked for certain examples at all).

This MR refactors the overlap detection and now relies on the FSLocator alone for doing the relocation:

  • a small bug with setting the FSLocator exiting_FS was fixed by introducing a temporary FSLocator before the frame check is passed and only then using the final one that is passed.
  • extruding overlaps are now marked with the framed surface id = -1, since the sign of the common surface ID determines the side.
  • The tolerance for the hashing was increased since in LHCb there was an example of true common surfaces that were not detected due to a too strict hashing tolerance.
  • By passing the full state to the FSLocator, scenes also got fixed.

With this MR, overlaps are correctly detected in all simpler geometries (up to the CMS test beam gdml, but CMS and LHCb themselves still fail). The results for running without overlap detection are unaffected.

Note that the overlap detection algorithm (the Relocation algorithm especially) are still not fully cleaned, this will happen when the overlap detection is completely correct.

Edited by Severin Diederichs

Merge request reports