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