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

refactor: rename PortalShell connect outer to fill #3820

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 5 additions & 7 deletions Core/include/Acts/Geometry/PortalShell.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ class PortalShellBase {
/// Virtusl destructor
virtual ~PortalShellBase() = default;

/// Connect a volume to the outer side of all portal shells. Which "side" is
/// "outer" depends on the volume type.
/// This method essentially creates a @c TrivialPortalLink on the unconnected
/// side of each portal that is part of the chell
/// Fill the open slots of the shell with a @c TrivialPortalLink
/// to the given @p volume.
/// @param volume The volume to connect
virtual void connectOuter(TrackingVolume& volume) = 0;
virtual void fill(TrackingVolume& volume) = 0;

/// Get the number of portals in the shell. This number depends on the volume
/// type
Expand Down Expand Up @@ -88,8 +86,8 @@ class CylinderPortalShell : public PortalShellBase {
/// @param face The face to set the portal
virtual void setPortal(std::shared_ptr<Portal> portal, Face face) = 0;

/// @copydoc PortalShellBase::connectOuter
void connectOuter(TrackingVolume& volume) override;
/// @copydoc PortalShellBase::fill
void fill(TrackingVolume& volume) override;
};

/// Output stream operator for the CylinderPortalShell::Face enum
Expand Down
2 changes: 1 addition & 1 deletion Core/src/Geometry/PortalShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

namespace Acts {

void CylinderPortalShell::connectOuter(TrackingVolume& volume) {
void CylinderPortalShell::fill(TrackingVolume& volume) {
for (Face face : {PositiveDisc, NegativeDisc, OuterCylinder, InnerCylinder,
NegativePhiPlane, PositivePhiPlane}) {
const auto& portalAtFace = portalPtr(face);
Expand Down
4 changes: 2 additions & 2 deletions Tests/UnitTests/Core/Geometry/PortalShellTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ BOOST_AUTO_TEST_CASE(NestedStacks) {
nullptr);
}

BOOST_AUTO_TEST_CASE(ConnectOuter) {
BOOST_AUTO_TEST_CASE(Fill) {
auto cyl1 = makeVolume(30_mm, 40_mm, 100_mm);
auto cyl2 = makeVolume(0_mm, 50_mm, 110_mm);

Expand All @@ -736,7 +736,7 @@ BOOST_AUTO_TEST_CASE(ConnectOuter) {
BOOST_CHECK_EQUAL(
shell.portal(NegativeDisc)->getLink(Direction::OppositeNormal), nullptr);

shell.connectOuter(cyl2);
shell.fill(cyl2);

BOOST_CHECK_NE(shell.portal(OuterCylinder)->getLink(Direction::AlongNormal),
nullptr);
Expand Down
Loading