Skip to content

PrLongLivedTracking speedup with SIMD

This MR modifies part of the PrLongLivedTracking algorithm to achieve an execution speedup using SIMD instructions.

Optimisation of addUhits

The biggest change lies in the addUhits function. The current logic:

  1. Preselect U hits using the distance to the track
  2. Copy a track candidate and add a U hit (loop over all the U-hits)
  3. Run the simplyFit function, extract chi2.
  4. If chi2 is too big or the track is not y-compatible, delete the track.

The proposed idea is to parallelise over U hits using SIMD. Therefore:

  1. Preselect U hits using the distance to the track. Copy the preselected hits to the SOA container.
  2. Run simplyFitSIMD. This function will fit the track candidates with different U hits using SIMD. In addition, it will check the chi2 and y-compatibility requirements. Only the accepted tracks are stored in the output vector

Affected parts of the code:

  • PrDownTrack.h: Downstream::SOA::Hits
  • PrLongLivedTracking.cpp: simplyFitSIMD(), addUHits()

Optimisation of X-track fitting

Current behaviour (scalar):

  1. Find all the hits that satisfy the tolerance window in findMatchingHits
  2. For every X hit, create a track candidate, add the X hit (fitXProjection), and fit (xFit).
  3. Check the track quality and delete the track if it's bad.

The proposed idea is to parallelise over X hits using SIMD. Therefore:

  • Collapse the three previous functions into one createXTracks.
  • Fitting using SIMD instructions and parallelizing over the second X hits.

Affected parts of the code:

  • PrDownTrack.h: Downstream::SOA::Hits
  • PrLongLivedTracking.cpp: findMatchingHits(), fitXProjection(), xFit()

Buffering of additional variables in Downstream::Hit

This MR adds two more variables to the Downstream::Hit object: xAtYEq0 and dxDy. Previously, these quantities were extracted from the hitHandler object every time they were needed for the computations.

Affected parts of the code:

  • PrDownTrack.h: Downstream::Hit
  • PrLongLivedTracking.cpp: getPreSelection()

Cleanup

Remove unused sorting in getPreSelection()

Plots with 2025 real data

Hlt2DQ_KsToPimPip_DD_m Hlt2DQ_L0ToPpPim_DD_m_L Hlt2DQ_TrackMonitors_Track_Downstream_eta Hlt2DQ_TrackMonitors_Track_Downstream_nUTHits Hlt2DQ_TrackMonitors_Track_Downstream_pt

This MR closes #614 (closed)

FYI: @pehoffma @jzhuo

Edited by Volodymyr Svintozelskyi

Merge request reports

Loading