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