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
23
24namespace o2::its
25{
26class CellSeed;
27struct CellNeighbour;
28template <int>
29class TrackSeed;
30class TrackingFrameInfo;
31class Tracklet;
32template <int>
33class IndexTableUtils;
34class Cluster;
35class TrackITSExt;
36class ExternalAllocator;
37
38template <int NLayers>
40 const typename ROFMaskTable<NLayers>::View& rofMask,
41 const int transitionId,
42 const int fromLayer,
43 const int toLayer,
44 const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
45 const typename ROFVertexLookupTable<NLayers>::View& vertexLUT,
46 const int vertexId,
47 const Vertex* vertices,
48 const int* rofPV,
49 const Cluster** clusters,
50 std::vector<unsigned int> nClusters,
51 const int** ROFClusters,
52 const unsigned char** usedClusters,
53 const int** clustersIndexTables,
54 int** trackletsLUTs,
55 gsl::span<int*> trackletsLUTsHost,
56 const bool selectUPCVertices,
57 const float NSigmaCut,
58 const typename TrackingTopology<NLayers>::View topology,
59 bounded_vector<float>& transitionPhiCuts,
60 const float resolutionPV,
61 std::array<float, NLayers>& minR,
62 std::array<float, NLayers>& maxR,
63 bounded_vector<float>& resolutions,
64 std::vector<float>& radii,
65 bounded_vector<float>& transitionMSAngles,
67 gpu::Streams& streams);
68
69template <int NLayers>
71 const typename ROFMaskTable<NLayers>::View& rofMask,
72 const int transitionId,
73 const int fromLayer,
74 const int toLayer,
75 const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
76 const typename ROFVertexLookupTable<NLayers>::View& vertexLUT,
77 const int vertexId,
78 const Vertex* vertices,
79 const int* rofPV,
80 const Cluster** clusters,
81 std::vector<unsigned int> nClusters,
82 const int** ROFClusters,
83 const unsigned char** usedClusters,
84 const int** clustersIndexTables,
86 gsl::span<Tracklet*> spanTracklets,
87 gsl::span<int> nTracklets,
88 int** trackletsLUTs,
89 gsl::span<int*> trackletsLUTsHost,
90 const bool selectUPCVertices,
91 const float NSigmaCut,
92 const typename TrackingTopology<NLayers>::View topology,
93 bounded_vector<float>& transitionPhiCuts,
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>& transitionMSAngles,
101 gpu::Streams& streams);
102
103template <int NLayers>
104void countCellsHandler(const Cluster** sortedClusters,
105 const Cluster** unsortedClusters,
106 const TrackingFrameInfo** tfInfo,
108 int** trackletsLUT,
109 const int nTracklets,
110 const int cellTopologyId,
111 const typename TrackingTopology<NLayers>::View topology,
113 int** cellsLUTsDeviceArray,
114 int* cellsLUTsHost,
115 const float bz,
116 const float maxChi2ClusterAttachment,
117 const float cellDeltaTanLambdaSigma,
118 const float nSigmaCut,
119 const std::vector<float>& layerxX0Host,
121 gpu::Streams& streams);
122
123template <int NLayers>
124void computeCellsHandler(const Cluster** sortedClusters,
125 const Cluster** unsortedClusters,
126 const TrackingFrameInfo** tfInfo,
128 int** trackletsLUT,
129 const int nTracklets,
130 const int cellTopologyId,
131 const typename TrackingTopology<NLayers>::View topology,
133 int** cellsLUTsDeviceArray,
134 int* cellsLUTsHost,
135 const float bz,
136 const float maxChi2ClusterAttachment,
137 const float cellDeltaTanLambdaSigma,
138 const float nSigmaCut,
139 const std::vector<float>& layerxX0Host,
140 gpu::Streams& streams);
141
142template <int NLayers>
143void countCellNeighboursHandler(CellSeed** cellsLayersDevice,
144 int* neighboursCursor,
145 int** cellsLUTs,
146 const int sourceCellTopologyId,
147 const int targetCellTopologyId,
148 const float maxChi2ClusterAttachment,
149 const float bz,
150 const unsigned int nCells,
152
153void scanCellNeighboursHandler(int* neighboursCursor,
154 int* neighboursLUT,
155 const unsigned int nCells,
158
159template <int NLayers>
160void computeCellNeighboursHandler(CellSeed** cellsLayersDevice,
161 int* neighboursCursor,
162 int** cellsLUTs,
163 CellNeighbour* cellNeighbours,
164 const int sourceCellTopologyId,
165 const int targetCellTopologyId,
166 const float maxChi2ClusterAttachment,
167 const float bz,
168 const unsigned int nCells,
170
172 int*,
173 unsigned int,
175 o2::its::ExternalAllocator* = nullptr);
176
177template <int NLayers>
178void processNeighboursHandler(const int startLevel,
179 const int defaultCellTopologyId,
180 CellSeed** allCellSeeds,
181 CellSeed* currentCellSeeds,
182 const int* currentCellTopologyIds,
183 const int* currentCellIds,
184 const int* nCells,
185 const unsigned char** usedClusters,
186 CellNeighbour** neighbours,
187 int** neighboursDeviceLUTs,
188 const TrackingFrameInfo** foundTrackingFrameInfo,
190 const float bz,
191 const float MaxChi2ClusterAttachment,
192 const float maxChi2NDF,
193 const int maxHoles,
194 const int minTrackLength,
195 const LayerMask holeLayerMask,
196 const std::vector<float>& layerxX0Host,
197 const o2::base::Propagator* propagator,
198 const o2::base::PropagatorF::MatCorrType matCorrType,
200
201template <int NLayers>
203 const TrackingFrameInfo** foundTrackingFrameInfo,
204 const Cluster** unsortedClusters,
205 int* seedLUT,
206 const std::vector<float>& layerRadiiHost,
207 const std::vector<float>& minPtsHost,
208 const std::vector<float>& layerxX0Host,
209 const unsigned int nSeeds,
210 const float Bz,
211 const int startLevel,
212 const float maxChi2ClusterAttachment,
213 const float maxChi2NDF,
214 const int reseedIfShorter,
215 const bool repeatRefitOut,
216 const bool shiftRefToCluster,
217 const o2::base::Propagator* propagator,
218 const o2::base::PropagatorF::MatCorrType matCorrType,
220
221template <int NLayers>
223 const TrackingFrameInfo** foundTrackingFrameInfo,
224 const Cluster** unsortedClusters,
225 o2::its::TrackITSExt* tracks,
226 const int* seedLUT,
227 const std::vector<float>& layerRadiiHost,
228 const std::vector<float>& minPtsHost,
229 const std::vector<float>& layerxX0Host,
230 const unsigned int nSeeds,
231 const unsigned int nTracks,
232 const float Bz,
233 const int startLevel,
234 const float maxChi2ClusterAttachment,
235 const float maxChi2NDF,
236 const int reseedIfShorter,
237 const bool repeatRefitOut,
238 const bool shiftRefToCluster,
239 const o2::base::Propagator* propagator,
240 const o2::base::PropagatorF::MatCorrType matCorrType,
242
243} // namespace o2::its
244#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 countTrackletsInROFsHandler(const IndexTableUtils< NLayers > *utils, const typename ROFMaskTable< NLayers >::View &rofMask, const int transitionId, 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 > &transitionPhiCuts, const float resolutionPV, std::array< float, NLayers > &minR, std::array< float, NLayers > &maxR, bounded_vector< float > &resolutions, std::vector< float > &radii, bounded_vector< float > &transitionMSAngles, o2::its::ExternalAllocator *alloc, gpu::Streams &streams)
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 int startLevel, 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)
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 minTrackLength, const LayerMask holeLayerMask, const std::vector< float > &layerxX0Host, const o2::base::Propagator *propagator, const o2::base::PropagatorF::MatCorrType matCorrType, o2::its::ExternalAllocator *alloc)
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
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)
void computeTrackletsInROFsHandler(const IndexTableUtils< NLayers > *utils, const typename ROFMaskTable< NLayers >::View &rofMask, const int transitionId, 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 > &transitionPhiCuts, const float resolutionPV, std::array< float, NLayers > &minR, std::array< float, NLayers > &maxR, bounded_vector< float > &resolutions, std::vector< float > &radii, bounded_vector< float > &transitionMSAngles, o2::its::ExternalAllocator *alloc, gpu::Streams &streams)
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)
void computeTrackSeedHandler(TrackSeed< NLayers > *trackSeeds, const TrackingFrameInfo **foundTrackingFrameInfo, const Cluster **unsortedClusters, o2::its::TrackITSExt *tracks, const int *seedLUT, 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 int startLevel, 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)
Common utility functions.
std::vector< Cluster > clusters
std::vector< Cell > cells
std::vector< Tracklet64 > tracklets