CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RecoMuonCosmics_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
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 = 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 ## Sequences
59 # Stand Alone Tracking
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 
75 # TeV refinement
77 tevMuons.MuonCollectionLabel = 'globalCosmicMuons'
78 tevMuons.RefitterParameters.PropDirForCosmics = True
79 
80 # Glb Track Quality
82 glbTrackQual.InputCollection = 'globalCosmicMuons'
83 
84 # all muons id
85 allmuonsTask = cms.Task(glbTrackQual,
86  tevMuons,
87  muons,
88  muIsolationTask)
89 allmuons = cms.Sequence(allmuonsTask)
90 
91 # Final sequence
92 muonrecoforcosmicsTask = cms.Task(muontrackingforcosmicsTask,
93  allmuonsTask,
94  muonsFromCosmics)
95 muonrecoforcosmics = cms.Sequence(muonrecoforcosmicsTask)
96 
97 # 1 leg mode
98 # Stand alone muon track producer
99 cosmicMuons1Leg = cosmicMuons.clone(
100  MuonSeedCollectionLabel = 'CosmicMuonSeed',
101  TrajectoryBuilderParameters = dict(BuildTraversingMuon = True)
102 )
103 
104 # Global muon track producer
105 globalCosmicMuons1Leg = globalCosmicMuons.clone(
106  MuonCollectionLabel = 'cosmicMuons1Leg',
107  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
108 )
109 
110 # Muon Id producer
111 muons1Leg = muons1stStep.clone(
112  inputCollectionLabels = ['ctfWithMaterialTracksP5',
113  'globalCosmicMuons1Leg',
114  'cosmicMuons1Leg'],
115  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
116  fillIsolation = False,
117  fillGlobalTrackQuality = False,
118  fillGlobalTrackRefits = False,
119  TimingFillerParameters = dict(
120  DTTimingParameters = dict(PruneCut = 9999),
121  CSCTimingParameters = dict(PruneCut = 9999))
122 )
123 
124 # Sequences
125 # Stand Alone Tracking
126 STAmuontrackingforcosmics1LegTask = cms.Task(CosmicMuonSeed,cosmicMuons1Leg)
127 
128 # Stand Alone Tracking plus global tracking
129 muontrackingforcosmics1LegTask = cms.Task(STAmuontrackingforcosmics1LegTask, globalCosmicMuons1Leg)
130 
131 # Final sequence
132 muonrecoforcosmics1LegTask = cms.Task(muontrackingforcosmics1LegTask,muons1Leg)
133 
134 #####################################################
135 
136 # t0 Corrections
137 
138 # Seed generator
139 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone(
140  DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
141 )
142 
143 # Stand alone muon track producer
144 cosmicMuonsWitht0Correction = cosmicMuons.clone(
145  MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction',
146  TrajectoryBuilderParameters = dict(BuildTraversingMuon = False, DTRecSegmentLabel = 'dt4DSegmentsT0Seg')
147 )
148 
149 # Global muon track producer
150 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone(
151  MuonCollectionLabel = 'cosmicMuonsWitht0Correction',
152  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
153 )
154 
155 # Muon Id producer
156 muonsWitht0Correction = muons1stStep.clone(
157  inputCollectionLabels = ['ctfWithMaterialTracksP5',
158  'globalCosmicMuonsWitht0Correction',
159  'cosmicMuonsWitht0Correction'],
160  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
161  fillIsolation = True,
162  fillGlobalTrackQuality = False,
163  fillGlobalTrackRefits = False,
164  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
165  # set wide cone until the code is made to compute this wrt CalIntersection
166  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0),
167  TimingFillerParameters = dict(
168  DTTimingParameters = dict(UseSegmentT0 = True),
169  MatchParameters = dict(DTsegments = 'dt4DSegmentsT0Seg'))
170 )
171 
172 #Sequences
173 # Stand Alone Tracking
174 STAmuontrackingforcosmicsWitht0CorrectionTask = cms.Task(CosmicMuonSeedWitht0Correction,cosmicMuonsWitht0Correction)
175 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
176 
177 # Stand Alone Tracking plus global tracking
178 muontrackingforcosmicsWitht0CorrectionTask = cms.Task(STAmuontrackingforcosmicsWitht0CorrectionTask,globalCosmicMuonsWitht0Correction)
179 muontrackingforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0CorrectionTask)
180 
181 # Stand Alone Tracking plus muon ID
182 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0CorrectionTask)
183 
184 # Final sequence
185 muonrecoforcosmicsWitht0CorrectionTask = cms.Task(muontrackingforcosmicsWitht0CorrectionTask,muonsWitht0Correction)
186 muonrecoforcosmicsWitht0Correction = cms.Sequence(muonrecoforcosmicsWitht0CorrectionTask)
187 
188 ### Final sequence ###
189 muonRecoGRTask = cms.Task(muonrecoforcosmics1LegTask,muonrecoforcosmicsWitht0CorrectionTask)
190 muonRecoGR = cms.Sequence(muonRecoGRTask)
191 
192 #####################################################
193 
194 # Beam halo in Encaps only. GLB reco only is needed
195 
196 # Seed generator
197 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone(
198  EnableDTMeasurement = False
199 )
200 
201 # Stand alone muon track producer
202 cosmicMuonsEndCapsOnly = cosmicMuons.clone(
203  MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly',
204  TrajectoryBuilderParameters = dict(
205  EnableDTMeasurement = False,
206  MuonNavigationParameters = dict(Barrel = False))
207 )
208 
209 # Global muon track producer
210 globalBeamHaloMuonEndCapslOnly = globalCosmicMuons.clone(
211  MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
212 )
213 
214 # Muon Id producer
215 muonsBeamHaloEndCapsOnly = muons1stStep.clone(
216  inputCollectionLabels = ['beamhaloTracks',
217  'globalBeamHaloMuonEndCapslOnly',
218  'cosmicMuonsEndCapsOnly'],
219  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
220  fillIsolation = True,
221  fillGlobalTrackQuality = False,
222  fillGlobalTrackRefits = False,
223  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
224  # set wide cone until the code is made to compute this wrt CalIntersection
225  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
226 )
227 
228 # Sequences
229 muonrecoBeamHaloEndCapsOnlyTask = cms.Task(CosmicMuonSeedEndCapsOnly,
230  cosmicMuonsEndCapsOnly,
231  globalBeamHaloMuonEndCapslOnly,
232  muonsBeamHaloEndCapsOnly)
233 muonrecoBeamHaloEndCapsOnly = cms.Sequence(muonrecoBeamHaloEndCapsOnlyTask)
234 
235 ########
236 
237 ## Full detector but NO RPC ##
238 
239 # Stand alone muon track producer
240 cosmicMuonsNoRPC = cosmicMuons.clone(
241  TrajectoryBuilderParameters = dict(EnableRPCMeasurement = False)
242 )
243 
244 # Global muon track producer
245 globalCosmicMuonsNoRPC = globalCosmicMuons.clone(
246  MuonCollectionLabel = 'cosmicMuonsNoRPC',
247  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'ctfWithMaterialTracksP5')
248 )
249 
250 # Muon Id producer
251 muonsNoRPC = muons1stStep.clone(
252  inputCollectionLabels = ['ctfWithMaterialTracksP5',
253  'globalCosmicMuonsNoRPC',
254  'cosmicMuonsNoRPC'],
255  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
256  fillIsolation = True,
257  fillGlobalTrackQuality = False,
258  fillGlobalTrackRefits = False,
259  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5'),
260  # set wide cone until the code is made to compute this wrt CalIntersection
261  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
262 )
263 
264 #Sequences
265 
266 # Stand Alone Tracking plus global tracking
267 muontrackingforcosmicsNoRPCTask = cms.Task(cosmicMuonsNoRPC,globalCosmicMuonsNoRPC)
268 muontrackingforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPCTask)
269 
270 # Final sequence
271 muonrecoforcosmicsNoRPCTask = cms.Task(muontrackingforcosmicsNoRPCTask,muonsNoRPC)
272 muonrecoforcosmicsNoRPC = cms.Sequence(muonrecoforcosmicsNoRPCTask)
273 
274 ##############################################
275 
276 ## Split Tracks ##
277 
278 # Global muon track producer
279 globalCosmicSplitMuons = globalCosmicMuons.clone(
280  MuonCollectionLabel = 'cosmicMuons',
281  TrajectoryBuilderParameters = dict(TkTrackCollectionLabel = 'splittedTracksP5')
282 )
283 
284 # Muon Id producer
285 splitMuons = muons1stStep.clone(
286  inputCollectionLabels = ['splittedTracksP5',
287  'globalCosmicSplitMuons',
288  'cosmicMuons'],
289  inputCollectionTypes = ['inner tracks', 'links', 'outer tracks'],
290  fillIsolation = True,
291  fillGlobalTrackQuality = False,
292  fillGlobalTrackRefits = False,
293  TrackExtractorPSet = dict(inputTrackCollection = 'splittedTracksP5'),
294  # set wide cone until the code is made to compute this wrt CalIntersection
295  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
296 )
297 
298 #Sequences
299 
300 # Final sequence
301 muonrecoforsplitcosmicsTask = cms.Task(globalCosmicSplitMuons,splitMuons)
302 muonrecoforsplitcosmics = cms.Sequence(muonrecoforsplitcosmicsTask)
303 
304 ##############################################
305 
306 ######################## LHC like Reco #############################
307 
308 # Standard reco
310 
311 # Muon Id producer
312 lhcSTAMuons = muons1stStep.clone(
313  inputCollectionLabels = ['standAloneMuons'],
314  inputCollectionTypes = ['outer tracks'],
315  fillIsolation = True,
316  fillGlobalTrackQuality = False,
317  fillGlobalTrackRefits = False,
318  TrackExtractorPSet = dict(inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'),
319  # set wide cone until the code is made to compute this wrt CalIntersection
320  CaloExtractorPSet = dict(CenterConeOnCalIntersection = True, DR_Max = 1.0)
321 )
322 
323 # Final sequence
324 muonRecoLHCTask = cms.Task(ancientMuonSeed,
325  standAloneMuons,
326  lhcSTAMuons)
327 muonRecoLHC = cms.Sequence(muonRecoLHCTask)
328 
329 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
330 muonRecoGRTask = cms.Task(muonrecoforcosmicsTask,
331  muonRecoGRTask,
332  muonrecoBeamHaloEndCapsOnlyTask,
333  muonrecoforcosmicsNoRPCTask,
334  muonrecoforsplitcosmicsTask,
335  muonRecoLHCTask)
336 muonRecoGR = cms.Sequence(muonRecoGRTask)
337 #######################################################################################################################