16#ifndef TRACKINGITSU_INCLUDE_TRACKERTRAITS_H_
17#define TRACKINGITSU_INCLUDE_TRACKERTRAITS_H_
27#include <oneapi/tbb.h>
28#include <oneapi/tbb/partitioner.h>
42template <
int nLayers = 7>
53 virtual void findRoads(
const int iteration);
66 virtual void setBz(
float bz);
70 virtual const char*
getName() const noexcept {
return "CPU"; }
71 virtual bool isGPU() const noexcept {
return false; }
72 void setMemoryPool(std::shared_ptr<BoundedMemoryResource>& pool)
noexcept { mMemoryPool = pool; }
76 GPUhd() static consteval
int4 getEmptyBinsRect() {
return int4{0, 0, 0, 0}; }
78 const int4 getBinsRect(
const Cluster& cls,
int layer,
float z1,
float z2,
float maxdeltaz,
float maxdeltaphi)
const noexcept {
return getBinsRect(
layer, cls.phi, maxdeltaphi, z1, z2, maxdeltaz); }
79 const int4 getBinsRect(
int layer,
float phi,
float maxdeltaphi,
float z1,
float z2,
float maxdeltaz)
const noexcept;
98 bool mApplySmoothing =
false;
99 std::shared_ptr<BoundedMemoryResource> mMemoryPool;
100 tbb::task_arena mTaskArena;
112template <
int nLayers>
115 const float zRangeMin = o2::gpu::GPUCommonMath::Min(z1, z2) - maxdeltaz;
117 const float zRangeMax = o2::gpu::GPUCommonMath::Max(z1, z2) + maxdeltaz;
120 if (zRangeMax < -mTrkParams[0].LayerZ[layerIndex] ||
121 zRangeMin > mTrkParams[0].LayerZ[layerIndex] || zRangeMin > zRangeMax) {
122 return getEmptyBinsRect();
126 return int4{o2::gpu::GPUCommonMath::Max(0,
utils.getZBinIndex(layerIndex, zRangeMin)),
127 utils.getPhiBinIndex(math_utils::getNormalizedPhi(phiRangeMin)),
128 o2::gpu::GPUCommonMath::Min(mTrkParams[0].ZBins - 1,
utils.getZBinIndex(layerIndex, zRangeMax)),
129 utils.getPhiBinIndex(math_utils::getNormalizedPhi(phiRangeMax))};
virtual void initialiseTimeFrame(const int iteration)
virtual int getTFNumberOfTracklets() const
GPUhd() static const eval int4 getEmptyBinsRect()
TimeFrame< nLayers > * getTimeFrame()
virtual ~TrackerTraits()=default
virtual void findRoads(const int iteration)
auto getMemoryPool() const noexcept
void setMemoryPool(std::shared_ptr< BoundedMemoryResource > &pool) noexcept
virtual bool isGPU() const noexcept
virtual int getTFNumberOfClusters() const
virtual void processNeighbours(int iLayer, int iLevel, const bounded_vector< CellSeed > ¤tCellSeed, const bounded_vector< int > ¤tCellId, bounded_vector< CellSeed > &updatedCellSeed, bounded_vector< int > &updatedCellId)
void updateTrackingParameters(const std::vector< TrackingParameters > &trkPars)
virtual bool trackFollowing(TrackITSExt *track, int rof, bool outward, const int iteration)
virtual void computeLayerTracklets(const int iteration, int iROFslice, int iVertex)
virtual void adoptTimeFrame(TimeFrame< nLayers > *tf)
std::vector< TrackingParameters > mTrkParams
void setCorrType(const o2::base::PropagatorImpl< float >::MatCorrType type)
virtual void computeLayerCells(const int iteration)
void setSmoothing(bool v)
virtual bool supportsFindShortPrimaries() const noexcept
virtual void findShortPrimaries()
const int4 getBinsRect(int layer, float phi, float maxdeltaphi, float z1, float z2, float maxdeltaz) const noexcept
o2::base::PropagatorImpl< float >::MatCorrType mCorrType
const int4 getBinsRect(const Cluster &cls, int layer, float z1, float z2, float maxdeltaz, float maxdeltaphi) const noexcept
virtual bool supportsExtendTracks() const noexcept
virtual void setBz(float bz)
virtual void findCellsNeighbours(const int iteration)
virtual void extendTracks(const int iteration)
const int4 getBinsRect(int layer, float phi, float maxdeltaphi, float z, float maxdeltaz) const noexcept
virtual const char * getName() const noexcept
TimeFrame< nLayers > * mTimeFrame
void SetRecoChain(o2::gpu::GPUChainITS *chain)
bool getSmoothing() const
virtual int getTFNumberOfCells() const
o2::gpu::GPUChainITS * getChain() const
o2::gpu::GPUChainITS * mChain
GLint GLint GLsizei GLint GLenum GLenum type
GLenum GLuint GLint GLint layer
GLdouble GLdouble GLdouble z
std::pmr::vector< T > bounded_vector
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Common utility functions.
std::unique_ptr< GPUReconstructionTimeframe > tf
void initialise(const int iteration, const TrackingParameters &trkParam, const int maxLayers=7, bool resetVertices=true)
int getNumberOfTracklets() const
int getNumberOfCells() const
int getNumberOfClusters() const