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.
2 
3 ######################## Cosmic Reco #############################
4 
5 ## Full detector ##
6 
7 # Seed generator
9 
10 # Stand alone muon track producer
12 #Mike: For backport at 53X : adding RPC back to the fit
13 cosmicMuons.TrajectoryBuilderParameters.BackwardMuonTrajectoryUpdatorParameters.ExcludeRPCFromFit = cms.bool(False)
14 cosmicMuons.TrajectoryBuilderParameters.MuonTrajectoryUpdatorParameters.ExcludeRPCFromFit = cms.bool(False)
15 
16 # Global muon track producer
18 globalCosmicMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5LHCNavigation'
19 
20 # Muon Id producer
22 
23 muons = muons1stStep.clone()
24 
25 muons.inputCollectionLabels = ['ctfWithMaterialTracksP5LHCNavigation', 'globalCosmicMuons', 'cosmicMuons', "tevMuons:firstHit","tevMuons:picky","tevMuons:dyt"]
26 muons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks', 'tev firstHit', 'tev picky', 'tev dyt']
27 muons.fillIsolation = True
28 muons.fillGlobalTrackQuality = True
29 # need to modify track selection as well (not clear to what)
30 muons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
31 muons.CaloExtractorPSet.CenterConeOnCalIntersection = True
32 
34 calomuons.inputTracks = 'ctfWithMaterialTracksP5LHCNavigation'
35 calomuons.inputCollection = 'muons'
36 calomuons.inputMuons = 'muons'
37 
38 ## Sequences
39 
40 # Stand Alone Tracking
41 STAmuontrackingforcosmics = cms.Sequence(CosmicMuonSeed*cosmicMuons)
42 # Stand Alone Tracking plus muon ID
43 STAmuonrecoforcosmics = cms.Sequence(STAmuontrackingforcosmics)
44 
45 # Stand Alone Tracking plus global tracking
46 muontrackingforcosmics = cms.Sequence(STAmuontrackingforcosmics*globalCosmicMuons)
47 
48 # Muon Isolation sequence
50 # muisodeposits based on "muons"
51 # we are using copy extractors now
52 muIsoDepositTk.inputTags = cms.VInputTag(cms.InputTag("muons:tracker"))
53 muIsoDepositJets. inputTags = cms.VInputTag(cms.InputTag("muons:jets"))
54 muIsoDepositCalByAssociatorTowers.inputTags = cms.VInputTag(cms.InputTag("muons:ecal"), cms.InputTag("muons:hcal"), cms.InputTag("muons:ho"))
55 
56 
57 
58 # TeV refinement
60 tevMuons.MuonCollectionLabel = "globalCosmicMuons"
61 tevMuons.RefitterParameters.PropDirForCosmics = cms.bool(True)
62 
63 # Glb Track Quality
65 glbTrackQual.InputCollection = "globalCosmicMuons"
66 
67 # all muons id
68 allmuons = cms.Sequence(glbTrackQual*tevMuons*muons*muIsolation*calomuons)
69 
70 # Final sequence
71 muonrecoforcosmics = cms.Sequence(muontrackingforcosmics*allmuons)
72 muonRecoAllGR = cms.Sequence(muonrecoforcosmics)
73 
74 # 1 leg mode
75 
76 # Stand alone muon track producer
77 cosmicMuons1Leg = cosmicMuons.clone()
78 cosmicMuons1Leg.TrajectoryBuilderParameters.BuildTraversingMuon = True
79 cosmicMuons1Leg.MuonSeedCollectionLabel = 'CosmicMuonSeed'
80 
81 # Global muon track producer
82 globalCosmicMuons1Leg = globalCosmicMuons.clone()
83 globalCosmicMuons1Leg.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
84 globalCosmicMuons1Leg.MuonCollectionLabel = 'cosmicMuons1Leg'
85 
86 # Muon Id producer
87 muons1Leg = muons1stStep.clone()
88 muons1Leg.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuons1Leg', 'cosmicMuons1Leg']
89 muons1Leg.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
90 muons1Leg.fillIsolation = False
91 muons1Leg.fillGlobalTrackQuality = False
92 muons1Leg.fillGlobalTrackRefits = False
93 # Sequences
94 
95 # Stand Alone Tracking
96 STAmuontrackingforcosmics1Leg = cms.Sequence(CosmicMuonSeed*cosmicMuons1Leg)
97 
98 # Stand Alone Tracking plus global tracking
99 muontrackingforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg*globalCosmicMuons1Leg)
100 
101 # all muons id
102 allmuons1Leg = cms.Sequence(muons1Leg)
103 
104 # Stand Alone Tracking plus muon ID
105 STAmuonrecoforcosmics1Leg = cms.Sequence(STAmuontrackingforcosmics1Leg)
106 
107 # Final sequence
108 muonrecoforcosmics1Leg = cms.Sequence(muontrackingforcosmics1Leg*allmuons1Leg)
109 
110 #####################################################
111 
112 # t0 Corrections
113 
114 # Seed generator
115 CosmicMuonSeedWitht0Correction = CosmicMuonSeed.clone()
116 CosmicMuonSeedWitht0Correction.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
117 
118 # Stand alone muon track producer
119 cosmicMuonsWitht0Correction = cosmicMuons.clone()
120 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.BuildTraversingMuon = False
121 cosmicMuonsWitht0Correction.MuonSeedCollectionLabel = 'CosmicMuonSeedWitht0Correction'
122 cosmicMuonsWitht0Correction.TrajectoryBuilderParameters.DTRecSegmentLabel = 'dt4DSegmentsT0Seg'
123 
124 # Global muon track producer
125 globalCosmicMuonsWitht0Correction = globalCosmicMuons.clone()
126 globalCosmicMuonsWitht0Correction.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
127 globalCosmicMuonsWitht0Correction.MuonCollectionLabel = 'cosmicMuonsWitht0Correction'
128 
129 # Muon Id producer
130 muonsWitht0Correction = muons1stStep.clone()
131 muonsWitht0Correction.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsWitht0Correction', 'cosmicMuonsWitht0Correction']
132 muonsWitht0Correction.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
133 muonsWitht0Correction.fillIsolation = True
134 muonsWitht0Correction.fillGlobalTrackQuality = False
135 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.UseSegmentT0 = True
136 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.DTsegments = 'dt4DSegmentsT0Seg'
137 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.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