Skip to content

Commit 1c19183

Browse files
committed
ITS: test new GPU tracking
1 parent 6ab4d1b commit 1c19183

6 files changed

Lines changed: 433 additions & 45 deletions

File tree

Detectors/ITSMFT/ITS/tracking/GPU/ITStrackingGPU/TrackingKernels.h

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ void countTrackSeedHandler(TrackSeed<NLayers>* trackSeeds,
262262
const std::vector<float>& layerxX0Host,
263263
const unsigned int nSeeds,
264264
const float Bz,
265-
const int startLevel,
266265
const float maxChi2ClusterAttachment,
267266
const float maxChi2NDF,
268267
const int reseedIfShorter,
@@ -276,20 +275,35 @@ template <int NLayers>
276275
void computeTrackSeedHandler(TrackSeed<NLayers>* trackSeeds,
277276
const TrackingFrameInfo** foundTrackingFrameInfo,
278277
const Cluster** unsortedClusters,
278+
const IndexTableUtils<NLayers>* utils,
279+
const typename ROFMaskTable<NLayers>::View& rofMask,
280+
const typename ROFOverlapTable<NLayers>::View& rofOverlaps,
281+
const Cluster** clusters,
282+
const unsigned char** usedClusters,
283+
const int** clustersIndexTables,
284+
const int** ROFClusters,
279285
o2::its::TrackITSExt* tracks,
280286
const int* seedLUT,
287+
TrackExtensionHypothesis<NLayers>* activeHypotheses,
288+
TrackExtensionHypothesis<NLayers>* nextHypotheses,
281289
const std::vector<float>& layerRadiiHost,
282290
const std::vector<float>& minPtsHost,
283291
const std::vector<float>& layerxX0Host,
284292
const unsigned int nSeeds,
285293
const unsigned int nTracks,
286294
const float Bz,
287-
const int startLevel,
288295
const float maxChi2ClusterAttachment,
289296
const float maxChi2NDF,
290297
const int reseedIfShorter,
291298
const bool repeatRefitOut,
292299
const bool shiftRefToCluster,
300+
const int nLayers,
301+
const int phiBins,
302+
const int beamWidth,
303+
const bool extendTop,
304+
const bool extendBot,
305+
const float nSigmaCutPhi,
306+
const float nSigmaCutZ,
293307
const o2::base::Propagator* propagator,
294308
const o2::base::PropagatorF::MatCorrType matCorrType,
295309
o2::its::ExternalAllocator* alloc);

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ void TrackerTraitsGPU<NLayers>::findRoads(const int iteration)
308308
firstClusters.resize(this->mTrkParams[iteration].NLayers);
309309
sharedFirstClusters.resize(this->mTrkParams[iteration].NLayers);
310310
const auto hostTopology = mTimeFrameGPU->getTrackingTopologyView();
311+
const bool extendTop = this->mTrkParams[iteration].PassFlags[IterationStep::TrackFollowerTop];
312+
const bool extendBot = this->mTrkParams[iteration].PassFlags[IterationStep::TrackFollowerBot];
313+
const bool extendTracks = extendTop || extendBot;
314+
size_t nExtendedTracks{0};
315+
size_t nExtendedClusters{0};
311316
for (int startLevel{this->mTrkParams[iteration].CellsPerRoad()}; startLevel >= this->mTrkParams[iteration].CellMinimumLevel(); --startLevel) {
312317
bounded_vector<TrackSeed<NLayers>> trackSeeds(this->getMemoryPool().get());
313318
for (int startCellTopologyId{0}; startCellTopologyId < hostTopology.nCells; ++startCellTopologyId) {
@@ -357,7 +362,6 @@ void TrackerTraitsGPU<NLayers>::findRoads(const int iteration)
357362
this->mTrkParams[iteration].LayerxX0,
358363
trackSeeds.size(),
359364
this->mBz,
360-
startLevel,
361365
this->mTrkParams[iteration].MaxChi2ClusterAttachment,
362366
this->mTrkParams[iteration].MaxChi2NDF,
363367
this->mTrkParams[iteration].ReseedIfShorter,
@@ -367,32 +371,53 @@ void TrackerTraitsGPU<NLayers>::findRoads(const int iteration)
367371
this->mTrkParams[iteration].CorrType,
368372
mTimeFrameGPU->getFrameworkAllocator());
369373
mTimeFrameGPU->createTrackITSExtDevice(trackSeeds.size());
374+
if (extendTracks) {
375+
mTimeFrameGPU->createTrackExtensionScratchDevice(kTrackExtensionLaunchThreads, this->mTrkParams[iteration].TrackFollowerBeamWidth);
376+
}
370377
computeTrackSeedHandler(mTimeFrameGPU->getDeviceTrackSeeds(),
371378
mTimeFrameGPU->getDeviceArrayTrackingFrameInfo(),
372379
mTimeFrameGPU->getDeviceArrayUnsortedClusters(),
380+
mTimeFrameGPU->getDeviceIndexTableUtils(),
381+
mTimeFrameGPU->getDeviceROFMaskTableView(),
382+
mTimeFrameGPU->getDeviceROFOverlapTableView(),
383+
mTimeFrameGPU->getDeviceArrayClusters(),
384+
(const unsigned char**)mTimeFrameGPU->getDeviceArrayUsedClusters(),
385+
mTimeFrameGPU->getDeviceArrayClustersIndexTables(),
386+
mTimeFrameGPU->getDeviceROFrameClusters(),
373387
mTimeFrameGPU->getDeviceTrackITSExt(),
374388
mTimeFrameGPU->getDeviceTrackSeedsLUT(),
389+
extendTracks ? mTimeFrameGPU->getDeviceActiveTrackExtensionHypotheses() : nullptr,
390+
extendTracks ? mTimeFrameGPU->getDeviceNextTrackExtensionHypotheses() : nullptr,
375391
this->mTrkParams[iteration].LayerRadii,
376392
this->mTrkParams[iteration].MinPt,
377393
this->mTrkParams[iteration].LayerxX0,
378394
trackSeeds.size(),
379395
mTimeFrameGPU->getNTrackSeeds(),
380396
this->mBz,
381-
startLevel,
382397
this->mTrkParams[iteration].MaxChi2ClusterAttachment,
383398
this->mTrkParams[iteration].MaxChi2NDF,
384399
this->mTrkParams[iteration].ReseedIfShorter,
385400
this->mTrkParams[iteration].RepeatRefitOut,
386401
this->mTrkParams[iteration].ShiftRefToCluster,
402+
this->mTrkParams[iteration].NLayers,
403+
this->mTrkParams[iteration].PhiBins,
404+
this->mTrkParams[iteration].TrackFollowerBeamWidth,
405+
extendTop,
406+
extendBot,
407+
this->mTrkParams[iteration].TrackFollowerNSigmaCutPhi,
408+
this->mTrkParams[iteration].TrackFollowerNSigmaCutZ,
387409
mTimeFrameGPU->getDevicePropagator(),
388410
this->mTrkParams[iteration].CorrType,
389411
mTimeFrameGPU->getFrameworkAllocator());
390412
mTimeFrameGPU->downloadTrackITSExtDevice();
391413

392414
auto& tracks = mTimeFrameGPU->getTrackITSExt();
393-
this->acceptTracks(iteration, tracks, firstClusters, sharedFirstClusters);
415+
this->acceptTracks(iteration, tracks, firstClusters, sharedFirstClusters, &nExtendedTracks, &nExtendedClusters);
394416
mTimeFrameGPU->loadUsedClustersDevice();
395417
}
418+
if (extendTracks) {
419+
LOGP(info, "Integrated track extension accepted {} tracks using {} clusters in iteration {}", nExtendedTracks, nExtendedClusters, iteration);
420+
}
396421
this->markTracks(iteration, sharedFirstClusters);
397422
// wipe the artefact memory
398423
mTimeFrameGPU->popMemoryStack(iteration);

0 commit comments

Comments
 (0)