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
17#include "GPUCommonDef.h"
18
19namespace o2::its
20{
21class CellSeed;
22class ExternalAllocator;
23namespace gpu
24{
25
26#ifdef GPUCA_GPUCODE // GPUg() global kernels must only when compiled by GPU compiler
27
28GPUdi() int4 getEmptyBinsRect() { return int4{0, 0, 0, 0}; }
29
30GPUd() bool fitTrack(TrackITSExt& track,
31 int start,
32 int end,
33 int step,
34 float chi2clcut,
35 float chi2ndfcut,
36 float maxQoverPt,
37 int nCl,
38 float Bz,
39 TrackingFrameInfo** tfInfos,
40 const o2::base::Propagator* prop,
41 o2::base::PropagatorF::MatCorrType matCorrType = o2::base::PropagatorImpl<float>::MatCorrType::USEMatCorrNONE);
42
43template <int nLayers = 7>
44GPUg() void fitTrackSeedsKernel(
45 CellSeed* trackSeeds,
46 const TrackingFrameInfo** foundTrackingFrameInfo,
47 o2::its::TrackITSExt* tracks,
48 const float* minPts,
49 const unsigned int nSeeds,
50 const float Bz,
51 const int startLevel,
52 float maxChi2ClusterAttachment,
53 float maxChi2NDF,
54 const o2::base::Propagator* propagator,
55 const o2::base::PropagatorF::MatCorrType matCorrType = o2::base::PropagatorF::MatCorrType::USEMatCorrLUT);
56#endif
57} // namespace gpu
58
59template <int nLayers = 7>
61 const uint8_t* multMask,
62 const int startROF,
63 const int endROF,
64 const int maxROF,
65 const int deltaROF,
66 const int vertexId,
67 const Vertex* vertices,
68 const int* rofPV,
69 const int nVertices,
70 const Cluster** clusters,
71 std::vector<unsigned int> nClusters,
72 const int** ROFClusters,
73 const unsigned char** usedClusters,
74 const int** clustersIndexTables,
75 int** trackletsLUTs,
76 gsl::span<int*> trackletsLUTsHost,
77 const int iteration,
78 const float NSigmaCut,
79 bounded_vector<float>& phiCuts,
80 const float resolutionPV,
81 std::array<float, nLayers>& minR,
82 std::array<float, nLayers>& maxR,
83 bounded_vector<float>& resolutions,
84 std::vector<float>& radii,
85 bounded_vector<float>& mulScatAng,
86 const int nBlocks,
87 const int nThreads);
88
89template <int nLayers = 7>
91 const uint8_t* multMask,
92 const int startROF,
93 const int endROF,
94 const int maxROF,
95 const int deltaROF,
96 const int vertexId,
97 const Vertex* vertices,
98 const int* rofPV,
99 const int nVertices,
100 const Cluster** clusters,
101 std::vector<unsigned int> nClusters,
102 const int** ROFClusters,
103 const unsigned char** usedClusters,
104 const int** clustersIndexTables,
106 gsl::span<Tracklet*> spanTracklets,
107 gsl::span<int> nTracklets,
108 int** trackletsLUTs,
109 gsl::span<int*> trackletsLUTsHost,
110 const int iteration,
111 const float NSigmaCut,
112 bounded_vector<float>& phiCuts,
113 const float resolutionPV,
114 std::array<float, nLayers>& minR,
115 std::array<float, nLayers>& maxR,
116 bounded_vector<float>& resolutions,
117 std::vector<float>& radii,
118 bounded_vector<float>& mulScatAng,
119 const int nBlocks,
120 const int nThreads);
121
122void countCellsHandler(const Cluster** sortedClusters,
123 const Cluster** unsortedClusters,
124 const TrackingFrameInfo** tfInfo,
126 int** trackletsLUT,
127 const int nTracklets,
128 const int layer,
130 int** cellsLUTsDeviceArray,
131 int* cellsLUTsHost,
132 const float bz,
133 const float maxChi2ClusterAttachment,
134 const float cellDeltaTanLambdaSigma,
135 const float nSigmaCut,
136 const int nBlocks,
137 const int nThreads);
138
139void computeCellsHandler(const Cluster** sortedClusters,
140 const Cluster** unsortedClusters,
141 const TrackingFrameInfo** tfInfo,
143 int** trackletsLUT,
144 const int nTracklets,
145 const int layer,
147 int** cellsLUTsDeviceArray,
148 int* cellsLUTsHost,
149 const float bz,
150 const float maxChi2ClusterAttachment,
151 const float cellDeltaTanLambdaSigma,
152 const float nSigmaCut,
153 const int nBlocks,
154 const int nThreads);
155
156unsigned int countCellNeighboursHandler(CellSeed** cellsLayersDevice,
157 int* neighboursLUTs,
158 int** cellsLUTs,
159 gpuPair<int, int>* cellNeighbours,
160 int* neighboursIndexTable,
161 const float maxChi2ClusterAttachment,
162 const float bz,
163 const int layerIndex,
164 const unsigned int nCells,
165 const unsigned int nCellsNext,
166 const int maxCellNeighbours,
167 const int nBlocks,
168 const int nThreads);
169
170void computeCellNeighboursHandler(CellSeed** cellsLayersDevice,
171 int* neighboursLUTs,
172 int** cellsLUTs,
173 gpuPair<int, int>* cellNeighbours,
174 int* neighboursIndexTable,
175 const float maxChi2ClusterAttachment,
176 const float bz,
177 const int layerIndex,
178 const unsigned int nCells,
179 const unsigned int nCellsNext,
180 const int maxCellNeighbours,
181 const int nBlocks,
182 const int nThreads);
183
185 int*,
186 unsigned int,
187 o2::its::ExternalAllocator* = nullptr);
188
189template <int nLayers = 7>
190void processNeighboursHandler(const int startLayer,
191 const int startLevel,
192 CellSeed** allCellSeeds,
193 CellSeed* currentCellSeeds,
194 std::array<int, nLayers - 2>& nCells,
195 const unsigned char** usedClusters,
196 std::array<int*, nLayers - 2>& neighbours,
197 gsl::span<int*> neighboursDeviceLUTs,
198 const TrackingFrameInfo** foundTrackingFrameInfo,
199 bounded_vector<CellSeed>& seedsHost,
201 const float bz,
202 const float MaxChi2ClusterAttachment,
203 const float maxChi2NDF,
204 const o2::base::Propagator* propagator,
205 const o2::base::PropagatorF::MatCorrType matCorrType,
206 const int nBlocks,
207 const int nThreads);
208
209void trackSeedHandler(CellSeed* trackSeeds,
210 const TrackingFrameInfo** foundTrackingFrameInfo,
211 o2::its::TrackITSExt* tracks,
212 std::vector<float>& minPtsHost,
213 const unsigned int nSeeds,
214 const float Bz,
215 const int startLevel,
216 float maxChi2ClusterAttachment,
217 float maxChi2NDF,
218 const o2::base::Propagator* propagator,
219 const o2::base::PropagatorF::MatCorrType matCorrType,
220 const int nBlocks,
221 const int nThreads);
222} // namespace o2::its
223#endif // ITSTRACKINGGPU_TRACKINGKERNELS_H_
#define GPUg()
#define GPUdi()
#define GPUd()
int nClusters
GLuint GLuint end
Definition glcorearb.h:469
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLuint start
Definition glcorearb.h:469
void countTrackletsInROFsHandler(const IndexTableUtils *utils, const uint8_t *multMask, const int startROF, const int endROF, const int maxROF, const int deltaROF, const int vertexId, const Vertex *vertices, const int *rofPV, const int nVertices, 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 int iteration, const float NSigmaCut, bounded_vector< float > &phiCuts, const float resolutionPV, std::array< float, nLayers > &minR, std::array< float, nLayers > &maxR, bounded_vector< float > &resolutions, std::vector< float > &radii, bounded_vector< float > &mulScatAng, const int nBlocks, const int nThreads)
int filterCellNeighboursHandler(gpuPair< int, int > *, int *, unsigned int, o2::its::ExternalAllocator *=nullptr)
std::pmr::vector< T > bounded_vector
void computeTrackletsInROFsHandler(const IndexTableUtils *utils, const uint8_t *multMask, const int startROF, const int endROF, const int maxROF, const int deltaROF, const int vertexId, const Vertex *vertices, const int *rofPV, const int nVertices, 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 int iteration, const float NSigmaCut, bounded_vector< float > &phiCuts, const float resolutionPV, std::array< float, nLayers > &minR, std::array< float, nLayers > &maxR, bounded_vector< float > &resolutions, std::vector< float > &radii, bounded_vector< float > &mulScatAng, const int nBlocks, const int nThreads)
void computeCellsHandler(const Cluster **sortedClusters, const Cluster **unsortedClusters, const TrackingFrameInfo **tfInfo, Tracklet **tracklets, int **trackletsLUT, const int nTracklets, const int layer, CellSeed *cells, int **cellsLUTsDeviceArray, int *cellsLUTsHost, const float bz, const float maxChi2ClusterAttachment, const float cellDeltaTanLambdaSigma, const float nSigmaCut, const int nBlocks, const int nThreads)
void computeCellNeighboursHandler(CellSeed **cellsLayersDevice, int *neighboursLUTs, int **cellsLUTs, gpuPair< int, int > *cellNeighbours, int *neighboursIndexTable, const float maxChi2ClusterAttachment, const float bz, const int layerIndex, const unsigned int nCells, const unsigned int nCellsNext, const int maxCellNeighbours, const int nBlocks, const int nThreads)
unsigned int countCellNeighboursHandler(CellSeed **cellsLayersDevice, int *neighboursLUTs, int **cellsLUTs, gpuPair< int, int > *cellNeighbours, int *neighboursIndexTable, const float maxChi2ClusterAttachment, const float bz, const int layerIndex, const unsigned int nCells, const unsigned int nCellsNext, const int maxCellNeighbours, const int nBlocks, const int nThreads)
void trackSeedHandler(CellSeed *trackSeeds, const TrackingFrameInfo **foundTrackingFrameInfo, o2::its::TrackITSExt *tracks, std::vector< float > &minPtsHost, const unsigned int nSeeds, const float Bz, const int startLevel, float maxChi2ClusterAttachment, float maxChi2NDF, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, const int nBlocks, const int nThreads)
void processNeighboursHandler(const int startLayer, const int startLevel, CellSeed **allCellSeeds, CellSeed *currentCellSeeds, std::array< int, nLayers - 2 > &nCells, const unsigned char **usedClusters, std::array< int *, nLayers - 2 > &neighbours, gsl::span< int * > neighboursDeviceLUTs, const TrackingFrameInfo **foundTrackingFrameInfo, bounded_vector< CellSeed > &seedsHost, o2::its::ExternalAllocator *, const float bz, const float MaxChi2ClusterAttachment, const float maxChi2NDF, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, const int nBlocks, const int nThreads)
void countCellsHandler(const Cluster **sortedClusters, const Cluster **unsortedClusters, const TrackingFrameInfo **tfInfo, Tracklet **tracklets, int **trackletsLUT, const int nTracklets, const int layer, CellSeed *cells, int **cellsLUTsDeviceArray, int *cellsLUTsHost, const float bz, const float maxChi2ClusterAttachment, const float cellDeltaTanLambdaSigma, const float nSigmaCut, const int nBlocks, const int nThreads)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Common utility functions.
std::vector< Cluster > clusters
std::vector< Cell > cells
std::vector< Tracklet64 > tracklets