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.
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 
32 #similar to what's in pp configuration
33 muonsFromCosmics = muons1stStep.clone()
34 muonsFromCosmics.inputCollectionLabels = ['cosmicMuons']
35 muonsFromCosmics.inputCollectionTypes = ['outer tracks']
36 muonsFromCosmics.TrackExtractorPSet.inputTrackCollection = 'cosmicMuons'
37 muonsFromCosmics.TimingFillerParameters.DTTimingParameters.PruneCut = 9999
38 muonsFromCosmics.TimingFillerParameters.CSCTimingParameters.PruneCut = 9999
39 muonsFromCosmics.fillIsolation = False
40 muonsFromCosmics.fillGlobalTrackQuality = False
41 muonsFromCosmics.fillGlobalTrackRefits = False
42 
44 calomuons.inputTracks = 'ctfWithMaterialTracksP5LHCNavigation'
45 calomuons.inputCollection = 'muons'
46 calomuons.inputMuons = 'muons'
47 
48 ## Sequences
49 
50 # Stand Alone Tracking
51 STAmuontrackingforcosmics = cms.Sequence(CosmicMuonSeed*cosmicMuons)
52 # Stand Alone Tracking plus muon ID
53 STAmuonrecoforcosmics = cms.Sequence(STAmuontrackingforcosmics)
54 
55 # Stand Alone Tracking plus global tracking
56 muontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmics*globalCosmicMuons)
57 
58 # Muon Isolation sequence
60 # muisodeposits based on "muons"
61 # we are using copy extractors now
62 muIsoDepositTk.inputTags = cms.VInputTag(cms.InputTag("muons:tracker"))
63 muIsoDepositJets. inputTags = cms.VInputTag(cms.InputTag("muons:jets"))
64 muIsoDepositCalByAssociatorTowers.inputTags = cms.VInputTag(cms.InputTag("muons:ecal"), cms.InputTag("muons:hcal"), cms.InputTag("muons:ho"))
65 
66 
67 
68 # TeV refinement
70 tevMuons.MuonCollectionLabel = "globalCosmicMuons"
71 tevMuons.RefitterParameters.PropDirForCosmics = cms.bool(True)
72 
73 # Glb Track Quality
75 glbTrackQual.InputCollection = "globalCosmicMuons"
76 
77 # all muons id
78 allmuons = cms.Sequence(glbTrackQual*tevMuons*muons*muIsolation*calomuons)
79 
80 # Final sequence
81 muonrecoforcosmics = cms.Sequence(muontrackingforcosmics*allmuons*muonsFromCosmics)
82 muonRecoAllGR = cms.Sequence(muonrecoforcosmics)
83 
84 # 1 leg mode
85 
86 # Stand alone muon track producer
87 cosmicMuons1Leg = cosmicMuons.clone()
88 cosmicMuons1Leg.TrajectoryBuilderParameters.BuildTraversingMuon = True
89 cosmicMuons1Leg.MuonSeedCollectionLabel = 'CosmicMuonSeed'
90 
91 # Global muon track producer
92 globalCosmicMuons1Leg = globalCosmicMuons.clone()
93 globalCosmicMuons1Leg.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
94 globalCosmicMuons1Leg.MuonCollectionLabel = 'cosmicMuons1Leg'
95 
96 # Muon Id producer
97 muons1Leg = muons1stStep.clone()
98 muons1Leg.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuons1Leg', 'cosmicMuons1Leg']
99 muons1Leg.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
100 muons1Leg.fillIsolation = False
101 muons1Leg.fillGlobalTrackQuality = False
102 muons1Leg.fillGlobalTrackRefits = False
103 muons1Leg.TimingFillerParameters.DTTimingParameters.PruneCut = 9999
104 muons1Leg.TimingFillerParameters.CSCTimingParameters.PruneCut = 9999
105 # Sequences
106 
107 # Stand Alone Tracking
108 STAmuontrackingforcosmics1Leg = cms.Sequence(CosmicMuonSeed*cosmicMuons1Leg)
109 
110 # Stand Alone Tracking plus global tracking
111 muontrackingforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg*globalCosmicMuons1Leg)
112 
113 # all muons id
114 allmuons1Leg = cms.Sequence(muons1Leg)
115 
116 # Stand Alone Tracking plus muon ID
117 STAmuonrecoforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg)
118 
119 # Final sequence
120 muonrecoforcosmics1Leg = cms.Sequence(muontrackingforcosmics1Leg*allmuons1Leg)
121 
122 #####################################################
123 
124 # t0 Corrections
125 
126 # Seed generator
127 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone()
128 CosmicMuonSeedWitht0Correction.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
129 
130 # Stand alone muon track producer
131 cosmicMuonsWitht0Correction = cosmicMuons.clone()
132 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.BuildTraversingMuon = False
133 cosmicMuonsWitht0Correction.MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction'
134 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
135 
136 # Global muon track producer
137 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone()
138 globalCosmicMuonsWitht0Correction.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
139 globalCosmicMuonsWitht0Correction.MuonCollectionLabel = 'cosmicMuonsWitht0Correction'
140 
141 # Muon Id producer
142 muonsWitht0Correction = muons1stStep.clone()
143 muonsWitht0Correction.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsWitht0Correction', 'cosmicMuonsWitht0Correction']
144 muonsWitht0Correction.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
145 muonsWitht0Correction.fillIsolation = True
146 muonsWitht0Correction.fillGlobalTrackQuality = False
147 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.UseSegmentT0 = True
148 muonsWitht0Correction.TimingFillerParameters.MatchParameters.DTsegments = 'dt4DSegmentsT0Seg'
149 muonsWitht0Correction.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
150 muonsWitht0Correction.CaloExtractorPSet.CenterConeOnCalIntersection = True
151 muonsWitht0Correction.fillGlobalTrackRefits = False
152 #Sequences
153 
154 
155 # Stand Alone Tracking
156 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(CosmicMuonSeedWitht0Correction*cosmicMuonsWitht0Correction)
157 
158 # Stand Alone Tracking plus global tracking
159 muontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction*globalCosmicMuonsWitht0Correction)
160 
161 # Stand Alone Tracking plus muon ID
162 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction)
163 
164 # all muons id
165 allmuonsWitht0Correction = cms.Sequence(muonsWitht0Correction)
166 
167 # Final sequence
168 muonrecoforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0Correction*allmuonsWitht0Correction)
169 
170 ### Final sequence ###
171 muonRecoGR = cms.Sequence(muonrecoforcosmics1Leg+muonrecoforcosmicsWitht0Correction)
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 muonsBeamHaloEndCapsOnly.fillGlobalTrackRefits = False
202 
203 # Sequences
204 muonrecoBeamHaloEndCapsOnly = cms.Sequence(CosmicMuonSeedEndCapsOnly*cosmicMuonsEndCapsOnly*globalBeamHaloMuonEndCapslOnly*muonsBeamHaloEndCapsOnly)
205 
206 ########
207 
208 ## Full detector but NO RPC ##
209 
210 # Stand alone muon track producer
211 cosmicMuonsNoRPC = cosmicMuons.clone()
212 cosmicMuonsNoRPC.TrajectoryBuilderParameters.EnableRPCMeasurement = False
213 
214 # Global muon track producer
215 globalCosmicMuonsNoRPC = globalCosmicMuons.clone()
216 globalCosmicMuonsNoRPC.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
217 globalCosmicMuonsNoRPC.MuonCollectionLabel = 'cosmicMuonsNoRPC'
218 
219 # Muon Id producer
220 muonsNoRPC = muons1stStep.clone()
221 muonsNoRPC.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsNoRPC', 'cosmicMuonsNoRPC']
222 muonsNoRPC.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
223 muonsNoRPC.fillIsolation = True
224 muonsNoRPC.fillGlobalTrackQuality = False
225 muonsNoRPC.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
226 muonsNoRPC.CaloExtractorPSet.CenterConeOnCalIntersection = True
227 muonsNoRPC.fillGlobalTrackRefits = False
228 
229 #Sequences
230 
231 # Stand Alone Tracking
232 STAmuontrackingforcosmicsNoRPC = cms.Sequence(cosmicMuonsNoRPC)
233 
234 # Stand Alone Tracking plus global tracking
235 muontrackingforcosmicsNoRPC = cms.Sequence(STAmuontrackingforcosmicsNoRPC*globalCosmicMuonsNoRPC)
236 
237 # all muons id
238 allmuonsNoRPC = cms.Sequence(muonsNoRPC)
239 
240 # Final sequence
241 muonrecoforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPC*allmuonsNoRPC)
242 
243 ##############################################
244 
245 ## Split Tracks ##
246 
247 # Global muon track producer
248 globalCosmicSplitMuons = globalCosmicMuons.clone()
249 globalCosmicSplitMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'splittedTracksP5'
250 globalCosmicSplitMuons.MuonCollectionLabel = 'cosmicMuons'
251 
252 # Muon Id producer
253 
254 splitMuons = muons1stStep.clone()
255 splitMuons.inputCollectionLabels = ['splittedTracksP5', 'globalCosmicSplitMuons', 'cosmicMuons']
256 splitMuons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
257 splitMuons.fillIsolation = True
258 splitMuons.fillGlobalTrackQuality = False
259 splitMuons.TrackExtractorPSet.inputTrackCollection = 'splittedTracksP5'
260 splitMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
261 splitMuons.fillGlobalTrackRefits = False
262 
263 #Sequences
264 
265 # Final sequence
266 muonrecoforsplitcosmics = cms.Sequence(globalCosmicSplitMuons*splitMuons)
267 
268 ##############################################
269 
270 ######################## LHC like Reco #############################
271 
272 # Standard reco
274 
275 # Muon Id producer
276 lhcSTAMuons = muons1stStep.clone()
277 lhcSTAMuons.inputCollectionLabels = ['standAloneMuons']
278 lhcSTAMuons.inputCollectionTypes = ['outer tracks']
279 lhcSTAMuons.fillIsolation = True
280 lhcSTAMuons.fillGlobalTrackQuality = False
281 lhcSTAMuons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
282 lhcSTAMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
283 lhcSTAMuons.fillGlobalTrackRefits = False
284 
285 # Final sequence
286 muonRecoLHC = cms.Sequence(ancientMuonSeed*standAloneMuons*lhcSTAMuons)
287 
288 
289 
290 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
291 
292 muonRecoGR = cms.Sequence(muonRecoAllGR*muonRecoGR*muonrecoBeamHaloEndCapsOnly*muonrecoforcosmicsNoRPC*muonrecoforsplitcosmics*muonRecoLHC)
293 
294 #######################################################################################################################
295 
296 
297 
298 
299