Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import FWCore.ParameterSet.Config as cms

from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5

# This modifier is for running TICL v5 with GNN track-trackster linking.
ticl_v5_TrackLinkingGNN = cms.Modifier()
ticlv5_TrackLinkingGNN = cms.ModifierChain(ticl_v5, ticl_v5_TrackLinkingGNN)
1 change: 1 addition & 0 deletions Configuration/PyReleaseValidation/python/relval_Run4.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,38 @@ def condition(self, fragment, stepList, key, hasHarvest):
upgradeWFs['ticl_barrel_CPfromPU'].step3 = {'--procModifiers': 'ticl_barrel,enableCPfromPU'}
upgradeWFs['ticl_barrel_CPfromPU'].step4 = {'--procModifiers': 'ticl_barrel,enableCPfromPU'}

class UpgradeWorkflow_ticlv5_TrackLinkingGNN(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
if ('Digi' in step and 'NoHLT' not in step) or ('HLTOnly' in step):
stepDict[stepName][k] = merge([self.step2, stepDict[step][k]])
if 'RecoGlobal' in step:
stepDict[stepName][k] = merge([self.step3, stepDict[step][k]])
if 'HARVESTGlobal' in step:
stepDict[stepName][k] = merge([self.step4, stepDict[step][k]])
def condition(self, fragment, stepList, key, hasHarvest):
selected_fragments = ["TTbar_14TeV", "CloseByP", "Eta1p7_2p7", "ZEE_14"]
return any(sf in fragment for sf in selected_fragments) and 'Run4' in key

upgradeWFs['ticlv5_TrackLinkingGNN'] = UpgradeWorkflow_ticlv5_TrackLinkingGNN(
steps = [
'HLTOnly',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'
],
PU = [
'HLTOnly',
'DigiTrigger',
'RecoGlobal',
'HARVESTGlobal'
],
suffix = '_ticlv5_TrackLinkGNN',
offset = 0.211,
)
upgradeWFs['ticlv5_TrackLinkingGNN'].step2 = {'--procModifiers': 'ticlv5_TrackLinkingGNN'}
upgradeWFs['ticlv5_TrackLinkingGNN'].step3 = {'--procModifiers': 'ticlv5_TrackLinkingGNN'}
upgradeWFs['ticlv5_TrackLinkingGNN'].step4 = {'--procModifiers': 'ticlv5_TrackLinkingGNN'}

# L3 Tracker Muon Outside-In reconstruction first
class UpgradeWorkflow_phase2L3MuonsOIFirst(UpgradeWorkflow):
def setup_(self, step, stepName, stepDict, k, properties):
Expand Down Expand Up @@ -1956,6 +1988,20 @@ def condition(self, fragment, stepList, key, hasHarvest):
'-s':'HARVESTING:@hltValidation'
}

upgradeWFs['HLTTiming75e33TiclV5TrackLinkingGNN'] = deepcopy(upgradeWFs['HLTTiming75e33'])
upgradeWFs['HLTTiming75e33TiclV5TrackLinkingGNN'].suffix = '_HLT75e33TimingTiclV5TrackLinkGNN'
upgradeWFs['HLTTiming75e33TiclV5TrackLinkingGNN'].offset = 0.7521
upgradeWFs['HLTTiming75e33TiclV5TrackLinkingGNN'].step2 = {
'-s':'DIGI:pdigi_valid,L1TrackTrigger,L1,L1P2GT,DIGI2RAW,HLT:75e33_timing,VALIDATION:@hltValidation',
'--procModifiers': 'ticlv5_TrackLinkingGNN',
'--datatier':'GEN-SIM-DIGI-RAW,DQMIO',
'--eventcontent':'FEVTDEBUGHLT,DQMIO'
}
upgradeWFs['HLTTiming75e33TiclV5TrackLinkingGNN'].step3 = {
'-s':'HARVESTING:@hltValidation'
}


upgradeWFs['HLTTiming75e33AlpakaSingleIter'] = deepcopy(upgradeWFs['HLTTiming75e33'])
upgradeWFs['HLTTiming75e33AlpakaSingleIter'].suffix = '_HLT75e33TimingAlpakaSingleIter'
upgradeWFs['HLTTiming75e33AlpakaSingleIter'].offset = 0.753
Expand Down
1 change: 1 addition & 0 deletions Configuration/PyReleaseValidation/scripts/runTheMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def runSelected(opt):
prefixDet+34.751, # HLT phase-2 timing menu Alpaka variant
prefixDet+34.7511, # HLT phase-2 timing menu Phase2CAExtension variant
prefixDet+34.752, # HLT phase-2 timing menu ticl_v5 variant
prefixDet+34.7521, # HLT phase-2 timing menu ticlv5TrackLinkGNN variant
prefixDet+34.753, # HLT phase-2 timing menu Alpaka, single tracking iteration variant
prefixDet+34.754, # HLT phase-2 timing menu Alpaka, single tracking iteration, LST building variant
prefixDet+34.755, # HLT phase-2 timing menu Alpaka, LST building variant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,15 @@
useTimingAverage = cms.bool(False)
)

from Configuration.ProcessModifiers.ticlv5_TrackLinkingGNN_cff import ticl_v5_TrackLinkingGNN
ticl_v5_TrackLinkingGNN.toModify(hltTiclCandidate,
interpretationDescPSet = cms.PSet(
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')
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?

)
)
1 change: 1 addition & 0 deletions RecoHGCal/TICL/interface/TICLInterpretationAlgoBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "PhysicsTools/TensorFlow/interface/TensorFlow.h"
#include "DataFormats/Common/interface/MultiSpan.h"
#include "PhysicsTools/ONNXRuntime/interface/ONNXRuntime.h"

namespace edm {
class Event;
Expand Down
Loading