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