@@ -25,7 +25,7 @@ namespace Acts {
2525void CylinderPortalShell::fill (TrackingVolume& volume) {
2626 for (Face face : {PositiveDisc, NegativeDisc, OuterCylinder, InnerCylinder,
2727 NegativePhiPlane, PositivePhiPlane}) {
28- const auto & portalAtFace = portalPtr (face);
28+ const auto & portalAtFace = portal (face);
2929 if (portalAtFace != nullptr ) {
3030 portalAtFace->fill (volume);
3131 volume.addPortal (portalAtFace);
@@ -84,11 +84,7 @@ SingleCylinderPortalShell::SingleCylinderPortalShell(TrackingVolume& volume)
8484 }
8585}
8686
87- Portal* SingleCylinderPortalShell::portal (Face face) {
88- return portalPtr (face).get ();
89- }
90-
91- std::shared_ptr<Portal> SingleCylinderPortalShell::portalPtr (Face face) {
87+ std::shared_ptr<Portal> SingleCylinderPortalShell::portal (Face face) {
9288 return m_portals.at (toUnderlying (face));
9389}
9490
@@ -155,9 +151,8 @@ CylinderStackPortalShell::CylinderStackPortalShell(
155151
156152 auto merge = [&](Face face) {
157153 std::vector<std::shared_ptr<Portal>> portals;
158- std::ranges::transform (
159- m_shells, std::back_inserter (portals),
160- [face](auto * shell) { return shell->portalPtr (face); });
154+ std::ranges::transform (m_shells, std::back_inserter (portals),
155+ [face](auto * shell) { return shell->portal (face); });
161156
162157 auto merged = std::accumulate (
163158 std::next (portals.begin ()), portals.end (), portals.front (),
@@ -186,7 +181,7 @@ CylinderStackPortalShell::CylinderStackPortalShell(
186181 ACTS_VERBOSE (" Fusing " << shellA->label () << " and " << shellB->label ());
187182
188183 auto fused = std::make_shared<Portal>(Portal::fuse (
189- gctx, *shellA->portalPtr (faceA), *shellB->portalPtr (faceB), logger));
184+ gctx, *shellA->portal (faceA), *shellB->portal (faceB), logger));
190185
191186 assert (fused != nullptr && " Invalid fused portal" );
192187 assert (fused->isValid () && " Fused portal is invalid" );
@@ -246,21 +241,17 @@ std::size_t CylinderStackPortalShell::size() const {
246241 return m_hasInnerCylinder ? 4 : 3 ;
247242}
248243
249- Portal* CylinderStackPortalShell::portal (Face face) {
250- return portalPtr (face).get ();
251- }
252-
253- std::shared_ptr<Portal> CylinderStackPortalShell::portalPtr (Face face) {
244+ std::shared_ptr<Portal> CylinderStackPortalShell::portal (Face face) {
254245 if (m_direction == AxisDirection::AxisR) {
255246 switch (face) {
256247 case NegativeDisc:
257- return m_shells.front ()->portalPtr (NegativeDisc);
248+ return m_shells.front ()->portal (NegativeDisc);
258249 case PositiveDisc:
259- return m_shells.front ()->portalPtr (PositiveDisc);
250+ return m_shells.front ()->portal (PositiveDisc);
260251 case OuterCylinder:
261- return m_shells.back ()->portalPtr (OuterCylinder);
252+ return m_shells.back ()->portal (OuterCylinder);
262253 case InnerCylinder:
263- return m_shells.front ()->portalPtr (InnerCylinder);
254+ return m_shells.front ()->portal (InnerCylinder);
264255 case NegativePhiPlane:
265256 [[fallthrough]];
266257 case PositivePhiPlane:
@@ -274,13 +265,13 @@ std::shared_ptr<Portal> CylinderStackPortalShell::portalPtr(Face face) {
274265 } else {
275266 switch (face) {
276267 case NegativeDisc:
277- return m_shells.front ()->portalPtr (NegativeDisc);
268+ return m_shells.front ()->portal (NegativeDisc);
278269 case PositiveDisc:
279- return m_shells.back ()->portalPtr (PositiveDisc);
270+ return m_shells.back ()->portal (PositiveDisc);
280271 case OuterCylinder:
281272 [[fallthrough]];
282273 case InnerCylinder:
283- return m_shells.front ()->portalPtr (face);
274+ return m_shells.front ()->portal (face);
284275 case NegativePhiPlane:
285276 [[fallthrough]];
286277 case PositivePhiPlane:
0 commit comments