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
25
26namespace o2::its
27{
28class CellSeed;
29struct CellNeighbour;
30template <int>
31class TrackSeed;
32class TrackingFrameInfo;
33class Tracklet;
34template <int>
35class IndexTableUtils;
36class Cluster;
37class TrackITSExt;
38class ExternalAllocator;
39
40template <int NLayers>
42 const typename ROFMaskTable<NLayers>::View& rofMask,
43 const int linkId,
44 const int fromLayer,
45 const int toLayer,
46 const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
47 const typename ROFVertexLookupTable<NLayers>::View& vertexLUT,
48 const int vertexId,
49 const Vertex* vertices,
50 const int* rofPV,
51 const Cluster** clusters,
52 std::vector<unsigned int> nClusters,
53 const int** ROFClusters,
54 const unsigned char** usedClusters,
55 const int** clustersIndexTables,
56 int** trackletsLUTs,
57 gsl::span<int*> trackletsLUTsHost,
58 const bool selectUPCVertices,
59 const float NSigmaCut,
60 const typename TrackingTopology<NLayers>::View topology,
61 bounded_vector<float>& linkPhiCuts,
62 const float resolutionPV,
63 std::array<float, NLayers>& minR,
64 std::array<float, NLayers>& maxR,
65 bounded_vector<float>& resolutions,
66 std::vector<float>& radii,
67 bounded_vector<float>& linkMSAngles,
69 gpu::Streams& streams);
70
71template <int NLayers>
73 const typename ROFMaskTable<NLayers>::View& rofMask,
74 const int linkId,
75 const int fromLayer,
76 const int toLayer,
77 const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
78 const typename ROFVertexLookupTable<NLayers>::View& vertexLUT,
79 const int vertexId,
80 const Vertex* vertices,
81 const int* rofPV,
82 const Cluster** clusters,
83 std::vector<unsigned int> nClusters,
84 const int** ROFClusters,
85 const unsigned char** usedClusters,
86 const int** clustersIndexTables,
88 gsl::span<Tracklet*> spanTracklets,
89 gsl::span<int> nTracklets,
90 int** trackletsLUTs,
91 gsl::span<int*> trackletsLUTsHost,
92 const bool selectUPCVertices,
93 const float NSigmaCut,
94 const typename TrackingTopology<NLayers>::View topology,
95 bounded_vector<float>& linkPhiCuts,
96 const float resolutionPV,
97 std::array<float, NLayers>& minR,
98 std::array<float, NLayers>& maxR,
99 bounded_vector<float>& resolutions,
100 std::vector<float>& radii,
101 bounded_vector<float>& linkMSAngles,
103 gpu::Streams& streams);
104
105template <int NLayers>
106void countCellsHandler(const Cluster** sortedClusters,
107 const Cluster** unsortedClusters,
108 const TrackingFrameInfo** tfInfo,
110 int** trackletsLUT,
111 const int nTracklets,
112 const int cellTopologyId,
113 const typename TrackingTopology<NLayers>::View topology,
115 int** cellsLUTsDeviceArray,
116 int* cellsLUTsHost,
117 const float bz,
118 const float maxChi2ClusterAttachment,
119 const float cellDeltaTanLambdaSigma,
120 const float nSigmaCut,
121 const std::vector<float>& layerxX0Host,
123 gpu::Streams& streams);
124
125template <int NLayers>
126void computeCellsHandler(const Cluster** sortedClusters,
127 const Cluster** unsortedClusters,
128 const TrackingFrameInfo** tfInfo,
130 int** trackletsLUT,
131 const int nTracklets,
132 const int cellTopologyId,
133 const typename TrackingTopology<NLayers>::View topology,
135 int** cellsLUTsDeviceArray,
136 int* cellsLUTsHost,
137 const float bz,
138 const float maxChi2ClusterAttachment,
139 const float cellDeltaTanLambdaSigma,
140 const float nSigmaCut,
141 const std::vector<float>& layerxX0Host,
142 gpu::Streams& streams);
143
144template <int NLayers>
145void countCellNeighboursHandler(CellSeed** cellsLayersDevice,
146 int* neighboursCursor,
147 int** cellsLUTs,
148 const int sourceCellTopologyId,
149 const int targetCellTopologyId,
150 const float maxChi2ClusterAttachment,
151 const float bz,
152 const unsigned int nCells,
154
155void scanCellNeighboursHandler(int* neighboursCursor,
156 int* neighboursLUT,
157 const unsigned int nCells,
160
161template <int NLayers>
162void computeCellNeighboursHandler(CellSeed** cellsLayersDevice,
163 int* neighboursCursor,
164 int** cellsLUTs,
165 CellNeighbour* cellNeighbours,
166 const int sourceCellTopologyId,
167 const int targetCellTopologyId,
168 const float maxChi2ClusterAttachment,
169 const float bz,
170 const unsigned int nCells,
172
174 int*,
175 unsigned int,
177 o2::its::ExternalAllocator* = nullptr);
178
179template <int NLayers>
180void processNeighboursHandler(const int startLevel,
181 const int defaultCellTopologyId,
182 CellSeed** allCellSeeds,
183 CellSeed* currentCellSeeds,
184 const int* currentCellTopologyIds,
185 const int* currentCellIds,
186 const int* nCells,
187 const unsigned char** usedClusters,
188 CellNeighbour** neighbours,
189 int** neighboursDeviceLUTs,
190 const TrackingFrameInfo** foundTrackingFrameInfo,
192 const float bz,
193 const float MaxChi2ClusterAttachment,
194 const float maxChi2NDF,
195 const int maxHoles,
196 const int minSeedingClusters,
197 const LayerMask holeLayerMask,
198 const LayerMask nonSeedingLayerMask,
199 const std::vector<float>& layerxX0Host,
200 const o2::base::Propagator* propagator,
201 const o2::base::PropagatorF::MatCorrType matCorrType,
203
204template <int NLayers>
206 const TrackingFrameInfo** foundTrackingFrameInfo,
207 const Cluster** unsortedClusters,
208 int* seedLUT,
209 const std::vector<float>& layerRadiiHost,
210 const std::vector<float>& minPtsHost,
211 const std::vector<float>& layerxX0Host,
212 const unsigned int nSeeds,
213 const float Bz,
214 const float maxChi2ClusterAttachment,
215 const float maxChi2NDF,
216 const int reseedIfShorter,
217 const bool repeatRefitOut,
218 const bool shiftRefToCluster,
219 const o2::base::Propagator* propagator,
220 const o2::base::PropagatorF::MatCorrType matCorrType,
222
223template <int NLayers>
225 const TrackingFrameInfo** foundTrackingFrameInfo,
226 const Cluster** unsortedClusters,
228 const typename ROFMaskTable<NLayers>::View& rofMask,
229 const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
230 const Cluster** clusters,
231 const unsigned char** usedClusters,
232 const int** clustersIndexTables,
233 const int** ROFClusters,
234 o2::its::TrackITSExt* tracks,
235 int* trackIndices,
236 const int* seedLUT,
239 const std::vector<float>& layerRadiiHost,
240 const std::vector<float>& minPtsHost,
241 const std::vector<float>& layerxX0Host,
242 const unsigned int nSeeds,
243 const unsigned int nTracks,
244 const float Bz,
245 const float maxChi2ClusterAttachment,
246 const float maxChi2NDF,
247 const int reseedIfShorter,
248 const bool repeatRefitOut,
249 const bool shiftRefToCluster,
250 const int nLayers,
251 const int phiBins,
252 const int maxHypotheses,
253 const bool extendTop,
254 const bool extendBot,
255 const float nSigmaCutPhi,
256 const float nSigmaCutZ,
257 const o2::base::Propagator* propagator,
258 const o2::base::PropagatorF::MatCorrType matCorrType,
260
261} // namespace o2::its
262#endif // ITSTRACKINGGPU_TRACKINGKERNELS_H_
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
void countTrackSeedHandler(TrackSeed< NLayers > *trackSeeds, const TrackingFrameInfo **foundTrackingFrameInfo, const Cluster **unsortedClusters, int *seedLUT, const std::vector< float > &layerRadiiHost, const std::vector< float > &minPtsHost, const std::vector< float > &layerxX0Host, const unsigned int nSeeds, const float Bz, const float maxChi2ClusterAttachment, const float maxChi2NDF, const int reseedIfShorter, const bool repeatRefitOut, const bool shiftRefToCluster, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, o2::its::ExternalAllocator *alloc)
void countCellsHandler(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, int **cellsLUTsDeviceArray, int *cellsLUTsHost, const float bz, const float maxChi2ClusterAttachment, const float cellDeltaTanLambdaSigma, const float nSigmaCut, const std::vector< float > &layerxX0Host, o2::its::ExternalAllocator *alloc, gpu::Streams &streams)
std::pair< T1, T2 > gpuPair
Definition Utils.h:58
void 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, int **cellsLUTsDeviceArray, int *cellsLUTsHost, const float bz, const float maxChi2ClusterAttachment, const float cellDeltaTanLambdaSigma, const float nSigmaCut, const std::vector< float > &layerxX0Host, gpu::Streams &streams)
std::pmr::vector< T > bounded_vector
const bool const int nLayers
int filterCellNeighboursHandler(gpuPair< int, int > *, int *, unsigned int, gpu::Stream &, o2::its::ExternalAllocator *=nullptr)
void scanCellNeighboursHandler(int *neighboursCursor, int *neighboursLUT, const unsigned int nCells, o2::its::ExternalAllocator *alloc, gpu::Stream &stream)
TrackExtensionHypothesis< NLayers > int const int maxHypotheses
const bool const bool extendBot
void countTrackletsInROFsHandler(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 int *rofPV, const Cluster **clusters, std::vector< unsigned int > nClusters, const int **ROFClusters, const unsigned char **usedClusters, const int **clustersIndexTables, int **trackletsLUTs, 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)
const bool extendTop
void 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 int *rofPV, const Cluster **clusters, 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, int **trackletsLUTs, 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)
void processNeighboursHandler(const int startLevel, const int defaultCellTopologyId, CellSeed **allCellSeeds, CellSeed *currentCellSeeds, const int *currentCellTopologyIds, const int *currentCellIds, const int *nCells, const unsigned char **usedClusters, CellNeighbour **neighbours, int **neighboursDeviceLUTs, const TrackingFrameInfo **foundTrackingFrameInfo, bounded_vector< TrackSeed< NLayers > > &seedsHost, const float bz, const float MaxChi2ClusterAttachment, const float maxChi2NDF, const int maxHoles, const int minSeedingClusters, const LayerMask holeLayerMask, const LayerMask nonSeedingLayerMask, const std::vector< float > &layerxX0Host, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, o2::its::ExternalAllocator *alloc)
const track::TrackFitContext< NLayers > const TrackFollowContext< NLayers > const bool TrackExtensionHypothesis< NLayers > * activeHypotheses
void countCellNeighboursHandler(CellSeed **cellsLayersDevice, int *neighboursCursor, int **cellsLUTs, const int sourceCellTopologyId, const int targetCellTopologyId, const float maxChi2ClusterAttachment, const float bz, const unsigned int nCells, gpu::Stream &stream)
void computeCellNeighboursHandler(CellSeed **cellsLayersDevice, int *neighboursCursor, int **cellsLUTs, CellNeighbour *cellNeighbours, const int sourceCellTopologyId, const int targetCellTopologyId, const float maxChi2ClusterAttachment, const float bz, const unsigned int nCells, gpu::Stream &stream)
const track::TrackFitContext< NLayers > const TrackFollowContext< NLayers > const bool TrackExtensionHypothesis< NLayers > TrackExtensionHypothesis< NLayers > * nextHypotheses
void 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, const int *seedLUT, TrackExtensionHypothesis< NLayers > *activeHypotheses, TrackExtensionHypothesis< NLayers > *nextHypotheses, const std::vector< float > &layerRadiiHost, const std::vector< float > &minPtsHost, const std::vector< float > &layerxX0Host, const unsigned int nSeeds, const unsigned int nTracks, 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)
Common utility functions.
std::vector< Cluster > clusters
std::vector< Cell > cells
std::vector< Tracklet64 > tracklets