refactor!: Switch SourceLink to container
This PR changes the SourceLink back from a base class to a concrete type without inheritance. It now contains a type erased upstream sourcelink (right now implement by std::any, but we can change this to use something with small buffer optimization).
Contains #1512 at the moment.
@tboldagh what do you think?
Codecov Report
Merging #1616 (fe4a168) into main (275ef67) will increase coverage by
0.01%. The diff coverage is65.11%.
@@ Coverage Diff @@
## main #1616 +/- ##
==========================================
+ Coverage 49.20% 49.21% +0.01%
==========================================
Files 398 398
Lines 21815 21827 +12
Branches 9902 9904 +2
==========================================
+ Hits 10733 10742 +9
- Misses 4215 4216 +1
- Partials 6867 6869 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ude/Acts/SpacePointFormation/SpacePointBuilder.hpp | 50.00% <ø> (ø) |
|
| ...de/Acts/TrackFinding/CombinatorialKalmanFilter.hpp | 31.72% <0.00%> (-0.26%) |
:arrow_down: |
| Core/include/Acts/TrackFitting/KalmanFitter.hpp | 45.06% <33.33%> (-0.31%) |
:arrow_down: |
| ...s/SpacePointFormation/detail/SpacePointBuilder.ipp | 47.14% <50.00%> (ø) |
|
| Core/include/Acts/EventData/MultiTrajectory.hpp | 71.35% <57.14%> (+0.27%) |
:arrow_up: |
| ...e/include/Acts/EventData/VectorMultiTrajectory.hpp | 58.20% <60.00%> (ø) |
|
| Core/include/Acts/EventData/Measurement.hpp | 80.00% <66.66%> (-6.37%) |
:arrow_down: |
| Core/include/Acts/EventData/SourceLink.hpp | 75.00% <73.33%> (-25.00%) |
:arrow_down: |
| Core/include/Acts/EventData/MultiTrajectory.ipp | 57.89% <100.00%> (+0.75%) |
:arrow_up: |
| Core/src/EventData/VectorMultiTrajectory.cpp | 78.67% <100.00%> (+1.47%) |
:arrow_up: |
| ... and 3 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
:bar_chart: Physics performance monitoring for fe4a1683cdf1d2ca8bb75cd5f3d3574b27ac901e
Full report Seeding: seeded, truth estimated, orthogonal CKF: seeded, truth smeared, truth estimated, orthogonal IVF: seeded, truth smeared, truth estimated, orthogonal Ambiguity resolution: seeded, orthogonal Truth tracking Truth tracking (GSF)
Vertexing
Vertexing vs. mu
IVF seeded
IVF truth_smeared
IVF truth_estimated
IVF orthogonal
Seeding
Seeding seeded
Seeding truth_estimated
Seeding orthogonal
CKF
CKF seeded
CKF truth_smeared
CKF truth_estimated
CKF orthogonal
Ambiguity resolution
seeded
Truth tracking (Kalman Filter)
Truth tracking
Truth tracking (GSF)
Truth tracking
Ok, the orthogonal seeding test and the ExaTrkX compilation still need fixes here.
This still carries a slowdown of about 10%. I'm trying to optimize the type erasure mechanism to be more efficient.
I made some performance comparisons here on 20 events, 100 runs in each config.

I need to unblock this from the Any developments (#1695). Can we move ahead with this with std::any, and accept that the overhead we incur is slightly larger than we would/will until the Any type with SBO lands?
Opinions? @asalzburger @andiwand @benjaminhuth ?
makes sense to me as the performance seems to be mostly lost in the ambi resolution which is not optimal anyway
Yeah sounds good. And I think Acts::Any will land quite soon, right?
There are 100 million edge cases so no ETA on Acts::Any yet.
Inclusively, a 20 event ODD job goes from about 10.0s to about 11.2s on -O3.
Also in this case the largest part seems to indeed be from the Ambiguity resolution. Space point creation and track selection is also slower, but those are generally not very slow to begin with, so it's a smaller effect.

Track finding is not strongly affected (likely dominated by math anyway):

I think this is ready for review. @benjaminhuth, @andiwand @asalzburger ?
@andiwand can you have another quick look and reapprove?