CMS 3D CMS Logo

ticlDumper_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from RecoHGCal.TICL.ticlDumper_cfi import ticlDumper as ticlDumper_
3 
4 from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5
5 from Configuration.ProcessModifiers.ticl_superclustering_dnn_cff import ticl_superclustering_dnn
6 from Configuration.ProcessModifiers.ticl_superclustering_mustache_pf_cff import ticl_superclustering_mustache_pf
7 from Configuration.ProcessModifiers.ticl_superclustering_mustache_ticl_cff import ticl_superclustering_mustache_ticl
8 
9 
10 from RecoHGCal.TICL.iterativeTICL_cff import ticlIterLabels, associatorsInstances
11 
12 
13 simTrackstersCollections = ["ticlSimTracksters", "ticlSimTrackstersfromCPs"]
14 dumperAssociators = []
15 
16 for simTrackstersCollection in simTrackstersCollections:
17  for tracksterIteration in ticlIterLabels:
18  suffix = "CP" if "fromCPs" in simTrackstersCollection else "SC"
19  dumperAssociators.append(
20  cms.PSet(
21  branchName=cms.string(tracksterIteration),
22  suffix=cms.string(suffix),
23  associatorRecoToSimInputTag=cms.InputTag(f"allTrackstersToSimTrackstersAssociationsByLCs:{tracksterIteration}To{simTrackstersCollection}"),
24  associatorSimToRecoInputTag=cms.InputTag(f"allTrackstersToSimTrackstersAssociationsByLCs:{simTrackstersCollection}To{tracksterIteration}")
25  )
26  )
27 
28 
29 ticlDumper = ticlDumper_.clone(
30  tracksterCollections = [*[cms.PSet(treeName=cms.string(label), inputTag=cms.InputTag(label)) for label in ticlIterLabels],
31  cms.PSet(
32  treeName=cms.string("simtrackstersSC"),
33  inputTag=cms.InputTag("ticlSimTracksters"),
34  tracksterType=cms.string("SimTracksterSC")
35  ),
36  cms.PSet(
37  treeName=cms.string("simtrackstersCP"),
38  inputTag=cms.InputTag("ticlSimTracksters", "fromCPs"),
39  tracksterType=cms.string("SimTracksterCP")
40  ),
41  ],
42 
43  associators=dumperAssociators.copy()
44 )
45 
46 ticl_v5.toModify(ticlDumper, ticlcandidates = cms.InputTag("ticlCandidate"), recoSuperClusters_sourceTracksterCollection=cms.InputTag("ticlCandidate"))
47 
48 
49 
50 (ticl_v5 & ticl_superclustering_mustache_pf).toModify(ticlDumper, saveSuperclustering=False, recoSuperClusters_sourceTracksterCollection=cms.InputTag("ticlCandidate"))