File indexing completed on 2024-10-16 05:06:32
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from RecoHGCal.TICL.ticlDumper_cff import ticlDumper
0004 from RecoHGCal.Configuration.RecoHGCal_EventContent_cff import customiseForTICLv5EventContent
0005 from RecoHGCal.TICL.mergedTrackstersProducer_cfi import mergedTrackstersProducer as _mergedTrackstersProducer
0006 from RecoLocalCalo.HGCalRecProducers.hgcalLayerClusters_cff import hgcalLayerClustersEE, hgcalLayerClustersHSi, hgcalLayerClustersHSci
0007 from RecoLocalCalo.HGCalRecProducers.hgcalMergeLayerClusters_cfi import hgcalMergeLayerClusters
0008 from RecoTracker.IterativeTracking.iterativeTk_cff import trackdnn_source
0009 from RecoLocalCalo.HGCalRecProducers.recHitMapProducer_cfi import recHitMapProducer
0010 from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer
0011
0012 from RecoHGCal.TICL.pfTICLProducer_cfi import pfTICLProducer as _pfTICLProducer
0013
0014 from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer
0015 from RecoHGCal.TICL.tracksterSelectionTf_cfi import *
0016
0017 from RecoHGCal.TICL.tracksterLinksProducer_cfi import tracksterLinksProducer as _tracksterLinksProducer
0018 from RecoHGCal.TICL.ticlCandidateProducer_cfi import ticlCandidateProducer as _ticlCandidateProducer
0019 from RecoHGCal.Configuration.RecoHGCal_EventContent_cff import customiseForTICLv5EventContent
0020 from RecoHGCal.TICL.iterativeTICL_cff import ticlIterLabels
0021 from RecoHGCal.TICL.mergedTrackstersProducer_cfi import mergedTrackstersProducer as _mergedTrackstersProducer
0022 from SimCalorimetry.HGCalAssociatorProducers.TSToSimTSAssociation_cfi import allTrackstersToSimTrackstersAssociationsByLCs as _allTrackstersToSimTrackstersAssociationsByLCs
0023 from SimCalorimetry.HGCalAssociatorProducers.TSToSimTSAssociationByHits_cfi import allTrackstersToSimTrackstersAssociationsByHits as _allTrackstersToSimTrackstersAssociationsByHits
0024
0025 from SimCalorimetry.HGCalAssociatorProducers.SimClusterToCaloParticleAssociation_cfi import SimClusterToCaloParticleAssociation
0026 from Validation.HGCalValidation.HGCalValidator_cff import hgcalValidator
0027 from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import HGCalUncalibRecHit
0028 from RecoHGCal.TICL.SimTracksters_cff import ticlSimTracksters, ticlSimTrackstersTask
0029
0030 from RecoHGCal.TICL.FastJetStep_cff import ticlTrackstersFastJet
0031 from RecoHGCal.TICL.EMStep_cff import ticlTrackstersEM, ticlTrackstersHFNoseEM
0032 from RecoHGCal.TICL.TrkStep_cff import ticlTrackstersTrk, ticlTrackstersHFNoseTrk
0033 from RecoHGCal.TICL.MIPStep_cff import ticlTrackstersMIP, ticlTrackstersHFNoseMIP
0034 from RecoHGCal.TICL.HADStep_cff import ticlTrackstersHAD, ticlTrackstersHFNoseHAD
0035 from RecoHGCal.TICL.CLUE3DEM_cff import ticlTrackstersCLUE3DEM
0036 from RecoHGCal.TICL.CLUE3DHAD_cff import ticlTrackstersCLUE3DHAD
0037 from RecoHGCal.TICL.CLUE3DHighStep_cff import ticlTrackstersCLUE3DHigh
0038 from RecoHGCal.TICL.TrkEMStep_cff import ticlTrackstersTrkEM, filteredLayerClustersHFNoseTrkEM
0039
0040 from RecoHGCal.TICL.mtdSoAProducer_cfi import mtdSoAProducer as _mtdSoAProducer
0041
0042 def customiseTICLv5FromReco(process, enableDumper = False):
0043
0044
0045 process.TFESSource = cms.Task(process.trackdnn_source)
0046
0047 process.hgcalLayerClustersTask = cms.Task(process.hgcalLayerClustersEE,
0048 process.hgcalLayerClustersHSi,
0049 process.hgcalLayerClustersHSci,
0050 process.hgcalMergeLayerClusters)
0051
0052
0053
0054 process.ticlSimTracksters.computeLocalTime = cms.bool(True)
0055
0056 process.ticlTrackstersCLUE3DHigh.pluginPatternRecognitionByCLUE3D.computeLocalTime = cms.bool(True)
0057
0058 '''for future CLUE3D separate iterations
0059 process.ticlTrackstersCLUE3DHAD.pluginPatternRecognitionByCLUE3D.computeLocalTime = cms.bool(True)
0060 process.ticlTrackstersCLUE3DEM.pluginPatternRecognitionByCLUE3D.computeLocalTime = cms.bool(True)
0061 '''
0062
0063 process.ticlLayerTileTask = cms.Task(ticlLayerTileProducer)
0064
0065 process.ticlIterationsTask = cms.Task(
0066 process.ticlTrackstersCLUE3DHigh,
0067 )
0068
0069 process.mtdSoA = _mtdSoAProducer.clone()
0070 process.mtdSoATask = cms.Task(process.mtdSoA)
0071
0072 process.ticlTracksterLinks = _tracksterLinksProducer.clone()
0073 process.ticlTracksterLinks = _tracksterLinksProducer.clone(
0074 tracksters_collections = cms.VInputTag(
0075 'ticlTrackstersCLUE3DHigh'
0076 ),
0077 )
0078
0079 process.ticlCandidate = _ticlCandidateProducer.clone()
0080 process.ticlCandidateTask = cms.Task(process.ticlCandidate)
0081
0082 process.allTrackstersToSimTrackstersAssociationsByLCs = _allTrackstersToSimTrackstersAssociationsByLCs.clone()
0083
0084 process.allTrackstersToSimTrackstersAssociationsByHits = _allTrackstersToSimTrackstersAssociationsByHits.clone()
0085
0086 process.iterTICLTask = cms.Path(process.hgcalLayerClustersTask,
0087 process.TFESSource,
0088 process.ticlLayerTileTask,
0089 process.mtdSoATask,
0090 process.ticlIterationsTask,
0091 process.ticlTracksterLinksTask,
0092 process.ticlCandidateTask)
0093
0094 process.particleFlowClusterHGCal.initialClusteringStep.tracksterSrc = "ticlCandidate"
0095 process.globalrecoTask.remove(process.ticlTrackstersMerge)
0096
0097
0098 process.mergeTICLTask = cms.Task()
0099 process.pfTICL = _pfTICLProducer.clone(
0100 ticlCandidateSrc = cms.InputTag('ticlCandidate'),
0101 isTICLv5 = cms.bool(True)
0102 )
0103 process.hgcalAssociators = cms.Task(process.recHitMapProducer, process.lcAssocByEnergyScoreProducer, process.layerClusterCaloParticleAssociationProducer,
0104 process.scAssocByEnergyScoreProducer, process.layerClusterSimClusterAssociationProducer,
0105
0106 process.allLayerClusterToTracksterAssociations, process.allHitToTracksterAssociations,
0107 process.allTrackstersToSimTrackstersAssociationsByLCs, process.allTrackstersToSimTrackstersAssociationsByHits,
0108 process.hitToSimClusterCaloParticleAssociator, process.SimClusterToCaloParticleAssociation,
0109 )
0110
0111 if(enableDumper):
0112 process.ticlDumper = ticlDumper
0113 process.TFileService = cms.Service("TFileService",
0114 fileName=cms.string("histo.root")
0115 )
0116
0117 process.FEVTDEBUGHLToutput_step = cms.EndPath(process.ticlDumper)
0118
0119 process.TICL_Validation = cms.Path(process.ticlSimTrackstersTask, process.hgcalAssociators)
0120
0121
0122 process.schedule = cms.Schedule(process.iterTICLTask,
0123 process.TICL_Validation,
0124 process.FEVTDEBUGHLToutput_step)
0125 process = customiseForTICLv5EventContent(process)
0126
0127 return process