CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecoMuonCosmics_cff.py
Go to the documentation of this file.
2 
3 ######################## Cosmic Reco #############################
4 
5 ## Full detector ##
6 
7 # Seed generator
9 
10 # Stand alone muon track producer
12 
13 # Global muon track producer
15 globalCosmicMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5LHCNavigation'
16 
17 # Muon Id producer
19 
20 muons.inputCollectionLabels = ['ctfWithMaterialTracksP5LHCNavigation', 'globalCosmicMuons', 'cosmicMuons']
21 muons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
22 muons.fillIsolation = True
23 muons.fillGlobalTrackQuality = True
24 # need to modify track selection as well (not clear to what)
25 muons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
26 muons.CaloExtractorPSet.CenterConeOnCalIntersection = True
27 
29 calomuons.inputTracks = 'ctfWithMaterialTracksP5LHCNavigation'
30 
31 ## Sequences
32 
33 # Stand Alone Tracking
34 STAmuontrackingforcosmics = cms.Sequence(CosmicMuonSeed*cosmicMuons)
35 # Stand Alone Tracking plus muon ID
36 STAmuonrecoforcosmics = cms.Sequence(STAmuontrackingforcosmics)
37 
38 # Stand Alone Tracking plus global tracking
39 muontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmics*globalCosmicMuons)
40 
41 # Muon Isolation sequence
43 # muisodeposits based on "muons"
44 # we are using copy extractors now
45 
46 # TeV refinement
48 tevMuons.MuonCollectionLabel = "globalCosmicMuons"
49 tevMuons.RefitterParameters.PropDirForCosmics = cms.bool(True)
50 
51 # Glb Track Quality
53 glbTrackQual.InputCollection = "globalCosmicMuons"
54 
55 # all muons id
56 allmuons = cms.Sequence(glbTrackQual*muons*tevMuons*muIsolation*calomuons)
57 
58 # Final sequence
59 muonrecoforcosmics = cms.Sequence(muontrackingforcosmics*allmuons)
60 muonRecoAllGR = cms.Sequence(muonrecoforcosmics)
61 
62 ##############################################
63 
64 ## Barrel only ##
65 
66 # Seed generator
67 CosmicMuonSeedBarrelOnly = CosmicMuonSeed.clone()
68 CosmicMuonSeedBarrelOnly.EnableCSCMeasurement = False
69 
70 # Stand alone muon track producer
71 cosmicMuonsBarrelOnly = cosmicMuons.clone()
72 cosmicMuonsBarrelOnly.TrajectoryBuilderParameters.EnableCSCMeasurement = False
73 cosmicMuonsBarrelOnly.TrajectoryBuilderParameters.MuonNavigationParameters.Endcap = False
74 cosmicMuonsBarrelOnly.MuonSeedCollectionLabel = 'CosmicMuonSeedBarrelOnly'
75 
76 # Global muon track producer
77 globalCosmicMuonsBarrelOnly = globalCosmicMuons.clone()
78 globalCosmicMuonsBarrelOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
79 globalCosmicMuonsBarrelOnly.MuonCollectionLabel = 'cosmicMuonsBarrelOnly'
80 
81 # Muon Id producer
82 muonsBarrelOnly = muons.clone()
83 muonsBarrelOnly.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsBarrelOnly', 'cosmicMuonsBarrelOnly']
84 muonsBarrelOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
85 muonsBarrelOnly.fillIsolation = True
86 muonsBarrelOnly.fillGlobalTrackQuality = False
87 muonsBarrelOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
88 muonsBarrelOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
89 
90 #Sequences
91 
92 # Stand Alone Tracking
93 STAmuontrackingforcosmicsBarrelOnly = cms.Sequence(CosmicMuonSeedBarrelOnly*cosmicMuonsBarrelOnly)
94 
95 # Stand Alone Tracking plus global tracking
96 muontrackingforcosmicsBarrelOnly = cms.Sequence(STAmuontrackingforcosmicsBarrelOnly*globalCosmicMuonsBarrelOnly)
97 
98 # Stand Alone Tracking plus muon ID
99 STAmuonrecoforcosmicsBarrelOnly = cms.Sequence(STAmuontrackingforcosmicsBarrelOnly)
100 
101 # all muons id
102 allmuonsBarrelOnly = cms.Sequence(muonsBarrelOnly)
103 
104 # Final sequence
105 muonrecoforcosmicsBarrelOnly = cms.Sequence(muontrackingforcosmicsBarrelOnly*allmuonsBarrelOnly)
106 
107 ########
108 
109 # 1 leg mode
110 
111 # Stand alone muon track producer
112 cosmicMuons1Leg = cosmicMuons.clone()
113 cosmicMuons1Leg.TrajectoryBuilderParameters.BuildTraversingMuon = True
114 cosmicMuons1Leg.MuonSeedCollectionLabel = 'CosmicMuonSeed'
115 
116 # Global muon track producer
117 globalCosmicMuons1Leg = globalCosmicMuons.clone()
118 globalCosmicMuons1Leg.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
119 globalCosmicMuons1Leg.MuonCollectionLabel = 'cosmicMuons1Leg'
120 
121 # Muon Id producer
122 muons1Leg = muons.clone()
123 muons1Leg.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuons1Leg', 'cosmicMuons1Leg']
124 muons1Leg.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
125 muons1Leg.fillIsolation = False
126 muons1Leg.fillGlobalTrackQuality = False
127 
128 # Sequences
129 
130 # Stand Alone Tracking
131 STAmuontrackingforcosmics1Leg = cms.Sequence(CosmicMuonSeed*cosmicMuons1Leg)
132 
133 # Stand Alone Tracking plus global tracking
134 muontrackingforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg*globalCosmicMuons1Leg)
135 
136 # all muons id
137 allmuons1Leg = cms.Sequence(muons1Leg)
138 
139 # Stand Alone Tracking plus muon ID
140 STAmuonrecoforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg)
141 
142 # Final sequence
143 muonrecoforcosmics1Leg = cms.Sequence(muontrackingforcosmics1Leg*allmuons1Leg)
144 
145 ########
146 
147 # t0 Corrections
148 
149 # Seed generator
150 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone()
151 CosmicMuonSeedWitht0Correction.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
152 
153 # Stand alone muon track producer
154 cosmicMuonsWitht0Correction = cosmicMuons.clone()
155 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.BuildTraversingMuon = False
156 cosmicMuonsWitht0Correction.MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction'
157 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
158 
159 # Global muon track producer
160 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone()
161 globalCosmicMuonsWitht0Correction.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
162 globalCosmicMuonsWitht0Correction.MuonCollectionLabel = 'cosmicMuonsWitht0Correction'
163 
164 # Muon Id producer
165 muonsWitht0Correction = muons.clone()
166 muonsWitht0Correction.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsWitht0Correction', 'cosmicMuonsWitht0Correction']
167 muonsWitht0Correction.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
168 muonsWitht0Correction.fillIsolation = True
169 muonsWitht0Correction.fillGlobalTrackQuality = False
170 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.UseSegmentT0 = True
171 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.DTsegments = 'dt4DSegmentsT0Seg'
172 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.MatchParameters.DTsegments = 'dt4DSegmentsT0Seg'
173 muonsWitht0Correction.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
174 muonsWitht0Correction.CaloExtractorPSet.CenterConeOnCalIntersection = True
175 
176 #Sequences
177 
178 
179 # Stand Alone Tracking
180 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(CosmicMuonSeedWitht0Correction*cosmicMuonsWitht0Correction)
181 
182 # Stand Alone Tracking plus global tracking
183 muontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction*globalCosmicMuonsWitht0Correction)
184 
185 # Stand Alone Tracking plus muon ID
186 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction)
187 
188 # all muons id
189 allmuonsWitht0Correction = cms.Sequence(muonsWitht0Correction)
190 
191 # Final sequence
192 muonrecoforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0Correction*allmuonsWitht0Correction)
193 
194 ### Final sequence for barrel only ###
195 muonRecoBarrelGR = cms.Sequence(muonrecoforcosmicsBarrelOnly+muonrecoforcosmics1Leg+muonrecoforcosmicsWitht0Correction)
196 
197 ##############################################
198 
199 ## Endcaps only ##
200 
201 # Seed generator
202 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone()
203 CosmicMuonSeedEndCapsOnly.EnableDTMeasurement = False
204 
205 # Stand alone muon track producer
206 cosmicMuonsEndCapsOnly = cosmicMuons.clone()
207 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.EnableDTMeasurement = False
208 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.MuonNavigationParameters.Barrel = False
209 cosmicMuonsEndCapsOnly.MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly'
210 
211 # Global muon track producer
212 globalCosmicMuonsEndCapsOnly = globalCosmicMuons.clone()
213 globalCosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
214 globalCosmicMuonsEndCapsOnly.MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
215 
216 # Muon Id producer
217 muonsEndCapsOnly = muons.clone()
218 muonsEndCapsOnly.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsEndCapsOnly', 'cosmicMuonsEndCapsOnly']
219 muonsEndCapsOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
220 muonsEndCapsOnly.fillIsolation = True
221 muonsEndCapsOnly.fillGlobalTrackQuality = False
222 muonsEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
223 muonsEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
224 
225 # Sequences
226 
227 # Stand Alone Tracking
228 STAmuontrackingforcosmicsEnsCapsOnly = cms.Sequence(CosmicMuonSeedEndCapsOnly*cosmicMuonsEndCapsOnly)
229 
230 # Stand Alone Tracking plus global tracking
231 muontrackingforcosmicsEndCapsOnly = cms.Sequence(STAmuontrackingforcosmicsEnsCapsOnly*globalCosmicMuonsEndCapsOnly)
232 
233 # Stand Alone Tracking plus muon ID
234 STAmuonrecoforcosmicsEndCapsOnly = cms.Sequence(STAmuontrackingforcosmicsEnsCapsOnly)
235 
236 # all muons id
237 allmuonsEndCapsOnly = cms.Sequence(muonsEndCapsOnly)
238 
239 # Final sequence
240 muonrecoforcosmicsEndCapsOnly = cms.Sequence(muontrackingforcosmicsEndCapsOnly*allmuonsEndCapsOnly)
241 
242 ########
243 
244 # Beam halo in Encaps only. GLB reco only is needed
245 globalBeamHaloMuonEndCapslOnly = globalCosmicMuonsEndCapsOnly.clone()
246 globalBeamHaloMuonEndCapslOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'beamhaloTracks'
247 
248 # Muon Id producer
249 muonsBeamHaloEndCapsOnly = muons.clone()
250 muonsBeamHaloEndCapsOnly.inputCollectionLabels = ['beamhaloTracks', 'globalBeamHaloMuonEndCapslOnly', 'cosmicMuonsEndCapsOnly']
251 muonsBeamHaloEndCapsOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
252 muonsBeamHaloEndCapsOnly.fillIsolation = True
253 muonsBeamHaloEndCapsOnly.fillGlobalTrackQuality = False
254 muonsBeamHaloEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
255 muonsBeamHaloEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
256 
257 # Sequences
258 muonrecoBeamHaloEndCapsOnly = cms.Sequence(globalBeamHaloMuonEndCapslOnly*muonsBeamHaloEndCapsOnly)
259 
260 ### Final sequence for endcaps only ###
261 muonRecoEndCapsGR = cms.Sequence(muonrecoforcosmicsEndCapsOnly*muonrecoBeamHaloEndCapsOnly)
262 
263 ########
264 
265 ## Full detector but NO RPC ##
266 
267 # Stand alone muon track producer
268 cosmicMuonsNoRPC = cosmicMuons.clone()
269 cosmicMuonsNoRPC.TrajectoryBuilderParameters.EnableRPCMeasurement = False
270 
271 # Global muon track producer
272 globalCosmicMuonsNoRPC = globalCosmicMuons.clone()
273 globalCosmicMuonsNoRPC.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
274 globalCosmicMuonsNoRPC.MuonCollectionLabel = 'cosmicMuonsNoRPC'
275 
276 # Muon Id producer
277 muonsNoRPC = muons.clone()
278 muonsNoRPC.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsNoRPC', 'cosmicMuonsNoRPC']
279 muonsNoRPC.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
280 muonsNoRPC.fillIsolation = True
281 muonsNoRPC.fillGlobalTrackQuality = False
282 muonsNoRPC.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
283 muonsNoRPC.CaloExtractorPSet.CenterConeOnCalIntersection = True
284 
285 #Sequences
286 
287 # Stand Alone Tracking
288 STAmuontrackingforcosmicsNoRPC = cms.Sequence(cosmicMuonsNoRPC)
289 
290 # Stand Alone Tracking plus global tracking
291 muontrackingforcosmicsNoRPC = cms.Sequence(STAmuontrackingforcosmicsNoRPC*globalCosmicMuonsNoRPC)
292 
293 # all muons id
294 allmuonsNoRPC = cms.Sequence(muonsNoRPC)
295 
296 # Final sequence
297 muonrecoforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPC*allmuonsNoRPC)
298 
299 ##############################################
300 
301 ## Split Tracks ##
302 
303 # Global muon track producer
304 globalCosmicSplitMuons = globalCosmicMuons.clone()
305 globalCosmicSplitMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'splittedTracksP5'
306 globalCosmicSplitMuons.MuonCollectionLabel = 'cosmicMuons'
307 
308 # Muon Id producer
309 
310 splitMuons = muons.clone()
311 splitMuons.inputCollectionLabels = ['splittedTracksP5', 'globalCosmicSplitMuons', 'cosmicMuons']
312 splitMuons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
313 splitMuons.fillIsolation = True
314 splitMuons.fillGlobalTrackQuality = False
315 splitMuons.TrackExtractorPSet.inputTrackCollection = 'splittedTracksP5'
316 splitMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
317 
318 #Sequences
319 
320 # Final sequence
321 muonrecoforsplitcosmics = cms.Sequence(globalCosmicSplitMuons*splitMuons)
322 
323 ##############################################
324 
325 ######################## LHC like Reco #############################
326 
327 # Standard reco
329 
330 ## Barrel only ##
331 
332 # Seed generator
333 lhcMuonSeedBarrelOnly = ancientMuonSeed.clone()
334 lhcMuonSeedBarrelOnly.EnableCSCMeasurement = False
335 
336 # Stand alone muon track producer
337 lhcStandAloneMuonsBarrelOnly = standAloneMuons.clone()
338 lhcStandAloneMuonsBarrelOnly.STATrajBuilderParameters.BWFilterParameters.EnableCSCMeasurement = False
339 lhcStandAloneMuonsBarrelOnly.InputObjects = 'lhcMuonSeedBarrelOnly'
340 #lhcStandAloneMuonsBarrelOnly.STATrajBuilderParameters.NavigationType = 'Direct'
341 
342 # Muon Id producer
343 lhcSTAMuonsBarrelOnly = muons.clone()
344 lhcSTAMuonsBarrelOnly.inputCollectionLabels = ['lhcStandAloneMuonsBarrelOnly']
345 lhcSTAMuonsBarrelOnly.inputCollectionTypes = ['outer tracks']
346 lhcSTAMuonsBarrelOnly.fillIsolation = True
347 lhcSTAMuonsBarrelOnly.fillGlobalTrackQuality = False
348 lhcSTAMuonsBarrelOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
349 lhcSTAMuonsBarrelOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
350 
351 # Seqeunces
352 lhcMuonBarrelOnly = cms.Sequence(lhcMuonSeedBarrelOnly*lhcStandAloneMuonsBarrelOnly)
353 
354 # Final sequence
355 muonrecocosmicLHCBarrelOnly = cms.Sequence(lhcMuonBarrelOnly*lhcSTAMuonsBarrelOnly)
356 
357 ##############################################
358 
359 ## Endcaps only ##
360 
361 # Seed generator
362 lhcMuonSeedEndCapsOnly = ancientMuonSeed.clone()
363 lhcMuonSeedEndCapsOnly.EnableDTMeasurement = False
364 
365 # Stand alone muon track producer
366 lhcStandAloneMuonsEndCapsOnly = standAloneMuons.clone()
367 lhcStandAloneMuonsEndCapsOnly.STATrajBuilderParameters.BWFilterParameters.EnableDTMeasurement = False
368 lhcStandAloneMuonsEndCapsOnly.InputObjects = 'lhcMuonSeedEndCapsOnly'
369 #lhcStandAloneMuonsBarrelOnly.STATrajBuilderParameters.NavigationType = 'Direct'
370 
371 # Muon Id producer
372 lhcSTAMuonsEndCapsOnly = muons.clone()
373 lhcSTAMuonsEndCapsOnly.inputCollectionLabels = ['lhcStandAloneMuonsEndCapsOnly']
374 lhcSTAMuonsEndCapsOnly.inputCollectionTypes = ['outer tracks']
375 lhcSTAMuonsEndCapsOnly.fillIsolation = True
376 lhcSTAMuonsEndCapsOnly.fillGlobalTrackQuality = False
377 lhcSTAMuonsEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
378 lhcSTAMuonsEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
379 
380 # Seqeunces
381 lhcMuonEndCapsOnly = cms.Sequence(lhcMuonSeedEndCapsOnly*lhcStandAloneMuonsEndCapsOnly)
382 
383 # Final sequence
384 muonrecocosmicLHCEndCapsOnly = cms.Sequence(lhcMuonEndCapsOnly*lhcSTAMuonsEndCapsOnly)
385 
386 ## Fianl sequence for cosmics a la LHC
387 muonRecoLHC = cms.Sequence(muonrecocosmicLHCBarrelOnly*muonrecocosmicLHCEndCapsOnly)
388 
389 ##############################################
390 
391 
392 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
393 
394 muonRecoGR = cms.Sequence(muonRecoAllGR*muonRecoBarrelGR*muonRecoEndCapsGR*muonrecoforcosmicsNoRPC*muonrecoforsplitcosmics*muonRecoLHC)
395 
396 #######################################################################################################################
397 
398 
399 
400 
401