Project
Loading...
Searching...
No Matches
TimeFrame.cxx
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.
15
17#include <algorithm>
18#include <limits>
19#include <numeric>
20#include <stdexcept>
21
24
26{
27
29{
30 mPrimaryVertices.emplace_back(vert);
31 if (!isBeamPositionOverridden) {
32 const float w = vert.getNContributors();
33 mBeamPos[0] = (mBeamPos[0] * mBeamPosWeight + vert.getX() * w) / (mBeamPosWeight + w);
34 mBeamPos[1] = (mBeamPos[1] * mBeamPosWeight + vert.getY() * w) / (mBeamPosWeight + w);
35 mBeamPosWeight += w;
36 }
37}
38
39void TimeFrame::resetBeamXY(const float x, const float y, const float w)
40{
41 mBeamPos[0] = x;
42 mBeamPos[1] = y;
43 mBeamPosWeight = w;
44}
45
46gsl::span<const GlobalMeasurement> TimeFrame::getGlobalMeasurements(LayerId surface) const
47{
48 return surface.isValid() && surface.value() < mLayerGlobalMeasurements.size() ? gsl::make_span(mLayerGlobalMeasurements[surface.value()]) : gsl::span<const GlobalMeasurement>{};
49}
50
51gsl::span<GlobalMeasurement> TimeFrame::getGlobalMeasurements(LayerId surface)
52{
53 return surface.isValid() && surface.value() < mLayerGlobalMeasurements.size() ? gsl::make_span(mLayerGlobalMeasurements[surface.value()]) : gsl::span<GlobalMeasurement>{};
54}
55
57 const SurfaceMeasurement& measurement)
58{
59 if (!mConfigurationValid || !surface.isValid() || surface.value() >= mLayerGlobalMeasurements.size()) {
60 throw std::logic_error{"TimeFrame::addMeasurement(): invalid or unconfigured surface"};
61 }
62 const auto position = surface.value();
63 const auto clusterId = static_cast<uint32_t>(mLayerSurfaceMeasurements[position].size());
64 global.clusterId = clusterId;
65 mLayerGlobalMeasurements[position].push_back(global);
66 mLayerSurfaceMeasurements[position].push_back(measurement);
67 mLayerUsedClusters[position].push_back(uint8_t{0});
68}
69
71 const SurfaceMeasurement& measurement,
72 gsl::span<const o2::MCCompLabel> labels)
73{
74 addMeasurement(surface, global, measurement);
75 const auto clusterId = static_cast<uint32_t>(mLayerSurfaceMeasurements[surface.value()].size() - 1);
76 mLayerClusterLabels[surface.value()].addElements(clusterId, labels);
77}
78
79const SurfaceMeasurement* TimeFrame::getSurfaceMeasurement(LayerId layer, uint32_t clusterId) const noexcept
80{
81 if (!layer.isValid() || layer.value() >= mLayerSurfaceMeasurements.size()) {
82 return nullptr;
83 }
84 const auto& measurements = mLayerSurfaceMeasurements[layer.value()];
85 return clusterId < measurements.size() ? &measurements[clusterId] : nullptr;
86}
87
88gsl::span<const o2::MCCompLabel> TimeFrame::getLabels(LayerId layer, uint32_t clusterId) const
89{
90 if (!layer.isValid() || layer.value() >= mLayerClusterLabels.size()) {
91 return {};
92 }
93 return mLayerClusterLabels[layer.value()].getLabels(clusterId);
94}
95
97{
98 std::size_t total = 0;
99 for (const auto& measurements : mLayerGlobalMeasurements) {
100 total += measurements.size();
101 }
102 return total;
103}
104
105gsl::span<GlobalMeasurement> TimeFrame::getClustersOnLayer(int rofId, int layer)
106{
107 if (rofId < 0 || rofId >= getNrof(layer)) {
108 return {};
109 }
110 const int first = mROFramesClusters[layer][rofId];
111 return {mLayerGlobalMeasurements[layer].data() + first,
112 static_cast<gsl::span<GlobalMeasurement>::size_type>(mROFramesClusters[layer][rofId + 1] - first)};
113}
114
115gsl::span<const GlobalMeasurement> TimeFrame::getClustersOnLayer(int rofId, int layer) const
116{
117 if (rofId < 0 || rofId >= getNrof(layer)) {
118 return {};
119 }
120 const int first = mROFramesClusters[layer][rofId];
121 return {mLayerGlobalMeasurements[layer].data() + first,
122 static_cast<gsl::span<const GlobalMeasurement>::size_type>(mROFramesClusters[layer][rofId + 1] - first)};
123}
124
125gsl::span<const GlobalMeasurement> TimeFrame::getClustersPerROFrange(int rofMin, int range, int layer) const
126{
127 if (rofMin < 0 || rofMin >= getNrof(layer)) {
128 return {};
129 }
130 const int first = mROFramesClusters[layer][rofMin];
131 const int last = mROFramesClusters[layer][o2::gpu::CAMath::Min(rofMin + range, getNrof(layer))];
132 return {mLayerGlobalMeasurements[layer].data() + first, static_cast<gsl::span<const GlobalMeasurement>::size_type>(last - first)};
133}
134
135gsl::span<const int> TimeFrame::getROFramesClustersPerROFrange(int rofMin, int range, int layer) const
136{
137 const int checkedRange = o2::gpu::CAMath::Min(range, getNrof(layer) - rofMin);
138 return {mROFramesClusters[layer].data() + rofMin, static_cast<gsl::span<const int>::size_type>(checkedRange)};
139}
140
141gsl::span<const int> TimeFrame::getROFrameClusters(int layer) const
142{
143 return gsl::make_span(mROFramesClusters[layer]);
144}
145
146gsl::span<int> TimeFrame::getIndexTable(int rofId, int layer)
147{
148 if (rofId < 0 || rofId >= getNrof(layer)) {
149 return {};
150 }
151 const int tableSize = mIndexTableUtils[layer].getNrowBins() * mIndexTableUtils[layer].getNcolBins() + 1;
152 return {mIndexTables[layer].data() + rofId * tableSize, static_cast<gsl::span<int>::size_type>(tableSize)};
153}
154
155int TimeFrame::getClusterROF(int layer, int cluster) const
156{
157 return static_cast<int>(std::lower_bound(mROFramesClusters[layer].begin(), mROFramesClusters[layer].end(), cluster + 1) -
158 mROFramesClusters[layer].begin() - 1);
159}
160
162{
163 const int last = o2::gpu::CAMath::Min(rofMin + range, getNrof(layer));
164 return mROFramesClusters[layer][last] - mROFramesClusters[layer][rofMin];
165}
166
167gsl::span<unsigned char> TimeFrame::getUsedClusters(int layer)
168{
169 return layer >= 0 && static_cast<std::size_t>(layer) < mLayerUsedClusters.size() ? gsl::make_span(mLayerUsedClusters[layer]) : gsl::span<unsigned char>{};
170}
171
172bool TimeFrame::isClusterUsed(int layer, uint32_t clusterId) const
173{
174 return layer >= 0 && static_cast<std::size_t>(layer) < mLayerUsedClusters.size() && clusterId < mLayerUsedClusters[layer].size() && mLayerUsedClusters[layer][clusterId] != 0;
175}
176
177void TimeFrame::markUsedCluster(int layer, uint32_t clusterId)
178{
179 if (layer >= 0 && static_cast<std::size_t>(layer) < mLayerUsedClusters.size() && clusterId < mLayerUsedClusters[layer].size()) {
180 mLayerUsedClusters[layer][clusterId] = 1;
181 }
182}
183
185{
186 return std::accumulate(mLayerGlobalMeasurements.begin(), mLayerGlobalMeasurements.end(), std::size_t{0},
187 [](std::size_t total, const auto& layer) { return total + layer.size(); });
188}
189
191{
192 return std::accumulate(mLayerUsedClusters.begin(), mLayerUsedClusters.end(), std::size_t{0}, [](std::size_t total, const auto& layer) {
193 return total + static_cast<std::size_t>(std::count(layer.begin(), layer.end(), uint8_t{1}));
194 });
195}
196
197void TimeFrame::setROFViews(RuntimeROFViews views) noexcept
198{
199 mROFViews = views;
200 mROFViewsBySurface.assign(mDetectorConfiguration.size(), views);
201 mROFLocalLayerBySurface.resize(mROFViewsBySurface.size());
202 std::iota(mROFLocalLayerBySurface.begin(), mROFLocalLayerBySurface.end(), uint16_t{0});
203 mUseUPC = false;
204}
205
206void TimeFrame::setROFClusters(std::size_t position, gsl::span<const int> boundaries)
207{
208 if (!mConfigurationValid || position >= mROFramesClusters.size()) {
209 throw std::logic_error{"TimeFrame::setROFClusters(): invalid or unconfigured surface position"};
210 }
211 mROFramesClusters[position].assign(boundaries.begin(), boundaries.end());
212}
213
214void TimeFrame::setROFViews(std::size_t position, RuntimeROFViews views, uint16_t localLayer)
215{
216 if (!mConfigurationValid || position >= mROFViewsBySurface.size()) {
217 throw std::logic_error{"TimeFrame::setROFViews(): invalid or unconfigured surface position"};
218 }
219 mROFViewsBySurface[position] = views;
220 mROFLocalLayerBySurface[position] = localLayer;
221 mUseUPC = false;
222}
223
224const RuntimeROFTableEntry& TimeFrame::getROFOverlap(int fromLayer, int toLayer, int rof) const noexcept
225{
226 return getROFViews(fromLayer).overlap.getOverlap(getROFLocalLayer(fromLayer), getROFLocalLayer(toLayer), rof);
227}
228
229bool TimeFrame::isROFEnabled(int layer, int rof) const noexcept
230{
231 const auto& views = getROFViews(layer);
232 return (mUseUPC ? views.upcMask : views.mask).isROFEnabled(getROFLocalLayer(layer), rof);
233}
234
235bool TimeFrame::isVertexCompatible(int layer, int rof, const Vertex& vertex) const noexcept
236{
237 return getROFViews(layer).vertexLookup.isVertexCompatible(getROFLocalLayer(layer), rof, vertex);
238}
239
240o2::its::TimeEstBC TimeFrame::getROFTimeStamp(int fromLayer, int fromROF, int toLayer, int toROF) const noexcept
241{
242 return getROFViews(fromLayer).overlap.getTimeStamp(getROFLocalLayer(fromLayer), fromROF,
243 getROFLocalLayer(toLayer), toROF);
244}
245
246int TimeFrame::getMaxVerticesPerROF() const noexcept
247{
248 if (mROFViewsBySurface.empty()) {
249 return mROFViews.vertexLookup.getMaxVerticesPerROF();
250 }
251 int result = 0;
252 for (auto it = mROFViewsBySurface.begin(); it != mROFViewsBySurface.end(); ++it) {
253 const auto& lookup = it->vertexLookup;
254 // Surfaces of one source usually share the entire vertex lookup table.
255 const auto alreadyScanned = std::any_of(mROFViewsBySurface.begin(), it, [&](const auto& views) {
256 return views.vertexLookup.mFlatTable == lookup.mFlatTable &&
257 views.vertexLookup.mIndices == lookup.mIndices &&
258 views.vertexLookup.mLayerCount == lookup.mLayerCount;
259 });
260 if (!alreadyScanned) {
261 result = std::max(result, lookup.getMaxVerticesPerROF());
262 }
263 }
264 return result;
265}
266
267gsl::span<const Vertex> TimeFrame::getPrimaryVertices(int layer, int rofId) const
268{
269 if (rofId < 0 || rofId >= getNrof(layer)) {
270 return {};
271 }
272 const auto& entry = getROFViews(layer).vertexLookup.getVertices(getROFLocalLayer(layer), rofId);
273 return {mPrimaryVertices.data() + entry.getFirstEntry(),
274 static_cast<gsl::span<const Vertex>::size_type>(entry.getEntries())};
275}
276
277bool TimeFrame::hasMCinformation() const noexcept
278{
279 return mHasMCInformation;
280}
281
282gsl::span<const MCCompLabel> TimeFrame::getClusterLabels(int layer, int cluster) const
283{
284 if (layer < 0 || static_cast<std::size_t>(layer) >= mLayerGlobalMeasurements.size() || cluster < 0 || static_cast<std::size_t>(cluster) >= mLayerGlobalMeasurements[layer].size()) {
285 return {};
286 }
287 return getLabels(LayerId{static_cast<uint16_t>(layer)}, mLayerGlobalMeasurements[layer][cluster].clusterId);
288}
289
290bool TimeFrame::configure(DetectorConfiguration&& layout, std::size_t maxEdges, std::size_t maxCells,
291 std::shared_ptr<BoundedMemoryResource> memoryPool)
292{
293 if (mConfigurationValid || !memoryPool || !layout.valid() || layout.empty()) {
294 return false;
295 }
296 const auto nOwnedSurfaces = layout.size();
297 const auto nMeasurementSurfaces = layout.size();
298 mScratch.setMemoryPool(memoryPool);
299 setMemoryPool(std::move(memoryPool));
300 try {
301 mScratch.configureStorage(maxEdges, maxCells);
302 mROFramesClusters.resize(nOwnedSurfaces);
303 mROFViewsBySurface.resize(nOwnedSurfaces);
304 mROFLocalLayerBySurface.resize(nOwnedSurfaces);
305 mLayerGlobalMeasurements.resize(nMeasurementSurfaces);
306 mLayerSurfaceMeasurements.resize(nMeasurementSurfaces);
307 mLayerUsedClusters.resize(nMeasurementSurfaces);
308 mLayerClusterLabels.resize(nMeasurementSurfaces);
309 clearResizeBoundedVector(mIndexTables, nOwnedSurfaces, mMemoryPool.get());
310 mIndexTableUtils.reset(layout.getSurfaceCatalog());
311 mMinR.assign(nOwnedSurfaces, std::numeric_limits<float>::max());
312 mMaxR.assign(nOwnedSurfaces, std::numeric_limits<float>::lowest());
313 mMinZ.assign(nOwnedSurfaces, std::numeric_limits<float>::max());
314 mMaxZ.assign(nOwnedSurfaces, std::numeric_limits<float>::lowest());
315 } catch (const std::bad_alloc&) {
316 resetTimeFrame();
317 mScratch.clearStorage();
318 mROFramesClusters.clear();
319 mROFViewsBySurface.clear();
320 mROFLocalLayerBySurface.clear();
321 mLayerGlobalMeasurements.clear();
322 mLayerSurfaceMeasurements.clear();
323 mLayerUsedClusters.clear();
324 mLayerClusterLabels.clear();
325 mIndexTables.clear();
326 mIndexTableUtils.clear();
327 mMinR.clear();
328 mMaxR.clear();
329 mMinZ.clear();
330 mMaxZ.clear();
331 return false;
332 }
333 mDetectorConfiguration = std::move(layout);
334 mCapacityEstimator.reset();
335 mConfigurationValid = true;
336 return true;
337}
338
339TimeFrameScratch& TimeFrame::getScratch()
340{
341 return mScratch;
342}
343
344const TimeFrameScratch& TimeFrame::getScratch() const
345{
346 return mScratch;
347}
348
349void TimeFrame::resetTimeFrame() noexcept
350{
351 mScratch.reset();
352 deepVectorClear(mPrimaryVertices);
353 deepVectorClear(mPrimaryVerticesLabels);
354 // Common tracks, labels, and cluster references are valid only for the
355 // current TimeFrame measurements, so clear them together.
356 deepVectorClear(mGenericTracks);
357 deepVectorClear(mTrackLabels);
358 deepVectorClear(mTrackClusterIndices);
359 for (auto& measurements : mLayerGlobalMeasurements) {
360 measurements.clear();
361 }
362 for (auto& measurements : mLayerSurfaceMeasurements) {
363 measurements.clear();
364 }
365 for (auto& used : mLayerUsedClusters) {
366 used.clear();
367 }
368 for (auto& labels : mLayerClusterLabels) {
369 labels.clear();
370 }
371 mHasMCInformation = false;
372 mROFViews = {};
373 std::fill(mROFViewsBySurface.begin(), mROFViewsBySurface.end(), RuntimeROFViews{});
374 std::fill(mROFLocalLayerBySurface.begin(), mROFLocalLayerBySurface.end(), uint16_t{0});
375 mUseUPC = false;
376 for (auto& boundaries : mROFramesClusters) {
377 boundaries.clear();
378 }
379 deepVectorClear(mIndexTables);
380 std::fill(mMinR.begin(), mMinR.end(), std::numeric_limits<float>::max());
381 std::fill(mMaxR.begin(), mMaxR.end(), std::numeric_limits<float>::lowest());
382 std::fill(mMinZ.begin(), mMinZ.end(), std::numeric_limits<float>::max());
383 std::fill(mMaxZ.begin(), mMaxZ.end(), std::numeric_limits<float>::lowest());
384}
385
386void TimeFrame::setMemoryPool(std::shared_ptr<BoundedMemoryResource> pool)
387{
388 mMemoryPool = pool;
389
390 auto initVector = [&]<typename T>(bounded_vector<T>& vec) {
391 deepVectorClear(vec, mMemoryPool.get());
392 };
393
394 initVector(mPrimaryVertices);
395 initVector(mPrimaryVerticesLabels);
396 initVector(mGenericTracks);
397 initVector(mTrackLabels);
398 initVector(mTrackClusterIndices);
399 for (auto& table : mIndexTables) {
400 initVector(table);
401 }
402}
403
404void TimeFrame::prepareIndexTables(const IndexTableConfigurationSet& indexTableConfigs)
405{
406 if (indexTableConfigs.size() != mIndexTables.size()) {
407 throw std::logic_error{"TimeFrame::prepareIndexTables(): configuration extent mismatch"};
408 }
409 mIndexTableUtils = indexTableConfigs;
410 for (std::size_t layer = 0; layer < mIndexTables.size(); ++layer) {
411 std::size_t stride = 0;
412 if (!checkedIndexTableSizeProduct(static_cast<std::size_t>(mIndexTableUtils[layer].getNrowBins()),
413 static_cast<std::size_t>(mIndexTableUtils[layer].getNcolBins()), stride) ||
414 stride == std::numeric_limits<std::size_t>::max()) {
415 throw std::bad_alloc{};
416 }
417 ++stride;
418 std::size_t tableSize = 0;
419 if (!checkedIndexTableSizeProduct(static_cast<std::size_t>(getNrof(static_cast<int>(layer))), stride, tableSize)) {
420 throw std::bad_alloc{};
421 }
422 clearResizeBoundedVector(mIndexTables[layer], tableSize, mMemoryPool.get());
423 }
424 std::fill(mMinR.begin(), mMinR.end(), std::numeric_limits<float>::max());
425 std::fill(mMaxR.begin(), mMaxR.end(), std::numeric_limits<float>::lowest());
426 std::fill(mMinZ.begin(), mMinZ.end(), std::numeric_limits<float>::max());
427 std::fill(mMaxZ.begin(), mMaxZ.end(), std::numeric_limits<float>::lowest());
428}
429
430void TimeFrame::prepareClusters(int maxLayers)
431{
432 struct SortingHelper {
433 int bin;
434 int indexWithinBin;
435 int measurementIndex;
436 };
437
438 const int stopLayer = std::min(maxLayers, static_cast<int>(mLayerGlobalMeasurements.size()));
439 for (int layer = 0; layer < stopLayer; ++layer) {
440 const auto& utils = mIndexTableUtils[layer];
441 const int colBinsCount = utils.getNcolBins();
442 std::size_t numBins = 0;
443 if (!checkedIndexTableSizeProduct(static_cast<std::size_t>(utils.getNrowBins()),
444 static_cast<std::size_t>(colBinsCount), numBins) ||
445 numBins == std::numeric_limits<std::size_t>::max()) {
446 throw std::bad_alloc{};
447 }
448 const std::size_t stride = numBins + 1;
449 bounded_vector<SortingHelper> helpers(mMemoryPool.get());
450 bounded_vector<GlobalMeasurement> sortedMeasurements(mMemoryPool.get());
451 bounded_vector<int> counts(numBins, 0, mMemoryPool.get());
452 bounded_vector<int> offsets(numBins, 0, mMemoryPool.get());
453
454 for (int rof = 0; rof < getNrof(layer); ++rof) {
455 if (!isROFEnabled(layer, rof)) {
456 continue;
457 }
458 const int first = mROFramesClusters[layer][rof];
459 const int last = mROFramesClusters[layer][rof + 1];
460 const int count = last - first;
461 auto* tableBase = mIndexTables[layer].data() + rof * stride;
462 helpers.resize(count);
463 sortedMeasurements.resize(count);
464 const bool usePhiRBinning = utils.getCoordType() == o2::itsmft::IndexTableCoordType::PhiR;
465
466 for (int local = 0; local < count; ++local) {
467 const int measurementIndex = first + local;
468 const auto& measurement = mLayerGlobalMeasurements[layer][measurementIndex];
469 auto& helper = helpers[local];
470 int colBin = utils.getColBinIndex(layer, usePhiRBinning ? measurement.radius : measurement.z);
471 if (colBin < 0 || colBin >= colBinsCount) {
472 colBin = std::clamp(colBin, 0, colBinsCount - 1);
473 }
474 helper.bin = utils.getBinIndex(colBin, utils.getRowBinIndex(measurement.phi));
475 helper.indexWithinBin = counts[helper.bin]++;
476 helper.measurementIndex = measurementIndex;
477 mMinR[layer] = o2::gpu::GPUCommonMath::Min(measurement.radius, mMinR[layer]);
478 mMaxR[layer] = o2::gpu::GPUCommonMath::Max(measurement.radius, mMaxR[layer]);
479 mMinZ[layer] = o2::gpu::GPUCommonMath::Min(measurement.z, mMinZ[layer]);
480 mMaxZ[layer] = o2::gpu::GPUCommonMath::Max(measurement.z, mMaxZ[layer]);
481 }
482 std::exclusive_scan(counts.begin(), counts.end(), offsets.begin(), 0);
483
484 for (const auto& helper : helpers) {
485 sortedMeasurements[offsets[helper.bin] + helper.indexWithinBin] = mLayerGlobalMeasurements[layer][helper.measurementIndex];
486 }
487 std::copy(sortedMeasurements.begin(), sortedMeasurements.end(), mLayerGlobalMeasurements[layer].begin() + first);
488 std::copy_n(offsets.data(), counts.size(), tableBase);
489 std::fill_n(tableBase + counts.size(), stride - counts.size(), count);
490 std::fill(counts.begin(), counts.end(), 0);
491 helpers.clear();
492 sortedMeasurements.clear();
493 }
494 }
495}
496
497} // namespace o2::itsmft::tracking
uint8_t lookup(const char input) noexcept
Passive common TimeFrame owner.
uint64_t vertex
Definition RawEventData.h:9
std::vector< o2::MCCompLabel > labels
void reset()
Clear iteration state without changing plan sizes.
GLint GLenum GLint x
Definition glcorearb.h:403
GLint GLsizei count
Definition glcorearb.h:399
GLuint64EXT * result
Definition glcorearb.h:5662
GLuint entry
Definition glcorearb.h:5735
GLuint GLsizei const GLuint const GLintptr * offsets
Definition glcorearb.h:2595
GLuint GLuint end
Definition glcorearb.h:469
GLint first
Definition glcorearb.h:399
GLenum GLint * range
Definition glcorearb.h:1899
GLint y
Definition glcorearb.h:270
GLint GLenum GLboolean GLsizei stride
Definition glcorearb.h:867
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLubyte GLubyte GLubyte GLubyte w
Definition glcorearb.h:852
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
auto make_span(const o2::rans::internal::simd::AlignedArray< T, width_V, size_V > &array)
const int tableSize
bool checkedIndexTableSizeProduct(std::size_t a, std::size_t b, std::size_t &result) noexcept
void deepVectorClear(std::vector< T > &vec)
void clearResizeBoundedVector(bounded_vector< T > &vec, size_t sz, std::pmr::memory_resource *mr=nullptr, T def=T())
uint32_t trackClusterIndicesSize noexcept
std::pmr::vector< T > bounded_vector
Common utility functions.
gsl::span< const int > getROFrameClusters(int layer) const
void markUsedCluster(int layer, uint32_t clusterId)
void addPrimaryVertex(const Vertex &vertex)
Definition TimeFrame.cxx:28
void addMeasurement(LayerId surface, GlobalMeasurement global, const SurfaceMeasurement &measurement)
Definition TimeFrame.cxx:56
int getNrof(int layer) const
Definition TimeFrame.h:97
std::size_t getTotalMeasurements() const noexcept
Definition TimeFrame.cxx:96
gsl::span< const o2::MCCompLabel > getLabels(LayerId layer, uint32_t clusterId) const
Definition TimeFrame.cxx:88
bool isClusterUsed(int layer, uint32_t clusterId) const
gsl::span< int > getIndexTable(int rofId, int layer)
const SurfaceMeasurement * getSurfaceMeasurement(LayerId layer, uint32_t clusterId) const noexcept
Definition TimeFrame.cxx:79
gsl::span< const int > getROFramesClustersPerROFrange(int rofMin, int range, int layer) const
void resetBeamXY(const float x, const float y, const float w=0)
Definition TimeFrame.cxx:39
int getTotalClustersPerROFrange(int rofMin, int range, int layer) const
std::size_t getNumberOfClusters() const
gsl::span< const GlobalMeasurement > getGlobalMeasurements(LayerId surface) const
Definition TimeFrame.cxx:46
int getClusterROF(int layer, int cluster) const
gsl::span< unsigned char > getUsedClusters(int layer)
std::size_t getNumberOfUsedClusters() const
gsl::span< GlobalMeasurement > getClustersOnLayer(int rofId, int layer)
gsl::span< const GlobalMeasurement > getClustersPerROFrange(int rofMin, int range, int layer) const
std::vector< o2::ctf::BufferType > vec