Skip to content

Commit

Permalink
fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Jul 11, 2023
1 parent ef8f74e commit e707fdc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
12 changes: 6 additions & 6 deletions Core/include/Acts/Surfaces/PointSurface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ class PointSurface : public Surface {
protected:
/// Constructor from Translation3 and bounds
///
/// @param transform The transform that positions the surface in the global
/// @param translation The translation that positions the surface in the global
/// frame
/// @param radius The straw radius
PointSurface(const Translation3& transform, double radius);
PointSurface(const Translation3& translation, double radius);

/// Constructor from Translation3 and a shared bounds object
///
/// @param transform The transform that positions the surface in the global
/// @param translation The translation that positions the surface in the global
/// frame
/// @param pbounds The bounds describing the straw dimensions, can be
/// optionally nullptr
PointSurface(const Translation3& transform,
PointSurface(const Translation3& translation,
std::shared_ptr<const PointBounds> pbounds = nullptr);

/// Constructor from DetectorElementBase : Element proxy
Expand All @@ -74,9 +74,9 @@ class PointSurface : public Surface {
///
/// @param gctx The current geometry context object, e.g. alignment
/// @param other is the source cone surface
/// @param shift is the additional transform applied after copying
/// @param translation is the additional translation applied after copying
PointSurface(const GeometryContext& gctx, const PointSurface& other,
const Transform3& shift);
const Translation3& translation);

public:
~PointSurface() override = default;
Expand Down
22 changes: 12 additions & 10 deletions Core/src/Surfaces/PointSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ namespace Acts {
class DetectorElementBase;
} // namespace Acts

Acts::PointSurface::PointSurface(const Translation3& transform, double radius)
Acts::PointSurface::PointSurface(const Translation3& translation, double radius)
: GeometryObject(),
Surface(transform),
Surface(Transform3(translation)),
m_bounds(std::make_shared<const PointBounds>(radius)) {}

Acts::PointSurface::PointSurface(const Transform3& transform,
Acts::PointSurface::PointSurface(const Translation3& transform,
std::shared_ptr<const PointBounds> pbounds)
: GeometryObject(), Surface(transform), m_bounds(std::move(pbounds)) {}
: GeometryObject(),
Surface(Transform3(transform)),
m_bounds(std::move(pbounds)) {}

Acts::PointSurface::PointSurface(std::shared_ptr<const PointBounds> pbounds,
const DetectorElementBase& detelement)
Expand All @@ -49,8 +51,10 @@ Acts::PointSurface::PointSurface(const PointSurface& other)

Acts::PointSurface::PointSurface(const GeometryContext& gctx,
const PointSurface& other,
const Transform3& shift)
: GeometryObject(), Surface(gctx, other, shift), m_bounds(other.m_bounds) {}
const Translation3& translation)
: GeometryObject(),
Surface(gctx, other, Transform3(translation)),
m_bounds(other.m_bounds) {}

Acts::PointSurface& Acts::PointSurface::operator=(const PointSurface& other) {
if (this != &other) {
Expand Down Expand Up @@ -177,10 +181,8 @@ Acts::SurfaceIntersection Acts::PointSurface::intersect(
// At closest approach: check inside R or and inside Z
const Vector3 vecLocal(result - mb);
double cZ = vecLocal.dot(eb);
double hZ = m_bounds->get(LineBounds::eHalfLengthZ) + tolerance;
if ((std::abs(cZ) > std::abs(hZ)) or
((vecLocal - cZ * eb).norm() >
m_bounds->get(LineBounds::eR) + tolerance)) {
if ((vecLocal - cZ * eb).norm() >
m_bounds->get(PointBounds::eR) + tolerance) {
status = Intersection3D::Status::missed;
}
}
Expand Down

0 comments on commit e707fdc

Please sign in to comment.