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

feat: Geant4 Gdml surface provider + Unit Test #2906

Merged
merged 24 commits into from
Feb 7, 2024

Conversation

ssdetlab
Copy link
Contributor

Adding a Surface Provider that is able to read Gdml files and extract surfaces based on Geant4PhysicalVolumeSelector criteria. Optional range-based selection of a subset of surfaces from the preselected, based on these criteria, set is available. KDTree is used to implement the range-based subset selection.

Unit test showing examples of interfacing between the volume selectors and internal structure builders with the surface provider is implemented. New selector that accepts G4 volumes based on their position is shipped to show the more memory-efficient preselection->KDTree selection pipeline. Converter to BinningValue to Geant4 axis is added and can be used to implement more sophisticated Volume Selectors.

Minor changes made to KdtSurfacesProvider and Range1D. In the former one of the internal variables is renamed to resolve shadowed declaration conflict with one of the necessary Geant4 includes. In the latter constructor is changed to be consistent with its description and provide a way to deduce uninitialized ranges based on the "degenerate" method.

@github-actions github-actions bot added Component - Core Affects the Core module Component - Plugins Affects one or more Plugins labels Jan 27, 2024
@ssdetlab
Copy link
Contributor Author

Ok, turns out that making Range1D construct a degenerate range breaks Extent Extent-accepting constructor, so changed the way of checking range initialization to template parameters check

@ssdetlab
Copy link
Contributor Author

Template parameters check worked locally but broke the git compilation. Switched to manually initializing the degenerate range

Copy link

codecov bot commented Jan 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c2e1e6e) 48.99% compared to head (f3bb3bf) 48.99%.
Report is 1 commits behind head on main.

❗ Current head f3bb3bf differs from pull request most recent head c2a9c59. Consider uploading reports for the commit c2a9c59 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2906   +/-   ##
=======================================
  Coverage   48.99%   48.99%           
=======================================
  Files         495      496    +1     
  Lines       28937    28938    +1     
  Branches    13704    13704           
=======================================
+ Hits        14178    14179    +1     
  Misses       4881     4881           
  Partials     9878     9878           

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

@github-actions github-actions bot added the Component - Documentation Affects the documentation label Jan 27, 2024
@AJPfleger AJPfleger added this to the next milestone Jan 29, 2024
@paulgessinger
Copy link
Member

@ssdetlab somehow, you were not on the CI allow-list. Can you accept the GH team invitation, and then push an (empty) commit to retrigger the CI?

Copy link
Contributor

@AJPfleger AJPfleger left a comment

Choose a reason for hiding this comment

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

I was just looking at the tests.

@ssdetlab
Copy link
Contributor Author

ssdetlab commented Feb 1, 2024

@AJPfleger, added the changes that you've suggested to the test.

@AJPfleger AJPfleger requested a review from asalzburger February 1, 2024 14:16
@kodiakhq kodiakhq bot merged commit 1e436b2 into acts-project:main Feb 7, 2024
50 of 51 checks passed
@github-actions github-actions bot removed the automerge label Feb 7, 2024
LaraCalic pushed a commit to LaraCalic/acts that referenced this pull request Feb 10, 2024
Adding a Surface Provider that is able to read Gdml files and extract surfaces based on Geant4PhysicalVolumeSelector criteria. Optional range-based selection of a subset of surfaces from the preselected, based on these criteria, set  is available. KDTree is used to implement the range-based subset selection.  

Unit test showing examples of interfacing between the volume selectors and internal structure builders with the surface provider is implemented. New selector that accepts G4 volumes based on their position is shipped to show the more memory-efficient preselection->KDTree selection pipeline. Converter to BinningValue to Geant4 axis is added and can be used to implement more sophisticated Volume Selectors.

Minor changes made to KdtSurfacesProvider and Range1D. In the former one of the internal variables is renamed to resolve shadowed declaration conflict with one of the necessary Geant4 includes. In the latter constructor is changed to be consistent with its description and provide a way to deduce uninitialized ranges based on the "degenerate" method.
@paulgessinger paulgessinger modified the milestones: next, v33.0.0 Mar 6, 2024
EleniXoch pushed a commit to EleniXoch/acts that referenced this pull request May 6, 2024
Adding a Surface Provider that is able to read Gdml files and extract surfaces based on Geant4PhysicalVolumeSelector criteria. Optional range-based selection of a subset of surfaces from the preselected, based on these criteria, set  is available. KDTree is used to implement the range-based subset selection.  

Unit test showing examples of interfacing between the volume selectors and internal structure builders with the surface provider is implemented. New selector that accepts G4 volumes based on their position is shipped to show the more memory-efficient preselection->KDTree selection pipeline. Converter to BinningValue to Geant4 axis is added and can be used to implement more sophisticated Volume Selectors.

Minor changes made to KdtSurfacesProvider and Range1D. In the former one of the internal variables is renamed to resolve shadowed declaration conflict with one of the necessary Geant4 includes. In the latter constructor is changed to be consistent with its description and provide a way to deduce uninitialized ranges based on the "degenerate" method.
asalzburger pushed a commit to asalzburger/acts that referenced this pull request May 21, 2024
Adding a Surface Provider that is able to read Gdml files and extract surfaces based on Geant4PhysicalVolumeSelector criteria. Optional range-based selection of a subset of surfaces from the preselected, based on these criteria, set  is available. KDTree is used to implement the range-based subset selection.  

Unit test showing examples of interfacing between the volume selectors and internal structure builders with the surface provider is implemented. New selector that accepts G4 volumes based on their position is shipped to show the more memory-efficient preselection->KDTree selection pipeline. Converter to BinningValue to Geant4 axis is added and can be used to implement more sophisticated Volume Selectors.

Minor changes made to KdtSurfacesProvider and Range1D. In the former one of the internal variables is renamed to resolve shadowed declaration conflict with one of the necessary Geant4 includes. In the latter constructor is changed to be consistent with its description and provide a way to deduce uninitialized ranges based on the "degenerate" method.
@ssdetlab ssdetlab deleted the geant4-surface-provider branch October 11, 2024 12:42
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 Component - Documentation Affects the documentation Component - Plugins Affects one or more Plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants