Skip to content

Draft: Remove const cast and add map to TrackingGeometry

This PR removes Surface::associatedLayer() and adds a map<Surface*, Layer*> to the TrackingGeometry. All calls to Surface::associatedLayer() have been replaced by a call to TrackingGeometry::associatedLayer(). While my tests show that 7000 calls (avg number of calls per event in q431) to a map with 7000 entries takes just 0.0005s (std::map) respectively 0.0001s (std::unordered_map), I'm not sure about the impact of having to retrieve the TrackingGeometry in places this was not necessary before.

This PR for starters should run all tests to see if the results are good.

If this produces the desired results, the Surface::associateLayer method should also be removed.

Edited by Robert Johannes Langenberg

Merge request reports

Loading