ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::unmasked< DIM > Class Template Reference

Generic shape without boundaries. More...

#include <detray/geometry/shapes/unmasked.hpp>

Collaboration diagram for detray::unmasked< DIM >:
[legend]

Public Types

enum  boundaries : unsigned int { e_size = 1u }
 Boundary array layout; this shape has one placeholder entry.
template<concepts::scalar scalar_t>
using bounds_type = darray<scalar_t, boundaries::e_size>
 Container definition for the shape boundary values.
template<concepts::algebra algebra_t>
using local_frame_type = cartesian2D<algebra_t>
 Local coordinate frame for boundary checks.
template<typename bool_t>
using result_type = bool_t
 Result type of a boundary check.

Public Member Functions

template<concepts::scalar scalar_t>
constexpr scalar_t area (const bounds_type< scalar_t > &) const
 The area of a the shape.
template<concepts::algebra algebra_t>
dpoint3D< algebra_t > centroid (const bounds_type< dscalar< algebra_t > > &) const
template<concepts::scalar scalar_t>
constexpr bool check_consistency (const bounds_type< scalar_t > &, const std::ostream &) const
 Check consistency of boundary values.
template<concepts::algebra algebra_t>
darray< dscalar< algebra_t >, 6 > local_min_bounds (const bounds_type< dscalar< algebra_t > > &, const dscalar< algebra_t >=std::numeric_limits< dscalar< algebra_t > >::epsilon()) const
 Lower and upper point for minimal axis aligned bounding box.
template<concepts::scalar scalar_t>
constexpr scalar_t measure (const bounds_type< scalar_t > &bounds) const
 Measure of the shape: Inf.
template<concepts::scalar scalar_t>
constexpr bounds_type< scalar_t > merge (const bounds_type< scalar_t > &, const bounds_type< scalar_t > &) const
 Merge two unmasked shapes.
template<concepts::scalar scalar_t, concepts::point point_t>
scalar_t min_dist_to_boundary (const bounds_type< scalar_t > &, const point_t &) const
 Find the minimum distance to any boundary.
template<concepts::algebra algebra_t>
dvector< dpoint3D< algebra_t > > vertices (const bounds_type< dscalar< algebra_t > > &bounds, dindex) const
 Generate vertices in local cartesian frame.
template<concepts::scalar scalar_t>
constexpr scalar_t volume (const bounds_type< scalar_t > &) const
 The volume of a the shape.
template<concepts::algebra algebra_t>
constexpr dbool< algebra_t > check_boundaries (const bounds_type< dscalar< algebra_t > > &, const dtransform3D< algebra_t > &, const dpoint3D< algebra_t > &, const dscalar< algebra_t >=0.f, const dscalar< algebra_t >=0.f) const
 Check boundary values for a local point.
template<concepts::scalar scalar_t, concepts::point point_t>
constexpr auto check_boundaries (const bounds_type< scalar_t > &, const point_t &, const scalar_t tol=0.f, const scalar_t edge_tol=0.f) const -> decltype(tol< edge_tol)
 Always accept a point supplied in local coordinates.

Static Public Attributes

static constexpr std::size_t dim {DIM}
 Dimension of the local coordinate system.
static constexpr std::string_view name = "unmasked"
 The name for this shape.

Detailed Description

template<std::size_t DIM = 2>
class detray::unmasked< DIM >

Generic shape without boundaries.

Member Function Documentation

◆ area()

template<std::size_t DIM = 2>
template<concepts::scalar scalar_t>
scalar_t detray::unmasked< DIM >::area ( const bounds_type< scalar_t > & ) const
constexpr

The area of a the shape.

Returns
the stereo annulus area.

◆ centroid()

template<std::size_t DIM = 2>
template<concepts::algebra algebra_t>
dpoint3D< algebra_t > detray::unmasked< DIM >::centroid ( const bounds_type< dscalar< algebra_t > > & ) const
Returns
the shapes centroid in global cartesian coordinates

◆ check_boundaries() [1/2]

template<std::size_t DIM = 2>
template<concepts::algebra algebra_t>
dbool< algebra_t > detray::unmasked< DIM >::check_boundaries ( const bounds_type< dscalar< algebra_t > > & ,
const dtransform3D< algebra_t > & ,
const dpoint3D< algebra_t > & ,
const dscalar< algebra_t > = 0.f,
const dscalar< algebra_t > = 0.f ) const
constexpr

Check boundary values for a local point.

Template Parameters
bounds_tany type of boundary values
Note
the parameters are ignored
Returns
always true

◆ check_boundaries() [2/2]

template<std::size_t DIM = 2>
template<concepts::scalar scalar_t, concepts::point point_t>
auto detray::unmasked< DIM >::check_boundaries ( const bounds_type< scalar_t > & ,
const point_t & ,
const scalar_t tol = 0.f,
const scalar_t edge_tol = 0.f ) const->decltype(tol< edge_tol)
constexpr

Always accept a point supplied in local coordinates.

Parameters
tolTolerance argument retained for the shape interface.
edge_tolEdge tolerance argument retained for the shape interface.
Returns
True.

◆ check_consistency()

template<std::size_t DIM = 2>
template<concepts::scalar scalar_t>
bool detray::unmasked< DIM >::check_consistency ( const bounds_type< scalar_t > & ,
const std::ostream &  ) const
constexpr

Check consistency of boundary values.

Returns
true if the bounds are consistent.

◆ local_min_bounds()

template<std::size_t DIM = 2>
template<concepts::algebra algebra_t>
darray< dscalar< algebra_t >, 6 > detray::unmasked< DIM >::local_min_bounds ( const bounds_type< dscalar< algebra_t > > & ,
const dscalar< algebra_t > = std::numeric_limits<dscalar<algebra_t>>::epsilon() ) const

Lower and upper point for minimal axis aligned bounding box.

Computes the min and max vertices in a local cartesian frame.

Returns
and array of coordinates that contains the lower point (first three values) and the upper point (latter three values) .

◆ measure()

template<std::size_t DIM = 2>
template<concepts::scalar scalar_t>
scalar_t detray::unmasked< DIM >::measure ( const bounds_type< scalar_t > & bounds) const
constexpr

Measure of the shape: Inf.

Parameters
boundsthe boundary values for this shape
Returns
Inf.

◆ merge()

template<std::size_t DIM = 2>
template<concepts::scalar scalar_t>
bounds_type< scalar_t > detray::unmasked< DIM >::merge ( const bounds_type< scalar_t > & ,
const bounds_type< scalar_t > &  ) const
constexpr

Merge two unmasked shapes.

Returns
merged bound values

◆ min_dist_to_boundary()

template<std::size_t DIM = 2>
template<concepts::scalar scalar_t, concepts::point point_t>
scalar_t detray::unmasked< DIM >::min_dist_to_boundary ( const bounds_type< scalar_t > & ,
const point_t &  ) const

Find the minimum distance to any boundary.

Note
the point is expected to be given in local coordinates by the caller.
Returns
the minimum distance.

◆ vertices()

template<std::size_t DIM = 2>
template<concepts::algebra algebra_t>
dvector< dpoint3D< algebra_t > > detray::unmasked< DIM >::vertices ( const bounds_type< dscalar< algebra_t > > & bounds,
dindex  ) const

Generate vertices in local cartesian frame.

Parameters
boundsthe boundary values
Returns
a generated list of vertices

◆ volume()

template<std::size_t DIM = 2>
template<concepts::scalar scalar_t>
scalar_t detray::unmasked< DIM >::volume ( const bounds_type< scalar_t > & ) const
constexpr

The volume of a the shape.

Returns
Inf.