File Extent.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Typedefs

using Envelope = std::array<ActsScalar, 2>
using ExtentEnvelope = std::array<std::array<ActsScalar, 2>, binValues>

Functions

std::ostream &operator<<(std::ostream &sl, const Extent &rhs)

Overload of << operator for std::ostream for debug output.

Variables

constexpr Envelope zeroEnvelope = {0., 0}
constexpr ExtentEnvelope zeroEnvelopes = {zeroEnvelope, zeroEnvelope, zeroEnvelope, zeroEnvelope, zeroEnvelope, zeroEnvelope, zeroEnvelope, zeroEnvelope}
class Extent
#include <Acts/Geometry/Extent.hpp>

A class representing the geometric extent of an object in its possbile dimensions, these can be all dimensions that are described as BinningValues.

The extent object can have an optional envelope in all of those values

Note

that the consistency of the different envelopes is not checked

Public Functions

Extent(const ExtentEnvelope &envelope = zeroEnvelopes)

Constructor with (optional)

Parameters

envelope

bool constrains(BinningValue bValue = binValues) const

Constraints check.

Parameters

bValue – is the binning value, if all the check on all is done

bool contains(const Extent &rhs, BinningValue bValue = binValues) const

Contains check.

Parameters
  • rhs – the extent that is check if it is contained

  • bValue – is the binning value, if set to binValues the check on all is done

Returns

true if the rhs is contained

inline ExtentEnvelope &envelope()

Return the envelope - non-const access.

inline const ExtentEnvelope &envelope() const

Return the envelope - const access.

void extend(const Vector3 &vtx, const std::vector<BinningValue> &bValues = s_binningValues, bool applyEnv = true, bool fillHistograms = false)

Extend with a position vertex.

Parameters
  • vtx – the vertex to be used for extending

  • bValues – the binning values

  • applyEnv – boolean to steer if envelope should be applied

  • fillHistograms – is a boolean flag to steer whether the values to fill this extent should be stored

template<typename vector_iterator_t>
inline void extend(const vector_iterator_t &start, const vector_iterator_t &end, const std::vector<BinningValue> &bValues = s_binningValues, bool applyEnv = true, bool fillHistograms = false)

Extend with a set of vectors by iterators.

Parameters
  • start – the start iterator of the loop

  • end – the end iterator of the loop

  • bValues – the binning values

  • applyEnv – boolean to steer if envelope should be applied

  • fillHistograms – is a boolean flag to steer whether the values to fill this extent should be stored

void extend(const Extent &rhs, const std::vector<BinningValue> &bValues = s_binningValues, bool applyEnv = true)

Extend with another geometric extent, usually pushes the current range to the boundaries of the rhs extent, unless the current extent is already bigger.

Note

the extent can also simply set an envelope which then is applied to the current one

Note

that the histogram values can not be filled in this call

Parameters
  • rhs – is the other source Extent

  • bValues – the binning values

  • applyEnv – boolean to steer if envelope should be applied on the constraint values, if only an envelope is given but the value not constraint, then it is always applied

bool intersects(const Extent &rhs, BinningValue bValue = binValues) const

Intersection checks.

Parameters
  • rhs – the extent that is check for intersection

  • bValue – is the binning value, if set to binValues the check on all is done

Returns

true if the rhs intersects

inline ActsScalar max(BinningValue bValue) const

Access the maximum parameter.

Parameters

bValue – the binning identification

inline ActsScalar medium(BinningValue bValue) const

Access the maximum parameter.

Parameters

bValue – the binning identification

inline ActsScalar min(BinningValue bValue) const

Access the minimum parameter.

Parameters

bValue – the binning identification

inline Range1D<ActsScalar> &range(BinningValue bValue)

Return the individual 1-dimensional range.

Parameters

bValue – is the binning value to be returned

Returns

a one dimensional arrange

inline const Range1D<ActsScalar> &range(BinningValue bValue) const

Return the individual 1-dimensional range.

Parameters

bValue – is the binning value to be returned

Returns

a one dimensional arrange

inline const RangeXD<binValues, ActsScalar> range() const

Return the N-dimension range.

template<unsigned int kSUBDIM>
inline RangeXD<kSUBDIM, ActsScalar> range(const std::array<BinningValue, kSUBDIM> &binValues) const

Return an D-dimensional sub range according to the the given.

Parameters

binValues

void set(BinningValue bValue, ActsScalar min, ActsScalar max)

Set a range for a dedicated binning value.

Parameters
  • bValue – the binning identification

  • min – the minimum parameter

  • max – the maximum parameter

void setEnvelope(const ExtentEnvelope &envelope = zeroEnvelopes)

(re-)Set the envelope

Parameters

envelope – new envelope to be set

std::ostream &toStream(std::ostream &sl) const

Convert to output stream for screen output.

Parameters

sl – [in,out] The output stream

inline const std::array<std::vector<ActsScalar>, binValues> &valueHistograms() const

Return the histogram store.

The histogram stroe can be used for automated binning detection

Private Members

std::bitset<binValues> m_constrains = {0}

A bitset that remembers the constraint values.

ExtentEnvelope m_envelope = zeroEnvelopes

A potential envenelope.

RangeXD<binValues, ActsScalar> m_range

The actual range store.

std::array<std::vector<ActsScalar>, binValues> m_valueHistograms

(Optional) Value histograms for bin detection