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

fix: CylVolStack resizing issue #3715

Merged
merged 6 commits into from
Oct 11, 2024

Conversation

paulgessinger
Copy link
Member

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:

Improvements to overlap checking:

Volume update improvements:

This makes it easier to pass it through if you have one
(CylinderVolumeStack mainly)
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
@paulgessinger paulgessinger added this to the next milestone Oct 11, 2024
@github-actions github-actions bot added the Component - Core Affects the Core module label Oct 11, 2024
Copy link

github-actions bot commented Oct 11, 2024

📊: Physics performance monitoring for 49ff95e

Full contents

physmon summary

Copy link

sonarcloud bot commented Oct 11, 2024

@kodiakhq kodiakhq bot merged commit 16f6341 into acts-project:main Oct 11, 2024
42 checks passed
@acts-project-service acts-project-service added the Fails Athena tests This PR causes a failure in the Athena tests label Oct 11, 2024
paulgessinger added a commit that referenced this pull request 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
@paulgessinger paulgessinger modified the milestones: next, v37.1.0 Oct 16, 2024
Rosie-Hasan pushed a commit to Rosie-Hasan/acts that referenced this pull request 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 pull request 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
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 Fails Athena tests This PR causes a failure in the Athena tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants