Skip to content

[NGT] Extension of CA Pixel Tracking to Phase 2 Outer Tracker barrel#48921

Merged
cmsbuild merged 40 commits intocms-sw:masterfrom
cms-ngt-hlt:ngt_phase2CAExtension
Oct 29, 2025
Merged

[NGT] Extension of CA Pixel Tracking to Phase 2 Outer Tracker barrel#48921
cmsbuild merged 40 commits intocms-sw:masterfrom
cms-ngt-hlt:ngt_phase2CAExtension

Conversation

@Parsifal-2045
Copy link
Copy Markdown
Contributor

@Parsifal-2045 Parsifal-2045 commented Sep 12, 2025

PR description:

This PR was co-developed by: @AdrianoDee @JanGerritSchulz @mmusich @rovere

The Phase 2 CA Extension for PixelTracks enables the usage of recHits found in the first 3 layers of the Outer Tracker barrel in addition to the pixel recHits in the CA algorithm. As part of this work, the regular CA has also been updated and its parameters re-tuned for Phase 2. In particular, two more connections have been added in the very forward region bringing the total number of layer pairs to 57; a few more cuts have also been added and others have been re-tuned. The newly optimised, non-extended CA is proposed as the new default pixel tracking configuration, producing tracks with 4+ hits.

The CA extension provides a more radical improvement, bringing the total number of layer pairs to 71, taking advantage of 3 more layers in the barrel, while still producing tracks with 4+ hits. It is not enabled by default, but can be tested using in workflows *.7511, *.771, *.774, and *.775, which are also part of the IB matrix or by enabling the phase2CAExtension procModifier.

Full talks with discussions on physics performance as well as the overall impact on general tracks have been recently given at the HLT Upgrade and Tracking POG. These slides also contain links to a large set of plots and comparisons.

Main developments

To support the extension, two new plugins have been developed:

  • Phase2OTRecHitsSoAConverter converts the recHits on the P modules of the Outer Tracker barrel detector into SoA format using the same layout and following the same ordering logic as what is already in use in the pixel
  • SiPixelRecHitExtendedAlpaka merges the existing trackingRecHitsSoACollection for pixel hits with the newly converted one so that each column is extended with the hits from the OT, meaning that the CA interface with the input collection does not need to be changed

Other modules have been modified to support the extension, including:

  • PixelTrackProducerFromSoAAlpaka, responsible for converting the PixelTracks in SoA format to legacy. It can now be configured to include the OT recHits in the legacy tracks or discard them
  • A new TrackerTraits, phase2OT, has been introduce to be able to differentiate parameters, classes and functions, between regular and extended CA
  • When the CA extension is used together with the trackingLST procModifier, the OT recHits are removed from PixelTracks fed in input to LST as to avoid a large increase in duplicates
  • The initialStep high-purity selection is applied to extended PixelTracks to further reduce their fake rate. Note that this is a temporary solution until a proper DNN will be applied directly to the PixelTracks in SoA format in a follow-up PR.

Both the regular and extended CA have been optimised and new cuts have been introduced to improve fake rejection such as:

  • Cuts on inner/outer max/min z (r) for layer pairs in the barrel (endcap)
  • Layer pair depended pT cuts at the doublet building level
  • adaptive chi2 cut based on the number of hits of the track

The meaning of the ngtScouting procModifier has been changed as follows:

  • when enabled, ngtScouting, promotes PixelTracks as general tracks directly without any other pattern recognition or fitting step
    • enabling ngtScouting,phase2CAExtension uses extended PixelTracks as general tracks
    • enabling ngtScouting,phase2CAExtension,trackingLST merges extended PixelTracks with LST T5s and uses the resulting collection as general tracks

A few workflows have been added to test the extension and have been included in the IB matrix

  • *.7511: HLT phase-2 timing menu, with PixelTracks CA Extension
  • *.774: HLT phase-2 NGT Scouting menu Alpaka variant, with PixelTracks CA Extension as GeneralTracks
  • *.775: HLT phase-2 NGT Scouting menu Alpaka variant, with Pixeltracks CA Extension + LST T5s as GeneralTracks

Physics performance

Run 3

Since we expect no changes in Run 3 performance, we verified that the Run 3 CA performs exactly the same using the following recipe:

#!/bin/bash -ex

cmsDriver.py step2 -s HLT:@relval2025,VALIDATION:hltMultiTrackValidation \
    --conditions auto:phase1_2025_realistic \
    --datatier DQMIO \
    -n 1000 \
    --eventcontent DQMIO \
    --geometry DB:Extended \
    --era Run3_2025 \
    --filein file:/eos/cms/store/relval/CMSSW_15_1_0_pre5/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/PU_151X_mcRun3_2025_realistic_v4_STD_2025_PU-v2/2590000/0ecc755f-c744-48bb-8c46-abddb997dc46.root \
    --fileout file:step2.root \
    --nThreads 32 \
    --process HLTX \
    --inputCommands='keep *, drop *_hlt*_*_HLT, drop triggerTriggerFilterObjectWithRefs_l1t*_*_HLT' \
    >step2.log 2>&1

cmsDriver.py step3 -s HARVESTING:postProcessorHLTtrackingSequence \
    --conditions auto:phase1_2025_realistic \
    --mc \
    --geometry DB:Extended \
    --scenario pp \
    --filetype DQM \
    --era Run3_2025 \
    -n 1000 \
    --filein file:step2.root \
    --fileout file:step3.root >step3.log 2>&1

and comparing the DQM outputs.

run3 effic pixel run3 fake pixel

Phase 2

Performance measured on a TTbar D110 PU Run4 RelVal sample (EDM input):

/RelValTTbar_14TeV/CMSSW_15_1_0_pre4-PU_150X_mcRun4_realistic_v1_STD_Run4D110_PU-v1/GEN-SIM-DIGI-RAW 

A detailed report on physics performance can be found in the talks linked above, here a few results are reported for completeness. Firstly, a comparison between legacy PixelTracks, new alpaka-based default, and extended CA (all plots

phase2 effic pixel phase2 fake pixel

The impact on general tracks is more nuanced, here we only show a few configurations which were highlighted during the talks linked above and in the following discussions (all plots). Note, that the first 3 configurations run 2 tracking iterations (initialStep + highPtTriplets), while the last configuration singleIterCAExtensionLST runs a single tracking iteration where LST is seeded by extended PixelTracks only.

phase2 effic general phase2 fake general

Timing

Measurements run on 2x AMD EPYC 9534 with 4x L40 GPUs. Configuration: 16 jobs with 16 threads/16 streams each, sample of 1000 TTbar 200PU events.

We have tested about 20 different configurations: the most interesting comparisons can be found in the talks linked above while all the results are here. We only show a comparison between legacy, the proposed new default and the promising singleIterCAExtLST configuration for the records

Legacy New Default singleIterCAExtLST
piechart(4) piechart(5) piechart(6)

Memory usage

GPU memory usage have been measured while running the timing measurements using the output from nvidia-smi, thus the setup is exactly the same.

image

The non-extend optimised CA proposed as the new baseline shows a memory consumption comparable with what was already in release after #47611. The extension, including more layer pair connections and doubling the maximum number of doublets and tracks produced shows a more noticeable memory increase of about 34%

PR validation:

This PR has been tested locally running both addOnTests.py and runTheMatrix.py -l limited -i all --ibeos, both commands resulting in all tests passing. The newly introduced workflows have been tested with:

runTheMatrix.py -w upgrade -l 29634.7511,29634.774,29634.775

Update 25/09

We have updated the track selection settings for the default Pixel Tracking in Phase-2 (with Patatrack, without extension) by changing the $\chi^2$ / ndof requirement (depends on number of hits per track). It was previously set identical to the extended Pixel Tracking, which led to efficiency losses in the barrel due to shorter tracks. The change in efficiency for the new default before and after the commit is shown below. More validation plots can be found here.

image

The small efficiency losses at $|\eta|$ > 4 are due to an added requirement for quadruplets to not skip layers. This part of the track selection is planned to be replaced soon by a DNN to improve the track selection further.

@cmsbuild
Copy link
Copy Markdown
Contributor

cmsbuild commented Sep 12, 2025

cms-bot internal usage

@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48921/46075

@cmsbuild
Copy link
Copy Markdown
Contributor

A new Pull Request was created by @Parsifal-2045 for master.

It involves the following packages:

  • Configuration/ProcessModifiers (operations)
  • Configuration/PyReleaseValidation (pdmv, upgrade)
  • DataFormats/SiPixelClusterSoA (reconstruction, heterogeneous)
  • DataFormats/TrackSoA (reconstruction, heterogeneous)
  • Geometry/CommonTopologies (geometry)
  • HLTrigger/Configuration (hlt)
  • RecoLocalTracker/Phase2TrackerRecHits (reconstruction, upgrade)
  • RecoLocalTracker/SiPixelRecHits (reconstruction)
  • RecoTracker/Configuration (reconstruction)
  • RecoTracker/PixelSeeding (reconstruction)
  • RecoTracker/PixelTrackFitting (reconstruction)
  • RecoTracker/TkSeedGenerator (reconstruction)
  • Validation/RecoTrack (dqm)

@AdrianoDee, @Dr15Jones, @Martin-Grunewald, @Moanwar, @antoniovagnerini, @bsunanda, @civanch, @cmsbuild, @ctarricone, @davidlange6, @DickyChant, @fabiocos, @ftenchini, @fwyzard, @gabrielmscampos, @jfernan2, @kpedro88, @makortel, @mandrenguyen, @mdhildreth, @miquork, @mmusich, @nothingface0, @rseidita, @srimanob, @subirsarkar can you please review it and eventually sign? Thanks.
@GiacomoSguazzoni, @Martin-Grunewald, @SohamBhattacharya, @VinInn, @VourMa, @bsunanda, @dgulhan, @dkotlins, @fabiocos, @felicepantaleo, @ferencek, @gpetruc, @makortel, @martinamalberti, @missirol, @mmusich, @mroguljic, @mtosi, @rovere, @slomeo, @threus, @tsusa, @tvami, @wmtford this is something you requested to watch as well.
@ftenchini, @mandrenguyen, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Sep 12, 2025

type ngt

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Sep 12, 2025

test parameters:

  • enable = gpu, hlt_p2_integration, hlt_p2_timing
  • workflows = ph2_hlt

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Sep 12, 2025

allow @Parsifal-2045 test rights

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Sep 12, 2025

@cmsbuild, please test

@Parsifal-2045 Parsifal-2045 changed the title Ngt phase2 ca extension [NGT] Extension of CA Pixel Tracking to Phase 2 Outer Tracker barrel Sep 12, 2025
@cmsbuild
Copy link
Copy Markdown
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-48921/46577

@cmsbuild
Copy link
Copy Markdown
Contributor

@Parsifal-2045
Copy link
Copy Markdown
Contributor Author

Mostly I wanted to avoid

image

but in the end if I'm the only one that cares, you might just leave the history as it is.

After a little misunderstanding with the bot, the history should now be clean :)

@Parsifal-2045
Copy link
Copy Markdown
Contributor Author

@cmsbuild, please test
One more, hopefully last, time

@fwyzard
Copy link
Copy Markdown
Contributor

fwyzard commented Oct 28, 2025

Thanks, indeed and explicit comparison shows no differences.

@jfernan2
Copy link
Copy Markdown
Contributor

+1

@cmsbuild
Copy link
Copy Markdown
Contributor

+1

Size: This PR adds an extra 220KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d66c20/48862/summary.html
COMMIT: 262716c
CMSSW: CMSSW_16_0_X_2025-10-27-2300/el8_amd64_gcc13
Additional Tests: GPU,AMD_MI300X,AMD_W7900,NVIDIA_H100,NVIDIA_L40S,NVIDIA_T4
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/48921/48862/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 2 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 3 differences found in the comparisons
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4172318
  • DQMHistoTests: Total failures: 17690
  • DQMHistoTests: Total nulls: 43
  • DQMHistoTests: Total successes: 4154565
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 52 files compared)
  • Checked 226 log files, 198 edm output root files, 53 DQM output files
  • TriggerResults: found differences in 6 / 51 workflows

AMD_MI300X Comparison Summary

Summary:

  • No significant changes to the logs found
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 250 differences found in the comparisons
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 147869
  • DQMHistoTests: Total failures: 35116
  • DQMHistoTests: Total nulls: 21
  • DQMHistoTests: Total successes: 112732
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 4 / 10 workflows

AMD_W7900 Comparison Summary

Summary:

  • You potentially removed 1 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 247 differences found in the comparisons
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 147869
  • DQMHistoTests: Total failures: 35953
  • DQMHistoTests: Total nulls: 21
  • DQMHistoTests: Total successes: 111895
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 3 / 10 workflows

NVIDIA_H100 Comparison Summary

Summary:

  • You potentially removed 8 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 232 differences found in the comparisons
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 147869
  • DQMHistoTests: Total failures: 42207
  • DQMHistoTests: Total nulls: 20
  • DQMHistoTests: Total successes: 105642
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 4 / 10 workflows

NVIDIA_L40S Comparison Summary

Summary:

  • You potentially added 27 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 216 differences found in the comparisons
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 147869
  • DQMHistoTests: Total failures: 40676
  • DQMHistoTests: Total nulls: 20
  • DQMHistoTests: Total successes: 107173
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 5 / 10 workflows

NVIDIA_T4 Comparison Summary

Summary:

  • You potentially added 16 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 244 differences found in the comparisons
  • DQMHistoTests: Total files compared: 11
  • DQMHistoTests: Total histograms compared: 147869
  • DQMHistoTests: Total failures: 34656
  • DQMHistoTests: Total nulls: 22
  • DQMHistoTests: Total successes: 113191
  • DQMHistoTests: Total skipped: 0
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 10 files compared)
  • Checked 42 log files, 45 edm output root files, 11 DQM output files
  • TriggerResults: found differences in 3 / 10 workflows

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Oct 28, 2025

@cms-sw/db-l2 @cms-sw/geometry-l2 @cms-sw/pdmv-l2 @cms-sw/tracking-pog-l2 @cms-sw/upgrade-l2

it would be great to get this into CMSSW_16_0_0_pre2. Is there any outstanding comment on the PR (open since ~ 1 month)?
Thanks in advance for taking a look.

[ 28, 29, False, 1100, -1200, 1200, -10000, 10000, 10000, -50.0, 50.0, 0.85],
# [ 28, 30, False, 2000, -40, 40, -10000, 10000, 10000, -10000, 10000, 0.85],
[ 29, 30, False, 1250, -1200, 1200, -10000, 10000, 10000, -40.0, 40.0, 0.85],
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Couldn’t all these numbers just be stored in a CSV, JSON, or XML file instead?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For better or worse, CMS decided to use python for its configurations in 2008, so we use python - not CSV, JSON or XML.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On a more concrete note: not using python would mean increased code complexity (you'd need to parse JSON etc) and reduced configurability (you couldn't change the parameters in a configuration fragment, customisation function, or Era-based modifier).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Haha, true — CMS tradition stands strong! I just thought of giving those poor constants a short vacation outside the Python file, maybe in a lighter format, but still within the same configuration flow. Anyway, it’s fine by me overall.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Moanwar

I just thought of giving those poor constants a short vacation outside the Python file, maybe in a lighter format, but still within the same configuration flow.

This is beyond the point.
In current HLT development model, these configuration parameters can be changed within a same family of HLT menus starting from the same release template. If we start storing this outside of python we're going to need a change of release each time we want to change these (I would say this is not optimal at best).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the notes and the nice explanation. I was just thinking out loud, but apparently it wasn’t optimal at all.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On a general level (not suggesting anything for this particular case) I just want to point out that large ParameterSets have a cost in storage because these are stored in the output files as part of the provenance. As usual, what exactly "large" means can be debated, and while a few "large" PSets can be accommodated, "too many" "large" PSets would become costly.

else:
setattr(geometry, "phiCuts", cms.vint32(
522, 730, 730, 522, 626, 626, 522, 522, 626, 626, 626, 522, 522, 522, 522, 522, 522, 522, 522))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this really a DeltaPhi cut? Isn’t the number a bit too large for such a cut?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is because the phi stored in the hit SoA is actually a translation from float to short via these functions..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for the heads-up!

delattr(geometry, "maxR")
else:
maxR = cms.vdouble(20, 9, 9, 20, 7, 7, 5, 5, 20, 6, 6, 5, 5, 20, 20, 9, 9, 9, 9)
if not hasattr(geometry, "maxDR"):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The same applies here; the numbers seem too large for a DeltaR value, unless it represents something different in this context.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, this is a real deltaR. The magnitude is driven by the gaps between the layers (and the fact that the doublets are "tilted" in RZ). It might be slightly high for some pairs (?), but these cuts have proven to be efficient.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the confusion is between deltaR as in radial coordinate (in cm, as used here) vs deltaR as in phi/pseudorapidity cones (like in jets or particle associators).

// Layers params
const std::vector<double> caThetaCuts_;
const std::vector<double> caDCACuts_;
const std::vector<int> isBarrel_;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Defined but not used? Or maybe I just missed it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is a valid comment. Do you think we could do that as a follow-up clean-up (while we also provide the workflows requested by Andrea)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sure, that's fine too

@AdrianoDee
Copy link
Copy Markdown
Contributor

+pdmv

@Moanwar
Copy link
Copy Markdown
Contributor

Moanwar commented Oct 29, 2025

+Upgrade

@gabrielmscampos
Copy link
Copy Markdown
Member

+dqm

@elusian
Copy link
Copy Markdown

elusian commented Oct 29, 2025

+1

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Oct 29, 2025

+hlt

@civanch
Copy link
Copy Markdown
Contributor

civanch commented Oct 29, 2025

+1

@cmsbuild
Copy link
Copy Markdown
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @ftenchini, @sextonkennedy, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Copy Markdown
Contributor

+1

@fwyzard
Copy link
Copy Markdown
Contributor

fwyzard commented Oct 29, 2025

🎉

@makortel
Copy link
Copy Markdown
Contributor

This PR is a suspect for assertion failures in IBs, see #49266

@mmusich
Copy link
Copy Markdown
Contributor

mmusich commented Oct 31, 2025

This PR is a suspect for assertion failures in IBs, see #49266

#49272 hopefully will fix that.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.