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
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions Core/include/Acts/Geometry/CylinderVolumeStack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,12 @@ class CylinderVolumeStack : public Volume {
/// construction.
/// @param volbounds is the new bounds
/// @param transform is the new transform
/// @pre The volume bounds need to be of type
/// @c CylinderVolumeBounds.
void update(std::shared_ptr<VolumeBounds> volbounds,
std::optional<Transform3> transform = std::nullopt) override;

/// Update the volume bounds and transform. This
/// will update the bounds of all volumes in the stack
/// to accommodate the new bounds and optionally create
/// gap volumes according to the resize strategy set during
/// construction.
/// @param newBounds is the new bounds
/// @param transform is the new transform
/// @param logger is the logger
/// @pre The volume bounds need to be of type
/// @c CylinderVolumeBounds.
void update(std::shared_ptr<CylinderVolumeBounds> newBounds,
std::optional<Transform3> transform, const Logger& logger);
void update(std::shared_ptr<VolumeBounds> volbounds,
std::optional<Transform3> transform = std::nullopt,
const Logger& logger = getDummyLogger()) override;

/// Access the gap volume that were created during attachment or resizing.
/// @return the vector of gap volumes
Expand Down Expand Up @@ -133,11 +122,12 @@ class CylinderVolumeStack : public Volume {
Acts::Logging::Level lvl);

/// Helper function that prints output helping in debugging overlaps
/// @param direction is the overlap check direction
/// @param a is the first volume
/// @param b is the second volume
/// @param logger is the logger
static void overlapPrint(const VolumeTuple& a, const VolumeTuple& b,
const Logger& logger);
static void overlapPrint(BinningValue direction, const VolumeTuple& a,
const VolumeTuple& b, const Logger& logger);

/// Helper function that checks if volumes are properly aligned
/// for attachment.
Expand Down
5 changes: 4 additions & 1 deletion Core/include/Acts/Geometry/Volume.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "Acts/Geometry/GeometryObject.hpp"
#include "Acts/Utilities/BinningType.hpp"
#include "Acts/Utilities/BoundingBox.hpp"
#include "Acts/Utilities/Logger.hpp"

#include <iosfwd>
#include <memory>
Expand Down Expand Up @@ -83,8 +84,10 @@ class Volume : public GeometryObject {
/// Set the volume bounds and optionally also update the volume transform
/// @param volbounds The volume bounds to be assigned
/// @param transform The transform to be assigned, can be optional
/// @param logger A logger object to log messages
virtual void update(std::shared_ptr<VolumeBounds> volbounds,
std::optional<Transform3> transform = std::nullopt);
std::optional<Transform3> transform = std::nullopt,
const Logger& logger = Acts::getDummyLogger());

/// Construct bounding box for this shape
/// @param envelope Optional envelope to add / subtract from min/max
Expand Down
Loading
Loading