Class Acts::Extent¶
-
class Extent¶
A class representing the geometric extent of an object in its possible 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 –
-
void addConstrain(const Extent &rhs, const ExtentEnvelope &envelope = zeroEnvelopes)¶
Constrain an extent by another one, this is.
values that are already constrained are not touched
values not constrained by
values that are constrained by the external one, but not by the current one, are touched
- Parameters
rhs – are not touched
envelope – an envelope applied to the constrained value
-
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 interval(BinningValue bValue) const¶
Access the parameter interval (i.e.
the range span)
- Parameters
bValue – the binning identification
-
inline ActsScalar max(BinningValue bValue) const¶
Access the maximum parameter.
- Parameters
bValue – the binning identification
-
inline ActsScalar medium(BinningValue bValue) const¶
Access the midpoint.
- 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::string toString(const std::string &indent = "") const¶
Convert to output stream for screen output.
- Parameters
indent – indentation for the screen display
-
inline const std::array<std::vector<ActsScalar>, binValues> &valueHistograms() const¶
Return the histogram store.
The histogram store can be used for automated binning detection
-
Extent(const ExtentEnvelope &envelope = zeroEnvelopes)¶