CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ticl_iterations.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 # patch particle flow clusters for HGC into local reco sequence
7 # (for now until global reco is going with some sort of clustering)
10 from RecoLocalCalo.HGCalRecProducers.hgcalMergeLayerClusters_cff import hgcalMergeLayerClusters
11 from RecoLocalCalo.HGCalRecProducers.hgcalMultiClusters_cfi import hgcalMultiClusters
12 
13 from RecoHGCal.TICL.ticlSeedingRegionProducer_cfi import ticlSeedingRegionProducer
14 from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer
15 from RecoHGCal.TICL.trackstersProducer_cfi import trackstersProducer
16 from RecoHGCal.TICL.filteredLayerClustersProducer_cfi import filteredLayerClustersProducer
17 from RecoHGCal.TICL.ticlCandidateFromTrackstersProducer_cfi import ticlCandidateFromTrackstersProducer
18 from RecoHGCal.TICL.pfTICLProducer_cfi import pfTICLProducer
19 from Validation.HGCalValidation.ticlPFValidationDefault_cfi import ticlPFValidationDefault as ticlPFValidation
20 
21 
24  process.FEVTDEBUGHLTEventContent.outputCommands.extend([
25  'keep *_ticlCandidateFromTrackstersProducer*_*_*',
26  'keep *_pfTICLProducer*_*_*'])
27 
28  process.ticlLayerTileProducer = ticlLayerTileProducer.clone()
29 
30  process.ticlSeedingTrk = ticlSeedingRegionProducer.clone(
31  algoId = 1
32  )
33 
34  process.filteredLayerClustersTrk = filteredLayerClustersProducer.clone(
35  clusterFilter = "ClusterFilterByAlgo",
36  iteration_label = "Trk"
37  )
38 
39  process.trackstersTrk = trackstersProducer.clone(
40  filtered_mask = "filteredLayerClustersTrk:Trk",
41  seeding_regions = "ticlSeedingTrk",
42  skip_layers = 3,
43  min_layers_per_trackster = 5,
44  min_cos_theta = 0.99, # ~10 degrees
45  min_cos_pointing = 0.9
46  )
47 
48  process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
49  algoId = 2
50  )
51 
52  process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
53  clusterFilter = "ClusterFilterBySize",
54  max_cluster_size = 2, # inclusive
55  iteration_label = "MIP"
56  )
57 
58  process.trackstersMIP = trackstersProducer.clone(
59  filtered_mask = "filteredLayerClustersMIP:MIP",
60  seeding_regions = "ticlSeedingGlobal",
61  skip_layers = 3,
62  min_layers_per_trackster = 15,
63  min_cos_theta = 0.99, # ~10 degrees
64  min_cos_pointing = 0.9,
65  out_in_dfs = False,
66  )
67 
68  process.filteredLayerClusters = filteredLayerClustersProducer.clone(
69  clusterFilter = "ClusterFilterByAlgoAndSize",
70  min_cluster_size = 2,
71  iteration_label = "algo8",
72  LayerClustersInputMask = "trackstersMIP"
73  )
74 
75  process.trackstersEM = trackstersProducer.clone(
76  max_out_in_hops = 4,
77  original_mask = "trackstersMIP",
78  filtered_mask = "filteredLayerClusters:algo8",
79  seeding_regions = "ticlSeedingGlobal",
80  skip_layers = 1,
81  min_layers_per_trackster = 10,
82  min_cos_theta = 0.984, # ~10 degrees
83  min_cos_pointing = 0.9 # ~26 degrees
84  )
85 
86  process.trackstersHAD = trackstersProducer.clone(
87  filtered_mask = "filteredLayerClusters:algo8",
88  seeding_regions = "ticlSeedingGlobal",
89  skip_layers = 2,
90  min_layers_per_trackster = 10,
91  min_cos_theta = 0.8,
92  min_cos_pointing = 0.7
93  )
94 
95  process.ticlCandidateFromTrackstersProducer = ticlCandidateFromTrackstersProducer.clone()
96 
97  process.pfTICLProducer = pfTICLProducer.clone()
98 
99  process.hgcalMultiClusters = hgcalMultiClusters
100  process.TICL_Task = cms.Task(
101  process.ticlLayerTileProducer,
102  process.ticlSeedingTrk,
103  process.filteredLayerClustersTrk,
104  process.trackstersTrk,
105  process.ticlSeedingGlobal,
106  process.filteredLayerClustersMIP,
107  process.trackstersMIP,
108  process.filteredLayerClusters,
109  process.trackstersEM,
110  process.trackstersHAD,
111  process.ticlCandidateFromTrackstersProducer,
112  process.pfTICLProducer)
113 
114  process.schedule.associate(process.TICL_Task)
115 
116  process.ticlPFValidation = ticlPFValidation
117  process.hgcalValidation.insert(-1, process.ticlPFValidation)
118 
119  if getattr(process,'hgcalValidator'):
120  process.hgcalValidator.label_lcl = "hgcalMergeLayerClusters"
121  process.hgcalValidator.label_mcl = ["multiClustersFromTrackstersEM:MultiClustersFromTracksterByCA", "multiClustersFromTrackstersHAD:MultiClustersFromTracksterByCA"]
122  process.hgcalValidator.domulticlustersPlots = True
123 
124  return process
125 
126 
127 
129 def TICL_iterations(process):
130  process.ticlLayerTileProducer = ticlLayerTileProducer.clone()
131 
132  process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
133  algoId = 2
134  )
135 
136  process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
137  clusterFilter = "ClusterFilterBySize",
138  max_cluster_size = 2, # inclusive
139  iteration_label = "MIP"
140  )
141 
142  process.trackstersMIP = trackstersProducer.clone(
143  filtered_mask = "filteredLayerClustersMIP:MIP",
144  seeding_regions = "ticlSeedingGlobal",
145  skip_layers = 3,
146  min_layers_per_trackster = 15,
147  min_cos_theta = 0.99, # ~10 degrees
148  )
149 
150  process.filteredLayerClusters = filteredLayerClustersProducer.clone(
151  clusterFilter = "ClusterFilterByAlgoAndSize",
152  min_cluster_size = 2,
153  iteration_label = "algo8"
154  )
155 
156  process.tracksters = trackstersProducer.clone(
157  original_mask = "trackstersMIP",
158  filtered_mask = "filteredLayerClusters:algo8",
159  seeding_regions = "ticlSeedingGlobal",
160  skip_layers = 2,
161  min_layers_per_trackster = 15,
162  min_cos_theta = 0.94, # ~20 degrees
163  min_cos_pointing = 0.7
164  )
165 
166  process.HGCalUncalibRecHit = HGCalUncalibRecHit
167  process.HGCalRecHit = HGCalRecHit
168  process.hgcalMergeLayerClusters = hgcalMergeLayerClusters
169  process.hgcalMultiClusters = hgcalMultiClusters
170  process.TICL_Task = cms.Task(process.HGCalUncalibRecHit,
171  process.HGCalRecHit,
172  process.hgcalMergeLayerClusters,
173  process.filteredLayerClustersMIP,
174  process.ticlLayerTileProducer,
175  process.ticlSeedingGlobal,
176  process.trackstersMIP,
177  process.filteredLayerClusters,
178  process.tracksters,
179  process.hgcalMultiClusters)
180  process.schedule = cms.Schedule(process.raw2digi_step,process.FEVTDEBUGHLToutput_step)
181  process.schedule.associate(process.TICL_Task)
182  return process
183 
def TICL_iterations(process)
TICL_iterations: to be run with local HGCAL reco only i.e.
def TICL_iterations_withReco(process)
withReco: requires full reco of the event to run this part i.e.