12#ifndef ALICEO2_ITSMFT_TRACKING_PARAMETER_TEST_SUPPORT_H_
13#define ALICEO2_ITSMFT_TRACKING_PARAMETER_TEST_SUPPORT_H_
37 std::vector<float>
LayerRadii = {2.33959f, 3.14076f, 3.91924f, 19.6213f, 24.5597f, 34.388f, 39.3329f};
38 std::vector<float>
LayerxX0 = {5.e-3f, 5.e-3f, 5.e-3f, 1.e-2f, 1.e-2f, 1.e-2f, 1.e-2f};
44 if (detector == o2::detectors::DetID::MFT) {
63 if (detector == o2::detectors::DetID::MFT) {
64 constexpr std::array<float, MFTNLayers> minima{2.1f, 2.1f, 2.1f, 2.1f, 2.1f, 2.1f, 3.1f, 3.1f, 3.5f, 3.5f};
65 constexpr std::array<float, MFTNLayers> maxima{12.5f, 12.5f, 12.5f, 12.5f, 14.f, 14.f, 17.f, 17.f, 17.5f, 17.5f};
72 const auto catalog = detector == o2::detectors::DetID::ITS
76 parameters.
LayerxX0.push_back(catalog.surfaces[
layer].material.xOverX0);
81 return {parameters, parameters, {parameters}};
89template <
typename Parameters>
92 if (parameters.empty()) {
96 plan.iterations.assign(parameters.begin(), parameters.end());
102 std::vector<TrackingParameters>
result;
103 for (
const auto& iteration : plan.
iterations) {
122 template <
typename Decoder>
133 std::vector<std::vector<uint32_t>>*
indices =
nullptr,
134 std::vector<std::vector<uint32_t>>*
sizes =
nullptr,
bool requireCompleteMapping =
false)
136 const std::vector<ClusterSourceInput> inputs(
sources.begin(),
sources.end());
138 std::vector<std::vector<uint32_t>> externalIndices(catalog.
nSurfaces);
139 std::vector<std::vector<uint32_t>> clusterSizes(catalog.
nSurfaces);
140 bool hasMCInformation =
false;
144 const auto index =
static_cast<uint32_t
>(&cluster -
source.clusters.data());
145 return source.decode(cluster, patterns,
source.dictionary,
index); }, externalIndices, clusterSizes);
146 hasMCInformation |=
source.labels !=
nullptr;
158 *
indices = std::move(externalIndices);
160 if (
sizes !=
nullptr) {
161 *
sizes = std::move(clusterSizes);
167 std::vector<std::vector<uint32_t>>*
indices =
nullptr,
168 std::vector<std::vector<uint32_t>>*
sizes =
nullptr)
173template <
typename Decoder>
176 const Decoder& decoder,
179 gsl::span<const itsmft::CompClusterExt>
clusters,
180 gsl::span<const unsigned char> patterns,
181 gsl::span<const o2::itsmft::ROFRecord> rofs,
185 gsl::span<const LayerId> layerToSurface,
187 std::vector<std::vector<uint32_t>>* externalIndicesBySurface =
nullptr,
188 std::vector<std::vector<uint32_t>>* clusterSizesBySurface =
nullptr)
193 source.detector = detector;
195 source.patterns = patterns;
197 source.dictionary = dictionary;
199 source.layerToSurface = layerToSurface;
201 source.setDecoder(decoder);
204 externalIndicesBySurface, clusterSizesBySurface);
header::DataOrigin origin
Shared CA tracking configuration for ITS and MFT.
Passive common TimeFrame owner.
Shared cluster I/O utilities for ITS and MFT (based on ITStracking/IOUtils.h)
std::vector< o2::MCCompLabel > labels
int ID
Detector identifiers: continuous, starting from 0.
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
GLsizei GLsizei GLchar * source
GLsizei const GLfloat * value
GLsizei GLenum const void * indices
GLenum GLuint GLint GLint layer
TrackingPlan getTrackingPlan(o2::detectors::DetID::ID detId, Type mode)
void loadDecodedSource(TimeFrame &frame, const SurfaceCatalogView &catalog, const ClusterSourceInput &src, const Decode &decode, std::vector< std::vector< uint32_t > > &externalIndices, std::vector< std::vector< uint32_t > > &clusterSizes)
void validateClusterRanges(const ClusterSourceInput &)
void prepareSources(TimeFrame &, const SurfaceCatalogView &, gsl::span< const ClusterSourceInput >, std::vector< std::vector< uint32_t > > *, std::vector< std::vector< uint32_t > > *, bool requireCompleteMapping=false)
std::vector< TrackingParameters > expandTrackingPlan(const TrackingPlan &plan)
void resetReferenceTrackingParameters(ReferenceTrackingParameters ¶meters, o2::detectors::DetID::ID detector)
std::vector< TrackingParameters > referenceTrackingParameters(o2::detectors::DetID::ID detector, TrackingMode::Type mode)
TrackingParameters makeTestTrackingParameters(o2::detectors::DetID::ID detector)
void loadTimeFrameSources(TimeFrame &frame, gsl::span< const TestClusterSourceInput > sources, SurfaceCatalogView catalog, const o2::InteractionRecord &origin, std::vector< std::vector< uint32_t > > *indices=nullptr, std::vector< std::vector< uint32_t > > *sizes=nullptr)
TrackingPlan makeTrackingPlan(const TrackingParameters ¶meters)
void loadSources(TimeFrame &frame, const SurfaceCatalogView &catalog, gsl::span< const TestClusterSourceInput > sources, const o2::InteractionRecord &, std::vector< std::vector< uint32_t > > *indices=nullptr, std::vector< std::vector< uint32_t > > *sizes=nullptr, bool requireCompleteMapping=false)
void loadTimeFrameSource(TimeFrame &frame, const Decoder &decoder, const o2::InteractionRecord &origin, const o2::its::LayerTiming &timing, gsl::span< const itsmft::CompClusterExt > clusters, gsl::span< const unsigned char > patterns, gsl::span< const o2::itsmft::ROFRecord > rofs, const itsmft::TopologyDictionary *dictionary, const dataformats::MCTruthContainer< MCCompLabel > *labels, o2::detectors::DetID::ID detector, gsl::span< const LayerId > layerToSurface, SurfaceCatalogView catalog, std::vector< std::vector< uint32_t > > *externalIndicesBySurface=nullptr, std::vector< std::vector< uint32_t > > *clusterSizesBySurface=nullptr)
constexpr std::array< SurfaceDescriptor, MFTNLayers > kMFTSurfaces
constexpr int MFTNLayers
MFT CA half-disk layer count.
constexpr std::array< SurfaceDescriptor, ITSNLayers > kITSSurfaces
std::vector< uint32_t > AddTimeError
std::vector< float > SystError2Col
std::vector< float > SystError2Row
std::vector< float > LayerResolution
std::vector< float > MinPt
tracking::LayerMask StartLayerMask
bool PerPrimaryVertexProcessing
TrackingExecutionPolicy execution
DetectorParameters detector
std::vector< IterationParameters > iterations
void setHasMCInformation(bool value) noexcept
const RuntimeROFViews & getROFViews() const noexcept
void setROFViews(RuntimeROFViews views) noexcept
std::vector< float > LayerxX0
std::vector< float > LayerRadii
std::vector< Cluster > clusters