CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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.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.ticlCandidateFromTrackstersProducer_cfi import ticlCandidateFromTrackstersProducer
18 from RecoHGCal.TICL.pfTICLProducer_cfi import pfTICLProducer
19 from Validation.HGCalValidation.ticlPFValidationDefault_cfi import ticlPFValidationDefault as ticlPFValidation
20 
21 ## withReco: requires full reco of the event to run this part
22 ## i.e. collections of generalTracks can be accessed
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  algo_number = 8,
37  iteration_label = "Trk"
38  )
39 
40  process.trackstersTrk = trackstersProducer.clone(
41  filtered_mask = "filteredLayerClustersTrk:Trk",
42  seeding_regions = "ticlSeedingTrk",
43  skip_layers = 3,
44  min_layers_per_trackster = 5,
45  min_cos_theta = 0.99, # ~10 degrees
46  min_cos_pointing = 0.9
47  )
48 
49  process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
50  algoId = 2
51  )
52 
53  process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
54  clusterFilter = "ClusterFilterBySize",
55  algo_number = 8,
56  max_cluster_size = 2, # inclusive
57  iteration_label = "MIP"
58  )
59 
60  process.trackstersMIP = trackstersProducer.clone(
61  filtered_mask = "filteredLayerClustersMIP:MIP",
62  seeding_regions = "ticlSeedingGlobal",
63  skip_layers = 3,
64  min_layers_per_trackster = 15,
65  min_cos_theta = 0.99, # ~10 degrees
66  min_cos_pointing = 0.9,
67  out_in_dfs = False,
68  )
69 
70  process.filteredLayerClusters = filteredLayerClustersProducer.clone(
71  clusterFilter = "ClusterFilterByAlgoAndSize",
72  min_cluster_size = 2,
73  algo_number = 8,
74  iteration_label = "algo8",
75  LayerClustersInputMask = "trackstersMIP"
76  )
77 
78  process.trackstersEM = trackstersProducer.clone(
79  max_out_in_hops = 4,
80  original_mask = "trackstersMIP",
81  filtered_mask = "filteredLayerClusters:algo8",
82  seeding_regions = "ticlSeedingGlobal",
83  skip_layers = 1,
84  min_layers_per_trackster = 10,
85  min_cos_theta = 0.984, # ~10 degrees
86  min_cos_pointing = 0.9 # ~26 degrees
87  )
88 
89  process.trackstersHAD = trackstersProducer.clone(
90  filtered_mask = "filteredLayerClusters:algo8",
91  seeding_regions = "ticlSeedingGlobal",
92  skip_layers = 2,
93  min_layers_per_trackster = 10,
94  min_cos_theta = 0.8,
95  min_cos_pointing = 0.7
96  )
97 
98  process.ticlCandidateFromTrackstersProducer = ticlCandidateFromTrackstersProducer.clone()
99 
100  process.pfTICLProducer = pfTICLProducer.clone()
101 
102  process.hgcalMultiClusters = hgcalMultiClusters
103  process.TICL_Task = cms.Task(
104  process.ticlLayerTileProducer,
105  process.ticlSeedingTrk,
106  process.filteredLayerClustersTrk,
107  process.trackstersTrk,
108  process.ticlSeedingGlobal,
109  process.filteredLayerClustersMIP,
110  process.trackstersMIP,
111  process.filteredLayerClusters,
112  process.trackstersEM,
113  process.trackstersHAD,
114  process.ticlCandidateFromTrackstersProducer,
115  process.pfTICLProducer)
116 
117  process.schedule.associate(process.TICL_Task)
118 
119  process.ticlPFValidation = ticlPFValidation
120  process.hgcalValidation.insert(-1, process.ticlPFValidation)
121 
122  if getattr(process,'hgcalValidator'):
123  process.hgcalValidator.label_lcl = "hgcalLayerClusters"
124  process.hgcalValidator.label_mcl = ["multiClustersFromTrackstersEM:MultiClustersFromTracksterByCA", "multiClustersFromTrackstersHAD:MultiClustersFromTracksterByCA"]
125  process.hgcalValidator.domulticlustersPlots = True
126 
127  return process
128 
129 
130 ## TICL_iterations: to be run with local HGCAL reco only
131 ## i.e. collections of generalTracks (track-seeded iteration) NOT available
132 def TICL_iterations(process):
133  process.ticlLayerTileProducer = ticlLayerTileProducer.clone()
134 
135  process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
136  algoId = 2
137  )
138 
139  process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
140  clusterFilter = "ClusterFilterBySize",
141  algo_number = 8,
142  max_cluster_size = 2, # inclusive
143  iteration_label = "MIP"
144  )
145 
146  process.trackstersMIP = trackstersProducer.clone(
147  filtered_mask = "filteredLayerClustersMIP:MIP",
148  seeding_regions = "ticlSeedingGlobal",
149  skip_layers = 3,
150  min_layers_per_trackster = 15,
151  min_cos_theta = 0.99, # ~10 degrees
152  )
153 
154  process.filteredLayerClusters = filteredLayerClustersProducer.clone(
155  clusterFilter = "ClusterFilterByAlgoAndSize",
156  min_cluster_size = 2,
157  algo_number = 8,
158  iteration_label = "algo8"
159  )
160 
161  process.tracksters = trackstersProducer.clone(
162  original_mask = "trackstersMIP",
163  filtered_mask = "filteredLayerClusters:algo8",
164  seeding_regions = "ticlSeedingGlobal",
165  skip_layers = 2,
166  min_layers_per_trackster = 15,
167  min_cos_theta = 0.94, # ~20 degrees
168  min_cos_pointing = 0.7
169  )
170 
171  process.HGCalUncalibRecHit = HGCalUncalibRecHit
172  process.HGCalRecHit = HGCalRecHit
173  process.hgcalLayerClusters = hgcalLayerClusters
174  process.hgcalMultiClusters = hgcalMultiClusters
175  process.TICL_Task = cms.Task(process.HGCalUncalibRecHit,
176  process.HGCalRecHit,
177  process.hgcalLayerClusters,
178  process.filteredLayerClustersMIP,
179  process.ticlLayerTileProducer,
180  process.ticlSeedingGlobal,
181  process.trackstersMIP,
182  process.filteredLayerClusters,
183  process.tracksters,
184  process.hgcalMultiClusters)
185  process.schedule = cms.Schedule(process.raw2digi_step,process.FEVTDEBUGHLToutput_step)
186  process.schedule.associate(process.TICL_Task)
187  return process
188 
def TICL_iterations_withReco
withReco: requires full reco of the event to run this part i.e.
def TICL_iterations
TICL_iterations: to be run with local HGCAL reco only i.e.