Skip to content

Commit ace88dc

Browse files
author
Dimitra Amperiadou
committed
rename method
1 parent c4fa899 commit ace88dc

File tree

11 files changed

+236
-257
lines changed

11 files changed

+236
-257
lines changed

Core/include/Acts/Geometry/CuboidPortalShell.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CuboidPortalShell : public PortalShellBase {
3333
/// nullptr if unset.
3434
/// @param face The face to retrieve the portal for
3535
/// @return The portal associated to the face
36-
virtual std::shared_ptr<Portal> portalPtr(Face face) = 0;
36+
virtual std::shared_ptr<Portal> portal(Face face) = 0;
3737

3838
/// Set the portal associated to the given face.
3939
/// @param portal The portal to set
@@ -65,8 +65,8 @@ class SingleCuboidPortalShell : public CuboidPortalShell {
6565
/// @copydoc PortalShellBase::size
6666
std::size_t size() const final;
6767

68-
/// @copydoc CuboidPortalShell::portalPtr
69-
std::shared_ptr<Portal> portalPtr(Face face) final;
68+
/// @copydoc CuboidPortalShell::portal
69+
std::shared_ptr<Portal> portal(Face face) final;
7070

7171
/// @copydoc CuboidPortalShell::setPortal
7272
void setPortal(std::shared_ptr<Portal> portal, Face face) final;
@@ -108,8 +108,8 @@ class CuboidStackPortalShell final : public CuboidPortalShell {
108108
/// @copydoc PortalShellBase::size
109109
std::size_t size() const override;
110110

111-
/// @copydoc CuboidPortalShell::portalPtr
112-
std::shared_ptr<Portal> portalPtr(Face face) override;
111+
/// @copydoc CuboidPortalShell::portal
112+
std::shared_ptr<Portal> portal(Face face) override;
113113

114114
/// @copydoc CuboidPortalShell::setPortal
115115
void setPortal(std::shared_ptr<Portal> portal, Face face) override;

Core/include/Acts/Geometry/CylinderPortalShell.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class CylinderPortalShell : public PortalShellBase {
3232
/// nullptr if unset.
3333
/// @param face The face to retrieve the portal for
3434
/// @return The portal associated to the face
35-
virtual std::shared_ptr<Portal> portalPtr(Face face) = 0;
35+
virtual std::shared_ptr<Portal> portal(Face face) = 0;
3636

3737
/// Set the portal associated to the given face.
3838
/// @param portal The portal to set
@@ -67,8 +67,8 @@ class SingleCylinderPortalShell : public CylinderPortalShell {
6767
/// @copydoc PortalShellBase::size
6868
std::size_t size() const final;
6969

70-
/// @copydoc CylinderPortalShell::portalPtr
71-
std::shared_ptr<Portal> portalPtr(Face face) final;
70+
/// @copydoc CylinderPortalShell::portal
71+
std::shared_ptr<Portal> portal(Face face) final;
7272

7373
/// @copydoc CylinderPortalShell::setPortal
7474
void setPortal(std::shared_ptr<Portal> portal, Face face) final;
@@ -141,8 +141,8 @@ class CylinderStackPortalShell : public CylinderPortalShell {
141141
/// @copydoc PortalShellBase::size
142142
std::size_t size() const final;
143143

144-
/// @copydoc CylinderPortalShell::portalPtr
145-
std::shared_ptr<Portal> portalPtr(Face face) final;
144+
/// @copydoc CylinderPortalShell::portal
145+
std::shared_ptr<Portal> portal(Face face) final;
146146

147147
/// @copydoc CylinderPortalShell::setPortal
148148
void setPortal(std::shared_ptr<Portal> portal, Face face) final;

Core/include/Acts/Geometry/TrapezoidPortalShell.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TrapezoidPortalShell : public PortalShellBase {
3131
/// nullptr if unset.
3232
/// @param face The face to retrieve the portal for
3333
/// @return The portal associated to the face
34-
virtual std::shared_ptr<Portal> portalPtr(Face face) = 0;
34+
virtual std::shared_ptr<Portal> portal(Face face) = 0;
3535

3636
/// Set the portal associated to the given face.
3737
/// @param portal The portal to set
@@ -63,8 +63,8 @@ class SingleTrapezoidPortalShell : public TrapezoidPortalShell {
6363
/// @copydoc PortalShellBase::size
6464
std::size_t size() const override;
6565

66-
/// @copydoc TrapezoidPortalShell::portalPtr
67-
std::shared_ptr<Portal> portalPtr(Face face) override;
66+
/// @copydoc TrapezoidPortalShell::portal
67+
std::shared_ptr<Portal> portal(Face face) override;
6868

6969
/// @copydoc TrapezoidPortalShell::setPortal
7070
void setPortal(std::shared_ptr<Portal> portal, Face face) override;

Core/src/Geometry/CuboidPortalShell.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void CuboidPortalShell::fill(TrackingVolume& volume) {
3131
using enum CuboidVolumeBounds::Face;
3232
for (Face face : {NegativeZFace, PositiveZFace, NegativeXFace, PositiveXFace,
3333
NegativeYFace, PositiveYFace}) {
34-
const auto& portalAtFace = portalPtr(face);
34+
const auto& portalAtFace = portal(face);
3535
if (portalAtFace != nullptr) {
3636
portalAtFace->fill(volume);
3737
volume.addPortal(portalAtFace);
@@ -67,7 +67,7 @@ SingleCuboidPortalShell::SingleCuboidPortalShell(TrackingVolume& volume)
6767
handle(PositiveYFace, positiveFaceZX);
6868
}
6969

70-
std::shared_ptr<Portal> SingleCuboidPortalShell::portalPtr(Face face) {
70+
std::shared_ptr<Portal> SingleCuboidPortalShell::portal(Face face) {
7171
return m_portals.at(toUnderlying(face));
7272
}
7373

@@ -179,9 +179,8 @@ CuboidStackPortalShell::CuboidStackPortalShell(
179179

180180
auto merge = [&](Face face) {
181181
std::vector<std::shared_ptr<Portal>> portals;
182-
std::ranges::transform(
183-
m_shells, std::back_inserter(portals),
184-
[face](auto* shell) { return shell->portalPtr(face); });
182+
std::ranges::transform(m_shells, std::back_inserter(portals),
183+
[face](auto* shell) { return shell->portal(face); });
185184

186185
auto merged = std::accumulate(
187186
std::next(portals.begin()), portals.end(), portals.front(),
@@ -212,7 +211,7 @@ CuboidStackPortalShell::CuboidStackPortalShell(
212211
ACTS_VERBOSE("Fusing " << shellA->label() << " and " << shellB->label());
213212

214213
auto fused = std::make_shared<Portal>(Portal::fuse(
215-
gctx, *shellA->portalPtr(faceA), *shellB->portalPtr(faceB), logger));
214+
gctx, *shellA->portal(faceA), *shellB->portal(faceB), logger));
216215

217216
assert(fused != nullptr && "Invalid fused portal");
218217
assert(fused->isValid() && "Fused portal is invalid");
@@ -236,11 +235,11 @@ std::size_t CuboidStackPortalShell::size() const {
236235
return 6;
237236
}
238237

239-
std::shared_ptr<Portal> CuboidStackPortalShell::portalPtr(Face face) {
238+
std::shared_ptr<Portal> CuboidStackPortalShell::portal(Face face) {
240239
if (face == m_backFace) {
241-
return m_shells.back()->portalPtr(face);
240+
return m_shells.back()->portal(face);
242241
} else {
243-
return m_shells.front()->portalPtr(face);
242+
return m_shells.front()->portal(face);
244243
}
245244
}
246245

Core/src/Geometry/CylinderPortalShell.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Acts {
2525
void 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,7 +84,7 @@ SingleCylinderPortalShell::SingleCylinderPortalShell(TrackingVolume& volume)
8484
}
8585
}
8686

87-
std::shared_ptr<Portal> SingleCylinderPortalShell::portalPtr(Face face) {
87+
std::shared_ptr<Portal> SingleCylinderPortalShell::portal(Face face) {
8888
return m_portals.at(toUnderlying(face));
8989
}
9090

@@ -151,9 +151,8 @@ CylinderStackPortalShell::CylinderStackPortalShell(
151151

152152
auto merge = [&](Face face) {
153153
std::vector<std::shared_ptr<Portal>> portals;
154-
std::ranges::transform(
155-
m_shells, std::back_inserter(portals),
156-
[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); });
157156

158157
auto merged = std::accumulate(
159158
std::next(portals.begin()), portals.end(), portals.front(),
@@ -182,7 +181,7 @@ CylinderStackPortalShell::CylinderStackPortalShell(
182181
ACTS_VERBOSE("Fusing " << shellA->label() << " and " << shellB->label());
183182

184183
auto fused = std::make_shared<Portal>(Portal::fuse(
185-
gctx, *shellA->portalPtr(faceA), *shellB->portalPtr(faceB), logger));
184+
gctx, *shellA->portal(faceA), *shellB->portal(faceB), logger));
186185

187186
assert(fused != nullptr && "Invalid fused portal");
188187
assert(fused->isValid() && "Fused portal is invalid");
@@ -242,17 +241,17 @@ std::size_t CylinderStackPortalShell::size() const {
242241
return m_hasInnerCylinder ? 4 : 3;
243242
}
244243

245-
std::shared_ptr<Portal> CylinderStackPortalShell::portalPtr(Face face) {
244+
std::shared_ptr<Portal> CylinderStackPortalShell::portal(Face face) {
246245
if (m_direction == AxisDirection::AxisR) {
247246
switch (face) {
248247
case NegativeDisc:
249-
return m_shells.front()->portalPtr(NegativeDisc);
248+
return m_shells.front()->portal(NegativeDisc);
250249
case PositiveDisc:
251-
return m_shells.front()->portalPtr(PositiveDisc);
250+
return m_shells.front()->portal(PositiveDisc);
252251
case OuterCylinder:
253-
return m_shells.back()->portalPtr(OuterCylinder);
252+
return m_shells.back()->portal(OuterCylinder);
254253
case InnerCylinder:
255-
return m_shells.front()->portalPtr(InnerCylinder);
254+
return m_shells.front()->portal(InnerCylinder);
256255
case NegativePhiPlane:
257256
[[fallthrough]];
258257
case PositivePhiPlane:
@@ -266,13 +265,13 @@ std::shared_ptr<Portal> CylinderStackPortalShell::portalPtr(Face face) {
266265
} else {
267266
switch (face) {
268267
case NegativeDisc:
269-
return m_shells.front()->portalPtr(NegativeDisc);
268+
return m_shells.front()->portal(NegativeDisc);
270269
case PositiveDisc:
271-
return m_shells.back()->portalPtr(PositiveDisc);
270+
return m_shells.back()->portal(PositiveDisc);
272271
case OuterCylinder:
273272
[[fallthrough]];
274273
case InnerCylinder:
275-
return m_shells.front()->portalPtr(face);
274+
return m_shells.front()->portal(face);
276275
case NegativePhiPlane:
277276
[[fallthrough]];
278277
case PositivePhiPlane:

Core/src/Geometry/TrapezoidPortalShell.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Acts {
1717
void TrapezoidPortalShell::fill(TrackingVolume& volume) {
1818
for (Face face : {NegativeZFaceXY, PositiveZFaceXY, TrapezoidFaceAlpha,
1919
TrapezoidFaceBeta, NegativeYFaceZX, PositiveYFaceZX}) {
20-
const auto& portalAtFace = portalPtr(face);
20+
const auto& portalAtFace = portal(face);
2121
if (portalAtFace != nullptr) {
2222
portalAtFace->fill(volume);
2323
volume.addPortal(portalAtFace);
@@ -46,7 +46,7 @@ SingleTrapezoidPortalShell::SingleTrapezoidPortalShell(TrackingVolume& volume)
4646
}
4747
}
4848

49-
std::shared_ptr<Portal> SingleTrapezoidPortalShell::portalPtr(Face face) {
49+
std::shared_ptr<Portal> SingleTrapezoidPortalShell::portal(Face face) {
5050
return m_portals.at(toUnderlying(face));
5151
}
5252

Core/src/Geometry/detail/MaterialDesignator.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class CylinderProtoDesignator : public DesignatorBase {
9090
using enum CylinderVolumeBounds::Face;
9191

9292
for (const auto& [face, loc0, loc1] : m_binning) {
93-
auto* portal = cylShell->portalPtr(face).get();
93+
auto* portal = cylShell->portal(face).get();
9494
if (portal == nullptr) {
9595
ACTS_ERROR(prefix << "Portal is nullptr");
9696
throw std::runtime_error("Portal is nullptr");
@@ -197,7 +197,7 @@ class CuboidProtoDesignator : public DesignatorBase {
197197
using enum CuboidVolumeBounds::Face;
198198

199199
for (const auto& [face, loc0, loc1] : m_binning) {
200-
auto* portal = cuboidShell->portalPtr(face).get();
200+
auto* portal = cuboidShell->portal(face).get();
201201
if (portal == nullptr) {
202202
ACTS_ERROR(prefix << "Portal is nullptr");
203203
throw std::runtime_error("Portal is nullptr");
@@ -287,7 +287,7 @@ class ISurfaceMaterialDesignator : public DesignatorBase {
287287
}
288288

289289
for (const auto& [face, material] : m_materials) {
290-
auto* portal = concreteShell->portalPtr(face).get();
290+
auto* portal = concreteShell->portal(face).get();
291291
if (portal == nullptr) {
292292
ACTS_ERROR(prefix << "Portal is nullptr");
293293
throw std::runtime_error("Portal is nullptr");

0 commit comments

Comments
 (0)