-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: Steppers use MagneticFieldProvider (2/2) #675
refactor!: Steppers use MagneticFieldProvider (2/2) #675
Conversation
@baschlag could give the vertexing based on this branch a shot and see if anything sticks out? |
3d2d202
to
945da0a
Compare
Codecov Report
@@ Coverage Diff @@
## master #675 +/- ##
==========================================
+ Coverage 48.94% 48.96% +0.02%
==========================================
Files 325 325
Lines 16622 16639 +17
Branches 7760 7762 +2
==========================================
+ Hits 8135 8147 +12
- Misses 3039 3042 +3
- Partials 5448 5450 +2
Continue to review full report at Codecov.
|
81c8489
to
349dcb1
Compare
8fd13ad
to
b2da6fb
Compare
Excellent news. This seems to be within precision, so we can go ahead with this one and #666 |
b2da6fb
to
af12fbf
Compare
af12fbf
to
05596c7
Compare
Ok with #666 merged, this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve the changes here (there's one question regaring a TODO), I think we should create three follow-up PRs to clean out the unneccessary shorthand definitions, i.e. we I would do:
- PropataionTests/Example (@asalzburger)
- Fitter Tests/Examples (@XiaocongAi)
- Vertexing Tests/Examples (@baschlag)
We should basically make a rule that
using Stepper = Acts::EigenStepper<>
should not be used, but e.g. `using KalmanFitter = Acts::KalmanFitter<Acts::EigenStepper<>, ..., ..>' is still fine.
What do you think?
Examples/Detectors/MagneticField/include/ActsExamples/MagneticField/MagneticField.hpp
Show resolved
Hide resolved
With the vertexing code previously being templated on the bfield type, a hardcoded ConstantBField was used for simplicity in the Examples. After #675 went in, a configurable BField can now easily be used and set in the example options. This PR changes the Examples accordingly. Additionally some clean-up is done and Stepper typedefs like using Stepper = Acts::EigenStepper<>; are removed and the type is used explicitly instead. Closes #735
Based on #666, this PR changes the way the steppers store and use the B fields. The B field template parameter goes away and they accept instances of
std::shared_ptr<MagneticFieldProvider>
. The use ofstd::shared_ptr
should be fine, since the propagators and steppers are only rarely created, copied or destroyed. This change then also allows getting rid ofBFieldVariant
in the examples, since the genericMagneticFieldProvider
can be used as an interchange type. Doing this reduces the compile time of two or our most compile-time resource hungry compilation units by over 20%. More improvements might be possible, but require more work.There are some additional cleanups that become possible but I would like to keep this PR reasonably (to some extent) small, so those will be independent.
I did not observe decreases in propagation preformance.
This includes #666, #670, #673
BREAKING CHANGE: The stepper type structure changes. None of the steppers accept a B field template argument anymore. Constructors are changed to accept an
std::shared_ptr<Acts::BFieldProvider>
instead of an instance of the concrete B field type.