File indexing completed on 2025-03-14 23:36:37
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from RecoHGCal.TICL.FastJetStep_cff import *
0004 from RecoHGCal.TICL.CLUE3DHighStep_cff import *
0005 from RecoHGCal.TICL.MIPStep_cff import *
0006 from RecoHGCal.TICL.TrkEMStep_cff import *
0007 from RecoHGCal.TICL.TrkStep_cff import *
0008 from RecoHGCal.TICL.EMStep_cff import *
0009 from RecoHGCal.TICL.HADStep_cff import *
0010 from RecoHGCal.TICL.CLUE3DEM_cff import *
0011 from RecoHGCal.TICL.CLUE3DHAD_cff import *
0012 from RecoHGCal.TICL.PRbyRecovery_cff import *
0013
0014 from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer
0015 from RecoHGCal.TICL.pfTICLProducer_cfi import pfTICLProducer as _pfTICLProducer
0016 from RecoHGCal.TICL.trackstersMergeProducer_cfi import trackstersMergeProducer as _trackstersMergeProducer
0017 from RecoHGCal.TICL.tracksterSelectionTf_cfi import *
0018
0019 from RecoHGCal.TICL.tracksterLinksProducer_cfi import tracksterLinksProducer as _tracksterLinksProducer
0020 from RecoHGCal.TICL.superclustering_cff import *
0021 from RecoHGCal.TICL.ticlCandidateProducer_cfi import ticlCandidateProducer as _ticlCandidateProducer
0022
0023 from RecoHGCal.TICL.mtdSoAProducer_cfi import mtdSoAProducer as _mtdSoAProducer
0024
0025 from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5
0026 from Configuration.ProcessModifiers.ticl_superclustering_dnn_cff import ticl_superclustering_dnn
0027 from Configuration.ProcessModifiers.ticl_superclustering_mustache_pf_cff import ticl_superclustering_mustache_pf
0028 from Configuration.ProcessModifiers.ticl_superclustering_mustache_ticl_cff import ticl_superclustering_mustache_ticl
0029
0030 ticlLayerTileTask = cms.Task(ticlLayerTileProducer)
0031
0032 ticlTrackstersMerge = _trackstersMergeProducer.clone()
0033 ticlTracksterLinks = _tracksterLinksProducer.clone(
0034 tracksters_collections = cms.VInputTag(
0035 'ticlTrackstersCLUE3DHigh',
0036 'ticlTrackstersRecovery'
0037 ),
0038 linkingPSet = cms.PSet(
0039 cylinder_radius_sqr_split = cms.double(9),
0040 proj_distance_split = cms.double(5),
0041 track_time_quality_threshold = cms.double(0.5),
0042 min_num_lcs = cms.uint32(15),
0043 min_trackster_energy = cms.double(20),
0044 pca_quality_th = cms.double(0.85),
0045 dot_prod_th = cms.double(0.97),
0046 lower_boundary = cms.vdouble(
0047 20,
0048 10
0049 ),
0050 upper_boundary = cms.vdouble(
0051 150,
0052 100
0053 ),
0054 upper_distance_projective_sqr = cms.vdouble(
0055 30,
0056 60
0057 ),
0058 lower_distance_projective_sqr = cms.vdouble(
0059 30,
0060 60
0061 ),
0062 min_distance_z = cms.vdouble(
0063 35,
0064 35
0065 ),
0066 upper_distance_projective_sqr_closest_points = cms.vdouble(
0067 5,
0068 30
0069 ),
0070 lower_distance_projective_sqr_closest_points = cms.vdouble(
0071 10,
0072 50
0073 ),
0074 max_z_distance_closest_points = cms.vdouble(
0075 35,
0076 35
0077 ),
0078 cylinder_radius_sqr = cms.vdouble(
0079 9,
0080 15
0081 ),
0082 deltaRxy = cms.double(4.),
0083 algo_verbosity = cms.int32(0),
0084 type = cms.string('Skeletons')
0085
0086 ),
0087 regressionAndPid = cms.bool(True),
0088 inferenceAlgo = cms.string('TracksterInferenceByPFN'),
0089 pluginInferenceAlgoTracksterInferenceByDNN = cms.PSet(
0090 algo_verbosity = cms.int32(0),
0091 doPID = cms.int32(1),
0092 doRegression = cms.int32(1),
0093 inputNames = cms.vstring('input'),
0094 output_en = cms.vstring('enreg_output'),
0095 output_id = cms.vstring('pid_output'),
0096 eid_min_cluster_energy = cms.double(1),
0097 eid_n_clusters = cms.int32(10),
0098 eid_n_layers = cms.int32(50),
0099 onnxEnergyModelPath = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/DNN/linking/energy_v0.onnx'),
0100 onnxPIDModelPath = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/DNN/linking/id_v0.onnx'),
0101 type = cms.string('TracksterInferenceByDNN')
0102 ),
0103 pluginInferenceAlgoTracksterInferenceByPFN = cms.PSet(
0104 algo_verbosity = cms.int32(0),
0105 doPID = cms.int32(1),
0106 doRegression = cms.int32(1),
0107 inputNames = cms.vstring('input','input_tr_features'),
0108 output_en = cms.vstring('enreg_output'),
0109 output_id = cms.vstring('pid_output'),
0110 eid_min_cluster_energy = cms.double(1),
0111 eid_n_clusters = cms.int32(10),
0112 eid_n_layers = cms.int32(50),
0113 onnxEnergyModelPath = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/PFN/linking/energy_v0.onnx'),
0114 onnxPIDModelPath = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/PFN/linking/id_v0.onnx'),
0115 type = cms.string('TracksterInferenceByPFN')
0116 )
0117 )
0118 ticlCandidate = _ticlCandidateProducer.clone()
0119 mtdSoA = _mtdSoAProducer.clone()
0120
0121 pfTICL = _pfTICLProducer.clone()
0122 ticl_v5.toModify(pfTICL, ticlCandidateSrc = cms.InputTag('ticlCandidate'), isTICLv5 = cms.bool(True), useTimingAverage=True)
0123
0124 ticlPFTask = cms.Task(pfTICL)
0125
0126 ticlIterationsTask = cms.Task(
0127 ticlCLUE3DHighStepTask
0128 )
0129
0130 ticl_v5.toModify(ticlIterationsTask , func=lambda x : x.add(ticlRecoveryStepTask))
0131 ''' For future separate iterations
0132 ,ticlCLUE3DEMStepTask,
0133 ,ticlCLUE3DHADStepTask
0134 '''
0135
0136 ''' For future separate iterations
0137 ticl_v5.toReplaceWith(ticlIterationsTask, ticlIterationsTask.copyAndExclude([ticlCLUE3DHighStepTask]))
0138 '''
0139
0140 from Configuration.ProcessModifiers.fastJetTICL_cff import fastJetTICL
0141 fastJetTICL.toModify(ticlIterationsTask, func=lambda x : x.add(ticlFastJetStepTask))
0142
0143 ticlIterLabels = ["ticlTrackstersCLUE3DHigh", "ticlTrackstersMerge"]
0144 ticlIterLabels_v5 = ["ticlTrackstersCLUE3DHigh", "ticlTracksterLinks", "ticlCandidate"]
0145
0146 ''' For future separate iterations
0147 "CLUE3DEM", "CLUE3DHAD",
0148 '''
0149
0150 ticlTracksterMergeTask = cms.Task(ticlTrackstersMerge)
0151 ticlTracksterLinksTask = cms.Task(ticlTracksterLinks, ticlSuperclusteringTask)
0152
0153
0154 mergeTICLTask = cms.Task(ticlLayerTileTask
0155 ,ticlIterationsTask
0156 ,ticlTracksterMergeTask
0157 )
0158
0159 ticl_v5.toReplaceWith(mergeTICLTask, mergeTICLTask.copyAndExclude([ticlTracksterMergeTask]))
0160 ticl_v5.toModify(mergeTICLTask, func=lambda x : x.add(ticlTracksterLinksTask))
0161
0162
0163 mtdSoATask = cms.Task(mtdSoA)
0164 ticlCandidateTask = cms.Task(ticlCandidate)
0165
0166
0167 if ticl_v5._isChosen():
0168 ticlIterLabels = ticlIterLabels_v5.copy()
0169 if ticl_superclustering_mustache_ticl._isChosen():
0170 ticlIterLabels.append("ticlTracksterLinksSuperclusteringMustache")
0171 if ticl_superclustering_dnn._isChosen():
0172 ticlIterLabels.append("ticlTracksterLinksSuperclusteringDNN")
0173
0174
0175 associatorsInstances = []
0176
0177 for labelts in ticlIterLabels:
0178 for labelsts in ['ticlSimTracksters', 'ticlSimTrackstersfromCPs']:
0179 associatorsInstances.append(labelts+'To'+labelsts)
0180 associatorsInstances.append(labelsts+'To'+labelts)
0181
0182 iterTICLTask = cms.Task(mergeTICLTask,
0183 ticlPFTask)
0184
0185 ticl_v5.toModify(iterTICLTask, func=lambda x : x.add(mtdSoATask, ticlCandidateTask))
0186
0187
0188 ticlLayerTileHFNose = ticlLayerTileProducer.clone(
0189 detector = 'HFNose'
0190 )
0191
0192 ticlLayerTileHFNoseTask = cms.Task(ticlLayerTileHFNose)
0193
0194 iterHFNoseTICLTask = cms.Task(ticlLayerTileHFNoseTask
0195 ,ticlHFNoseTrkEMStepTask
0196 ,ticlHFNoseEMStepTask
0197 ,ticlHFNoseTrkStepTask
0198 ,ticlHFNoseHADStepTask
0199 ,ticlHFNoseMIPStepTask
0200 )