File indexing completed on 2024-11-25 02:29:56
0001 import FWCore.ParameterSet.Config as cms
0002 from RecoHGCal.TICL.ticlDumper_cfi import ticlDumper as ticlDumper_
0003
0004 from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5
0005 from Configuration.ProcessModifiers.ticl_superclustering_dnn_cff import ticl_superclustering_dnn
0006 from Configuration.ProcessModifiers.ticl_superclustering_mustache_pf_cff import ticl_superclustering_mustache_pf
0007 from Configuration.ProcessModifiers.ticl_superclustering_mustache_ticl_cff import ticl_superclustering_mustache_ticl
0008
0009
0010 from RecoHGCal.TICL.iterativeTICL_cff import ticlIterLabels, associatorsInstances
0011
0012
0013 simTrackstersCollections = ["ticlSimTracksters", "ticlSimTrackstersfromCPs"]
0014 dumperAssociators = []
0015
0016 for simTrackstersCollection in simTrackstersCollections:
0017 for tracksterIteration in ticlIterLabels:
0018 suffix = "CP" if "fromCPs" in simTrackstersCollection else "SC"
0019 dumperAssociators.append(
0020 cms.PSet(
0021 branchName=cms.string(tracksterIteration),
0022 suffix=cms.string(suffix),
0023 associatorRecoToSimInputTag=cms.InputTag(f"allTrackstersToSimTrackstersAssociationsByLCs:{tracksterIteration}To{simTrackstersCollection}"),
0024 associatorSimToRecoInputTag=cms.InputTag(f"allTrackstersToSimTrackstersAssociationsByLCs:{simTrackstersCollection}To{tracksterIteration}")
0025 )
0026 )
0027
0028
0029 ticlDumper = ticlDumper_.clone(
0030 tracksterCollections = [*[cms.PSet(treeName=cms.string(label), inputTag=cms.InputTag(label)) for label in ticlIterLabels],
0031 cms.PSet(
0032 treeName=cms.string("simtrackstersSC"),
0033 inputTag=cms.InputTag("ticlSimTracksters"),
0034 tracksterType=cms.string("SimTracksterSC")
0035 ),
0036 cms.PSet(
0037 treeName=cms.string("simtrackstersCP"),
0038 inputTag=cms.InputTag("ticlSimTracksters", "fromCPs"),
0039 tracksterType=cms.string("SimTracksterCP")
0040 ),
0041 ],
0042
0043 associators=dumperAssociators.copy(),
0044 saveSuperclustering = cms.bool(False)
0045 )
0046
0047 ticl_v5.toModify(ticlDumper, ticlcandidates = cms.InputTag("ticlCandidate"), recoSuperClusters_sourceTracksterCollection=cms.InputTag("ticlCandidate"))
0048 ticl_v5.toModify(ticlDumper, saveSuperclustering = cms.bool(True))
0049
0050
0051
0052 (ticl_v5 & ticl_superclustering_mustache_pf).toModify(ticlDumper, saveSuperclustering=False, recoSuperClusters_sourceTracksterCollection=cms.InputTag("ticlCandidate"))