File indexing completed on 2024-09-26 05:07:09
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.PRbyPassthrough_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
0027 ticlLayerTileTask = cms.Task(ticlLayerTileProducer)
0028
0029 ticlTrackstersMerge = _trackstersMergeProducer.clone()
0030 ticlTracksterLinks = _tracksterLinksProducer.clone(
0031 tracksters_collections = cms.VInputTag(
0032 'ticlTrackstersCLUE3DHigh',
0033 'ticlTrackstersPassthrough'
0034 ),
0035 regressionAndPid = cms.bool(True),
0036 inferenceAlgo = cms.string('TracksterInferenceByDNN'),
0037 pluginInferenceAlgoTracksterInferenceByDNN = cms.PSet(
0038 algo_verbosity = cms.int32(0),
0039 doPID = cms.int32(1),
0040 doRegression = cms.int32(1),
0041 inputNames = cms.vstring('input'),
0042 output_en = cms.vstring('enreg_output'),
0043 output_id = cms.vstring('pid_output'),
0044 eid_min_cluster_energy = cms.double(1),
0045 eid_n_clusters = cms.int32(10),
0046 eid_n_layers = cms.int32(50),
0047 onnxEnergyModelPath = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/linking/energy_v0.onnx'),
0048 onnxPIDModelPath = cms.FileInPath('RecoHGCal/TICL/data/ticlv5/onnx_models/linking/id_v0.onnx'),
0049 type = cms.string('TracksterInferenceByDNN')
0050 )
0051 )
0052
0053 ticlCandidate = _ticlCandidateProducer.clone()
0054 mtdSoA = _mtdSoAProducer.clone()
0055
0056 pfTICL = _pfTICLProducer.clone()
0057 ticl_v5.toModify(pfTICL, ticlCandidateSrc = cms.InputTag('ticlCandidate'), isTICLv5 = cms.bool(True), useTimingAverage=True)
0058
0059 ticlPFTask = cms.Task(pfTICL)
0060
0061 ticlIterationsTask = cms.Task(
0062 ticlCLUE3DHighStepTask
0063 )
0064
0065 ticl_v5.toModify(ticlIterationsTask , func=lambda x : x.add(ticlPassthroughStepTask))
0066 ''' For future separate iterations
0067 ,ticlCLUE3DEMStepTask,
0068 ,ticlCLUE3DHADStepTask
0069 '''
0070
0071 ''' For future separate iterations
0072 ticl_v5.toReplaceWith(ticlIterationsTask, ticlIterationsTask.copyAndExclude([ticlCLUE3DHighStepTask]))
0073 '''
0074
0075 from Configuration.ProcessModifiers.fastJetTICL_cff import fastJetTICL
0076 fastJetTICL.toModify(ticlIterationsTask, func=lambda x : x.add(ticlFastJetStepTask))
0077
0078 ticlIterLabels = ["CLUE3DHigh"]
0079 ''' For future separate iterations
0080 "CLUE3DEM", "CLUE3DHAD",
0081 '''
0082
0083 ticlTracksterMergeTask = cms.Task(ticlTrackstersMerge)
0084 ticlTracksterLinksTask = cms.Task(ticlTracksterLinks, ticlSuperclusteringTask)
0085
0086
0087 mergeTICLTask = cms.Task(ticlLayerTileTask
0088 ,ticlIterationsTask
0089 ,ticlTracksterMergeTask
0090 )
0091 ticl_v5.toReplaceWith(mergeTICLTask, mergeTICLTask.copyAndExclude([ticlTracksterMergeTask]))
0092 ticl_v5.toModify(mergeTICLTask, func=lambda x : x.add(ticlTracksterLinksTask))
0093
0094 ticlIterLabelsMerge = ticlIterLabels + ["Merge"]
0095
0096 mtdSoATask = cms.Task(mtdSoA)
0097 ticlCandidateTask = cms.Task(ticlCandidate)
0098
0099 iterTICLTask = cms.Task(mergeTICLTask,
0100 ticlPFTask)
0101 ticl_v5.toModify(iterTICLTask, func=lambda x : x.add(mtdSoATask, ticlCandidateTask))
0102
0103 ticlLayerTileHFNose = ticlLayerTileProducer.clone(
0104 detector = 'HFNose'
0105 )
0106
0107 ticlLayerTileHFNoseTask = cms.Task(ticlLayerTileHFNose)
0108
0109 iterHFNoseTICLTask = cms.Task(ticlLayerTileHFNoseTask
0110 ,ticlHFNoseTrkEMStepTask
0111 ,ticlHFNoseEMStepTask
0112 ,ticlHFNoseTrkStepTask
0113 ,ticlHFNoseHADStepTask
0114 ,ticlHFNoseMIPStepTask
0115 )