Project
Loading...
Searching...
No Matches
TrackingKernels.h
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.
12
13#ifndef ITSTRACKINGGPU_TRACKINGKERNELS_H_
14#define ITSTRACKINGGPU_TRACKINGKERNELS_H_
15
16#include <array>
17#include <gsl/gsl>
18
26
27namespace o2::its
28{
29class CellSeed;
30struct CellNeighbour;
31template <int>
32class TrackSeed;
33class TrackingFrameInfo;
34class Tracklet;
35template <int>
36class IndexTableUtils;
37class Cluster;
38class TrackITSExt;
39class ExternalAllocator;
40
41template <int NLayers>
44 const typename ROFMaskTable<NLayers>::View& rofMask,
45 const int linkId,
46 const int fromLayer,
47 const int toLayer,
48 const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
49 const typename ROFVertexLookupTable<NLayers>::View& vertexLUT,
50 const int vertexId,
51 const Vertex* vertices,
52 const Cluster** clusters,
53 const std::vector<unsigned int>& nClusters,
54 const int** ROFClusters,
55 const unsigned char** usedClusters,
56 const int** clustersIndexTables,
58 gsl::span<Tracklet*> spanTracklets,
59 gsl::span<int> nTracklets,
60 const int capacity,
61 gsl::span<int*> trackletsLUTsHost,
62 const bool selectUPCVertices,
63 const float NSigmaCut,
64 const typename TrackingTopology<NLayers>::View topology,
65 bounded_vector<float>& linkPhiCuts,
66 const float resolutionPV,
67 std::array<float, NLayers>& minR,
68 std::array<float, NLayers>& maxR,
69 bounded_vector<float>& resolutions,
70 std::vector<float>& radii,
71 bounded_vector<float>& linkMSAngles,
73 gpu::Streams& streams);
74
75 static int computeCellsHandler(const Cluster** sortedClusters,
76 const Cluster** unsortedClusters,
77 const TrackingFrameInfo** tfInfo,
79 int** trackletsLUT,
80 const int nTracklets,
81 const int cellTopologyId,
82 const typename TrackingTopology<NLayers>::View topology,
84 const int capacity,
85 int* cellsLUTsHost,
86 const float bz,
87 const float maxChi2ClusterAttachment,
88 const float cellDeltaTanLambdaSigma,
89 const float nSigmaCut,
90 const float* layerxX0,
92 gpu::Streams& streams);
93
94 static void computeCellNeighboursHandler(CellSeed** cellsLayersDevice,
95 int** cellsLUTs,
96 CellNeighbour* cellNeighbours,
97 int* outputCounter,
98 const int capacity,
99 const int sourceCellTopologyId,
100 const int targetCellTopologyId,
101 const float maxChi2ClusterAttachment,
102 const float bz,
103 const unsigned int nCells,
106
107 static void processNeighboursHandler(const int startLevel,
108 const int startCellTopologyId,
109 CellSeed** allCellSeeds,
110 CellSeed* currentCellSeeds,
111 const int* currentCellTopologyIds,
112 const int* currentCellIds,
113 const int* nCells,
114 const unsigned char** usedClusters,
115 CellNeighbour** neighbours,
116 int** neighboursDeviceLUTs,
117 const TrackingFrameInfo** foundTrackingFrameInfo,
118 TrackSeed<NLayers>* seedsDevice,
119 const int seedsCapacity,
120 int& seedsCursor,
121 CapacityEstimator& estimator,
122 const int iteration,
123 const float bz,
124 const float MaxChi2ClusterAttachment,
125 const float maxChi2NDF,
126 const int maxHoles,
127 const int minSeedingClusters,
128 const LayerMask holeLayerMask,
129 const LayerMask nonSeedingLayerMask,
130 const float* layerxX0,
131 const o2::base::Propagator* propagator,
132 const o2::base::PropagatorF::MatCorrType matCorrType,
134
136 const TrackingFrameInfo** foundTrackingFrameInfo,
137 const Cluster** unsortedClusters,
139 const typename ROFMaskTable<NLayers>::View& rofMask,
140 const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
141 const Cluster** clusters,
142 const unsigned char** usedClusters,
143 const int** clustersIndexTables,
144 const int** ROFClusters,
145 o2::its::TrackITSExt* tracks,
146 int* trackIndices,
147 int* trackSeedIndices,
148 int* outputCounter,
149 const int trackCapacity,
152 const float* layerRadii,
153 const float* minPts,
154 const float* layerxX0,
155 const unsigned int nSeeds,
156 const float Bz,
157 const float maxChi2ClusterAttachment,
158 const float maxChi2NDF,
159 const int reseedIfShorter,
160 const bool repeatRefitOut,
161 const bool shiftRefToCluster,
162 const int nLayers,
163 const int phiBins,
164 const int maxHypotheses,
165 const bool extendTop,
166 const bool extendBot,
167 const float nSigmaCutPhi,
168 const float nSigmaCutZ,
169 const o2::base::Propagator* propagator,
170 const o2::base::PropagatorF::MatCorrType matCorrType,
172};
173
175
177 int* neighboursLUT,
178 const int nTargetCells,
179 const int capacity,
182
183} // namespace o2::its
184#endif // ITSTRACKINGGPU_TRACKINGKERNELS_H_
Cross-timeframe output-size prediction.
int nClusters
HMPID cluster implementation.
Definition Cluster.h:27
CellSeed: connections of three clusters.
Definition Cell.h:81
GLuint GLuint stream
Definition glcorearb.h:1806
std::pmr::vector< T > bounded_vector
const bool const int nLayers
void resetOutputCounterHandler(int *outputCounter, gpu::Stream &stream)
TrackExtensionHypothesis< NLayers > int const int maxHypotheses
const bool const bool extendBot
const bool extendTop
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
Common utility functions.
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 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, std::array< float, NLayers > &minR, std::array< float, NLayers > &maxR, bounded_vector< float > &resolutions, std::vector< float > &radii, bounded_vector< float > &linkMSAngles, o2::its::ExternalAllocator *alloc, gpu::Streams &streams)
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 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 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 nSigmaCut, const float *layerxX0, o2::its::ExternalAllocator *alloc, gpu::Streams &streams)
std::vector< Cluster > clusters
std::vector< Cell > cells
std::vector< Tracklet64 > tracklets