Project
Loading...
Searching...
No Matches
IterationConfiguration.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_ITSMFT_TRACKING_ITERATIONCONFIGURATION_H_
13#define ALICEO2_ITSMFT_TRACKING_ITERATIONCONFIGURATION_H_
14
15#include <optional>
16#include <ranges>
17#include <vector>
18
22
24{
25
26// Tracker-owned, immutable instructions for one tracking iteration.
31
32 // Dense IDs index the owned topology directly; schedules retain their own order.
33 auto edgeIds() const noexcept
34 {
35 return std::views::iota(uint16_t{0}, static_cast<uint16_t>(topology.edges.size())) |
36 std::views::transform([](uint16_t id) { return EdgeId{id}; });
37 }
38 auto cellIds() const noexcept
39 {
40 return std::views::iota(uint16_t{0}, static_cast<uint16_t>(topology.paths.size())) |
41 std::views::transform([](uint16_t id) { return CellPathId{id}; });
42 }
43
44 bool hasLayer(LayerId id) const noexcept
45 {
46 return id.isValid() && id.value() < topology.nLayers;
47 }
48
49 std::optional<uint16_t> getEdgeSlot(EdgeId id) const noexcept
50 {
51 return id.isValid() && id.value() < topology.edges.size() ? std::optional<uint16_t>{id.value()} : std::nullopt;
52 }
53
54 std::optional<uint16_t> getCellSlot(CellPathId id) const noexcept
55 {
56 return id.isValid() && id.value() < topology.paths.size() ? std::optional<uint16_t>{id.value()} : std::nullopt;
57 }
58
60 {
61 return topology.getView(catalog);
62 }
63};
64
65} // namespace o2::itsmft::tracking
66
67#endif
Shared CA tracking configuration for ITS and MFT.
uint32_t trackClusterIndicesSize noexcept
std::optional< uint16_t > getCellSlot(CellPathId id) const noexcept
std::optional< uint16_t > getEdgeSlot(EdgeId id) const noexcept
TraversalTopologyView getTopologyView(SurfaceCatalogView catalog) const noexcept
TraversalTopologyView getView(SurfaceCatalogView catalog) const noexcept