CMS 3D CMS Logo

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 
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 ## Sequences
46 
47 # Stand Alone Tracking
48 STAmuontrackingforcosmics = cms.Sequence(CosmicMuonSeed*cosmicMuons)
49 # Stand Alone Tracking plus muon ID
50 STAmuonrecoforcosmics = cms.Sequence(STAmuontrackingforcosmics)
51 
52 # Stand Alone Tracking plus global tracking
53 muontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmics*globalCosmicMuons)
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 allmuons = cms.Sequence(glbTrackQual*tevMuons*muons*muIsolation)
76 
77 # Final sequence
78 muonrecoforcosmics = cms.Sequence(muontrackingforcosmics*allmuons*muonsFromCosmics)
79 muonRecoAllGR = cms.Sequence(muonrecoforcosmics)
80 
81 # 1 leg mode
82 
83 # Stand alone muon track producer
84 cosmicMuons1Leg = cosmicMuons.clone()
85 cosmicMuons1Leg.TrajectoryBuilderParameters.BuildTraversingMuon = True
86 cosmicMuons1Leg.MuonSeedCollectionLabel = 'CosmicMuonSeed'
87 
88 # Global muon track producer
89 globalCosmicMuons1Leg = globalCosmicMuons.clone()
90 globalCosmicMuons1Leg.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
91 globalCosmicMuons1Leg.MuonCollectionLabel = 'cosmicMuons1Leg'
92 
93 # Muon Id producer
94 muons1Leg = muons1stStep.clone()
95 muons1Leg.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuons1Leg', 'cosmicMuons1Leg']
96 muons1Leg.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
97 muons1Leg.fillIsolation = False
98 muons1Leg.fillGlobalTrackQuality = False
99 muons1Leg.fillGlobalTrackRefits = False
100 muons1Leg.TimingFillerParameters.DTTimingParameters.PruneCut = 9999
101 muons1Leg.TimingFillerParameters.CSCTimingParameters.PruneCut = 9999
102 # Sequences
103 
104 # Stand Alone Tracking
105 STAmuontrackingforcosmics1Leg = cms.Sequence(CosmicMuonSeed*cosmicMuons1Leg)
106 
107 # Stand Alone Tracking plus global tracking
108 muontrackingforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg*globalCosmicMuons1Leg)
109 
110 # all muons id
111 allmuons1Leg = cms.Sequence(muons1Leg)
112 
113 # Stand Alone Tracking plus muon ID
114 STAmuonrecoforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg)
115 
116 # Final sequence
117 muonrecoforcosmics1Leg = cms.Sequence(muontrackingforcosmics1Leg*allmuons1Leg)
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 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(CosmicMuonSeedWitht0Correction*cosmicMuonsWitht0Correction)
156 
157 # Stand Alone Tracking plus global tracking
158 muontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction*globalCosmicMuonsWitht0Correction)
159 
160 # Stand Alone Tracking plus muon ID
161 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction)
162 
163 # all muons id
164 allmuonsWitht0Correction = cms.Sequence(muonsWitht0Correction)
165 
166 # Final sequence
167 muonrecoforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0Correction*allmuonsWitht0Correction)
168 
169 ### Final sequence ###
170 muonRecoGR = cms.Sequence(muonrecoforcosmics1Leg+muonrecoforcosmicsWitht0Correction)
171 
172 #####################################################
173 
174 # Beam halo in Encaps only. GLB reco only is needed
175 
176 # Seed generator
177 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone()
178 CosmicMuonSeedEndCapsOnly.EnableDTMeasurement = False
179 
180 # Stand alone muon track producer
181 cosmicMuonsEndCapsOnly = cosmicMuons.clone()
182 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.EnableDTMeasurement = False
183 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.MuonNavigationParameters.Barrel = False
184 cosmicMuonsEndCapsOnly.MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly'
185 
186 # Global muon track producer
187 globalBeamHaloMuonEndCapslOnly = globalCosmicMuons.clone()
188 globalBeamHaloMuonEndCapslOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'beamhaloTracks'
189 globalBeamHaloMuonEndCapslOnly.MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
190 
191 
192 # Muon Id producer
193 muonsBeamHaloEndCapsOnly = muons1stStep.clone()
194 muonsBeamHaloEndCapsOnly.inputCollectionLabels = ['beamhaloTracks', 'globalBeamHaloMuonEndCapslOnly', 'cosmicMuonsEndCapsOnly']
195 muonsBeamHaloEndCapsOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
196 muonsBeamHaloEndCapsOnly.fillIsolation = True
197 muonsBeamHaloEndCapsOnly.fillGlobalTrackQuality = False
198 muonsBeamHaloEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
199 muonsBeamHaloEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
200 # set wide cone until the code is made to compute this wrt CalIntersection
201 muonsBeamHaloEndCapsOnly.CaloExtractorPSet.DR_Max = 1.0
202 muonsBeamHaloEndCapsOnly.fillGlobalTrackRefits = False
203 
204 # Sequences
205 muonrecoBeamHaloEndCapsOnly = cms.Sequence(CosmicMuonSeedEndCapsOnly*cosmicMuonsEndCapsOnly*globalBeamHaloMuonEndCapslOnly*muonsBeamHaloEndCapsOnly)
206 
207 ########
208 
209 ## Full detector but NO RPC ##
210 
211 # Stand alone muon track producer
212 cosmicMuonsNoRPC = cosmicMuons.clone()
213 cosmicMuonsNoRPC.TrajectoryBuilderParameters.EnableRPCMeasurement = False
214 
215 # Global muon track producer
216 globalCosmicMuonsNoRPC = globalCosmicMuons.clone()
217 globalCosmicMuonsNoRPC.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
218 globalCosmicMuonsNoRPC.MuonCollectionLabel = 'cosmicMuonsNoRPC'
219 
220 # Muon Id producer
221 muonsNoRPC = muons1stStep.clone()
222 muonsNoRPC.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsNoRPC', 'cosmicMuonsNoRPC']
223 muonsNoRPC.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
224 muonsNoRPC.fillIsolation = True
225 muonsNoRPC.fillGlobalTrackQuality = False
226 muonsNoRPC.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
227 muonsNoRPC.CaloExtractorPSet.CenterConeOnCalIntersection = True
228 # set wide cone until the code is made to compute this wrt CalIntersection
229 muonsNoRPC.CaloExtractorPSet.DR_Max = 1.0
230 muonsNoRPC.fillGlobalTrackRefits = False
231 
232 #Sequences
233 
234 # Stand Alone Tracking
235 STAmuontrackingforcosmicsNoRPC = cms.Sequence(cosmicMuonsNoRPC)
236 
237 # Stand Alone Tracking plus global tracking
238 muontrackingforcosmicsNoRPC = cms.Sequence(STAmuontrackingforcosmicsNoRPC*globalCosmicMuonsNoRPC)
239 
240 # all muons id
241 allmuonsNoRPC = cms.Sequence(muonsNoRPC)
242 
243 # Final sequence
244 muonrecoforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPC*allmuonsNoRPC)
245 
246 ##############################################
247 
248 ## Split Tracks ##
249 
250 # Global muon track producer
251 globalCosmicSplitMuons = globalCosmicMuons.clone()
252 globalCosmicSplitMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'splittedTracksP5'
253 globalCosmicSplitMuons.MuonCollectionLabel = 'cosmicMuons'
254 
255 # Muon Id producer
256 
257 splitMuons = muons1stStep.clone()
258 splitMuons.inputCollectionLabels = ['splittedTracksP5', 'globalCosmicSplitMuons', 'cosmicMuons']
259 splitMuons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
260 splitMuons.fillIsolation = True
261 splitMuons.fillGlobalTrackQuality = False
262 splitMuons.TrackExtractorPSet.inputTrackCollection = 'splittedTracksP5'
263 splitMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
264 # set wide cone until the code is made to compute this wrt CalIntersection
265 splitMuons.CaloExtractorPSet.DR_Max = 1.0
266 splitMuons.fillGlobalTrackRefits = False
267 
268 #Sequences
269 
270 # Final sequence
271 muonrecoforsplitcosmics = cms.Sequence(globalCosmicSplitMuons*splitMuons)
272 
273 ##############################################
274 
275 ######################## LHC like Reco #############################
276 
277 # Standard reco
279 
280 # Muon Id producer
281 lhcSTAMuons = muons1stStep.clone()
282 lhcSTAMuons.inputCollectionLabels = ['standAloneMuons']
283 lhcSTAMuons.inputCollectionTypes = ['outer tracks']
284 lhcSTAMuons.fillIsolation = True
285 lhcSTAMuons.fillGlobalTrackQuality = False
286 lhcSTAMuons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
287 lhcSTAMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
288 # set wide cone until the code is made to compute this wrt CalIntersection
289 lhcSTAMuons.CaloExtractorPSet.DR_Max = 1.0
290 lhcSTAMuons.fillGlobalTrackRefits = False
291 
292 # Final sequence
293 muonRecoLHC = cms.Sequence(ancientMuonSeed*standAloneMuons*lhcSTAMuons)
294 
295 
296 
297 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
298 
299 muonRecoGR = cms.Sequence(muonRecoAllGR*muonRecoGR*muonrecoBeamHaloEndCapsOnly*muonrecoforcosmicsNoRPC*muonrecoforsplitcosmics*muonRecoLHC)
300 
301 #######################################################################################################################
302 
303 
304 
305 
306