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.DTsegments = 'dt4DSegmentsT0Seg'
134 muonsWitht0Correction.TimingFillerParameters.DTTimingParameters.MatchParameters.DTsegments = 'dt4DSegmentsT0Seg'
135 muonsWitht0Correction.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
136 muonsWitht0Correction.CaloExtractorPSet.CenterConeOnCalIntersection = True
137 muonsWitht0Correction.fillGlobalTrackRefits = False
138 #Sequences
139 
140 
141 # Stand Alone Tracking
142 STAmuontrackingforcosmicsWitht0Correction = cms.Sequence(CosmicMuonSeedWitht0Correction*cosmicMuonsWitht0Correction)
143 
144 # Stand Alone Tracking plus global tracking
145 muontrackingforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction*globalCosmicMuonsWitht0Correction)
146 
147 # Stand Alone Tracking plus muon ID
148 STAmuonrecoforcosmicsWitht0Correction = cms.Sequence(STAmuontrackingforcosmicsWitht0Correction)
149 
150 # all muons id
151 allmuonsWitht0Correction = cms.Sequence(muonsWitht0Correction)
152 
153 # Final sequence
154 muonrecoforcosmicsWitht0Correction = cms.Sequence(muontrackingforcosmicsWitht0Correction*allmuonsWitht0Correction)
155 
156 ### Final sequence ###
157 muonRecoGR = cms.Sequence(muonrecoforcosmics1Leg+muonrecoforcosmicsWitht0Correction)
158 
159 #####################################################
160 
161 # Beam halo in Encaps only. GLB reco only is needed
162 
163 # Seed generator
164 CosmicMuonSeedEndCapsOnly = CosmicMuonSeed.clone()
165 CosmicMuonSeedEndCapsOnly.EnableDTMeasurement = False
166 
167 # Stand alone muon track producer
168 cosmicMuonsEndCapsOnly = cosmicMuons.clone()
169 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.EnableDTMeasurement = False
170 cosmicMuonsEndCapsOnly.TrajectoryBuilderParameters.MuonNavigationParameters.Barrel = False
171 cosmicMuonsEndCapsOnly.MuonSeedCollectionLabel = 'CosmicMuonSeedEndCapsOnly'
172 
173 # Global muon track producer
174 globalBeamHaloMuonEndCapslOnly = globalCosmicMuons.clone()
175 globalBeamHaloMuonEndCapslOnly.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'beamhaloTracks'
176 globalBeamHaloMuonEndCapslOnly.MuonCollectionLabel = 'cosmicMuonsEndCapsOnly'
177 
178 
179 # Muon Id producer
180 muonsBeamHaloEndCapsOnly = muons1stStep.clone()
181 muonsBeamHaloEndCapsOnly.inputCollectionLabels = ['beamhaloTracks', 'globalBeamHaloMuonEndCapslOnly', 'cosmicMuonsEndCapsOnly']
182 muonsBeamHaloEndCapsOnly.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
183 muonsBeamHaloEndCapsOnly.fillIsolation = True
184 muonsBeamHaloEndCapsOnly.fillGlobalTrackQuality = False
185 muonsBeamHaloEndCapsOnly.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
186 muonsBeamHaloEndCapsOnly.CaloExtractorPSet.CenterConeOnCalIntersection = True
187 muonsBeamHaloEndCapsOnly.fillGlobalTrackRefits = False
188 
189 # Sequences
190 muonrecoBeamHaloEndCapsOnly = cms.Sequence(CosmicMuonSeedEndCapsOnly*cosmicMuonsEndCapsOnly*globalBeamHaloMuonEndCapslOnly*muonsBeamHaloEndCapsOnly)
191 
192 ########
193 
194 ## Full detector but NO RPC ##
195 
196 # Stand alone muon track producer
197 cosmicMuonsNoRPC = cosmicMuons.clone()
198 cosmicMuonsNoRPC.TrajectoryBuilderParameters.EnableRPCMeasurement = False
199 
200 # Global muon track producer
201 globalCosmicMuonsNoRPC = globalCosmicMuons.clone()
202 globalCosmicMuonsNoRPC.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'ctfWithMaterialTracksP5'
203 globalCosmicMuonsNoRPC.MuonCollectionLabel = 'cosmicMuonsNoRPC'
204 
205 # Muon Id producer
206 muonsNoRPC = muons1stStep.clone()
207 muonsNoRPC.inputCollectionLabels = ['ctfWithMaterialTracksP5', 'globalCosmicMuonsNoRPC', 'cosmicMuonsNoRPC']
208 muonsNoRPC.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
209 muonsNoRPC.fillIsolation = True
210 muonsNoRPC.fillGlobalTrackQuality = False
211 muonsNoRPC.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5'
212 muonsNoRPC.CaloExtractorPSet.CenterConeOnCalIntersection = True
213 muonsNoRPC.fillGlobalTrackRefits = False
214 
215 #Sequences
216 
217 # Stand Alone Tracking
218 STAmuontrackingforcosmicsNoRPC = cms.Sequence(cosmicMuonsNoRPC)
219 
220 # Stand Alone Tracking plus global tracking
221 muontrackingforcosmicsNoRPC = cms.Sequence(STAmuontrackingforcosmicsNoRPC*globalCosmicMuonsNoRPC)
222 
223 # all muons id
224 allmuonsNoRPC = cms.Sequence(muonsNoRPC)
225 
226 # Final sequence
227 muonrecoforcosmicsNoRPC = cms.Sequence(muontrackingforcosmicsNoRPC*allmuonsNoRPC)
228 
229 ##############################################
230 
231 ## Split Tracks ##
232 
233 # Global muon track producer
234 globalCosmicSplitMuons = globalCosmicMuons.clone()
235 globalCosmicSplitMuons.TrajectoryBuilderParameters.TkTrackCollectionLabel = 'splittedTracksP5'
236 globalCosmicSplitMuons.MuonCollectionLabel = 'cosmicMuons'
237 
238 # Muon Id producer
239 
240 splitMuons = muons1stStep.clone()
241 splitMuons.inputCollectionLabels = ['splittedTracksP5', 'globalCosmicSplitMuons', 'cosmicMuons']
242 splitMuons.inputCollectionTypes = ['inner tracks', 'links', 'outer tracks']
243 splitMuons.fillIsolation = True
244 splitMuons.fillGlobalTrackQuality = False
245 splitMuons.TrackExtractorPSet.inputTrackCollection = 'splittedTracksP5'
246 splitMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
247 splitMuons.fillGlobalTrackRefits = False
248 
249 #Sequences
250 
251 # Final sequence
252 muonrecoforsplitcosmics = cms.Sequence(globalCosmicSplitMuons*splitMuons)
253 
254 ##############################################
255 
256 ######################## LHC like Reco #############################
257 
258 # Standard reco
260 
261 # Muon Id producer
262 lhcSTAMuons = muons1stStep.clone()
263 lhcSTAMuons.inputCollectionLabels = ['standAloneMuons']
264 lhcSTAMuons.inputCollectionTypes = ['outer tracks']
265 lhcSTAMuons.fillIsolation = True
266 lhcSTAMuons.fillGlobalTrackQuality = False
267 lhcSTAMuons.TrackExtractorPSet.inputTrackCollection = 'ctfWithMaterialTracksP5LHCNavigation'
268 lhcSTAMuons.CaloExtractorPSet.CenterConeOnCalIntersection = True
269 lhcSTAMuons.fillGlobalTrackRefits = False
270 
271 # Final sequence
272 muonRecoLHC = cms.Sequence(ancientMuonSeed*standAloneMuons*lhcSTAMuons)
273 
274 
275 
276 ########################### SEQUENCE TO BE ADDED in ReconstructionGR_cff ##############################################
277 
278 muonRecoGR = cms.Sequence(muonRecoAllGR*muonRecoGR*muonrecoBeamHaloEndCapsOnly*muonrecoforcosmicsNoRPC*muonrecoforsplitcosmics*muonRecoLHC)
279 
280 #######################################################################################################################
281 
282 
283 
284 
285