@@ -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