19#ifndef ALICEO2_ITSMFT_TRACKING_TIMEFRAME_H_
20#define ALICEO2_ITSMFT_TRACKING_TIMEFRAME_H_
65 void setBeamPosition(
const float x,
const float y,
const float s2,
const float base = 50.f,
const float systematic = 0.f)
67 isBeamPositionOverridden =
true;
68 resetBeamXY(
x,
y, s2 / o2::gpu::CAMath::Sqrt((base * base) + systematic));
69 mBeamPositionVariance = s2;
75 std::array<float, 2>&
getBeamXY() {
return mBeamPos; }
77 void setBz(
float bz) { mBz = bz; }
78 float getBz()
const {
return mBz; }
86 gsl::span<const o2::MCCompLabel>
labels);
99 return mROFramesClusters[
layer].empty() ? 0 :
static_cast<int>(mROFramesClusters[
layer].size()) - 1;
127 void setROFClusters(std::size_t position, gsl::span<const int> boundaries);
155 std::shared_ptr<BoundedMemoryResource> memoryPool);
170 void setMemoryPool(std::shared_ptr<BoundedMemoryResource> pool);
175 std::shared_ptr<BoundedMemoryResource> mMemoryPool;
178 std::vector<std::vector<int>> mROFramesClusters;
179 std::vector<bounded_vector<int>> mIndexTables;
180 std::vector<std::vector<uint8_t>> mLayerUsedClusters;
182 std::vector<float> mMinR;
183 std::vector<float> mMaxR;
184 std::vector<float> mMinZ;
185 std::vector<float> mMaxZ;
188 std::vector<RuntimeROFViews> mROFViewsBySurface;
189 std::vector<uint16_t> mROFLocalLayerBySurface;
193 unsigned int mNTotalLowPtVertices = 0;
194 int mBeamPosWeight = 0;
195 std::array<float, 2> mBeamPos = {0.f, 0.f};
196 float mBeamPositionVariance = 0.f;
197 bool isBeamPositionOverridden =
false;
199 bounded_vector<Vertex> mPrimaryVertices;
200 bounded_vector<VertexLabel> mPrimaryVerticesLabels;
202 bounded_vector<GenericTrack> mGenericTracks;
203 bounded_vector<MCCompLabel> mTrackLabels;
204 bounded_vector<TrackClusterReference> mTrackClusterIndices;
206 std::vector<std::vector<GlobalMeasurement>> mLayerGlobalMeasurements;
207 std::vector<std::vector<SurfaceMeasurement>> mLayerSurfaceMeasurements;
208 std::vector<o2::dataformats::MCTruthContainer<o2::MCCompLabel>> mLayerClusterLabels;
209 bool mHasMCInformation{
false};
211 bool mConfigurationValid =
false;
212 DetectorConfiguration mDetectorConfiguration;
213 TimeFrameScratch mScratch;
214 CapacityEstimator mCapacityEstimator;
215 void prepareIndexTables(
const IndexTableConfigurationSet& indexTableConfigs);
216 void prepareClusters(
int maxLayers);
Cross-timeframe output-size prediction.
std::vector< o2::MCCompLabel > labels
Definition of a container to keep Monte Carlo truth external to simulation objects.
Runtime-plan-owned, detector-neutral CA workspace.
GLsizei const GLfloat * value
GLuint GLsizei const GLchar * label
GLenum GLuint GLint GLint layer
GLubyte GLubyte GLubyte GLubyte w
std::pair< o2::MCCompLabel, float > VertexLabel
o2::dataformats::Vertex< o2::its::TimeEstBC > Vertex
o2::its::VertexLabel VertexLabel
uint32_t trackClusterIndicesSize noexcept
RuntimeROFVertexLookupView vertexLookup
RuntimeROFMaskView upcMask
RuntimeROFOverlapView overlap
auto & getGenericTracks()
auto & getTrackClusterIndices()
TimeFrame(const TimeFrame &)=delete
const auto & getPrimaryVertices() const
float getBeamPositionVariance() const
gsl::span< const MCCompLabel > getClusterLabels(int layer, int cluster) const
TimeFrame & operator=(const TimeFrame &)=delete
int getTotalClusters() const
void setROFClusters(std::size_t position, gsl::span< const int > boundaries)
gsl::span< const int > getROFrameClusters(int layer) const
bool hasMCinformation() const noexcept
auto getPrimaryVerticesNum()
void markUsedCluster(int layer, uint32_t clusterId)
float getMinZ(int layer) const
const auto & getGenericTracks() const
void resetTimeFrame() noexcept
void addPrimaryVertexLabel(const VertexLabel &label)
const RuntimeROFTableEntry & getROFOverlap(int fromLayer, int toLayer, int rof) const noexcept
const auto & getIndexTableUtils(int layer) const
int getSortedStartIndex(int rofId, int layer) const
const RuntimeROFMaskView & getROFMaskView() const noexcept
void addPrimaryVertex(const Vertex &vertex)
void setBeamPosition(const float x, const float y, const float s2, const float base=50.f, const float systematic=0.f)
void setHasMCInformation(bool value) noexcept
auto & getClusters() noexcept
const DetectorConfiguration & getDetectorConfiguration() const noexcept
void addMeasurement(LayerId surface, GlobalMeasurement global, const SurfaceMeasurement &measurement)
int getNrof(int layer) const
const RuntimeROFViews & getROFViews() const noexcept
TimeFrameScratch & getScratch()
void setROFViews(RuntimeROFViews views) noexcept
int getSortedIndex(int rofId, int layer, int idx) const
std::size_t getTotalMeasurements() const noexcept
bool isConfigured() const noexcept
gsl::span< const o2::MCCompLabel > getLabels(LayerId layer, uint32_t clusterId) const
CapacityEstimator & getCapacityEstimator() noexcept
o2::its::TimeEstBC getROFTimeStamp(int fromLayer, int fromROF, int toLayer, int toROF) const noexcept
const auto & getIndexTableUtils() const
const CapacityEstimator & getCapacityEstimator() const noexcept
bool isClusterUsed(int layer, uint32_t clusterId) const
uint32_t getNMeasurementSurfaces() const noexcept
gsl::span< int > getIndexTable(int rofId, int layer)
int getROFLocalLayer(int layer) const noexcept
const SurfaceMeasurement * getSurfaceMeasurement(LayerId layer, uint32_t clusterId) const noexcept
float getMaxR(int layer) const
const RuntimeROFVertexLookupView & getROFVertexLookupView() const noexcept
gsl::span< const int > getROFramesClustersPerROFrange(int rofMin, int range, int layer) const
void resetBeamXY(const float x, const float y, const float w=0)
const auto & getTrackLabels() const
virtual ~TimeFrame()=default
auto & getPrimaryVertices()
void setMemoryPool(std::shared_ptr< BoundedMemoryResource > pool)
memory management
const auto & getClusters() const noexcept
int getMaxVerticesPerROF() const noexcept
const ROFTimingLayer & getROFTiming(int layer) const noexcept
const RuntimeROFViews & getROFViews(int layer) const noexcept
auto & getPrimaryVerticesLabels()
int getTotalClustersPerROFrange(int rofMin, int range, int layer) const
std::array< float, 2 > & getBeamXY()
std::size_t getNumberOfClusters() const
void useUPCMask() noexcept
gsl::span< const GlobalMeasurement > getGlobalMeasurements(LayerId surface) const
float getMaxZ(int layer) const
float getMinR(int layer) const
int getClusterROF(int layer, int cluster) const
bool isROFEnabled(int layer, int rof) const noexcept
gsl::span< unsigned char > getUsedClusters(int layer)
const auto & getTrackClusterIndices() const
std::size_t getNumberOfUsedClusters() const
gsl::span< GlobalMeasurement > getClustersOnLayer(int rofId, int layer)
auto & getMemoryPool() const noexcept
const Vertex & getPrimaryVertex(const int ivtx) const
gsl::span< const GlobalMeasurement > getClustersPerROFrange(int rofMin, int range, int layer) const
const RuntimeROFOverlapView & getROFOverlapView() const noexcept
bool configure(DetectorConfiguration &&layout, std::size_t maxEdges, std::size_t maxCells, std::shared_ptr< BoundedMemoryResource > memoryPool)
bool isVertexCompatible(int layer, int rof, const Vertex &vertex) const noexcept