File Intersection.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Typedefs

using Intersection2D = Intersection<2>
using Intersection3D = Intersection<3>

Enums

enum IntersectionStatus

Status enum.

Values:

enumerator missed
enumerator unreachable
enumerator reachable
enumerator onSurface

Functions

inline std::ostream &operator<<(std::ostream &os, IntersectionStatus status)

Ostream-operator for the IntersectionStatus enum.

template<unsigned int DIM>
struct Intersection
#include <Acts/Utilities/Intersection.hpp>

Intersection struct used for position.

Public Types

using Status = IntersectionStatus

Status enum.

Public Functions

inline Intersection(const ActsVector<DIM> &sinter, double slength, Status sstatus)

Constructor with arguments.

Parameters
  • sinter – is the position of the intersection

  • slength – is the path length to the intersection

  • sstatus – is an enum indicating the status of the intersection

Intersection() = default

Default constructor.

inline explicit operator bool() const

Bool() operator for validity checking.

inline bool operator<(const Intersection<DIM> &si) const

Smaller operator for sorting,.

  • it respects the validity of the intersection

Parameters

si – is the intersection for testing

inline bool operator>(const Intersection<DIM> &si) const

Greater operator for sorting,.

  • it respects the validity of the intersection

Parameters

si – is the intersection for testing

Public Members

ActsVector<DIM>::Scalar pathLength{std::numeric_limits<double>::infinity()}

Signed path length to the intersection (if valid)

ActsVector<DIM> position = ActsVector<DIM>::Zero()

Position of the intersection.

Status status = {Status::unreachable}

The Status of the intersection.

template<typename object_t, typename representation_t = object_t>
class ObjectIntersection
#include <Acts/Utilities/Intersection.hpp>

class extensions to return also the object and a representation

Public Functions

ObjectIntersection() = default

Default constructor.

template<typename T = representation_t, std::enable_if_t<std::is_same<T, object_t>::value, int> = 0>
inline ObjectIntersection(const Intersection3D &sInter, const object_t *sObject)

Object intersection - symmetric setup.

Parameters
  • sInter – is the intersection

  • sObject – is the object to be instersected

inline ObjectIntersection(const Intersection3D &sInter, const object_t *sObject, const representation_t *sRepresentation)

Object intersection.

Parameters
  • sInter – is the intersection

  • sObject – is the object to be instersected

  • sRepresentation – is the object represenatation

inline explicit operator bool() const

Bool() operator for validity checking.

inline bool operator<(const ObjectIntersection<object_t, representation_t> &oi) const

Smaller operator for ordering & sorting.

This operator will ignore the alternative, but simply order the representing intersection

Parameters

oi – is the source intersection for comparison

inline bool operator>(const ObjectIntersection<object_t, representation_t> &oi) const

Greater operator for ordering & sorting.

This operator will ignore the alternative, but simply order the representing intersection

Parameters

oi – is the source intersection for comparison

Public Members

Intersection3D alternative = {}

The alternative intersections.

Intersection3D intersection = {}

The intersection itself.

const object_t *object = {nullptr}

The object that was (tried to be) intersected.

const representation_t *representation = {nullptr}

The representation of this object.

struct SameSurfaceIntersection
#include <Acts/Utilities/Intersection.hpp>

Public Functions

template<typename intersection_t>
inline bool operator()(const intersection_t &i1, const intersection_t &i2) const

comparison operator

This is a struct to pick out intersection with identical surfaces

Template Parameters

intersection_t – Type of the intersection object

Parameters
  • i1 – First intersection to test

  • i2 – Second intersection to test