-
Notifications
You must be signed in to change notification settings - Fork 168
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
Gen3 geometry #3502
Comments
This was referenced Aug 27, 2024
kodiakhq bot
pushed a commit
that referenced
this issue
Aug 29, 2024
Part of #3502 This PR implements *Portals*. A portal connects two or more neighboring volumes. Each volume has a set of portals that describes which volumes lie behind the portal in that direction. Portals use associated portal links to perform lookups of target volumes. Each portal has two links, and a corresponding surface. One link is associated with the direction along the surface's normal vector, and one with the opposite direction. Portals can be **fused** and **merged**. **Fusing** is the combination of two portal linkson the same logical surfaces. The actual surface instances can be different, as long as they are geometrically equivalent (within numerical precistion). The resulting portal will have one portal along the shared surface's normal vector, and one opposite that vector. ``` portal1 portal2 +---+ +---+ | | | | | | | | <----+ | + | +----> | | | | | | | | +---+ +---+ ``` The input portals need to have compatible link loadout, e.g. one portal needs to have the *along normal* slot filled, and the other one needs to have the *opposite normal* slot filled. If portals share a filled slot, the function throws an exception. **Merging** is the complementary operation to the fusing of portals. To be able to merge portals, the surfaces of their associated links need to be *mergeable*, and the portal links need to be compatible. This means that both portals need to have a link along the portal surface normal, opposite the normal, or both. If the equipped links are opposite relative to one another (e.g. one along one opposite), the function will throw an exception. ``` ^ ^ | | portal1| portal2| +-------+-------+ +-------+-------+ | | + | | +-------+-------+ +-------+-------+ | | | | v v ``` This is a destructive operation on both portals, their links will be moved to produce merged links, which can fail if the portal links are not compatible
This issue/PR has been automatically marked as stale because it has not had recent activity. The stale label will be removed if any interaction occurs. |
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 1, 2024
Part of #3502 ### Enhancements to Geometry Handling: * [`Core/include/Acts/Geometry/Portal.hpp`](diffhunk://#diff-5aadb8a97cbb4382fe684f28586c415cde1b4e467a7fec315c7506f9766133f3R215-R218): Added a mutable `surface()` method to the `Portal` class to allow modification of the portal surface. * [`Core/src/Geometry/Portal.cpp`](diffhunk://#diff-e32791625fda93fd367fc971619ea03be19128e91bbca7e8a09b5af399beb461R175-R179): Implemented the mutable `surface()` method in the `Portal` class. ### Integration with TrackingVolume: * `Core/include/Acts/Geometry/TrackingVolume.hpp`: - Declared the `Portal` class. - Added methods to manage portals (`portals()`, `addPortal()`) and defined `PortalRange` and `MutablePortalRange` types. [[1]](diffhunk://#diff-835fb549fb77cdaa632a4e2131c8dc17ad4973ab3f1600a4608582b706a3f68eR51) [[2]](diffhunk://#diff-835fb549fb77cdaa632a4e2131c8dc17ad4973ab3f1600a4608582b706a3f68eR305-R324) [[3]](diffhunk://#diff-835fb549fb77cdaa632a4e2131c8dc17ad4973ab3f1600a4608582b706a3f68eR518) * `Core/src/Geometry/TrackingVolume.cpp`: - Included the `Portal.hpp` header. - Implemented the portal management methods (`portals()`, `addPortal()`). - Updated `closeGeometry` to assign geometry IDs to portals. [[1]](diffhunk://#diff-a086b4ee3f623999c43c4f743425d97d2c10c9c902e73e8ee21fce615880a647R14) [[2]](diffhunk://#diff-a086b4ee3f623999c43c4f743425d97d2c10c9c902e73e8ee21fce615880a647R428-R439) [[3]](diffhunk://#diff-a086b4ee3f623999c43c4f743425d97d2c10c9c902e73e8ee21fce615880a647R657-R668)
This was referenced Oct 2, 2024
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 4, 2024
Part of #3502 Blocked by: - #3673 --- This pull request introduces the new `PortalShell` classes to the Acts geometry module, along with corresponding unit tests. The changes are primarily focused on adding new functionality for handling portal shells in tracking volumes. ### New Functionality: * [`Core/include/Acts/Geometry/PortalShell.hpp`](diffhunk://#diff-80595cf723b4c4b0a2cf3de28ac0da38793f2955a2e0ce1dc4fd87381fac79aeR1-R115): Introduced new `PortalShell` classes, including `PortalShellBase`, `CylinderPortalShell`, `SingleCylinderPortalShell`, and `CylinderStackPortalShell`. These classes provide interfaces and implementations for managing portals within cylindrical tracking volumes. * [`Core/src/Geometry/PortalShell.cpp`](diffhunk://#diff-4d9e1b25351b7d20e1dbdc440060aa02eaab832aabfde0b621c44bf8241ca7b8R1-R387): Implemented the methods for the new `PortalShell` classes, including portal management and validation logic. ### Build System Updates: * [`Core/src/Geometry/CMakeLists.txt`](diffhunk://#diff-5d46d063bba89d4f5042c2ba4cdfbdcb77335367cb0ce9800dd5d036011e2c56R45): Added the new `PortalShell.cpp` source file to the build system. * [`Tests/UnitTests/Core/Geometry/CMakeLists.txt`](diffhunk://#diff-569c5da4fca89fb082a2e207221e8d00cde5d6352c26878d8df0e11ef9f148eeR37): Added a new unit test for `PortalShell` to ensure the new functionality is properly tested.
This was referenced Oct 7, 2024
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 7, 2024
Blocked by: - #3675 Related to #3502 --- The most significant changes include adding visualization methods to `TrackingGeometry` and `TrackingVolume`, updating the `Surface` class, and enhancing the `IVisualization3D` interface. Additionally, the `ObjVisualization3D` class has been refactored, and new default view configurations have been defined. ### Visualization Enhancements: * [`TrackingGeometry.hpp`](diffhunk://#diff-cc497a4ee5032615db90ef065e9466279a0fde38fbd201840a32d783d3d6ec4aR148-R158): Added a `visualize` method to enable visualization of tracking geometry, including substructures. (`[Core/include/Acts/Geometry/TrackingGeometry.hppR148-R158](diffhunk://#diff-cc497a4ee5032615db90ef065e9466279a0fde38fbd201840a32d783d3d6ec4aR148-R158)`) * [`TrackingVolume.hpp`](diffhunk://#diff-835fb549fb77cdaa632a4e2131c8dc17ad4973ab3f1600a4608582b706a3f68eR326-R344): Added methods to visualize tracking volumes and manage surfaces, including `visualize`, `surfaces`, and `addSurface`. (`[[1]](diffhunk://#diff-835fb549fb77cdaa632a4e2131c8dc17ad4973ab3f1600a4608582b706a3f68eR326-R344)`, `[[2]](diffhunk://#diff-835fb549fb77cdaa632a4e2131c8dc17ad4973ab3f1600a4608582b706a3f68eR477-R487)`, `[[3]](diffhunk://#diff-835fb549fb77cdaa632a4e2131c8dc17ad4973ab3f1600a4608582b706a3f68eR550)`) ### Interface Updates: * [`IVisualization3D.hpp`](diffhunk://#diff-c56ccee98d351daf6ac595cd265d30716a594ceb74030138411595aca66fdc39R75-R80): Introduced a destructor and a new `object` method to start a new object context. (`[Core/include/Acts/Visualization/IVisualization3D.hppR75-R80](diffhunk://#diff-c56ccee98d351daf6ac595cd265d30716a594ceb74030138411595aca66fdc39R75-R80)`) * [`ObjVisualization3D.hpp`](diffhunk://#diff-fab69ace861a3e5d8fc173e8627732777a5fdd52703e9e162a14db563ea56a2aL29-R32): Refactored to use `double` as the value type and added support for object contexts. (`[[1]](diffhunk://#diff-fab69ace861a3e5d8fc173e8627732777a5fdd52703e9e162a14db563ea56a2aL29-R32)`, `[[2]](diffhunk://#diff-fab69ace861a3e5d8fc173e8627732777a5fdd52703e9e162a14db563ea56a2aR76-R102)`) ### Configuration and Defaults: * [`ViewConfig.hpp`](diffhunk://#diff-e403e98244e75d6b7d32864417c37619de6becee73f53415b733073f655f0929R114-R117): Defined new default view configurations for surfaces, portals, volumes, and other elements. (`[[1]](diffhunk://#diff-e403e98244e75d6b7d32864417c37619de6becee73f53415b733073f655f0929R114-R117)`, `[[2]](diffhunk://#diff-e403e98244e75d6b7d32864417c37619de6becee73f53415b733073f655f0929R139-R146)`) ### Codebase Cleanup: * Removed obsolete and redundant code from `ObjVisualization3D.ipp`. (`[Core/include/Acts/Visualization/detail/ObjVisualization3D.ippL1-L179](diffhunk://#diff-29bbb6e8cfcb388c51d1e88237dd0c7d582762d7e05a0ec12278bdc336b0aaa1L1-L179)`)
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 7, 2024
…3697) Needed for #3502 --- This pull request introduces several enhancements and new features to the `ProtoLayer` struct and its associated tests in the `Core` and `Tests` directories. The key changes include the addition of a local transform, multiple constructors, and new test cases to validate the functionality. ### Enhancements to `ProtoLayer` struct: * Added a new member `transform` to the `ProtoLayer` struct and updated its constructors to accept a `Transform3` parameter with a default value of `Transform3::Identity()`. (`Core/include/Acts/Geometry/ProtoLayer.hpp`, `Core/src/Geometry/ProtoLayer.cpp`) [[1]](diffhunk://#diff-1451530599ae50cdf187f035045a620fe857ff4abcb25c7a0eefc33189ef3260R36-R38) [[2]](diffhunk://#diff-1451530599ae50cdf187f035045a620fe857ff4abcb25c7a0eefc33189ef3260R47-R50) [[3]](diffhunk://#diff-1451530599ae50cdf187f035045a620fe857ff4abcb25c7a0eefc33189ef3260R60-R76) [[4]](diffhunk://#diff-4d780d37fe19501d1f964a2d67f4a654c4365f31f736d0c9653a169f1637f29eL16-R43) [[5]](diffhunk://#diff-4d780d37fe19501d1f964a2d67f4a654c4365f31f736d0c9653a169f1637f29eL81-R95) * Implemented a friend function for the output stream operator to facilitate easy printing of `ProtoLayer` objects. (`Core/include/Acts/Geometry/ProtoLayer.hpp`) ### Codebase simplification: * Removed unused `#include` directives from `ProtoLayer.cpp` to clean up the code. (`Core/src/Geometry/ProtoLayer.cpp`) ### Enhancements to unit tests: * Added new test cases in `ProtoLayerTests.cpp` to validate the behavior of `ProtoLayer` with different transformations. These changes enhance the flexibility and functionality of the `ProtoLayer` struct and ensure that the new features are thoroughly tested.
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 9, 2024
Related to #3502 --- This pull request introduces several enhancements and new features to the `Delegate` class and related utilities, focusing on improving functionality and adding new capabilities. The most important changes include the addition of `requires` clauses for better compile-time checks, new methods for connecting delegates, and the introduction of the `DelegateChainBuilder` class for building delegate chains. ### Enhancements to `Delegate` Class: * Added `requires` clauses to various methods in the `Delegate` class to ensure compile-time checks for function signatures and ownership types. (`Core/include/Acts/Utilities/Delegate.hpp`) [[1]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L160-R165) [[2]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L213-R230) [[3]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L237-L243) [[4]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L262-R272) * Moved the `kOwnership` static member to the public section and added new type aliases for better readability. (`Core/include/Acts/Utilities/Delegate.hpp`) ### New Features: * Introduced the `DelegateChainBuilder` class for constructing chains of delegates, allowing for more flexible and powerful delegate management. (`Core/include/Acts/Utilities/DelegateChainBuilder.hpp`) * Added unit tests for `DelegateChainBuilder` to ensure its functionality and correctness. (`Tests/UnitTests/Core/Utilities/DelegateChainBuilderTests.cpp`) * Updated CMakeLists to include the new unit tests for `DelegateChainBuilder`. (`Tests/UnitTests/Core/Utilities/CMakeLists.txt`) ### Enhancements to `OwningDelegate` Class: * Added constructors to the `OwningDelegate` class to support default initialization and move construction from a `Delegate`. (`Core/include/Acts/Utilities/Delegate.hpp`)
This was referenced Oct 11, 2024
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 11, 2024
This fixes a bug where the local transform was not correctly synced after resizing. Also improves a number of assertions to not rely on floating point identity anymore Related to #3502 --- This pull request includes several changes to the `CylinderVolumeStack` and `Volume` classes to improve logging, add new parameters, and enhance the overlap checking and volume updating mechanisms. The most important changes include adding a logger parameter to several methods, updating method signatures, and improving overlap checking logic. ### Enhancements to logging and method signatures: * [`Core/include/Acts/Geometry/CylinderVolumeStack.hpp`](diffhunk://#diff-86daf525fefbaa344566ea4fc6493ca85afd3627922f04c3f16758fca8717a6eL88-R93): Added a `logger` parameter to the `update` method and modified its signature to include this parameter. [[1]](diffhunk://#diff-86daf525fefbaa344566ea4fc6493ca85afd3627922f04c3f16758fca8717a6eL88-R93) [[2]](diffhunk://#diff-86daf525fefbaa344566ea4fc6493ca85afd3627922f04c3f16758fca8717a6eR125-R130) * [`Core/include/Acts/Geometry/Volume.hpp`](diffhunk://#diff-beb0194dfdd77fcfe13c0b73c9e7790cbe7bae313f1723f7979a4e9beb5d16d5R16): Added a `logger` parameter to the `update` method and included the necessary import for the `Logger` class. [[1]](diffhunk://#diff-beb0194dfdd77fcfe13c0b73c9e7790cbe7bae313f1723f7979a4e9beb5d16d5R16) [[2]](diffhunk://#diff-beb0194dfdd77fcfe13c0b73c9e7790cbe7bae313f1723f7979a4e9beb5d16d5R87-R90) * [`Core/src/Geometry/CylinderVolumeStack.cpp`](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL70-R70): Updated the `commit` method to include a `logger` parameter and modified the `initializeOuterVolume` method to pass the `logger` parameter to the `update` method. [[1]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL70-R70) [[2]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL154-R156) [[3]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL188-R190) [[4]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL212-R215) [[5]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL244-R247) [[6]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL268-R272) ### Improvements to overlap checking: * [`Core/src/Geometry/CylinderVolumeStack.cpp`](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL286-R301): Enhanced the `overlapPrint` method to include a `direction` parameter and updated the overlap checking logic to handle different directions more robustly. [[1]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL286-R301) [[2]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cR312-R323) [[3]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL319-R338) [[4]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL347-R368) [[5]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL357-R386) [[6]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL379-R405) [[7]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL397-R424) [[8]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cR436-R442) [[9]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL446-R472) ### Volume update improvements: * [`Core/src/Geometry/CylinderVolumeStack.cpp`](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL625-R689): Updated the `update` method to provide detailed logging of the current and new bounds, and added checks to prevent shrinking the stack size. [[1]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL625-R689) [[2]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL676-R703) [[3]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL693-R754)
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 11, 2024
This PR does three things: - `PortalLinkBase::merge` **no longer** does merging of grids or trivials into a combined grid. This has been observed to lead to accumulating floating point imprecision. - `CompositePortalLink` gets a method to make a grid **if** (and only if) it is composed of a set of `TrivialPortalLink`s. - `Portal::fuse` will attempt to convert `CompositePortalLink`s composed of only `TrivialPortalLink`s to a single `GridPortalLink` before fusing it with the other portal. In combination, this avoids the floating point issues and produces correctly sized grids. Part of #3502. --- This pull request introduces several enhancements and bug fixes to the `Core/include/Acts/Geometry` module, focusing on improving the `CompositePortalLink` and `GridPortalLink` classes. The most important changes include the addition of new constructors, the introduction of the `makeGrid` method, and various adjustments to ensure compatibility and correctness. ### Enhancements to `CompositePortalLink`: * Added new constructors to allow the creation of composite portals from multiple links and to handle nested composites. (`Core/include/Acts/Geometry/CompositePortalLink.hpp`, [[1]](diffhunk://#diff-248145d68399a17324b82d81d6e661a3ab739eb5b6f8d67f40145195ca465c36R55-R63) [[2]](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314R101-R129) * Introduced the `makeGrid` method to convert composite portal links into grid portal links under specific conditions. (`Core/include/Acts/Geometry/CompositePortalLink.hpp`, [Core/src/Geometry/CompositePortalLink.cppR180-R297](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314R180-R297)) ### Adjustments to `GridPortalLink`: * Changed the type of `atLocalBins` methods to return `const TrackingVolume*` instead of `TrackingVolume*`. (`Core/include/Acts/Geometry/GridPortalLink.hpp`, [[1]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL384-R389) [[2]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL402-R402) [[3]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL548-R547) [[4]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL560-R559) * Updated internal grid type to use `const TrackingVolume*`. (`Core/include/Acts/Geometry/GridPortalLink.hpp`, [Core/include/Acts/Geometry/GridPortalLink.hppL402-R402](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL402-R402)) ### Bug Fixes and Code Improvements: * Moved `mergedSurface` function to an anonymous namespace in the implementation file and refactored it for better error handling and type safety. (`Core/src/Geometry/CompositePortalLink.cpp`, [[1]](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314R11-R78) [[2]](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314L77-L106) * Improved the `isSameSurface` function to include detailed checks for surface bounds and transformations. (`Core/src/Geometry/Portal.cpp`, [Core/src/Geometry/Portal.cppL308-R357](diffhunk://#diff-e32791625fda93fd367fc971619ea03be19128e91bbca7e8a09b5af399beb461L308-R357)) * Enhanced logging and error messages for better debugging and clarity. (`Core/src/Geometry/Portal.cpp`, [[1]](diffhunk://#diff-e32791625fda93fd367fc971619ea03be19128e91bbca7e8a09b5af399beb461R274-R277) [[2]](diffhunk://#diff-e32791625fda93fd367fc971619ea03be19128e91bbca7e8a09b5af399beb461R293-R313) These changes collectively improve the functionality, safety, and maintainability of the `Acts` geometry module, particularly in handling complex portal link structures.
paulgessinger
added a commit
that referenced
this issue
Oct 12, 2024
This PR makes it such that when a `CylinderVolumeStack` is resized with the gap strategy, if there are already gaps on the outside of the stack, **they are reused** instead of creating extra gaps. Part of to #3502. ``` original size ◀───────────────▶ ┌───────────────┐ │ │ │ │ │ Volume 1 │ │ │ │ │ └───────────────┘ first resize ◀──────────────────────────▶ ┌───────────────┬──────────┐ │ │ │ │ │ │ │ Volume 1 │ Gap │ │ │ │ Gap is │ │ │ reused!──┐ └───────────────┴──────────┘ │ second resize │ ◀───────────────────────────────────▶ │ ┌───────────────┬───────────────────┐ │ │ │ │ │ │ │ │ │ │ Volume 1 │ Gap │◀─────┘ │ │ │ │ │ │ └───────────────┴───────────────────┘ ``` Blocked by: - #3715
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 13, 2024
This is a collection of python bindings bits that have accumulated. Related #3502. --- This pull request includes several updates to the `Acts` geometry and Python binding code. The most important changes involve the introduction of new enums and the addition of Python bindings for new geometry classes and methods. ### Geometry and Enum Updates: * Added `Face` enum to `CylinderVolumeBounds` to describe possible faces of a cylinder volume. (`Core/include/Acts/Geometry/CylinderVolumeBounds.hpp`) * Refactored `PortalShellBase` to use the `Face` enum from `CylinderVolumeBounds` instead of defining its own. (`Core/include/Acts/Geometry/PortalShell.hpp`) ### Python Bindings Enhancements: * Added new binning values to the `addBinning` function in `Base.cpp`. (`Examples/Python/src/Base.cpp`) * Extended `addGeometry` function to include new methods and enums for `CylinderVolumeBounds` and `ExtentEnvelope`. (`Examples/Python/src/Geometry.cpp`) [[1]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dL181-R213) [[2]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dL212-R303) * Introduced Python bindings for `CylinderVolumeStack` and its enums `AttachmentStrategy` and `ResizeStrategy`. (`Examples/Python/src/Geometry.cpp`) ### Code Cleanup: * Removed redundant includes and updated include paths to reflect new dependencies. (`Core/include/Acts/Geometry/PortalShell.hpp`, `Examples/Python/src/Geometry.cpp`) [[1]](diffhunk://#diff-80595cf723b4c4b0a2cf3de28ac0da38793f2955a2e0ce1dc4fd87381fac79aeL11-R11) [[2]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dR40) [[3]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dR51) These changes improve the modularity and functionality of the geometry components and enhance the Python interface for better usability.
kodiakhq bot
pushed a commit
that referenced
this issue
Oct 24, 2024
Terminology: - "Navigation delegate": the function that is registered with a tracking volume. In principle, this can be anything - "Navigation policy": the object that is registered with the tracking volume. It contains a method that is connected to the "navigation delegate". It has extra methods - "Navigation policy factory": To delay construction of the actual policy object **until after** the volume is fully sized and has all of its internal structure registered, the blueprint tree only contains *navigation policy factories*. This is configurable. During construction, the factory is applied to volumes, and produces a policy that is registered with the volume. This is called "navigation policy factory" from a conceptual point of view. - "MultiNavigationPolicy": chains together multiple policies in a sort of composition. You can have one policy that only deals with portals, one for sensitive and one for passive surfaces, for example. - To make this less annoying to construct, as you would have to manage the factory, I'm adding a concrete class `NavigationPolicyFactory`. Its job is to make defining a factory that produces a "MultiNavigationPolicy" easy, like: ```cpp using namespace Acts; using SurfaceArrayNavigationPolicy::LayerType; SurfaceArrayNavigationPolicy::Config config{ .layerType = LayerType::Cylinder, .bins = {10, 10} }; auto factory = NavigationPolicyFactory::make() .add<TryAllPortalNavigationPolicy>() .add<SurfaceArrayNavigationPolicy>(config); ``` or in python: ```python policy = ( acts.NavigationPolicyFactory.make() .add(acts.TryAllPortalNavigationPolicy) .add(acts.TryAllSurfaceNavigationPolicy) .add( acts.SurfaceArrayNavigationPolicy, acts.SurfaceArrayNavigationPolicy.Config( layerType=acts.SurfaceArrayNavigationPolicy.LayerType.Plane, bins=(10, 10), ), ) ) ``` Part of #3502
This was referenced Nov 6, 2024
kodiakhq bot
pushed a commit
that referenced
this issue
Nov 7, 2024
This renames the `connectOuter` method in `PortalShell` to just `fill`, because that is more descriptive of what it actually does. Part of #3502
kodiakhq bot
pushed a commit
that referenced
this issue
Nov 12, 2024
Exposes the `decorate` function to python, so the decoration can itself be steered from python if needed. Part of #3502
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
…cts-project#3697) Needed for acts-project#3502 --- This pull request introduces several enhancements and new features to the `ProtoLayer` struct and its associated tests in the `Core` and `Tests` directories. The key changes include the addition of a local transform, multiple constructors, and new test cases to validate the functionality. ### Enhancements to `ProtoLayer` struct: * Added a new member `transform` to the `ProtoLayer` struct and updated its constructors to accept a `Transform3` parameter with a default value of `Transform3::Identity()`. (`Core/include/Acts/Geometry/ProtoLayer.hpp`, `Core/src/Geometry/ProtoLayer.cpp`) [[1]](diffhunk://#diff-1451530599ae50cdf187f035045a620fe857ff4abcb25c7a0eefc33189ef3260R36-R38) [[2]](diffhunk://#diff-1451530599ae50cdf187f035045a620fe857ff4abcb25c7a0eefc33189ef3260R47-R50) [[3]](diffhunk://#diff-1451530599ae50cdf187f035045a620fe857ff4abcb25c7a0eefc33189ef3260R60-R76) [[4]](diffhunk://#diff-4d780d37fe19501d1f964a2d67f4a654c4365f31f736d0c9653a169f1637f29eL16-R43) [[5]](diffhunk://#diff-4d780d37fe19501d1f964a2d67f4a654c4365f31f736d0c9653a169f1637f29eL81-R95) * Implemented a friend function for the output stream operator to facilitate easy printing of `ProtoLayer` objects. (`Core/include/Acts/Geometry/ProtoLayer.hpp`) ### Codebase simplification: * Removed unused `#include` directives from `ProtoLayer.cpp` to clean up the code. (`Core/src/Geometry/ProtoLayer.cpp`) ### Enhancements to unit tests: * Added new test cases in `ProtoLayerTests.cpp` to validate the behavior of `ProtoLayer` with different transformations. These changes enhance the flexibility and functionality of the `ProtoLayer` struct and ensure that the new features are thoroughly tested.
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
Related to acts-project#3502 --- This pull request introduces several enhancements and new features to the `Delegate` class and related utilities, focusing on improving functionality and adding new capabilities. The most important changes include the addition of `requires` clauses for better compile-time checks, new methods for connecting delegates, and the introduction of the `DelegateChainBuilder` class for building delegate chains. ### Enhancements to `Delegate` Class: * Added `requires` clauses to various methods in the `Delegate` class to ensure compile-time checks for function signatures and ownership types. (`Core/include/Acts/Utilities/Delegate.hpp`) [[1]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L160-R165) [[2]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L213-R230) [[3]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L237-L243) [[4]](diffhunk://#diff-62fc5c04840c99ddd78a514b3b33be9001a8b2b2fdb53e5db7e481b115295ca4L262-R272) * Moved the `kOwnership` static member to the public section and added new type aliases for better readability. (`Core/include/Acts/Utilities/Delegate.hpp`) ### New Features: * Introduced the `DelegateChainBuilder` class for constructing chains of delegates, allowing for more flexible and powerful delegate management. (`Core/include/Acts/Utilities/DelegateChainBuilder.hpp`) * Added unit tests for `DelegateChainBuilder` to ensure its functionality and correctness. (`Tests/UnitTests/Core/Utilities/DelegateChainBuilderTests.cpp`) * Updated CMakeLists to include the new unit tests for `DelegateChainBuilder`. (`Tests/UnitTests/Core/Utilities/CMakeLists.txt`) ### Enhancements to `OwningDelegate` Class: * Added constructors to the `OwningDelegate` class to support default initialization and move construction from a `Delegate`. (`Core/include/Acts/Utilities/Delegate.hpp`)
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
This fixes a bug where the local transform was not correctly synced after resizing. Also improves a number of assertions to not rely on floating point identity anymore Related to acts-project#3502 --- This pull request includes several changes to the `CylinderVolumeStack` and `Volume` classes to improve logging, add new parameters, and enhance the overlap checking and volume updating mechanisms. The most important changes include adding a logger parameter to several methods, updating method signatures, and improving overlap checking logic. ### Enhancements to logging and method signatures: * [`Core/include/Acts/Geometry/CylinderVolumeStack.hpp`](diffhunk://#diff-86daf525fefbaa344566ea4fc6493ca85afd3627922f04c3f16758fca8717a6eL88-R93): Added a `logger` parameter to the `update` method and modified its signature to include this parameter. [[1]](diffhunk://#diff-86daf525fefbaa344566ea4fc6493ca85afd3627922f04c3f16758fca8717a6eL88-R93) [[2]](diffhunk://#diff-86daf525fefbaa344566ea4fc6493ca85afd3627922f04c3f16758fca8717a6eR125-R130) * [`Core/include/Acts/Geometry/Volume.hpp`](diffhunk://#diff-beb0194dfdd77fcfe13c0b73c9e7790cbe7bae313f1723f7979a4e9beb5d16d5R16): Added a `logger` parameter to the `update` method and included the necessary import for the `Logger` class. [[1]](diffhunk://#diff-beb0194dfdd77fcfe13c0b73c9e7790cbe7bae313f1723f7979a4e9beb5d16d5R16) [[2]](diffhunk://#diff-beb0194dfdd77fcfe13c0b73c9e7790cbe7bae313f1723f7979a4e9beb5d16d5R87-R90) * [`Core/src/Geometry/CylinderVolumeStack.cpp`](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL70-R70): Updated the `commit` method to include a `logger` parameter and modified the `initializeOuterVolume` method to pass the `logger` parameter to the `update` method. [[1]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL70-R70) [[2]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL154-R156) [[3]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL188-R190) [[4]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL212-R215) [[5]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL244-R247) [[6]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL268-R272) ### Improvements to overlap checking: * [`Core/src/Geometry/CylinderVolumeStack.cpp`](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL286-R301): Enhanced the `overlapPrint` method to include a `direction` parameter and updated the overlap checking logic to handle different directions more robustly. [[1]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL286-R301) [[2]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cR312-R323) [[3]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL319-R338) [[4]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL347-R368) [[5]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL357-R386) [[6]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL379-R405) [[7]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL397-R424) [[8]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cR436-R442) [[9]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL446-R472) ### Volume update improvements: * [`Core/src/Geometry/CylinderVolumeStack.cpp`](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL625-R689): Updated the `update` method to provide detailed logging of the current and new bounds, and added checks to prevent shrinking the stack size. [[1]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL625-R689) [[2]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL676-R703) [[3]](diffhunk://#diff-39babeb41776345f10ffd90e329b67faf7a8a4f47f0abe7533f665442d52a44cL693-R754)
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
This PR does three things: - `PortalLinkBase::merge` **no longer** does merging of grids or trivials into a combined grid. This has been observed to lead to accumulating floating point imprecision. - `CompositePortalLink` gets a method to make a grid **if** (and only if) it is composed of a set of `TrivialPortalLink`s. - `Portal::fuse` will attempt to convert `CompositePortalLink`s composed of only `TrivialPortalLink`s to a single `GridPortalLink` before fusing it with the other portal. In combination, this avoids the floating point issues and produces correctly sized grids. Part of acts-project#3502. --- This pull request introduces several enhancements and bug fixes to the `Core/include/Acts/Geometry` module, focusing on improving the `CompositePortalLink` and `GridPortalLink` classes. The most important changes include the addition of new constructors, the introduction of the `makeGrid` method, and various adjustments to ensure compatibility and correctness. ### Enhancements to `CompositePortalLink`: * Added new constructors to allow the creation of composite portals from multiple links and to handle nested composites. (`Core/include/Acts/Geometry/CompositePortalLink.hpp`, [[1]](diffhunk://#diff-248145d68399a17324b82d81d6e661a3ab739eb5b6f8d67f40145195ca465c36R55-R63) [[2]](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314R101-R129) * Introduced the `makeGrid` method to convert composite portal links into grid portal links under specific conditions. (`Core/include/Acts/Geometry/CompositePortalLink.hpp`, [Core/src/Geometry/CompositePortalLink.cppR180-R297](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314R180-R297)) ### Adjustments to `GridPortalLink`: * Changed the type of `atLocalBins` methods to return `const TrackingVolume*` instead of `TrackingVolume*`. (`Core/include/Acts/Geometry/GridPortalLink.hpp`, [[1]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL384-R389) [[2]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL402-R402) [[3]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL548-R547) [[4]](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL560-R559) * Updated internal grid type to use `const TrackingVolume*`. (`Core/include/Acts/Geometry/GridPortalLink.hpp`, [Core/include/Acts/Geometry/GridPortalLink.hppL402-R402](diffhunk://#diff-5cc33f33e4da7753510a3c7bf2481d12c34dd9c1344bfd624c0b5db1d70f214fL402-R402)) ### Bug Fixes and Code Improvements: * Moved `mergedSurface` function to an anonymous namespace in the implementation file and refactored it for better error handling and type safety. (`Core/src/Geometry/CompositePortalLink.cpp`, [[1]](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314R11-R78) [[2]](diffhunk://#diff-5663ec0ea1d9723e610725aa0d0964e5c833bb90f431281c3802a9b9c5fa4314L77-L106) * Improved the `isSameSurface` function to include detailed checks for surface bounds and transformations. (`Core/src/Geometry/Portal.cpp`, [Core/src/Geometry/Portal.cppL308-R357](diffhunk://#diff-e32791625fda93fd367fc971619ea03be19128e91bbca7e8a09b5af399beb461L308-R357)) * Enhanced logging and error messages for better debugging and clarity. (`Core/src/Geometry/Portal.cpp`, [[1]](diffhunk://#diff-e32791625fda93fd367fc971619ea03be19128e91bbca7e8a09b5af399beb461R274-R277) [[2]](diffhunk://#diff-e32791625fda93fd367fc971619ea03be19128e91bbca7e8a09b5af399beb461R293-R313) These changes collectively improve the functionality, safety, and maintainability of the `Acts` geometry module, particularly in handling complex portal link structures.
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
This PR makes it such that when a `CylinderVolumeStack` is resized with the gap strategy, if there are already gaps on the outside of the stack, **they are reused** instead of creating extra gaps. Part of to acts-project#3502. ``` original size ◀───────────────▶ ┌───────────────┐ │ │ │ │ │ Volume 1 │ │ │ │ │ └───────────────┘ first resize ◀──────────────────────────▶ ┌───────────────┬──────────┐ │ │ │ │ │ │ │ Volume 1 │ Gap │ │ │ │ Gap is │ │ │ reused!──┐ └───────────────┴──────────┘ │ second resize │ ◀───────────────────────────────────▶ │ ┌───────────────┬───────────────────┐ │ │ │ │ │ │ │ │ │ │ Volume 1 │ Gap │◀─────┘ │ │ │ │ │ │ └───────────────┴───────────────────┘ ``` Blocked by: - acts-project#3715
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
This is a collection of python bindings bits that have accumulated. Related acts-project#3502. --- This pull request includes several updates to the `Acts` geometry and Python binding code. The most important changes involve the introduction of new enums and the addition of Python bindings for new geometry classes and methods. ### Geometry and Enum Updates: * Added `Face` enum to `CylinderVolumeBounds` to describe possible faces of a cylinder volume. (`Core/include/Acts/Geometry/CylinderVolumeBounds.hpp`) * Refactored `PortalShellBase` to use the `Face` enum from `CylinderVolumeBounds` instead of defining its own. (`Core/include/Acts/Geometry/PortalShell.hpp`) ### Python Bindings Enhancements: * Added new binning values to the `addBinning` function in `Base.cpp`. (`Examples/Python/src/Base.cpp`) * Extended `addGeometry` function to include new methods and enums for `CylinderVolumeBounds` and `ExtentEnvelope`. (`Examples/Python/src/Geometry.cpp`) [[1]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dL181-R213) [[2]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dL212-R303) * Introduced Python bindings for `CylinderVolumeStack` and its enums `AttachmentStrategy` and `ResizeStrategy`. (`Examples/Python/src/Geometry.cpp`) ### Code Cleanup: * Removed redundant includes and updated include paths to reflect new dependencies. (`Core/include/Acts/Geometry/PortalShell.hpp`, `Examples/Python/src/Geometry.cpp`) [[1]](diffhunk://#diff-80595cf723b4c4b0a2cf3de28ac0da38793f2955a2e0ce1dc4fd87381fac79aeL11-R11) [[2]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dR40) [[3]](diffhunk://#diff-a103b5682fb7c6e7ea58777983e4381b62783b2facd3e367e03ff0a7aa49816dR51) These changes improve the modularity and functionality of the geometry components and enhance the Python interface for better usability.
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
Terminology: - "Navigation delegate": the function that is registered with a tracking volume. In principle, this can be anything - "Navigation policy": the object that is registered with the tracking volume. It contains a method that is connected to the "navigation delegate". It has extra methods - "Navigation policy factory": To delay construction of the actual policy object **until after** the volume is fully sized and has all of its internal structure registered, the blueprint tree only contains *navigation policy factories*. This is configurable. During construction, the factory is applied to volumes, and produces a policy that is registered with the volume. This is called "navigation policy factory" from a conceptual point of view. - "MultiNavigationPolicy": chains together multiple policies in a sort of composition. You can have one policy that only deals with portals, one for sensitive and one for passive surfaces, for example. - To make this less annoying to construct, as you would have to manage the factory, I'm adding a concrete class `NavigationPolicyFactory`. Its job is to make defining a factory that produces a "MultiNavigationPolicy" easy, like: ```cpp using namespace Acts; using SurfaceArrayNavigationPolicy::LayerType; SurfaceArrayNavigationPolicy::Config config{ .layerType = LayerType::Cylinder, .bins = {10, 10} }; auto factory = NavigationPolicyFactory::make() .add<TryAllPortalNavigationPolicy>() .add<SurfaceArrayNavigationPolicy>(config); ``` or in python: ```python policy = ( acts.NavigationPolicyFactory.make() .add(acts.TryAllPortalNavigationPolicy) .add(acts.TryAllSurfaceNavigationPolicy) .add( acts.SurfaceArrayNavigationPolicy, acts.SurfaceArrayNavigationPolicy.Config( layerType=acts.SurfaceArrayNavigationPolicy.LayerType.Plane, bins=(10, 10), ), ) ) ``` Part of acts-project#3502
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
This renames the `connectOuter` method in `PortalShell` to just `fill`, because that is more descriptive of what it actually does. Part of acts-project#3502
Rosie-Hasan
pushed a commit
to Rosie-Hasan/acts
that referenced
this issue
Nov 13, 2024
…#3819) Exposes the `decorate` function to python, so the decoration can itself be steered from python if needed. Part of acts-project#3502
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Umbrella issue for the project to unify Gen1 (layer-based) and Gen2 (initial layer-less) geometry paradigms into a Gen3 (final) geometry.
See this presentation for details.
Associated PRs:
Blueprint construction
Navigation policies
Portal shells
Portals
Portal links
Preparation
lowestTrackingVolume
#3818Surface::isOnSurface
gets tolerance parameter #3544TrackingVolume
#3542RegularSurface
gets direction-lessisOnSurface
#3500CylinderVolumeStack
#3065Initial strategy
CylinderVolumeStack
,CuboidVolumeStack
CylinderContainerNode
andCuboidContainerNode
Volume::assignVolumeBounds()
becomesvirtual
CylinderLayer
etc?Node
for building purposesTwo passes:
Recursively call
build()
on all childrenTrackingVolume
or a composite volume likeCylinderVolumeStack
CylinderVolumeStack
resizes it's components, can create gaps on the outside if configuredRecursively call
connect()
with the current parent volume (starting from the root volume) as an argumentTrackingVolume
with the parent for ownershipPortal
indexed by the common enumTrackingVolume
for ownership and navigationconnect()
on their children, but pass through their own parentTrackingVolume
PortalHandle
, internal registration remains valid, only outer registrations is delegated up the treeconnect()
, childTrackingVolume
s have been registered: can create volume-local acceleration structure for findingRoot node receives
Volume
frombuild()
used as world volume + portal vector which are not connected outside, signaling navigation termination.Benefits:
Construction API:
Simplified:
And maybe in python like this (modulo
unique_ptr
not being usable)The text was updated successfully, but these errors were encountered: