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