Struct ActsFatras::PlanarSurfaceMask

struct PlanarSurfaceMask

A brief struct that allows to apply a surface bound mask.

Public Types

using Segment2D = std::array<Acts::Vector2, 2>

Shorthand for a 2-d segment;.

Public Functions

Acts::Result<Segment2D> annulusMask(const Acts::AnnulusBounds &aBounds, const Segment2D &segment, bool firstInside) const

Apply the mask of an annulus disk.

Parameters
  • aBounds – The annulus disc for the masking

  • segment – The track segment (on surface)

  • firstInside – The indicator if the first is inside

Returns

a result wrapping a segment

Acts::Result<Segment2D> apply(const Acts::Surface &surface, const Segment2D &segment) const

Apply the mask on the segment.

  • If the semgent is full inside the surface, return unchanged

  • Otherwise mask/clip the segment to fit into the bounds

Note

Only PlaneSurface/DiscSurface are supported

Note

If both end points of the segment are inside, the segment is not clipped/masked, even if it would cross a surface boundary. Examples for those would be non-covex polygons or segments on a radial bound, where the radial boundary is crossed. Such segments do not occur in Digitization, as the hit has to be inside the surface bounds to start with.

Parameters
  • surface – The surface in question

  • segment – The track segment (on surface)

Returns

a result wrapping a segment

Acts::Result<Segment2D> polygonMask(const std::vector<Acts::Vector2> &vertices, const Segment2D &segment, bool firstInside) const

Apply the mask of a polygon.

Parameters
  • vertices – The vertices of the polygon

  • segment – The track segment (on surface)

  • firstInside – The indicator if the first is inside

Returns

a result wrapping a segment

Acts::Result<Segment2D> radialMask(const Acts::RadialBounds &rBounds, const Segment2D &segment, const Segment2D &polarSegment, bool firstInside) const

Apply the mask of a Radial disk.

Parameters
  • rBounds – The radial disc for the masking

  • segment – The track segment (on surface)

  • polarSegment – The track segmetn (on surface, in polar)

  • firstInside – The indicator if the first is inside

Returns

a result wrapping a segment

Public Members

Acts::detail::IntersectionHelper2D intersector