CMS 3D CMS Logo

muonValidation_cff.py
Go to the documentation of this file.
1 #
2 # Production configuration for FullSim: muon track validation using MuonAssociatorByHits
3 #
4 import FWCore.ParameterSet.Config as cms
5 
10 
12 
13 import Validation.RecoMuon.MuonTrackValidator_cfi
14 MTV = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone(
15 # DEFAULTS ###################################
16 # label_tp = "mix:MergedTrackTruth",
17 # label_tp_refvector = False,
18 # muonTPSelector = cms.PSet(muonTPSet),
19 
20  label_tp = ("TPmu"),
21  label_tp_refvector = True
22 )
23 MTV.muonTPSelector.src = ("TPmu")
24 
25 
26 trkMuonTrackVTrackAssoc = MTV.clone(
27  associatormap = 'tpToTkmuTrackAssociation',
28  associators = ('trackAssociatorByHits',),
29  #label = ('generalTracks',),
30  label = ('probeTracks',),
31  label_tp = ("TPtrack"),
32  muonHistoParameters = trkMuonHistoParameters
33 )
34 trkMuonTrackVTrackAssoc.muonTPSelector.src = ("TPtrack")
35 # MuonAssociatorByHits used for all track collections
36 
37 trkProbeTrackVMuonAssoc = MTV.clone(
38  associatormap = 'tpToTkMuonAssociation',
39  #label = ('generalTracks',),
40  label = ('probeTracks',),
41  label_tp = ("TPtrack"),
42  muonHistoParameters = trkMuonHistoParameters
43 )
44 trkProbeTrackVMuonAssoc.muonTPSelector.src = ("TPtrack")
45 staSeedTrackVMuonAssoc = MTV.clone(
46  associatormap = 'tpToStaSeedAssociation',
47  label = ('seedsOfSTAmuons',),
48  muonHistoParameters = staSeedMuonHistoParameters
49 )
50 staMuonTrackVMuonAssoc = MTV.clone(
51  associatormap = 'tpToStaMuonAssociation',
52  label = ('standAloneMuons',),
53  muonHistoParameters = staMuonHistoParameters
54 )
55 staUpdMuonTrackVMuonAssoc = MTV.clone(
56  associatormap = 'tpToStaUpdMuonAssociation',
57  label = ('standAloneMuons:UpdatedAtVtx',),
58  muonHistoParameters = staUpdMuonHistoParameters
59 )
60 glbMuonTrackVMuonAssoc = MTV.clone(
61  associatormap = 'tpToGlbMuonAssociation',
62  label = ('globalMuons',),
63  muonHistoParameters = glbMuonHistoParameters
64 )
65 staRefitMuonTrackVMuonAssoc = MTV.clone(
66  associatormap = 'tpToStaRefitMuonAssociation',
67  label = ('refittedStandAloneMuons',),
68  muonHistoParameters = staMuonHistoParameters
69 )
70 staRefitUpdMuonTrackVMuonAssoc = MTV.clone(
71  associatormap = 'tpToStaRefitUpdMuonAssociation',
72  label = ('refittedStandAloneMuons:UpdatedAtVtx',),
73  muonHistoParameters = staUpdMuonHistoParameters
74 )
75 displacedTrackVMuonAssoc = MTV.clone(
76  associatormap = 'tpToDisplacedTrkMuonAssociation',
77  label = ('displacedTracks',),
78  label_tp = ("TPtrack"),
79  muonTPSelector = displacedMuonTPSet,
80  muonHistoParameters = displacedTrkMuonHistoParameters
81 )
82 displacedTrackVMuonAssoc.muonTPSelector.src = ("TPtrack")
83 
84 displacedStaSeedTrackVMuonAssoc = MTV.clone(
85  associatormap = 'tpToDisplacedStaSeedAssociation',
86  label = ('seedsOfDisplacedSTAmuons',),
87  muonTPSelector = displacedMuonTPSet,
88  muonHistoParameters = displacedStaSeedMuonHistoParameters
89 )
90 displacedStaSeedTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
91 
92 displacedStaMuonTrackVMuonAssoc = MTV.clone(
93  associatormap = 'tpToDisplacedStaMuonAssociation',
94  label = ('displacedStandAloneMuons',),
95  muonTPSelector = displacedMuonTPSet,
96  muonHistoParameters = displacedStaMuonHistoParameters
97 )
98 displacedStaMuonTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
99 
100 displacedGlbMuonTrackVMuonAssoc = MTV.clone(
101  associatormap = 'tpToDisplacedGlbMuonAssociation',
102  label = ('displacedGlobalMuons',),
103  muonTPSelector = displacedMuonTPSet,
104  muonHistoParameters = displacedGlbMuonHistoParameters
105 )
106 displacedGlbMuonTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
107 
108 tevMuonFirstTrackVMuonAssoc = MTV.clone(
109  associatormap = 'tpToTevFirstMuonAssociation',
110  label = ('tevMuons:firstHit',),
111  muonHistoParameters = glbMuonHistoParameters
112 )
113 tevMuonPickyTrackVMuonAssoc = MTV.clone(
114  associatormap = 'tpToTevPickyMuonAssociation',
115  label = ('tevMuons:picky',),
116  muonHistoParameters = glbMuonHistoParameters
117 )
118 tevMuonDytTrackVMuonAssoc = MTV.clone(
119  associatormap = 'tpToTevDytMuonAssociation',
120  label = ('tevMuons:dyt',),
121  muonHistoParameters = glbMuonHistoParameters
122 )
123 tunepMuonTrackVMuonAssoc = MTV.clone(
124  associatormap = 'tpToTunePMuonAssociation',
125  label = ('tunepMuonTracks',),
126  muonHistoParameters = glbMuonHistoParameters
127 )
128 pfMuonTrackVMuonAssoc = MTV.clone(
129  associatormap = 'tpToPFMuonAssociation',
130  label = ('pfMuonTracks',),
131  label_tp = ("TPpfmu"),
132  muonHistoParameters = glbMuonHistoParameters
133 )
134 pfMuonTrackVMuonAssoc.muonTPSelector.src = ("TPpfmu")
135 
136 recomuMuonTrackVMuonAssoc = MTV.clone(
137  associatormap = 'tpTorecoMuonMuonAssociation',
138  label = ('recoMuonTracks',),
139  muonHistoParameters = glbMuonHistoParameters
140 )
141 gemMuonTrackVMuonAssoc = MTV.clone(
142  associatormap = 'tpToGEMMuonMuonAssociation',
143  label = ('extractGemMuons',),
144  muonHistoParameters = gemMuonHistoParameters
145 )
146 me0MuonTrackVMuonAssoc = MTV.clone(
147  associatormap = 'tpToME0MuonMuonAssociation',
148  label = ('extractMe0Muons',),
149  muonTPSelector = me0MuonTPSet,
150  muonHistoParameters = me0MuonHistoParameters
151 )
152 me0MuonTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
153 
154 MTVcosmic = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone(
155 # DEFAULTS ###################################
156 # label_tp = "mix:MergedTrackTruth",
157 # label_tp_refvector = False,
158 
159  parametersDefiner = 'CosmicParametersDefinerForTP',
160  muonTPSelector = cosmicMuonTPSet
161 )
162 
163 
164 # cosmics 2-leg reco
165 trkCosmicMuonTrackVSelMuonAssoc = MTVcosmic.clone(
166  associatormap = 'tpToTkCosmicSelMuonAssociation',
167  label = ('ctfWithMaterialTracksP5LHCNavigation',),
168  BiDirectional_RecoToSim_association = False,
169  muonHistoParameters = trkCosmicMuonHistoParameters
170 )
171 staCosmicMuonTrackVSelMuonAssoc = MTVcosmic.clone(
172  associatormap = 'tpToStaCosmicSelMuonAssociation',
173  label = ('cosmicMuons',),
174  BiDirectional_RecoToSim_association = False,
175  muonHistoParameters = staCosmicMuonHistoParameters
176 )
177 glbCosmicMuonTrackVSelMuonAssoc = MTVcosmic.clone(
178  associatormap = 'tpToGlbCosmicSelMuonAssociation',
179  label = ('globalCosmicMuons',),
180  BiDirectional_RecoToSim_association = False,
181  muonHistoParameters = glbCosmicMuonHistoParameters
182 )
183 # cosmics 1-leg reco
184 trkCosmic1LegMuonTrackVSelMuonAssoc = MTVcosmic.clone(
185  associatormap = 'tpToTkCosmic1LegSelMuonAssociation',
186  label = ('ctfWithMaterialTracksP5',),
187  muonHistoParameters = trkCosmic1LegMuonHistoParameters
188 )
189 staCosmic1LegMuonTrackVSelMuonAssoc = MTVcosmic.clone(
190  associatormap = 'tpToStaCosmic1LegSelMuonAssociation',
191  label = ('cosmicMuons1Leg',),
192  muonHistoParameters = staCosmic1LegMuonHistoParameters
193 )
194 glbCosmic1LegMuonTrackVSelMuonAssoc = MTVcosmic.clone(
195  associatormap = 'tpToGlbCosmic1LegSelMuonAssociation',
196  label = ('globalCosmicMuons1Leg',),
197  muonHistoParameters = glbCosmic1LegMuonHistoParameters
198 )
199 
200 
203 
204 trkMuonTrackVTrackAssoc_phase2 = trkMuonTrackVTrackAssoc.clone(
205  muonHistoParameters = trkMuonHistoParameters_phase2
206 )
207 trkProbeTrackVMuonAssoc_phase2 = trkProbeTrackVMuonAssoc.clone(
208  muonHistoParameters = trkMuonHistoParameters_phase2
209 )
210 staSeedTrackVMuonAssoc_phase2 = staSeedTrackVMuonAssoc.clone(
211  muonHistoParameters = staSeedMuonHistoParameters
212 )
213 staMuonTrackVMuonAssoc_phase2 = staMuonTrackVMuonAssoc.clone(
214  muonHistoParameters = staMuonHistoParameters_phase2
215 )
216 staUpdMuonTrackVMuonAssoc_phase2 = staUpdMuonTrackVMuonAssoc.clone(
217  muonHistoParameters = staUpdMuonHistoParameters_phase2
218 )
219 glbMuonTrackVMuonAssoc_phase2 = glbMuonTrackVMuonAssoc.clone(
220  muonHistoParameters = glbMuonHistoParameters_phase2
221 )
222 pfMuonTrackVMuonAssoc_phase2 = pfMuonTrackVMuonAssoc.clone(
223  muonHistoParameters = glbMuonHistoParameters_phase2
224 )
225 recomuMuonTrackVMuonAssoc_phase2 = recomuMuonTrackVMuonAssoc.clone(
226  muonHistoParameters = recoMuonHistoParameters_phase2
227 )
228 tunepMuonTrackVMuonAssoc_phase2 = tunepMuonTrackVMuonAssoc.clone(
229  muonHistoParameters = glbMuonHistoParameters_phase2
230 )
231 displacedStaMuonTrackVMuonAssoc_phase2 = displacedStaMuonTrackVMuonAssoc.clone(
232  muonHistoParameters = displacedStaMuonHistoParameters_phase2
233 )
234 displacedGlbMuonTrackVMuonAssoc_phase2 = displacedGlbMuonTrackVMuonAssoc.clone(
235  muonHistoParameters = displacedGlbMuonHistoParameters_phase2
236 )
237 displacedTrackVMuonAssoc_phase2 = displacedTrackVMuonAssoc.clone(
238  muonHistoParameters = displacedTrkMuonHistoParameters_phase2
239 )
240 gemMuonTrackVMuonAssoc_phase2 = gemMuonTrackVMuonAssoc.clone(
241  muonHistoParameters = gemMuonHistoParameters_phase2
242 )
243 
244 
247 muonValidation_seq = cms.Sequence(
248  probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc
249  +trackAssociatorByHits + tpToTkmuTrackAssociation + trkMuonTrackVTrackAssoc
250  +seedsOfSTAmuons_seq + tpToStaSeedAssociation + staSeedTrackVMuonAssoc
251  +tpToStaMuonAssociation + staMuonTrackVMuonAssoc
252  +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc
253  +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc
254  +pfMuonTracks_seq + tpToPFMuonAssociation + pfMuonTrackVMuonAssoc
255  +recoMuonTracks_seq + tpTorecoMuonMuonAssociation + recomuMuonTrackVMuonAssoc
256 )
257 
258 muonValidation_noTABH_seq = cms.Sequence(
259  probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc
260  +seedsOfSTAmuons_seq + tpToStaSeedAssociation + staSeedTrackVMuonAssoc
261  +tpToStaMuonAssociation + staMuonTrackVMuonAssoc
262  +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc
263  +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc
264  +pfMuonTracks_seq + tpToPFMuonAssociation + pfMuonTrackVMuonAssoc
265  +recoMuonTracks_seq + tpTorecoMuonMuonAssociation + recomuMuonTrackVMuonAssoc
266 )
267 
268 muonValidationTEV_seq = cms.Sequence(
269  tpToTevFirstMuonAssociation + tevMuonFirstTrackVMuonAssoc
270  +tpToTevPickyMuonAssociation + tevMuonPickyTrackVMuonAssoc
271  +tpToTevDytMuonAssociation + tevMuonDytTrackVMuonAssoc
272  +tunepMuonTracks_seq + tpToTunePMuonAssociation + tunepMuonTrackVMuonAssoc
273 )
274 
275 muonValidationRefit_seq = cms.Sequence(
276  tpToStaRefitMuonAssociation + staRefitMuonTrackVMuonAssoc
277  +tpToStaRefitUpdMuonAssociation + staRefitUpdMuonTrackVMuonAssoc
278 )
279 
280 muonValidationDisplaced_seq = cms.Sequence(
281  seedsOfDisplacedSTAmuons_seq + tpToDisplacedStaSeedAssociation + displacedStaSeedTrackVMuonAssoc
282  +tpToDisplacedStaMuonAssociation + displacedStaMuonTrackVMuonAssoc
283  +tpToDisplacedTrkMuonAssociation + displacedTrackVMuonAssoc
284  +tpToDisplacedGlbMuonAssociation + displacedGlbMuonTrackVMuonAssoc
285 )
286 
287 recoMuonValidation_reduced_seq = cms.Sequence(
288  probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc_phase2
289  +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc_phase2
290  +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc_phase2
291  +tunepMuonTracks_seq + tpToTunePMuonAssociation + tunepMuonTrackVMuonAssoc_phase2
292  +pfMuonTracks_seq + tpToPFMuonAssociation + pfMuonTrackVMuonAssoc_phase2
293  +recoMuonTracks_seq + tpTorecoMuonMuonAssociation + recomuMuonTrackVMuonAssoc_phase2
294  +tpToDisplacedStaMuonAssociation + displacedStaMuonTrackVMuonAssoc_phase2
295  +tpToDisplacedTrkMuonAssociation + displacedTrackVMuonAssoc_phase2
296  +tpToDisplacedGlbMuonAssociation + displacedGlbMuonTrackVMuonAssoc_phase2
297 )
298 
299 muonValidationCosmic_seq = cms.Sequence(
300  tpToTkCosmicSelMuonAssociation + trkCosmicMuonTrackVSelMuonAssoc
301  +tpToTkCosmic1LegSelMuonAssociation + trkCosmic1LegMuonTrackVSelMuonAssoc
302  +tpToStaCosmicSelMuonAssociation + staCosmicMuonTrackVSelMuonAssoc
303  +tpToStaCosmic1LegSelMuonAssociation + staCosmic1LegMuonTrackVSelMuonAssoc
304  +tpToGlbCosmicSelMuonAssociation + glbCosmicMuonTrackVSelMuonAssoc
305  +tpToGlbCosmic1LegSelMuonAssociation + glbCosmic1LegMuonTrackVSelMuonAssoc
306 )
307 
308 gemMuonValidation = cms.Sequence(extractGemMuonsTracks_seq + tpToGEMMuonMuonAssociation + gemMuonTrackVMuonAssoc)
309 me0MuonValidation = cms.Sequence(extractMe0MuonsTracks_seq + tpToME0MuonMuonAssociation + me0MuonTrackVMuonAssoc)
310 
311 gemMuonValidation_phase2 = cms.Sequence(extractGemMuonsTracks_seq + tpToGEMMuonMuonAssociation + gemMuonTrackVMuonAssoc_phase2)
312 
313 
316 recoMuonValidation = cms.Sequence( TPtrack_seq + TPmu_seq + TPpfmu_seq +
317  muonValidation_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationDisplaced_seq + muonValidationRMV_seq
318  )
319 
320 # optionally omit TABH
321 recoMuonValidation_noTABH = cms.Sequence( TPtrack_seq + TPmu_seq + TPpfmu_seq +
322  muonValidation_noTABH_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationDisplaced_seq + muonValidationRMV_seq
323  )
324 
325 # ... and also displaced muons
326 recoMuonValidation_noTABH_noDisplaced = cms.Sequence( TPtrack_seq + TPmu_seq + TPpfmu_seq +
327  muonValidation_noTABH_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationRMV_seq
328  )
329 
330 # no displaced muons in fastsim
331 from Configuration.Eras.Modifier_fastSim_cff import fastSim
332 fastSim.toReplaceWith(recoMuonValidation, cms.Sequence(cms.SequencePlaceholder("TPtrack") + cms.SequencePlaceholder("TPmu") + cms.SequencePlaceholder("TPpfmu") + muonValidation_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationRMV_seq))
333 
334 # sequence for cosmic muons
335 recoCosmicMuonValidation = cms.Sequence(
336  muonValidationCosmic_seq
337  )
338 
339 # sequences for muon upgrades
340 #
341 _run3_muonValidation = recoMuonValidation.copy()
342 _run3_muonValidation += gemMuonValidation
343 
344 _phase2_muonValidation = cms.Sequence(TPtrack_seq + TPmu_seq + TPpfmu_seq + recoMuonValidation_reduced_seq)
345 _phase2_muonValidation += gemMuonValidation_phase2
346 _phase2_muonValidation += me0MuonValidation
347 
348 _phase2_ge0_muonValidation = cms.Sequence(TPtrack_seq + TPmu_seq + TPpfmu_seq + recoMuonValidation_reduced_seq)
349 _phase2_ge0_muonValidation += gemMuonValidation_phase2
350 
351 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
352 run3_GEM.toReplaceWith( recoMuonValidation, _run3_muonValidation )
353 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
354 phase2_muon.toReplaceWith( recoMuonValidation, _phase2_muonValidation )
355 from Configuration.Eras.Modifier_phase2_GE0_cff import phase2_GE0
356 phase2_GE0.toReplaceWith( recoMuonValidation, _phase2_ge0_muonValidation )
357