CMS 3D CMS Logo

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.hgcalLayerClusters_cff import hgcalLayerClusters
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.multiClustersFromTrackstersProducer_cfi import multiClustersFromTrackstersProducer
18 from RecoHGCal.TICL.ticlCandidateFromTrackstersProducer_cfi import ticlCandidateFromTrackstersProducer
19 from RecoHGCal.TICL.pfTICLProducer_cfi import pfTICLProducer
20 from Validation.HGCalValidation.ticlPFValidationDefault_cfi import ticlPFValidationDefault as ticlPFValidation
21 
22 
25  process.FEVTDEBUGHLTEventContent.outputCommands.extend(['keep *_multiClustersFromTracksters*_*_*',
26  'keep *_ticlCandidateFromTrackstersProducer*_*_*',
27  'keep *_pfTICLProducer*_*_*'])
28 
29  process.ticlLayerTileProducer = ticlLayerTileProducer.clone()
30 
31  process.ticlSeedingTrk = ticlSeedingRegionProducer.clone(
32  algoId = 1
33  )
34 
35  process.filteredLayerClustersTrk = filteredLayerClustersProducer.clone(
36  clusterFilter = "ClusterFilterByAlgo",
37  algo_number = 8,
38  iteration_label = "Trk"
39  )
40 
41  process.trackstersTrk = trackstersProducer.clone(
42  filtered_mask = "filteredLayerClustersTrk:Trk",
43  seeding_regions = "ticlSeedingTrk",
44  skip_layers = 3,
45  min_layers_per_trackster = 5,
46  min_cos_theta = 0.99, # ~10 degrees
47  min_cos_pointing = 0.9
48  )
49 
50  process.multiClustersFromTrackstersTrk = multiClustersFromTrackstersProducer.clone(
51  label = "TrkMultiClustersFromTracksterByCA",
52  Tracksters = "trackstersTrk"
53  )
54 
55  process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
56  algoId = 2
57  )
58 
59  process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
60  clusterFilter = "ClusterFilterBySize",
61  algo_number = 8,
62  max_cluster_size = 2, # inclusive
63  iteration_label = "MIP"
64  )
65 
66  process.trackstersMIP = trackstersProducer.clone(
67  filtered_mask = "filteredLayerClustersMIP:MIP",
68  seeding_regions = "ticlSeedingGlobal",
69  skip_layers = 3,
70  min_layers_per_trackster = 15,
71  min_cos_theta = 0.99, # ~10 degrees
72  min_cos_pointing = 0.9,
73  out_in_dfs = False,
74  )
75 
76  process.multiClustersFromTrackstersMIP = multiClustersFromTrackstersProducer.clone(
77  label = "MIPMultiClustersFromTracksterByCA",
78  Tracksters = "trackstersMIP"
79  )
80 
81  process.filteredLayerClusters = filteredLayerClustersProducer.clone(
82  clusterFilter = "ClusterFilterByAlgoAndSize",
83  min_cluster_size = 2,
84  algo_number = 8,
85  iteration_label = "algo8",
86  LayerClustersInputMask = "trackstersMIP"
87  )
88 
89  process.trackstersEM = trackstersProducer.clone(
90  max_out_in_hops = 4,
91  original_mask = "trackstersMIP",
92  filtered_mask = "filteredLayerClusters:algo8",
93  seeding_regions = "ticlSeedingGlobal",
94  skip_layers = 1,
95  min_layers_per_trackster = 10,
96  min_cos_theta = 0.984, # ~10 degrees
97  min_cos_pointing = 0.9 # ~26 degrees
98  )
99 
100  process.multiClustersFromTrackstersEM = multiClustersFromTrackstersProducer.clone(
101  Tracksters = "trackstersEM"
102  )
103 
104 
105  process.trackstersHAD = trackstersProducer.clone(
106  filtered_mask = "filteredLayerClusters:algo8",
107  seeding_regions = "ticlSeedingGlobal",
108  skip_layers = 2,
109  min_layers_per_trackster = 10,
110  min_cos_theta = 0.8,
111  min_cos_pointing = 0.7
112  )
113 
114  process.multiClustersFromTrackstersHAD = multiClustersFromTrackstersProducer.clone(
115  Tracksters = "trackstersHAD"
116  )
117 
118  process.ticlCandidateFromTrackstersProducer = ticlCandidateFromTrackstersProducer.clone()
119 
120  process.pfTICLProducer = pfTICLProducer.clone()
121 
122  process.hgcalMultiClusters = hgcalMultiClusters
123  process.TICL_Task = cms.Task(
124  process.ticlLayerTileProducer,
125  process.ticlSeedingTrk,
126  process.filteredLayerClustersTrk,
127  process.trackstersTrk,
128  process.multiClustersFromTrackstersTrk,
129  process.ticlSeedingGlobal,
130  process.filteredLayerClustersMIP,
131  process.trackstersMIP,
132  process.multiClustersFromTrackstersMIP,
133  process.filteredLayerClusters,
134  process.trackstersEM,
135  process.multiClustersFromTrackstersEM,
136  process.trackstersHAD,
137  process.multiClustersFromTrackstersHAD,
138  process.ticlCandidateFromTrackstersProducer,
139  process.pfTICLProducer)
140 
141  process.schedule.associate(process.TICL_Task)
142 
143  process.ticlPFValidation = ticlPFValidation
144  process.hgcalValidation.insert(-1, process.ticlPFValidation)
145 
146  if getattr(process,'hgcalValidator'):
147  process.hgcalValidator.label_lcl = "hgcalLayerClusters"
148  process.hgcalValidator.label_mcl = ["multiClustersFromTrackstersEM:MultiClustersFromTracksterByCA", "multiClustersFromTrackstersHAD:MultiClustersFromTracksterByCA"]
149  process.hgcalValidator.domulticlustersPlots = True
150 
151  return process
152 
153 
154 
156 def TICL_iterations(process):
157  process.FEVTDEBUGHLTEventContent.outputCommands.extend(['keep *_multiClustersFromTracksters*_*_*'])
158 
159  process.ticlLayerTileProducer = ticlLayerTileProducer.clone()
160 
161  process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
162  algoId = 2
163  )
164 
165  process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
166  clusterFilter = "ClusterFilterBySize",
167  algo_number = 8,
168  max_cluster_size = 2, # inclusive
169  iteration_label = "MIP"
170  )
171 
172  process.trackstersMIP = trackstersProducer.clone(
173  filtered_mask = "filteredLayerClustersMIP:MIP",
174  seeding_regions = "ticlSeedingGlobal",
175  skip_layers = 3,
176  min_layers_per_trackster = 15,
177  min_cos_theta = 0.99, # ~10 degrees
178  )
179 
180  process.multiClustersFromTrackstersMIP = multiClustersFromTrackstersProducer.clone(
181  label = "MIPMultiClustersFromTracksterByCA",
182  Tracksters = "trackstersMIP"
183  )
184 
185  process.filteredLayerClusters = filteredLayerClustersProducer.clone(
186  clusterFilter = "ClusterFilterByAlgoAndSize",
187  min_cluster_size = 2,
188  algo_number = 8,
189  iteration_label = "algo8"
190  )
191 
192  process.tracksters = trackstersProducer.clone(
193  original_mask = "trackstersMIP",
194  filtered_mask = "filteredLayerClusters:algo8",
195  seeding_regions = "ticlSeedingGlobal",
196  skip_layers = 2,
197  min_layers_per_trackster = 15,
198  min_cos_theta = 0.94, # ~20 degrees
199  min_cos_pointing = 0.7
200  )
201 
202  process.multiClustersFromTracksters = multiClustersFromTrackstersProducer.clone(
203  Tracksters = "tracksters"
204  )
205 
206  process.HGCalUncalibRecHit = HGCalUncalibRecHit
207  process.HGCalRecHit = HGCalRecHit
208  process.hgcalLayerClusters = hgcalLayerClusters
209  process.hgcalMultiClusters = hgcalMultiClusters
210  process.TICL_Task = cms.Task(process.HGCalUncalibRecHit,
211  process.HGCalRecHit,
212  process.hgcalLayerClusters,
213  process.filteredLayerClustersMIP,
214  process.ticlLayerTileProducer,
215  process.ticlSeedingGlobal,
216  process.trackstersMIP,
217  process.multiClustersFromTrackstersMIP,
218  process.filteredLayerClusters,
219  process.tracksters,
220  process.multiClustersFromTracksters,
221  process.hgcalMultiClusters)
222  process.schedule = cms.Schedule(process.raw2digi_step,process.FEVTDEBUGHLToutput_step)
223  process.schedule.associate(process.TICL_Task)
224  return process
225 
particleFlowClusterHGC_cfi
ticl_iterations.TICL_iterations
def TICL_iterations(process)
TICL_iterations: to be run with local HGCAL reco only i.e.
Definition: ticl_iterations.py:156
particleFlowRecHitHGC_cff
HGCalRecHit_cfi
ticl_iterations.TICL_iterations_withReco
def TICL_iterations_withReco(process)
withReco: requires full reco of the event to run this part i.e.
Definition: ticl_iterations.py:24
hgcalMultiClusters_cfi
HGCalUncalibRecHit_cfi