13#ifndef ITSTRACKINGGPU_TRACKINGKERNELS_H_
14#define ITSTRACKINGGPU_TRACKINGKERNELS_H_
38class TrackingFrameInfo;
44class ExternalAllocator;
57 const bool useDiamond,
59 const std::vector<unsigned int>&
nClusters,
60 const int** ROFClusters,
61 const unsigned char** usedClusters,
62 const int** clustersIndexTables,
64 gsl::span<Tracklet*> spanTracklets,
65 gsl::span<int> nTracklets,
67 gsl::span<int*> trackletsLUTsHost,
68 const bool selectUPCVertices,
69 const float NSigmaCut,
71 bounded_vector<float>& linkPhiCuts,
72 const float resolutionPV,
75 bounded_vector<float>& resolutions,
76 std::vector<float>& radii,
77 bounded_vector<float>& linkMSAngles,
82 const Cluster** unsortedClusters,
87 const int cellTopologyId,
93 const float maxChi2ClusterAttachment,
94 const float cellDeltaTanLambdaSigma,
95 const float cellDeltaPhiCut,
96 const float nSigmaCut,
97 const float* layerxX0,
100 const bool orderCandidates,
109 const int sourceCellTopologyId,
110 const int targetCellTopologyId,
111 const float maxChi2ClusterAttachment,
113 const unsigned int nCells,
118 const int startCellTopologyId,
121 const int* currentCellTopologyIds,
122 const int* currentCellIds,
124 const unsigned char** usedClusters,
126 int** neighboursDeviceLUTs,
129 const int seedsCapacity,
134 const float MaxChi2ClusterAttachment,
135 const float maxChi2NDF,
137 const int minSeedingClusters,
140 const float* layerxX0,
147 const Cluster** unsortedClusters,
152 const unsigned char** usedClusters,
153 const int** clustersIndexTables,
154 const int** ROFClusters,
157 int* trackSeedIndices,
159 const int trackCapacity,
162 const float* layerRadii,
164 const float* layerxX0,
165 const unsigned int nSeeds,
167 const float maxChi2ClusterAttachment,
168 const float maxChi2NDF,
169 const int reseedIfShorter,
170 const bool repeatRefitOut,
171 const bool shiftRefToCluster,
177 const float nSigmaCutPhi,
178 const float nSigmaCutZ,
185 const int* clusterOffsets,
189 float beamX,
float beamY,
190 int zBins,
int phiBins,
int nRofs,
int nClustersLayer,
int iLayer,
191 float* minRadiusLayer,
float* maxRadiusLayer,
199 unsigned long long** clusterOwnersDeviceArray,
204 const unsigned long long*
const* clusterOwners,
205 const int* rofFramesClustersL1,
207 const int ownedClustersCut,
234 const int* rofOffsets,
243 const int* rofOffsets,
247 const int* densityFine,
249 const int fineMinDensity,
258 const int* peakLineIdx,
262 const float* lineChi2,
264 const float goodLineChi2Cut,
265 const float goodLinePtCut,
266 const float pairCut2,
267 const float nSigmaCut,
268 const int minContributors,
271 const uint8_t* isPeakFine,
272 const float fineMaxDrift,
277 const int* peakLineIdx,
278 const int* peakOffsets,
280 const float duplicateZCut,
281 const float duplicateZScale,
290 const int nTargetCells,
Cross-timeframe output-size prediction.
std::vector< std::string > keys
std::vector< o2::its::TrackITS > tracks
small types shared by the host and device seeding vertexers, describing lines projected onto the beam...
HMPID cluster implementation.
CellSeed: connections of three clusters.
GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat maxZ
const bool const int nLayers
void resetOutputCounterHandler(int *outputCounter, gpu::Stream &stream)
TrackExtensionHypothesis< NLayers > int const int maxHypotheses
const bool const bool extendBot
const track::TrackFitContext< NLayers > const TrackFollowContext< NLayers > const bool TrackExtensionHypothesis< NLayers > * activeHypotheses
int finalizeCellNeighboursHandler(CellNeighbour *cellNeighbours, int *neighboursLUT, const int nTargetCells, const int capacity, o2::its::ExternalAllocator *alloc, gpu::Stream &stream)
const track::TrackFitContext< NLayers > const TrackFollowContext< NLayers > const bool TrackExtensionHypothesis< NLayers > TrackExtensionHypothesis< NLayers > * nextHypotheses
std::pmr::vector< T > bounded_vector
Common utility functions.
static void sortClustersHandler(const Cluster *unsorted, Cluster *sorted, const int *clusterOffsets, int *indexTable, const IndexTableUtils< NLayers > *utils, const typename ROFMaskTable< NLayers >::View &rofMask, float beamX, float beamY, int zBins, int phiBins, int nRofs, int nClustersLayer, int iLayer, float *minRadiusLayer, float *maxRadiusLayer, int *keys, int *perm, o2::its::ExternalAllocator *alloc, gpu::Stream &stream)
static void fitPeaksHandler(const int *nPeaksDevice, const int *peakLineIdx, const gpu::LineWindow *win, const gpu::LineProjSoA sortedSoa, const o2::its::Line *lines, const float *lineChi2, const float *linePt, const float goodLineChi2Cut, const float goodLinePtCut, const float pairCut2, const float nSigmaCut, const int minContributors, const float beamX, const float beamY, const uint8_t *isPeakFine, const float fineMaxDrift, gpu::VertexCand *cands, gpu::Stream &stream)
static void computeCellNeighboursHandler(CellSeed **cellsLayersDevice, int **cellsLUTs, CellNeighbour *cellNeighbours, int *outputCounter, const int capacity, const int sourceCellTopologyId, const int targetCellTopologyId, const float maxChi2ClusterAttachment, const float bz, const unsigned int nCells, o2::its::ExternalAllocator *alloc, gpu::Stream &stream)
static void dedupVertexCandidatesHandler(const int *nPeaksDevice, const int *peakLineIdx, const int *peakOffsets, const gpu::LineProjSoA sortedSoa, const float duplicateZCut, const float duplicateZScale, gpu::VertexCand *cands, gpu::Stream &stream)
static void scanDensityHandler(const int nLines, const gpu::LineProjSoA sortedSoa, const int *rofOffsets, int *density, gpu::LineWindow *win, const float zWindow, gpu::Stream &stream)
static void processNeighboursHandler(const int startLevel, const int startCellTopologyId, CellSeed **allCellSeeds, CellSeed *currentCellSeeds, const int *currentCellTopologyIds, const int *currentCellIds, const int *nCells, const unsigned char **usedClusters, CellNeighbour **neighbours, int **neighboursDeviceLUTs, const TrackingFrameInfo **foundTrackingFrameInfo, TrackSeed< NLayers > *seedsDevice, const int seedsCapacity, int &seedsCursor, CapacityEstimator &estimator, const int iteration, const float bz, const float MaxChi2ClusterAttachment, const float maxChi2NDF, const int maxHoles, const int minSeedingClusters, const LayerMask holeLayerMask, const LayerMask nonSeedingLayerMask, const float *layerxX0, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, o2::its::ExternalAllocator *alloc)
static int computeTrackSeedHandler(TrackSeed< NLayers > *trackSeeds, const TrackingFrameInfo **foundTrackingFrameInfo, const Cluster **unsortedClusters, const IndexTableUtils< NLayers > *utils, const typename ROFMaskTable< NLayers >::View &rofMask, const typename ROFOverlapTable< NLayers >::View &rofOverlaps, const Cluster **clusters, const unsigned char **usedClusters, const int **clustersIndexTables, const int **ROFClusters, o2::its::TrackITSExt *tracks, int *trackIndices, int *trackSeedIndices, int *outputCounter, const int trackCapacity, TrackExtensionHypothesis< NLayers > *activeHypotheses, TrackExtensionHypothesis< NLayers > *nextHypotheses, const float *layerRadii, const float *minPts, const float *layerxX0, const unsigned int nSeeds, const float Bz, const float maxChi2ClusterAttachment, const float maxChi2NDF, const int reseedIfShorter, const bool repeatRefitOut, const bool shiftRefToCluster, const int nLayers, const int phiBins, const int maxHypotheses, const bool extendTop, const bool extendBot, const float nSigmaCutPhi, const float nSigmaCutZ, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, o2::its::ExternalAllocator *alloc)
static void registerClusterOwnershipHandler(const CellSeed *cellsLayersDevice, const int nCells, unsigned long long **clusterOwnersDeviceArray, gpu::Stream &stream)
static void findPeaksHandler(const int nLines, const int nRofs, const gpu::LineProjSoA sortedSoa, const int *rofOffsets, const int *density, const gpu::LineWindow *win, uint8_t *isPeak, const int *densityFine, const gpu::LineWindow *winFine, const int fineMinDensity, uint8_t *isPeakFine, int *peakScan, int *peakLineIdx, int *peakOffsets, o2::its::ExternalAllocator *alloc, gpu::Stream &stream)
static void linearizeCellsToLinesHandler(const int nCells, const CellSeed *cells, const unsigned long long *const *clusterOwners, const int *rofFramesClustersL1, const int nRofsL1, const int ownedClustersCut, o2::its::Line *lines, int *lineRof, int *lineClusters, int *lineSlots, const float beamX, const float beamY, const float maxZ, const float minPt, float *linesZs, o2::its::TimeEstBC *lineTimes, float *lineChi2, float *linePt, o2::its::ExternalAllocator *alloc, gpu::Stream &stream)
static int computeCellsHandler(const Cluster **sortedClusters, const Cluster **unsortedClusters, const TrackingFrameInfo **tfInfo, Tracklet **tracklets, int **trackletsLUT, const int nTracklets, const int cellTopologyId, const typename TrackingTopology< NLayers >::View topology, CellSeed *cells, const int capacity, int *cellsLUTsHost, const float bz, const float maxChi2ClusterAttachment, const float cellDeltaTanLambdaSigma, const float cellDeltaPhiCut, const float nSigmaCut, const float *layerxX0, CapacityEstimator &estimator, const int iteration, const bool orderCandidates, o2::its::ExternalAllocator *alloc, gpu::Streams &streams)
static int computeTrackletsInROFsHandler(const IndexTableUtils< NLayers > *utils, const typename ROFMaskTable< NLayers >::View &rofMask, const int linkId, const int fromLayer, const int toLayer, const typename ROFOverlapTable< NLayers >::View &rofOverlaps, const typename ROFVertexLookupTable< NLayers >::View &vertexLUT, const int vertexId, const Vertex *vertices, const bool useDiamond, const Cluster **clusters, const std::vector< unsigned int > &nClusters, const int **ROFClusters, const unsigned char **usedClusters, const int **clustersIndexTables, Tracklet **tracklets, gsl::span< Tracklet * > spanTracklets, gsl::span< int > nTracklets, const int capacity, gsl::span< int * > trackletsLUTsHost, const bool selectUPCVertices, const float NSigmaCut, const typename TrackingTopology< NLayers >::View topology, bounded_vector< float > &linkPhiCuts, const float resolutionPV, const float *minRs, const float *maxRs, bounded_vector< float > &resolutions, std::vector< float > &radii, bounded_vector< float > &linkMSAngles, o2::its::ExternalAllocator *alloc, gpu::Streams &streams)
static void sortLinesHandler(const int nLines, const int nRofs, const gpu::LineProjSoA soa, const gpu::LineProjSoA sortedSoa, const int *lineRof, int *rofOffsets, o2::its::ExternalAllocator *alloc, gpu::Stream &stream)
std::vector< Cluster > clusters
std::vector< Cell > cells
std::vector< Tracklet64 > tracklets