1 import FWCore.ParameterSet.Config
as cms
14 from RecoHGCal.TICL.ticlLayerTileProducer_cfi
import ticlLayerTileProducer
15 from RecoHGCal.TICL.pfTICLProducer_cfi
import pfTICLProducer
as _pfTICLProducer
16 from RecoHGCal.TICL.trackstersMergeProducer_cfi
import trackstersMergeProducer
as _trackstersMergeProducer
19 from RecoHGCal.TICL.tracksterLinksProducer_cfi
import tracksterLinksProducer
as _tracksterLinksProducer
21 from RecoHGCal.TICL.ticlCandidateProducer_cfi
import ticlCandidateProducer
as _ticlCandidateProducer
23 from RecoHGCal.TICL.mtdSoAProducer_cfi
import mtdSoAProducer
as _mtdSoAProducer
25 from Configuration.ProcessModifiers.ticl_v5_cff
import ticl_v5
26 from Configuration.ProcessModifiers.ticl_superclustering_dnn_cff
import ticl_superclustering_dnn
27 from Configuration.ProcessModifiers.ticl_superclustering_mustache_pf_cff
import ticl_superclustering_mustache_pf
28 from Configuration.ProcessModifiers.ticl_superclustering_mustache_ticl_cff
import ticl_superclustering_mustache_ticl
30 ticlLayerTileTask = cms.Task(ticlLayerTileProducer)
32 ticlTrackstersMerge = _trackstersMergeProducer.clone()
33 ticlTracksterLinks = _tracksterLinksProducer.clone(
34 tracksters_collections = cms.VInputTag(
35 'ticlTrackstersCLUE3DHigh',
36 'ticlTrackstersRecovery' 38 regressionAndPid = cms.bool(
True),
39 inferenceAlgo = cms.string(
'TracksterInferenceByDNN'),
40 pluginInferenceAlgoTracksterInferenceByDNN = cms.PSet(
41 algo_verbosity = cms.int32(0),
43 doRegression = cms.int32(1),
44 inputNames = cms.vstring(
'input'),
45 output_en = cms.vstring(
'enreg_output'),
46 output_id = cms.vstring(
'pid_output'),
47 eid_min_cluster_energy = cms.double(1),
48 eid_n_clusters = cms.int32(10),
49 eid_n_layers = cms.int32(50),
50 onnxEnergyModelPath = cms.FileInPath(
'RecoHGCal/TICL/data/ticlv5/onnx_models/linking/energy_v0.onnx'),
51 onnxPIDModelPath = cms.FileInPath(
'RecoHGCal/TICL/data/ticlv5/onnx_models/linking/id_v0.onnx'),
52 type = cms.string(
'TracksterInferenceByDNN')
56 ticlCandidate = _ticlCandidateProducer.clone()
57 mtdSoA = _mtdSoAProducer.clone()
59 pfTICL = _pfTICLProducer.clone()
60 ticl_v5.toModify(pfTICL, ticlCandidateSrc = cms.InputTag(
'ticlCandidate'), isTICLv5 = cms.bool(
True), useTimingAverage=
True)
62 ticlPFTask = cms.Task(pfTICL)
64 ticlIterationsTask = cms.Task(
65 ticlCLUE3DHighStepTask
68 ticl_v5.toModify(ticlIterationsTask , func=
lambda x : x.add(ticlRecoveryStepTask))
69 ''' For future separate iterations 70 ,ticlCLUE3DEMStepTask, 71 ,ticlCLUE3DHADStepTask 74 ''' For future separate iterations 75 ticl_v5.toReplaceWith(ticlIterationsTask, ticlIterationsTask.copyAndExclude([ticlCLUE3DHighStepTask])) 78 from Configuration.ProcessModifiers.fastJetTICL_cff
import fastJetTICL
79 fastJetTICL.toModify(ticlIterationsTask, func=
lambda x : x.add(ticlFastJetStepTask))
81 ticlIterLabels = [
"ticlTrackstersCLUE3DHigh",
"ticlTrackstersMerge"]
82 ticlIterLabels_v5 = [
"ticlTrackstersCLUE3DHigh",
"ticlTracksterLinks",
"ticlCandidate"]
84 ''' For future separate iterations 85 "CLUE3DEM", "CLUE3DHAD", 88 ticlTracksterMergeTask = cms.Task(ticlTrackstersMerge)
89 ticlTracksterLinksTask = cms.Task(ticlTracksterLinks, ticlSuperclusteringTask)
92 mergeTICLTask = cms.Task(ticlLayerTileTask
94 ,ticlTracksterMergeTask
97 ticl_v5.toReplaceWith(mergeTICLTask, mergeTICLTask.copyAndExclude([ticlTracksterMergeTask]))
98 ticl_v5.toModify(mergeTICLTask, func=
lambda x : x.add(ticlTracksterLinksTask))
101 mtdSoATask = cms.Task(mtdSoA)
102 ticlCandidateTask = cms.Task(ticlCandidate)
105 if ticl_v5._isChosen():
106 ticlIterLabels = ticlIterLabels_v5.copy()
107 if ticl_superclustering_mustache_ticl._isChosen():
108 ticlIterLabels.append(
"ticlTracksterLinksSuperclusteringMustache")
109 if ticl_superclustering_dnn._isChosen():
110 ticlIterLabels.append(
"ticlTracksterLinksSuperclusteringDNN")
113 associatorsInstances = []
115 for labelts
in ticlIterLabels:
116 for labelsts
in [
'ticlSimTracksters',
'ticlSimTrackstersfromCPs']:
117 associatorsInstances.append(labelts+
'To'+labelsts)
118 associatorsInstances.append(labelsts+
'To'+labelts)
120 iterTICLTask = cms.Task(mergeTICLTask,
123 ticl_v5.toModify(iterTICLTask, func=
lambda x : x.add(mtdSoATask, ticlCandidateTask))
126 ticlLayerTileHFNose = ticlLayerTileProducer.clone(
130 ticlLayerTileHFNoseTask = cms.Task(ticlLayerTileHFNose)
132 iterHFNoseTICLTask = cms.Task(ticlLayerTileHFNoseTask
133 ,ticlHFNoseTrkEMStepTask
134 ,ticlHFNoseEMStepTask
135 ,ticlHFNoseTrkStepTask
136 ,ticlHFNoseHADStepTask
137 ,ticlHFNoseMIPStepTask