Skip to content
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

docs: Add comments grid iterator #2839

Merged
merged 15 commits into from
Jan 10, 2024

Conversation

CarloVarni
Copy link
Collaborator

This adds some comments to the code to describe what the grid iterator classes do. It also adds two methods for retrieving the current local and global positions from the iterators, as well as adding some unit tests to check these newly-added methods.

@CarloVarni CarloVarni added this to the next milestone Dec 18, 2023
@github-actions github-actions bot added the Component - Core Affects the Core module label Dec 18, 2023
Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (bbd7a11) 48.88% compared to head (fd91f49) 48.89%.

Files Patch % Lines
Core/include/Acts/Utilities/GridIterator.ipp 66.66% 0 Missing and 4 partials ⚠️
Core/include/Acts/Seeding/BinnedSPGroup.ipp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2839   +/-   ##
=======================================
  Coverage   48.88%   48.89%           
=======================================
  Files         488      488           
  Lines       28244    28253    +9     
  Branches    13303    13307    +4     
=======================================
+ Hits        13808    13813    +5     
  Misses       4827     4827           
- Partials     9609     9613    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CarloVarni CarloVarni force-pushed the AddCommentsGridIterator branch from a325bc2 to 01fb179 Compare January 8, 2024 17:12
Copy link
Contributor

@niermann999 niermann999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general

Core/include/Acts/Utilities/GridIterator.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/GridIterator.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/GridIterator.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/GridIterator.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/GridIterator.hpp Outdated Show resolved Hide resolved
@CarloVarni
Copy link
Collaborator Author

Hi @niermann999 thanks for the comment. I have applied your suggestions

niermann999
niermann999 previously approved these changes Jan 9, 2024
@acts-policybot acts-policybot bot dismissed niermann999’s stale review January 10, 2024 04:58

Invalidated by push of fd91f49

@CarloVarni
Copy link
Collaborator Author

CarloVarni commented Jan 10, 2024

Hi @niermann999 I had to make a minor change to fix a problem in the doc test (@brief -> @param). See fb17f79

This PR needs another approval for the CI to be happy

@andiwand andiwand merged commit 5893004 into acts-project:main Jan 10, 2024
55 checks passed
@acts-project-service
Copy link
Collaborator

acts-project-service commented Jan 10, 2024

✅ Athena integration test results [5893004]

✅ All tests successful

status job report
🟢 run_unit_tests
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsBenchmarkWithSpot.sh 8 100
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsWorkflow.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateAmbiguityResolution.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateResolvedTracks.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateTracks.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateActsCoreSpacePoints.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateActsSpacePoints.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateSeeds.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateOrthogonalSeeds.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsValidateClusters.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsPersistifyEDM.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsGSFRefitting.sh
🟢 run_ci_tests: ../athena/AtlasTest/CITest/test/ActsKfRefitting.sh
🟢 run_ci_tests: python3 ../athena/Tracking/Acts/ActsGeometry/test/ActsExtrapolationAlgTest.py
🟢 run_ci_tests: python3 ../athena/Tracking/Acts/ActsGeometry/test/ActsITkTest.py
🟢 run_workflow_tests_run4_mc
🟢 run_workflow_tests_run2_mc
🟢 run_workflow_tests_run2_data
🟢 run_workflow_tests_run3_mc
🟢 run_workflow_tests_run3_data
🟢 run_art_test: test_data18_13TeV_1000evt
🟢 run_art_test: test_ttbarPU40_reco

@CarloVarni CarloVarni deleted the AddCommentsGridIterator branch January 10, 2024 20:52
@acts-project-service acts-project-service added the Fails Athena tests This PR causes a failure in the Athena tests label Jan 15, 2024
kodiakhq bot pushed a commit that referenced this pull request Jan 18, 2024
A general class for defining a `BinnedGroup`. This class stores a `grid` (owns it), two `GridBinFinders` and a navigation pattern, optionally defined by the user. The PR also defines its iterator.

This will replace the current `BinnedSPGroup` implementation, which is very specific.

Also, creating and filling a grid cannot be generalized imho: variable definitions, selection cuts, number of axes and their ordering. As such, the creation and the filling of the grid are now handled externally, and not inside the `BinnedGroup` class, and it's the user's duty to make sure the filling happens.

In my mind, all of this should be handled by the user for any custom way of doing it. One thing we can provide (as we currently do but I'm afraid is more a "nice consequence" then a "design") some pre-defined grids for specific geometries. 
For instance we can define a `CylindricalSpacePointGrid<external_spacepoint_t>` (as well as `CylindricalBinnedGroup<external_spacepoint_t>`) or a `TelescopeSpacePointGrid<external_spacepoint_t>` (and its `TelescopeBinnedGroup<external_spacepoint_t>`). 

These last points are not covered here, will be addressed in another PR once this one is in. My idea is to define these "specialization" as simple `typedef`s of the above generic classes, as well as defining functions for their creation and filling. This can be located inside  a new `Acts/Seeding/detail` folder, so we can add as many specializations as possible.

Requires:
- #2838
- #2835
- #2839 (maybe optional?)
@paulgessinger paulgessinger modified the milestones: next, v32.0.0 Jan 19, 2024
@paulgessinger paulgessinger removed the Fails Athena tests This PR causes a failure in the Athena tests label Jan 23, 2024
LaraCalic pushed a commit to LaraCalic/acts that referenced this pull request Feb 10, 2024
This adds some comments to the code to describe what the grid iterator
classes do. It also adds two methods for retrieving the current local
and global positions from the iterators, as well as adding some unit
tests to check these newly-added methods.

---------

Co-authored-by: Carlo Varni <carlovarni@pccvarni.dyndns.cern.ch>
Co-authored-by: Carlo Varni <carlovarni@88-66-5a-25-b5-1f.dhcp.lbnl.us>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Carlo Varni <carlovarni@MacBook-Pro-di-Carlo-5.local>
LaraCalic pushed a commit to LaraCalic/acts that referenced this pull request Feb 10, 2024
A general class for defining a `BinnedGroup`. This class stores a `grid` (owns it), two `GridBinFinders` and a navigation pattern, optionally defined by the user. The PR also defines its iterator.

This will replace the current `BinnedSPGroup` implementation, which is very specific.

Also, creating and filling a grid cannot be generalized imho: variable definitions, selection cuts, number of axes and their ordering. As such, the creation and the filling of the grid are now handled externally, and not inside the `BinnedGroup` class, and it's the user's duty to make sure the filling happens.

In my mind, all of this should be handled by the user for any custom way of doing it. One thing we can provide (as we currently do but I'm afraid is more a "nice consequence" then a "design") some pre-defined grids for specific geometries. 
For instance we can define a `CylindricalSpacePointGrid<external_spacepoint_t>` (as well as `CylindricalBinnedGroup<external_spacepoint_t>`) or a `TelescopeSpacePointGrid<external_spacepoint_t>` (and its `TelescopeBinnedGroup<external_spacepoint_t>`). 

These last points are not covered here, will be addressed in another PR once this one is in. My idea is to define these "specialization" as simple `typedef`s of the above generic classes, as well as defining functions for their creation and filling. This can be located inside  a new `Acts/Seeding/detail` folder, so we can add as many specializations as possible.

Requires:
- acts-project#2838
- acts-project#2835
- acts-project#2839 (maybe optional?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module Seeding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants