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 <gsl/gsl>
17
22#include "GPUCommonDef.h"
23
24namespace o2::its
25{
26template <int>
27class CellSeed;
28class TrackingFrameInfo;
29class Tracklet;
30template <int>
31class IndexTableUtils;
32class Cluster;
33class TrackITSExt;
34class ExternalAllocator;
35
36template <int nLayers = 7>
38 const uint8_t* multMask,
39 const int layer,
40 const int startROF,
41 const int endROF,
42 const int maxROF,
43 const int deltaROF,
44 const int vertexId,
45 const Vertex* vertices,
46 const int* rofPV,
47 const int nVertices,
48 const Cluster** clusters,
49 std::vector<unsigned int> nClusters,
50 const int** ROFClusters,
51 const unsigned char** usedClusters,
52 const int** clustersIndexTables,
53 int** trackletsLUTs,
54 gsl::span<int*> trackletsLUTsHost,
55 const int iteration,
56 const float NSigmaCut,
57 bounded_vector<float>& phiCuts,
58 const float resolutionPV,
59 std::array<float, nLayers>& minR,
60 std::array<float, nLayers>& maxR,
61 bounded_vector<float>& resolutions,
62 std::vector<float>& radii,
63 bounded_vector<float>& mulScatAng,
65 const int nBlocks,
66 const int nThreads,
67 gpu::Streams& streams);
68
69template <int nLayers = 7>
71 const uint8_t* multMask,
72 const int layer,
73 const int startROF,
74 const int endROF,
75 const int maxROF,
76 const int deltaROF,
77 const int vertexId,
78 const Vertex* vertices,
79 const int* rofPV,
80 const int nVertices,
81 const Cluster** clusters,
82 std::vector<unsigned int> nClusters,
83 const int** ROFClusters,
84 const unsigned char** usedClusters,
85 const int** clustersIndexTables,
87 gsl::span<Tracklet*> spanTracklets,
88 gsl::span<int> nTracklets,
89 int** trackletsLUTs,
90 gsl::span<int*> trackletsLUTsHost,
91 const int iteration,
92 const float NSigmaCut,
93 bounded_vector<float>& phiCuts,
94 const float resolutionPV,
95 std::array<float, nLayers>& minR,
96 std::array<float, nLayers>& maxR,
97 bounded_vector<float>& resolutions,
98 std::vector<float>& radii,
99 bounded_vector<float>& mulScatAng,
101 const int nBlocks,
102 const int nThreads,
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 layer,
114 int** cellsLUTsDeviceArray,
115 int* cellsLUTsHost,
116 const int deltaROF,
117 const float bz,
118 const float maxChi2ClusterAttachment,
119 const float cellDeltaTanLambdaSigma,
120 const float nSigmaCut,
122 const int nBlocks,
123 const int nThreads,
124 gpu::Streams& streams);
125
126template <int nLayers>
127void computeCellsHandler(const Cluster** sortedClusters,
128 const Cluster** unsortedClusters,
129 const TrackingFrameInfo** tfInfo,
131 int** trackletsLUT,
132 const int nTracklets,
133 const int layer,
135 int** cellsLUTsDeviceArray,
136 int* cellsLUTsHost,
137 const int deltaROF,
138 const float bz,
139 const float maxChi2ClusterAttachment,
140 const float cellDeltaTanLambdaSigma,
141 const float nSigmaCut,
142 const int nBlocks,
143 const int nThreads,
144 gpu::Streams& streams);
145
146template <int nLayers>
148 int* neighboursLUTs,
149 int** cellsLUTs,
150 gpuPair<int, int>* cellNeighbours,
151 int* neighboursIndexTable,
152 const Tracklet** tracklets,
153 const int deltaROF,
154 const float maxChi2ClusterAttachment,
155 const float bz,
156 const int layerIndex,
157 const unsigned int nCells,
158 const unsigned int nCellsNext,
159 const int maxCellNeighbours,
161 const int nBlocks,
162 const int nThreads,
164
165template <int nLayers>
167 int* neighboursLUTs,
168 int** cellsLUTs,
169 gpuPair<int, int>* cellNeighbours,
170 int* neighboursIndexTable,
171 const Tracklet** tracklets,
172 const int deltaROF,
173 const float maxChi2ClusterAttachment,
174 const float bz,
175 const int layerIndex,
176 const unsigned int nCells,
177 const unsigned int nCellsNext,
178 const int maxCellNeighbours,
179 const int nBlocks,
180 const int nThreads,
182
184 int*,
185 unsigned int,
187 o2::its::ExternalAllocator* = nullptr);
188
189template <int nLayers = 7>
190void processNeighboursHandler(const int startLayer,
191 const int startLevel,
192 CellSeed<nLayers>** allCellSeeds,
193 CellSeed<nLayers>* 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,
200 const float bz,
201 const float MaxChi2ClusterAttachment,
202 const float maxChi2NDF,
203 const o2::base::Propagator* propagator,
204 const o2::base::PropagatorF::MatCorrType matCorrType,
206 const int nBlocks,
207 const int nThreads);
208
209template <int nLayers = 7>
211 const TrackingFrameInfo** foundTrackingFrameInfo,
212 o2::its::TrackITSExt* tracks,
213 std::vector<float>& minPtsHost,
214 const unsigned int nSeeds,
215 const float Bz,
216 const int startLevel,
217 float maxChi2ClusterAttachment,
218 float maxChi2NDF,
219 const o2::base::Propagator* propagator,
220 const o2::base::PropagatorF::MatCorrType matCorrType,
221 const int nBlocks,
222 const int nThreads);
223} // namespace o2::its
224#endif // ITSTRACKINGGPU_TRACKINGKERNELS_H_
int nClusters
HMPID cluster implementation.
Definition Cluster.h:27
GLenum GLuint GLint GLint layer
Definition glcorearb.h:1310
GLuint GLuint stream
Definition glcorearb.h:1806
std::pair< T1, T2 > gpuPair
Definition Utils.h:43
std::pmr::vector< T > bounded_vector
void countCellNeighboursHandler(CellSeed< nLayers > **cellsLayersDevice, int *neighboursLUTs, int **cellsLUTs, gpuPair< int, int > *cellNeighbours, int *neighboursIndexTable, const Tracklet **tracklets, const int deltaROF, const float maxChi2ClusterAttachment, const float bz, const int layerIndex, const unsigned int nCells, const unsigned int nCellsNext, const int maxCellNeighbours, o2::its::ExternalAllocator *alloc, const int nBlocks, const int nThreads, gpu::Stream &stream)
int filterCellNeighboursHandler(gpuPair< int, int > *, int *, unsigned int, gpu::Stream &, o2::its::ExternalAllocator *=nullptr)
void countTrackletsInROFsHandler(const IndexTableUtils< nLayers > *utils, const uint8_t *multMask, const int layer, 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, o2::its::ExternalAllocator *alloc, const int nBlocks, const int nThreads, gpu::Streams &streams)
void trackSeedHandler(CellSeed< nLayers > *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 computeTrackletsInROFsHandler(const IndexTableUtils< nLayers > *utils, const uint8_t *multMask, const int layer, 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, o2::its::ExternalAllocator *alloc, const int nBlocks, const int nThreads, gpu::Streams &streams)
void processNeighboursHandler(const int startLayer, const int startLevel, CellSeed< nLayers > **allCellSeeds, CellSeed< nLayers > *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< nLayers > > &seedsHost, const float bz, const float MaxChi2ClusterAttachment, const float maxChi2NDF, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, o2::its::ExternalAllocator *alloc, 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< nLayers > *cells, int **cellsLUTsDeviceArray, int *cellsLUTsHost, const int deltaROF, const float bz, const float maxChi2ClusterAttachment, const float cellDeltaTanLambdaSigma, const float nSigmaCut, const int nBlocks, const int nThreads, gpu::Streams &streams)
void computeCellNeighboursHandler(CellSeed< nLayers > **cellsLayersDevice, int *neighboursLUTs, int **cellsLUTs, gpuPair< int, int > *cellNeighbours, int *neighboursIndexTable, const Tracklet **tracklets, const int deltaROF, 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, gpu::Stream &stream)
void countCellsHandler(const Cluster **sortedClusters, const Cluster **unsortedClusters, const TrackingFrameInfo **tfInfo, Tracklet **tracklets, int **trackletsLUT, const int nTracklets, const int layer, CellSeed< nLayers > *cells, int **cellsLUTsDeviceArray, int *cellsLUTsHost, const int deltaROF, const float bz, const float maxChi2ClusterAttachment, const float cellDeltaTanLambdaSigma, const float nSigmaCut, o2::its::ExternalAllocator *alloc, const int nBlocks, const int nThreads, gpu::Streams &streams)
Common utility functions.
std::vector< Cluster > clusters
std::vector< Cell > cells
std::vector< Tracklet64 > tracklets