12#ifndef ALICEO2_ITSMFT_TRACKING_DETECTORCONFIGURATION_H_
13#define ALICEO2_ITSMFT_TRACKING_DETECTORCONFIGURATION_H_
45 : mLayers{layers.begin(), layers.
end()}, mComponentOffsets{
std::move(componentOffsets)}, mHoleLayers{holeLayers}
63 const auto& surface = (*this)[
id];
65 : 0.5f * (surface.chartRange.min + surface.chartRange.max);
70 if (
first >= mLayers.size() || second >= mLayers.size()) {
73 const auto component = [
this](uint16_t position) {
74 return std::upper_bound(mComponentOffsets.begin(), mComponentOffsets.end(), position) - mComponentOffsets.begin();
76 return component(
first) == component(second);
90 if (mLayers.empty()) {
98 if (mComponentOffsets.empty() || mComponentOffsets.front() != 0 || mComponentOffsets.back() >= mLayers.size() ||
99 !std::is_sorted(mComponentOffsets.begin(), mComponentOffsets.end()) ||
100 std::adjacent_find(mComponentOffsets.begin(), mComponentOffsets.end()) != mComponentOffsets.end()) {
104 if (!mHoleLayers.isSubsetOf(LayerMask::span(0,
static_cast<int>(mLayers.size()) - 1))) {
111 std::vector<SurfaceDescriptor> mLayers;
112 std::vector<uint16_t> mComponentOffsets;
const SurfaceDescriptor & operator[](LayerId id) const
std::vector< uint32_t > addTimeError
DetectorConfigurationError getError() const noexcept
gsl::span< const uint16_t > getComponentOffsets() const noexcept
bool empty() const noexcept
gsl::span< const SurfaceDescriptor > getLayers() const noexcept
IndexTableConfigurationSet indexTableConfigs
SurfaceCatalogView getSurfaceCatalog() const noexcept
std::vector< float > positionResolutions
DetectorConfiguration(gsl::span< const SurfaceDescriptor > layers, std::vector< uint16_t > componentOffsets={0}, LayerMask holeLayers={})
LayerMask getHoleLayers() const noexcept
float getRepresentativeRadius(LayerId id) const
bool sameComponent(uint16_t first, uint16_t second) const noexcept
std::vector< float > systError2Row
std::vector< float > systError2Col
std::size_t size() const noexcept
DetectorConfiguration()=default
std::vector< float > layerResolution
bool valid() const noexcept
GLsizei const GLfloat * value
DetectorConfigurationError
@ HoleLayersOutsideLayout
@ InvalidComponentBoundary
uint32_t trackClusterIndicesSize noexcept
constexpr uint32_t MaxLayoutSurfaces