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