-
Notifications
You must be signed in to change notification settings - Fork 173
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: New DetectorNavigator tests and some fixes #2988
refactor: New DetectorNavigator tests and some fixes #2988
Conversation
Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2988 +/- ##
==========================================
+ Coverage 48.63% 48.68% +0.05%
==========================================
Files 493 493
Lines 29043 29053 +10
Branches 13849 13854 +5
==========================================
+ Hits 14124 14144 +20
+ Misses 4971 4963 -8
+ Partials 9948 9946 -2 ☔ View full report in Codecov by Sentry. |
📊: Physics performance monitoring for b4b6d9aphysmon summary
|
Returned the errors but in the exception throwing form. |
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.
The changes look like they make sense to me.
I think we should get them in and start a testing setup for the ODD and the Telescope detector.
Added a simple concept to check the Something like that may already be useful in some parts of the codebase, so we may want to create later a separate PR with a bit more thought through implementation and a bit more wider coverage. |
I will try merge the Open Data Detector v4.0.1 today/tomorrow, so we can set up a first geometry building and propagation test. |
Adding new tests for the `DetectorNavigator` and introducing some fixes. In the `DetectorNavigator` itself: 1) Adding `DetectorVolume`, `CandidateSurfaces` and `NavigationState` initialization into `initialize`. Previously, if you ran with the `endOfWorld` aborter, Propagation didn't enter the stepping loop, because the current volume was `nullptr` and there were no candidates to try. 2) Adding implicit `endOfWorld` check after the `Portal` update. Previously, the `initialize` was called and volume was set to the one the Navigator is currently exiting (volume finders treat the boundary as a part of the volume). This resulted in the stepping loop continuing until the limit in the number of steps is reached. 3) Adding navigation breaks. Some of the aborters (related to the KF and its tests) were not exiting properly before. 4) Removed `initialize` call in the post step to insure the proper abortion. 5) Added iteration over the intersection list to store candidates. Previously, if the surface was intersected more than once, only one of the intersections was taken into account, even if more of them were valid. 6) Took direction (e.g. `Acts::Forward`) into account during the `NavigationState` filling. Previously, the `Backward` direction propagation didn't work. 7) Small changes in the material-related files to resolve the `currentVolume` conflicts in the compilation. In the tests: 1) Added initialization tests, analogous to the ones for the `Navigator` 2) Navigation through a simple cubic geometry in the `Forward` and `Backward` directions. Consistency checks, and things like that. 3) Tests that ensure the proper behaviour when the multiple valid intersections are encountered. Like the double crossing of the Cylindrical surface. --------- Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com> Co-authored-by: Andreas Salzburger <asalzburger@gmail.com>
Adding new tests for the `DetectorNavigator` and introducing some fixes. In the `DetectorNavigator` itself: 1) Adding `DetectorVolume`, `CandidateSurfaces` and `NavigationState` initialization into `initialize`. Previously, if you ran with the `endOfWorld` aborter, Propagation didn't enter the stepping loop, because the current volume was `nullptr` and there were no candidates to try. 2) Adding implicit `endOfWorld` check after the `Portal` update. Previously, the `initialize` was called and volume was set to the one the Navigator is currently exiting (volume finders treat the boundary as a part of the volume). This resulted in the stepping loop continuing until the limit in the number of steps is reached. 3) Adding navigation breaks. Some of the aborters (related to the KF and its tests) were not exiting properly before. 4) Removed `initialize` call in the post step to insure the proper abortion. 5) Added iteration over the intersection list to store candidates. Previously, if the surface was intersected more than once, only one of the intersections was taken into account, even if more of them were valid. 6) Took direction (e.g. `Acts::Forward`) into account during the `NavigationState` filling. Previously, the `Backward` direction propagation didn't work. 7) Small changes in the material-related files to resolve the `currentVolume` conflicts in the compilation. In the tests: 1) Added initialization tests, analogous to the ones for the `Navigator` 2) Navigation through a simple cubic geometry in the `Forward` and `Backward` directions. Consistency checks, and things like that. 3) Tests that ensure the proper behaviour when the multiple valid intersections are encountered. Like the double crossing of the Cylindrical surface. --------- Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com> Co-authored-by: Andreas Salzburger <asalzburger@gmail.com>
Adding new tests for the `DetectorNavigator` and introducing some fixes. In the `DetectorNavigator` itself: 1) Adding `DetectorVolume`, `CandidateSurfaces` and `NavigationState` initialization into `initialize`. Previously, if you ran with the `endOfWorld` aborter, Propagation didn't enter the stepping loop, because the current volume was `nullptr` and there were no candidates to try. 2) Adding implicit `endOfWorld` check after the `Portal` update. Previously, the `initialize` was called and volume was set to the one the Navigator is currently exiting (volume finders treat the boundary as a part of the volume). This resulted in the stepping loop continuing until the limit in the number of steps is reached. 3) Adding navigation breaks. Some of the aborters (related to the KF and its tests) were not exiting properly before. 4) Removed `initialize` call in the post step to insure the proper abortion. 5) Added iteration over the intersection list to store candidates. Previously, if the surface was intersected more than once, only one of the intersections was taken into account, even if more of them were valid. 6) Took direction (e.g. `Acts::Forward`) into account during the `NavigationState` filling. Previously, the `Backward` direction propagation didn't work. 7) Small changes in the material-related files to resolve the `currentVolume` conflicts in the compilation. In the tests: 1) Added initialization tests, analogous to the ones for the `Navigator` 2) Navigation through a simple cubic geometry in the `Forward` and `Backward` directions. Consistency checks, and things like that. 3) Tests that ensure the proper behaviour when the multiple valid intersections are encountered. Like the double crossing of the Cylindrical surface. --------- Co-authored-by: Andreas Stefl <stefl.andreas@gmail.com> Co-authored-by: Andreas Salzburger <asalzburger@gmail.com>
Adding new tests for the
DetectorNavigator
and introducing some fixes.In the
DetectorNavigator
itself:Adding
DetectorVolume
,CandidateSurfaces
andNavigationState
initialization intoinitialize
. Previously, if you ran with theendOfWorld
aborter, Propagation didn't enter the stepping loop, because the current volume wasnullptr
and there were no candidates to try.Adding implicit
endOfWorld
check after thePortal
update. Previously, theinitialize
was called and volume was set to the one the Navigator is currently exiting (volume finders treat the boundary as a part of the volume). This resulted in the stepping loop continuing until the limit in the number of steps is reached.Adding navigation breaks. Some of the aborters (related to the KF and its tests) were not exiting properly before.
Removed
initialize
call in the post step to insure the proper abortion.Added iteration over the intersection list to store candidates. Previously, if the surface was intersected more than once, only one of the intersections was taken into account, even if more of them were valid.
Took direction (e.g.
Acts::Forward
) into account during theNavigationState
filling. Previously, theBackward
direction propagation didn't work.Small changes in the material-related files to resolve the
currentVolume
conflicts in the compilation.In the tests:
Added initialization tests, analogous to the ones for the
Navigator
Navigation through a simple cubic geometry in the
Forward
andBackward
directions. Consistency checks, and things like that.Tests that ensure the proper behaviour when the multiple valid intersections are encountered. Like the double crossing of the Cylindrical surface.