Skip to content

Conversation

Parsifal-2045
Copy link
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
Contributor

cmsbuild commented Sep 12, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

+code-checks

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

@cmsbuild
Copy link
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
Contributor

mmusich commented Sep 12, 2025

type ngt

@mmusich
Copy link
Contributor

mmusich commented Sep 12, 2025

test parameters:

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

@mmusich
Copy link
Contributor

mmusich commented Sep 12, 2025

allow @Parsifal-2045 test rights

@mmusich
Copy link
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
alpaka::memcpy(queue, stripHitsDevice.buffer(), stripHitsHost.buffer());
stripHitsDevice.updateFromDevice(queue);

// Would be useful to have a way to prompt a special CopyToDevice for EDProducers
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you elaborate?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ping ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the point here was: do we have a mechanism to automatically copy to device an host collection produced by an EDProducer when needed, as is for an ESProducer?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, if the EDProducer is alpaka-based, the framework can automatically make the copy.

Copy link
Contributor

Choose a reason for hiding this comment

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

… of IT modules in the Phase2 (D110) geometry
- fully remove cellPtCut and isBarrel from CA configuration
- clean and restructure SimplePixelTopology
- restructure CA fillDescriptions to read the parameters from the TrackerTraits defined in SimplePixelTopology
- unify and simplify CA setup read from geometry
… the formerly default Legacy Pixel Tracks in HLT Phase-2
@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2025

+code-checks

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

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2025

@mmusich
Copy link
Contributor

mmusich commented Oct 3, 2025

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2025

-1

Failed Tests: RelVals-AMD_MI300X RelVals-AMD_W7900 RelVals-NVIDIA_H100 RelVals-NVIDIA_L40S RelVals-NVIDIA_T4
Size: This PR adds an extra 492KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d66c20/48443/summary.html
COMMIT: 9b88c98
CMSSW: CMSSW_16_0_X_2025-10-03-1100/el8_amd64_gcc13
Additional Tests: GPU,HLT_P2_INTEGRATION,HLT_P2_TIMING,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/48443/install.sh to create a dev area with all the needed externals and cmssw changes.

RelVals-AMD_MI300X

  • 17034.40617034.406_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka/step3_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka.log

RelVals-AMD_W7900

  • 17034.40617034.406_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka/step3_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka.log

RelVals-NVIDIA_H100

  • 29834.40329834.403_TTbar_14TeV+Run4D110PU_Patatrack_PixelOnlyAlpaka_Validation/step3_TTbar_14TeV+Run4D110PU_Patatrack_PixelOnlyAlpaka_Validation.log
  • 17034.40617034.406_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka/step3_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka.log

RelVals-NVIDIA_L40S

  • 17034.40617034.406_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka/step3_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka.log

RelVals-NVIDIA_T4

  • 17034.40617034.406_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka/step3_TTbar_14TeV+2025PU_Patatrack_PixelOnlyTripletsAlpaka.log

Comparison Summary

Summary:

  • You potentially removed 1 lines from the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 9 differences found in the comparisons
  • DQMHistoTests: Total files compared: 66
  • DQMHistoTests: Total histograms compared: 4504560
  • DQMHistoTests: Total failures: 49398
  • DQMHistoTests: Total nulls: 143
  • DQMHistoTests: Total successes: 4454999
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -7055.668 KiB( 65 files compared)
  • DQMHistoSizes: changed ( 29634.771,... ): -3527.834 KiB HLT/Tracking
  • Checked 271 log files, 233 edm output root files, 66 DQM output files
  • TriggerResults: found differences in 19 / 64 workflows

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2025

+code-checks

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

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 3, 2025

@Parsifal-2045
Copy link
Contributor Author

@cmsbuild please test

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.