Skip to content

ITS: GPU: minor change in vertex candidate finding and fixes to deterministic output - #16178

Open
cima22 wants to merge 2 commits into
AliceO2Group:devfrom
cima22:parallel-vertexer
Open

cima22 wants to merge 2 commits into
AliceO2Group:devfrom
cima22:parallel-vertexer

Conversation

@cima22

@cima22 cima22 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

This PR brings two changes:

  1. In the new seeding vertexer, the window size for selecting vertex candidates is now variable and depends on the number of surroundings cells (previously the window size was fixed with a large and fine pass). It simplifies the code and slightly improves seeding efficiency and fake rate:
eff_fake_vs_mult

New seeding vertexer config values for Pb--Pb: ITSCATrackerParam.diamondTrackletingCellDeltaPhiMinPt=0.12;ITSCATrackerParam.diamondCellTanLambdaNSigma=2.5;ITSCATrackerParam.seedingVertexIteration=1;ITSCATrackerParam.doUPCIteration=1;ITSCATrackerParam.cellLineSharedClusterCut=1;ITSCATrackerParam.diamondTrackletingPVres=1.5102214480735774;ITSCATrackerParam.diamondTrackletingNSigmaCut=2.976946815605669;ITSCATrackerParam.diamondTrackletingCellDeltaTanLambdaSigma=0.005566295924057422;ITSVertexerParam.useTruthSeeding=0;ITSVertexerParam.suppressLowMultDebris=16;ITSVertexerParam.goodLineChi2Cut=9.814679066181695;ITSVertexerParam.goodLinePtCut=0.12;ITSVertexerParam.clusterContributorsCut=3;ITSVertexerParam.clusterCut=0.07;ITSVertexerParam.duplicateZCut=0.1388966993405415;ITSVertexerParam.pairCut=0.0225;ITSVertexerParam.nSigmaCut=0.05;ITSVertexerParam.phiCut=0.008875191490279988;ITSVertexerParam.goodContributorsSignificance=0.070;ITSVertexerParam.lineMinPt=0.10;ITSVertexerParam.duplicateZScale=0.7;ITSVertexerParam.overpopulatedRofNSigma=15;ITSVertexerParam.lineCurvatureScale=0.5;ITSVertexerParam.adaptiveZWindowAlpha=0.3;ITSVertexerParam.adaptiveZWindowMin=0.0075;

  1. Claude found some fixes for deterministic mode: "The GPU track-sort tie-break on the seed index (the index of the cell chain a track was fitted from, set by atomic emission order) is removed with its buffer; CPU and GPU now sort tracks with the same total order on the track content: clusters count and χ², then cluster indices, then parameters.". Checked on 50 TFs, output is bit identical

@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2/fullCI_slc9 for 7ba9e64 at 2026-11-23 14:30:

## sw/BUILD/O2-latest/log
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(59): error: calling a __device__ function("o2::track::TrackParametrization<float> ::getParam(int) const") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(59): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E8getParamE1?") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(60): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E8getParamE1?") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(60): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E8getParamE1?") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(63): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E4getXEv") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(63): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E4getXEv") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(63): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E4getXEv") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(63): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E4getXEv") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(63): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E8getAlphaEv") from a __host__ __device__ function("isBetterOrdered") is not allowed
/sw/SOURCES/O2/slc9_x86-64-slc9_x86-64/0/Detectors/ITSMFT/ITS/tracking/include/ITStracking/TrackHelpers.h(63): error: calling a __device__ function("_ZNK2o25track20TrackParametrizationI1?E8getAlphaEv") from a __host__ __device__ function("isBetterOrdered") is not allowed
ninja: build stopped: subcommand failed.

Full log here.

Comment on lines 84 to 98
#ifndef GPUCA_GPUCODE
out[1] = std::hypot(r[0], r[1]);
out[3] = std::hypot(r[0], r[2]);
out[4] = std::hypot(r[1], r[2]);
if constexpr (DeviceHypot) {
out[1] = o2::gpu::GPUCommonMath::Hypot(r[0], r[1]);
out[3] = o2::gpu::GPUCommonMath::Hypot(r[0], r[2]);
out[4] = o2::gpu::GPUCommonMath::Hypot(r[1], r[2]);
} else {
out[1] = std::hypot(r[0], r[1]);
out[3] = std::hypot(r[0], r[2]);
out[4] = std::hypot(r[1], r[2]);
}
#else
out[1] = o2::gpu::GPUCommonMath::Hypot(r[0], r[1]);
out[3] = o2::gpu::GPUCommonMath::Hypot(r[0], r[2]);
out[4] = o2::gpu::GPUCommonMath::Hypot(r[1], r[2]);
#endif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be simplified to:

#ifndef GPUCA_GPUCODE
    if constexpr (DeviceHypot) {
      out[1] = o2::gpu::GPUCommonMath::Hypot(r[0], r[1]);
      out[3] = o2::gpu::GPUCommonMath::Hypot(r[0], r[2]);
      out[4] = o2::gpu::GPUCommonMath::Hypot(r[1], r[2]);
    } else {
      out[1] = std::hypot(r[0], r[1]);
      out[3] = std::hypot(r[0], r[2]);
      out[4] = std::hypot(r[1], r[2]);
    }
#else
    out[1] = o2::gpu::GPUCommonMath::Hypot(r[0], r[1]);
    out[3] = o2::gpu::GPUCommonMath::Hypot(r[0], r[2]);
    out[4] = o2::gpu::GPUCommonMath::Hypot(r[1], r[2]);
#endif

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants