CMS 3D CMS Logo

RecoMuonCosmics_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 
5 
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 = muons1stStep.clone(
21  inputCollectionLabels = ['ctfWithMaterialTracksP5LHCNavigation',
22  'globalCosmicMuons',
23  'cosmicMuons',
24  'tevMuons:firstHit',
25  'tevMuons:picky',
26  'tevMuons:dyt'],
27 
28  inputCollectionTypes = ['inner tracks',
29  'links',
30  'outer tracks',
31  'tev firstHit',
32  'tev picky',
33  'tev dyt'],
34  fillIsolation = True,
35  fillGlobalTrackQuality = True,
36  # need to modify track selection as well (not clear to what)
37  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'),
38  # set wide cone until the code is made to compute this wrt CalIntersection
39  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0),
40  TimingFillerParameters = dict(
41  DTTimingParameters = dict(PruneCut = 9999),
42  CSCTimingParameters = dict(PruneCut = 9999))
43 )
44 
45 #similar to what's in pp configuration
46 muonsFromCosmics = muons1stStep.clone(
47  inputCollectionLabels = ['cosmicMuons'],
48  inputCollectionTypes = ['outer tracks'],
49  fillIsolation = False,
50  fillGlobalTrackQuality = False,
51  fillGlobalTrackRefits = False,
52  TrackExtractorPSet = dict(inputTrackCollection = 'cosmicMuons'),
53  TimingFillerParameters = dict(
54  DTTimingParameters = dict(PruneCut = 9999),
55  CSCTimingParameters = dict(PruneCut = 9999))
56 )
57 
58 
60 STAmuontrackingforcosmicsTask = cms.Task(CosmicMuonSeed,cosmicMuons)
61 STAmuontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmicsTask)
62 
63 # Stand Alone Tracking plus global tracking
64 muontrackingforcosmicsTask = cms.Task(STAmuontrackingforcosmicsTask,globalCosmicMuons)
65 muontrackingforcosmics = cms.Sequence(muontrackingforcosmicsTask)
66 
67 # Muon Isolation sequence
69 # muisodeposits based on "muons"
70 # we are using copy extractors now
71 muIsoDepositTk.inputTags = ['muons:tracker']
72 muIsoDepositJets.inputTags = ['muons:jets']
73 muIsoDepositCalByAssociatorTowers.inputTags = ['muons:ecal', 'muons:hcal', 'muons:ho']
74 muIsoDepositCalByAssociatorHits.inputTags = ['muons:ecal', 'muons:hcal', 'muons:ho']
75 
76 # TeV refinement
78 tevMuons.MuonCollectionLabel = 'globalCosmicMuons'
79 tevMuons.RefitterParameters.PropDirForCosmics = True
80 
81 # Glb Track Quality
83 glbTrackQual.InputCollection = 'globalCosmicMuons'
84 
85 # all muons id
86 allmuonsTask = cms.Task(glbTrackQual,
87  tevMuons,
88  muons,
89  muIsolationTask)
90 allmuons = cms.Sequence(allmuonsTask)
91 
92 # Final sequence
93 muonrecoforcosmicsTask = cms.Task(muontrackingforcosmicsTask,
94  allmuonsTask,
95  muonsFromCosmics)
96 muonrecoforcosmics = cms.Sequence(muonrecoforcosmicsTask)
97 
98 # 1 leg mode
99 # Stand alone muon track producer
100 cosmicMuons1Leg = cosmicMuons.clone(
101  MuonSeedCollectionLabel = 'CosmicMuonSeed',
102  TrajectoryBuilderParameters = dict(BuildTraversingMuon = True)
103 )
104 
105 # Global muon track producer
106 globalCosmicMuons1Leg = globalCosmicMuons.clone(
107  MuonCollectionLabel = 'cosmicMuons1Leg',
108  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
109 )
110 
111 # Muon Id producer
112 muons1Leg = muons1stStep.clone(
113  inputCollectionLabels = ['ctfWithMaterialTracksP5',
114  'globalCosmicMuons1Leg',
115  'cosmicMuons1Leg'],
116  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
117  fillIsolation = False,
118  fillGlobalTrackQuality = False,
119  fillGlobalTrackRefits = False,
120  TimingFillerParameters = dict(
121  DTTimingParameters = dict(PruneCut = 9999),
122  CSCTimingParameters = dict(PruneCut = 9999))
123 )
124 
125 # Sequences
126 # Stand Alone Tracking
127 STAmuontrackingforcosmics1LegTask = cms.Task(CosmicMuonSeed,cosmicMuons1Leg)
128 
129 # Stand Alone Tracking plus global tracking
130 muontrackingforcosmics1LegTask = cms.Task(STAmuontrackingforcosmics1LegTask, globalCosmicMuons1Leg)
131 
132 # Final sequence
133 muonrecoforcosmics1LegTask = cms.Task(muontrackingforcosmics1LegTask,muons1Leg)
134 
135 
136 
137 # t0 Corrections
138 
139 # Seed generator
140 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone(
141  DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
142 )
143 
144 # Stand alone muon track producer
145 cosmicMuonsWitht0Correction = cosmicMuons.clone(
146  MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction',
147  TrajectoryBuilderParameters = dict(BuildTraversingMuon = False, DTRecSegmentLabel = 'dt4DSegmentsT0Seg')
148 )
149 
150 # Global muon track producer
151 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone(
152  MuonCollectionLabel = 'cosmicMuonsWitht0Correction',
153  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
154 )
155 
156 # Muon Id producer
157 muonsWitht0Correction = muons1stStep.clone(
158  inputCollectionLabels = ['ctfWithMaterialTracksP5',
159  'globalCosmicMuonsWitht0Correction',
160  'cosmicMuonsWitht0Correction'],
161  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
162  fillIsolation = True,
163  fillGlobalTrackQuality = False,
164  fillGlobalTrackRefits = False,
165  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
166  # set wide cone until the code is made to compute this wrt CalIntersection
167  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0),
168  TimingFillerParameters = dict(
169  DTTimingParameters = dict(UseSegmentT0 = True),
170  MatchParameters = dict(DTsegments = 'dt4DSegmentsT0Seg'))
171 )
172 
173 #Sequences
174 # Stand Alone Tracking
175 STAmuontrackingforcosmicsWitht0CorrectionTask = cms.Task(CosmicMuonSeedWitht0Correction,cosmicMuonsWitht0Correction)
176 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
177 
178 # Stand Alone Tracking plus global tracking
179 muontrackingforcosmicsWitht0CorrectionTask = cms.Task(STAmuontrackingforcosmicsWitht0CorrectionTask,globalCosmicMuonsWitht0Correction)
180 muontrackingforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0CorrectionTask)
181 
182 # Stand Alone Tracking plus muon ID
183 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
184 
185 # Final sequence
186 muonrecoforcosmicsWitht0CorrectionTask = cms.Task(muontrackingforcosmicsWitht0CorrectionTask,muonsWitht0Correction)
187 muonrecoforcosmicsWitht0Correction = cms.Sequence(muonrecoforcosmicsWitht0CorrectionTask)
188 
189 
190 muonRecoGRTask = cms.Task(muonrecoforcosmics1LegTask,muonrecoforcosmicsWitht0CorrectionTask)
191 muonRecoGR = cms.Sequence(muonRecoGRTask)
192 
193 
194 
195 # Beam halo in Encaps only. GLB reco only is needed
196 
197 # Seed generator
198 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone(
199  EnableDTMeasurement = False
200 )
201 
202 # Stand alone muon track producer
203 cosmicMuonsEndCapsOnly = cosmicMuons.clone(
204  MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly',
205  TrajectoryBuilderParameters = dict(
206  EnableDTMeasurement = False,
207  MuonNavigationParameters = dict(Barrel = False))
208 )
209 
210 # Global muon track producer
211 globalBeamHaloMuonEndCapslOnly = globalCosmicMuons.clone(
212  MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
213 )
214 
215 # Muon Id producer
216 muonsBeamHaloEndCapsOnly = muons1stStep.clone(
217  inputCollectionLabels = ['beamhaloTracks',
218  'globalBeamHaloMuonEndCapslOnly',
219  'cosmicMuonsEndCapsOnly'],
220  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
221  fillIsolation = True,
222  fillGlobalTrackQuality = False,
223  fillGlobalTrackRefits = False,
224  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
225  # set wide cone until the code is made to compute this wrt CalIntersection
226  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
227 )
228 
229 # Sequences
230 muonrecoBeamHaloEndCapsOnlyTask = cms.Task(CosmicMuonSeedEndCapsOnly,
231  cosmicMuonsEndCapsOnly,
232  globalBeamHaloMuonEndCapslOnly,
233  muonsBeamHaloEndCapsOnly)
234 muonrecoBeamHaloEndCapsOnly = cms.Sequence(muonrecoBeamHaloEndCapsOnlyTask)
235 
236 
237 
238 
239 
240 # Stand alone muon track producer
241 cosmicMuonsNoRPC = cosmicMuons.clone(
242  TrajectoryBuilderParameters = dict(EnableRPCMeasurement = False)
243 )
244 
245 # Global muon track producer
246 globalCosmicMuonsNoRPC = globalCosmicMuons.clone(
247  MuonCollectionLabel = 'cosmicMuonsNoRPC',
248  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
249 )
250 
251 # Muon Id producer
252 muonsNoRPC = muons1stStep.clone(
253  inputCollectionLabels = ['ctfWithMaterialTracksP5',
254  'globalCosmicMuonsNoRPC',
255  'cosmicMuonsNoRPC'],
256  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
257  fillIsolation = True,
258  fillGlobalTrackQuality = False,
259  fillGlobalTrackRefits = False,
260  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
261  # set wide cone until the code is made to compute this wrt CalIntersection
262  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
263 )
264 
265 #Sequences
266 
267 # Stand Alone Tracking plus global tracking
268 muontrackingforcosmicsNoRPCTask = cms.Task(cosmicMuonsNoRPC,globalCosmicMuonsNoRPC)
269 muontrackingforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPCTask)
270 
271 # Final sequence
272 muonrecoforcosmicsNoRPCTask = cms.Task(muontrackingforcosmicsNoRPCTask,muonsNoRPC)
273 muonrecoforcosmicsNoRPC = cms.Sequence(muonrecoforcosmicsNoRPCTask)
274 
275 
276 
277 
278 
279 # Global muon track producer
280 globalCosmicSplitMuons = globalCosmicMuons.clone(
281  MuonCollectionLabel = 'cosmicMuons',
282  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'splittedTracksP5')
283 )
284 
285 # Muon Id producer
286 splitMuons = muons1stStep.clone(
287  inputCollectionLabels = ['splittedTracksP5',
288  'globalCosmicSplitMuons',
289  'cosmicMuons'],
290  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
291  fillIsolation = True,
292  fillGlobalTrackQuality = False,
293  fillGlobalTrackRefits = False,
294  TrackExtractorPSet = dict(inputTrackCollection = 'splittedTracksP5'),
295  # set wide cone until the code is made to compute this wrt CalIntersection
296  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
297 )
298 
299 #Sequences
300 
301 # Final sequence
302 muonrecoforsplitcosmicsTask = cms.Task(globalCosmicSplitMuons,splitMuons)
303 muonrecoforsplitcosmics = cms.Sequence(muonrecoforsplitcosmicsTask)
304 
305 
306 
307 
308 
309 # Standard reco
311 
312 # Muon Id producer
313 lhcSTAMuons = muons1stStep.clone(
314  inputCollectionLabels = ['standAloneMuons'],
315  inputCollectionTypes = ['outer tracks'],
316  fillIsolation = True,
317  fillGlobalTrackQuality = False,
318  fillGlobalTrackRefits = False,
319  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'),
320  # set wide cone until the code is made to compute this wrt CalIntersection
321  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
322 )
323 
324 # Final sequence
325 muonRecoLHCTask = cms.Task(ancientMuonSeed,
326  standAloneMuons,
327  lhcSTAMuons)
328 muonRecoLHC = cms.Sequence(muonRecoLHCTask)
329 
330 
331 muonRecoGRTask = cms.Task(muonrecoforcosmicsTask,
332  muonRecoGRTask,
333  muonrecoBeamHaloEndCapsOnlyTask,
334  muonrecoforcosmicsNoRPCTask,
335  muonrecoforsplitcosmicsTask,
336  muonRecoLHCTask)
337 muonRecoGR = cms.Sequence(muonRecoGRTask)
338