Skip to content

Conversation

@Moanwar
Copy link
Contributor

@Moanwar Moanwar commented Dec 17, 2025

This PR introduces a new GNN-based linking method between tracks and tracksters within TICLv5. The method builds a graph consisting of tracks and their surrounding tracksters, and then uses a Graph Neural Network (GNN) to evaluate whether each track-trackster edge is valid. Tracksters that are predicted to be linked to a given track are then stored accordingly.

In the current implementation, the linking selection is prioritized using the track pT and the DeltaR between the track and tracksters. This strategy may be refined in the future for further optimization.

A new procmodifier has been added to enable this method in workflows *.211. The process modifier is named ticlv5_TrackLinkingGNN.

This PR should be tested with TICL workflows such as 29888.211 and 29688.211, using the GNN models uploaded here:
cms-data/RecoHGCal-TICL#11

Adding : @felicepantaleo @hatakeyamak @waredjeb @AuroraPerego

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 17, 2025

cms-bot internal usage

@Moanwar
Copy link
Contributor Author

Moanwar commented Dec 17, 2025

test parameters:
pull_request = cms-data/RecoHGCal-TICL#11
workflow_opts = -w upgrade
workflows = 29888.211,29688.211

@Moanwar
Copy link
Contributor Author

Moanwar commented Dec 17, 2025

please test

@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49652/47196

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@Moanwar
Copy link
Contributor Author

Moanwar commented Dec 17, 2025

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49652/47197

@mmusich
Copy link
Contributor

mmusich commented Dec 18, 2025

@cmsbuild please abort

@Moanwar
Copy link
Contributor Author

Moanwar commented Dec 18, 2025

@Moanwar

I added workflow .7521 for HLT checks in the ph2_hlt matrix

The changes you applied are insufficient for automatic redirection of the workflow number in the short matrix. Please add

diff --git a/Configuration/PyReleaseValidation/python/relval_Run4.py b/Configuration/PyReleaseValidation/python/relval_Run4.py
index 58c8f7e0dac..8559ff5325c 100644
--- a/Configuration/PyReleaseValidation/python/relval_Run4.py
+++ b/Configuration/PyReleaseValidation/python/relval_Run4.py
@@ -74,6 +74,7 @@ numWFIB.extend([prefixDet+34.7501])# HLTTrackingOnly75e33
 numWFIB.extend([prefixDet+34.751]) # HLTTiming75e33, alpaka
 numWFIB.extend([prefixDet+34.7511])# HLTTiming75e33, phase2CAExtension
 numWFIB.extend([prefixDet+34.752]) # HLTTiming75e33, ticl_v5
+numWFIB.extend([prefixDet+34.7521]) # HLTTiming75e33, ticl_v5, ticlv5TrackLinkingGNN
 numWFIB.extend([prefixDet+34.753]) # HLTTiming75e33, alpaka,singleIterPatatrack
 numWFIB.extend([prefixDet+34.754]) # HLTTiming75e33, alpaka,singleIterPatatrack,trackingLST
 numWFIB.extend([prefixDet+34.755]) # HLTTiming75e33, alpaka,trackingLST

Sure, no problem-thanks for pointing this out!

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49652/47228

@cmsbuild
Copy link
Contributor

Pull request #49652 was updated. @AdrianoDee, @DickyChant, @Martin-Grunewald, @Moanwar, @antoniovagnerini, @cmsbuild, @davidlange6, @fabiocos, @ftenchini, @jfernan2, @mandrenguyen, @miquork, @mmusich, @srimanob can you please check and sign again.

inputNames = cms.vstring('x', 'edge_index', 'edge_attr'),
output = cms.vstring('output'),
delta_tk_ts = cms.double(0.1),
thr_gnn = cms.double(0.5),
Copy link
Contributor

Choose a reason for hiding this comment

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

please fix the indentation.

output = cms.vstring('output'),
delta_tk_ts = cms.double(0.1),
thr_gnn = cms.double(0.5),
type = cms.string('GNNLink')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The choice of the name "type" is intentional to be the same, as it determines whether the old plugin or the new GNN-based plugin is used. However, I’m wondering if this should compile. I tried quickly and got the following error:

TypeError: type does not already exist, so it can only be set to a CMS Python configuration type

Did it compile successfully on your side?

Copy link
Contributor

@mmusich mmusich Dec 18, 2025

Choose a reason for hiding this comment

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

It did for me. @Moanwar you have to replace cms.PSet with dict first -- of course.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, that’s strange. I have tried compiling and running a few times to make sure it works:
runTheMatrix.py -w upgrade -l 29688.211 -j 0
But each time, I get the same error I mentioned above. I’m not sure I understand why this happens, could you please give that a try ? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

@Moanwar

cmsrel CMSSW_16_0_X_2025-12-17-2300
cd CMSSW_16_0_X_2025-12-17-2300/src/
cmsenv
git cms-merge-topic 49652
# apply patch below [*]
scram b -j 20
runTheMatrix.py -w upgrade -l 29688.211 -j 0

runs fine for me.
hope this helps!

[*]

diff --git a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
index 307af675b8e..03efda78c33 100644
--- a/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
+++ b/HLTrigger/Configuration/python/HLT_75e33/modules/hltTiclCandidate_cfi.py
@@ -49,13 +49,13 @@ hltTiclCandidate = cms.EDProducer("TICLCandidateProducer",
 
 from Configuration.ProcessModifiers.ticlv5_TrackLinkingGNN_cff import ticlv5TrackLinkingGNN
 ticlv5TrackLinkingGNN.toModify(hltTiclCandidate,
-    interpretationDescPSet = cms.PSet(
+    interpretationDescPSet = dict(
         onnxTrkLinkingModelFirstDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/FirstDiskPropGNN_v0.onnx'),
         onnxTrkLinkingModelInterfaceDisk = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/TrackLinking_GNN/InterfaceDiskPropGNN_v0.onnx'),
         inputNames = cms.vstring('x', 'edge_index', 'edge_attr'),
         output = cms.vstring('output'),
         delta_tk_ts = cms.double(0.1),
         thr_gnn = cms.double(0.5),
-        type = cms.string('GNNLink')
+        type = 'GNNLink'
     )
 )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, thanks a lot @mmusich, That makes sense. I was testing without changing to a dict, which does compile successfully, but then it raises the other error mentioned in cmsRun here: - unless it’s working for you as well?

output = cms.vstring('output'),
delta_tk_ts = cms.double(0.1),
thr_gnn = cms.double(0.5),
type = cms.string('GNNLink')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The choice of the name "type" is intentional to be the same, as it determines whether the old plugin or the new GNN-based plugin is used. However, I’m wondering if this should compile. I tried quickly and got the following error:

TypeError: type does not already exist, so it can only be set to a CMS Python configuration type

Did it compile successfully on your side?

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49652/47233

@cmsbuild
Copy link
Contributor

Pull request #49652 was updated. @AdrianoDee, @DickyChant, @Martin-Grunewald, @Moanwar, @antoniovagnerini, @cmsbuild, @davidlange6, @fabiocos, @ftenchini, @jfernan2, @mandrenguyen, @miquork, @mmusich, @srimanob can you please check and sign again.

@mmusich
Copy link
Contributor

mmusich commented Dec 18, 2025

@cmsbuild, please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 76KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-553e9c/50356/summary.html
COMMIT: 777302a
CMSSW: CMSSW_16_0_X_2025-12-18-1100/el8_amd64_gcc13
Additional Tests: HLT_P2_INTEGRATION,HLT_P2_TIMING
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/49652/50356/install.sh to create a dev area with all the needed externals and cmssw changes.

HLT P2 Timing: chart

Comparison Summary

Summary:

  • You potentially added 19 lines to the logs
  • ROOTFileChecks: Some differences in event products or their sizes found
  • Reco comparison results: 9 differences found in the comparisons
  • Reco comparison had 4 failed jobs
  • DQMHistoTests: Total files compared: 53
  • DQMHistoTests: Total histograms compared: 4280393
  • DQMHistoTests: Total failures: 84
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 4280289
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 52 files compared)
  • Checked 227 log files, 198 edm output root files, 53 DQM output files
  • TriggerResults: no differences found

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.

6 participants