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 
9 import Validation.RecoMuon.MuonTrackValidator_cfi
10 
13 
15 
16 # quickTrackAssociatorByHits on probeTracks used as monitor wrt MuonAssociatorByHits
17 
18 trkMuonTrackVTrackAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
19 trkMuonTrackVTrackAssoc.associatormap = 'tpToTkmuTrackAssociation'
20 trkMuonTrackVTrackAssoc.associators = ('trackAssociatorByHits',)
21 #trkMuonTrackVTrackAssoc.label = ('generalTracks',)
22 trkMuonTrackVTrackAssoc.label = ('probeTracks',)
23 trkMuonTrackVTrackAssoc.muonHistoParameters = trkMuonHistoParameters
24 
25 # MuonAssociatorByHits used for all track collections
26 
27 trkProbeTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
28 trkProbeTrackVMuonAssoc.associatormap = 'tpToTkMuonAssociation'
29 #trkProbeTrackVMuonAssoc.label = ('generalTracks',)
30 trkProbeTrackVMuonAssoc.label = ('probeTracks',)
31 trkProbeTrackVMuonAssoc.muonHistoParameters = trkMuonHistoParameters
32 
33 staSeedTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
34 staSeedTrackVMuonAssoc.associatormap = 'tpToStaSeedAssociation'
35 staSeedTrackVMuonAssoc.label = ('seedsOfSTAmuons',)
36 staSeedTrackVMuonAssoc.muonHistoParameters = staSeedMuonHistoParameters
37 
38 staMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
39 staMuonTrackVMuonAssoc.associatormap = 'tpToStaMuonAssociation'
40 staMuonTrackVMuonAssoc.label = ('standAloneMuons',)
41 staMuonTrackVMuonAssoc.muonHistoParameters = staMuonHistoParameters
42 
43 staUpdMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
44 staUpdMuonTrackVMuonAssoc.associatormap = 'tpToStaUpdMuonAssociation'
45 staUpdMuonTrackVMuonAssoc.label = ('standAloneMuons:UpdatedAtVtx',)
46 staUpdMuonTrackVMuonAssoc.muonHistoParameters = staUpdMuonHistoParameters
47 
48 glbMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
49 glbMuonTrackVMuonAssoc.associatormap = 'tpToGlbMuonAssociation'
50 glbMuonTrackVMuonAssoc.label = ('globalMuons',)
51 glbMuonTrackVMuonAssoc.muonHistoParameters = glbMuonHistoParameters
52 
53 staRefitMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
54 staRefitMuonTrackVMuonAssoc.associatormap = 'tpToStaRefitMuonAssociation'
55 staRefitMuonTrackVMuonAssoc.label = ('refittedStandAloneMuons',)
56 staRefitMuonTrackVMuonAssoc.muonHistoParameters = staMuonHistoParameters
57 
58 staRefitUpdMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
59 staRefitUpdMuonTrackVMuonAssoc.associatormap = 'tpToStaRefitUpdMuonAssociation'
60 staRefitUpdMuonTrackVMuonAssoc.label = ('refittedStandAloneMuons:UpdatedAtVtx',)
61 staRefitUpdMuonTrackVMuonAssoc.muonHistoParameters = staUpdMuonHistoParameters
62 
63 displacedTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
64 displacedTrackVMuonAssoc.associatormap = 'tpToDisplacedTrkMuonAssociation'
65 displacedTrackVMuonAssoc.label = ('displacedTracks',)
66 displacedTrackVMuonAssoc.muonTPSelector = displacedMuonTPSet
67 displacedTrackVMuonAssoc.muonHistoParameters = displacedTrkMuonHistoParameters
68 
69 displacedStaSeedTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
70 displacedStaSeedTrackVMuonAssoc.associatormap = 'tpToDisplacedStaSeedAssociation'
71 displacedStaSeedTrackVMuonAssoc.label = ('seedsOfDisplacedSTAmuons',)
72 displacedStaSeedTrackVMuonAssoc.muonTPSelector = displacedMuonTPSet
73 displacedStaSeedTrackVMuonAssoc.muonHistoParameters = displacedStaSeedMuonHistoParameters
74 
75 displacedStaMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
76 displacedStaMuonTrackVMuonAssoc.associatormap = 'tpToDisplacedStaMuonAssociation'
77 displacedStaMuonTrackVMuonAssoc.label = ('displacedStandAloneMuons',)
78 displacedStaMuonTrackVMuonAssoc.muonTPSelector = displacedMuonTPSet
79 displacedStaMuonTrackVMuonAssoc.muonHistoParameters = displacedStaMuonHistoParameters
80 
81 displacedGlbMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
82 displacedGlbMuonTrackVMuonAssoc.associatormap = 'tpToDisplacedGlbMuonAssociation'
83 displacedGlbMuonTrackVMuonAssoc.label = ('displacedGlobalMuons',)
84 displacedGlbMuonTrackVMuonAssoc.muonTPSelector = displacedMuonTPSet
85 displacedGlbMuonTrackVMuonAssoc.muonHistoParameters = displacedGlbMuonHistoParameters
86 
87 tevMuonFirstTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
88 tevMuonFirstTrackVMuonAssoc.associatormap = 'tpToTevFirstMuonAssociation'
89 tevMuonFirstTrackVMuonAssoc.label = ('tevMuons:firstHit',)
90 tevMuonFirstTrackVMuonAssoc.muonHistoParameters = glbMuonHistoParameters
91 
92 tevMuonPickyTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
93 tevMuonPickyTrackVMuonAssoc.associatormap = 'tpToTevPickyMuonAssociation'
94 tevMuonPickyTrackVMuonAssoc.label = ('tevMuons:picky',)
95 tevMuonPickyTrackVMuonAssoc.muonHistoParameters = glbMuonHistoParameters
96 
97 tevMuonDytTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
98 tevMuonDytTrackVMuonAssoc.associatormap = 'tpToTevDytMuonAssociation'
99 tevMuonDytTrackVMuonAssoc.label = ('tevMuons:dyt',)
100 tevMuonDytTrackVMuonAssoc.muonHistoParameters = glbMuonHistoParameters
101 
102 gemMuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
103 gemMuonTrackVMuonAssoc.associatormap = 'tpToGEMMuonMuonAssociation'
104 gemMuonTrackVMuonAssoc.label = ('extractGemMuons',)
105 gemMuonTrackVMuonAssoc.muonHistoParameters = gemMuonHistoParameters
106 
107 me0MuonTrackVMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
108 me0MuonTrackVMuonAssoc.associatormap = 'tpToME0MuonMuonAssociation'
109 me0MuonTrackVMuonAssoc.label = ('extractMe0Muons',)
110 me0MuonTrackVMuonAssoc.muonTPSelector = me0MuonTPSet
111 me0MuonTrackVMuonAssoc.muonHistoParameters = me0MuonHistoParameters
112 
113 # cosmics 2-leg reco
114 trkCosmicMuonTrackVSelMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
115 trkCosmicMuonTrackVSelMuonAssoc.associatormap = 'tpToTkCosmicSelMuonAssociation'
116 trkCosmicMuonTrackVSelMuonAssoc.label = ('ctfWithMaterialTracksP5LHCNavigation',)
117 trkCosmicMuonTrackVSelMuonAssoc.parametersDefiner = cms.string('CosmicParametersDefinerForTP')
118 trkCosmicMuonTrackVSelMuonAssoc.muonTPSelector = cosmicMuonTPSet
119 trkCosmicMuonTrackVSelMuonAssoc.BiDirectional_RecoToSim_association = False
120 trkCosmicMuonTrackVSelMuonAssoc.muonHistoParameters = trkCosmicMuonHistoParameters
121 
122 staCosmicMuonTrackVSelMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
123 staCosmicMuonTrackVSelMuonAssoc.associatormap = 'tpToStaCosmicSelMuonAssociation'
124 staCosmicMuonTrackVSelMuonAssoc.label = ('cosmicMuons',)
125 staCosmicMuonTrackVSelMuonAssoc.parametersDefiner = cms.string('CosmicParametersDefinerForTP')
126 staCosmicMuonTrackVSelMuonAssoc.muonTPSelector = cosmicMuonTPSet
127 staCosmicMuonTrackVSelMuonAssoc.BiDirectional_RecoToSim_association = False
128 staCosmicMuonTrackVSelMuonAssoc.muonHistoParameters = staCosmicMuonHistoParameters
129 
130 glbCosmicMuonTrackVSelMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
131 glbCosmicMuonTrackVSelMuonAssoc.associatormap = 'tpToGlbCosmicSelMuonAssociation'
132 glbCosmicMuonTrackVSelMuonAssoc.label = ('globalCosmicMuons',)
133 glbCosmicMuonTrackVSelMuonAssoc.parametersDefiner = cms.string('CosmicParametersDefinerForTP')
134 glbCosmicMuonTrackVSelMuonAssoc.muonTPSelector = cosmicMuonTPSet
135 glbCosmicMuonTrackVSelMuonAssoc.BiDirectional_RecoToSim_association = False
136 glbCosmicMuonTrackVSelMuonAssoc.muonHistoParameters = glbCosmicMuonHistoParameters
137 
138 # cosmics 1-leg reco
139 trkCosmic1LegMuonTrackVSelMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
140 trkCosmic1LegMuonTrackVSelMuonAssoc.associatormap = 'tpToTkCosmic1LegSelMuonAssociation'
141 trkCosmic1LegMuonTrackVSelMuonAssoc.label = ('ctfWithMaterialTracksP5',)
142 trkCosmic1LegMuonTrackVSelMuonAssoc.parametersDefiner = cms.string('CosmicParametersDefinerForTP')
143 trkCosmic1LegMuonTrackVSelMuonAssoc.muonTPSelector = cosmicMuonTPSet
144 trkCosmic1LegMuonTrackVSelMuonAssoc.muonHistoParameters = trkCosmic1LegMuonHistoParameters
145 
146 staCosmic1LegMuonTrackVSelMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
147 staCosmic1LegMuonTrackVSelMuonAssoc.associatormap = 'tpToStaCosmic1LegSelMuonAssociation'
148 staCosmic1LegMuonTrackVSelMuonAssoc.label = ('cosmicMuons1Leg',)
149 staCosmic1LegMuonTrackVSelMuonAssoc.parametersDefiner = cms.string('CosmicParametersDefinerForTP')
150 staCosmic1LegMuonTrackVSelMuonAssoc.muonTPSelector = cosmicMuonTPSet
151 staCosmic1LegMuonTrackVSelMuonAssoc.muonHistoParameters = staCosmic1LegMuonHistoParameters
152 
153 glbCosmic1LegMuonTrackVSelMuonAssoc = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
154 glbCosmic1LegMuonTrackVSelMuonAssoc.associatormap = 'tpToGlbCosmic1LegSelMuonAssociation'
155 glbCosmic1LegMuonTrackVSelMuonAssoc.label = ('globalCosmicMuons1Leg',)
156 glbCosmic1LegMuonTrackVSelMuonAssoc.parametersDefiner = cms.string('CosmicParametersDefinerForTP')
157 glbCosmic1LegMuonTrackVSelMuonAssoc.muonTPSelector = cosmicMuonTPSet
158 glbCosmic1LegMuonTrackVSelMuonAssoc.muonHistoParameters = glbCosmic1LegMuonHistoParameters
159 
160 ##################################################################################
161 # Muon validation sequences using MuonTrackValidator
162 #
163 muonValidation_seq = cms.Sequence(
164  probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc
165  +trackAssociatorByHits + tpToTkmuTrackAssociation + trkMuonTrackVTrackAssoc
166  +seedsOfSTAmuons_seq + tpToStaSeedAssociation + staSeedTrackVMuonAssoc
167  +tpToStaMuonAssociation + staMuonTrackVMuonAssoc
168  +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc
169  +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc
170 )
171 
172 muonValidation_reduced_seq = cms.Sequence(
173  probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc
174  +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc
175  +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc
176  +tpToDisplacedStaMuonAssociation + displacedStaMuonTrackVMuonAssoc
177  +tpToDisplacedTrkMuonAssociation + displacedTrackVMuonAssoc
178  +tpToDisplacedGlbMuonAssociation + displacedGlbMuonTrackVMuonAssoc
179 )
180 
181 muonValidationTEV_seq = cms.Sequence(
182  tpToTevFirstMuonAssociation + tevMuonFirstTrackVMuonAssoc
183  +tpToTevPickyMuonAssociation + tevMuonPickyTrackVMuonAssoc
184  +tpToTevDytMuonAssociation + tevMuonDytTrackVMuonAssoc
185 )
186 
187 muonValidationRefit_seq = cms.Sequence(
188  tpToStaRefitMuonAssociation + staRefitMuonTrackVMuonAssoc
189  +tpToStaRefitUpdMuonAssociation + staRefitUpdMuonTrackVMuonAssoc
190 )
191 
192 muonValidationDisplaced_seq = cms.Sequence(
193  seedsOfDisplacedSTAmuons_seq + tpToDisplacedStaSeedAssociation + displacedStaSeedTrackVMuonAssoc
194  +tpToDisplacedStaMuonAssociation + displacedStaMuonTrackVMuonAssoc
195  +tpToDisplacedTrkMuonAssociation + displacedTrackVMuonAssoc
196  +tpToDisplacedGlbMuonAssociation + displacedGlbMuonTrackVMuonAssoc
197 )
198 
199 muonValidationCosmic_seq = cms.Sequence(
200  tpToTkCosmicSelMuonAssociation + trkCosmicMuonTrackVSelMuonAssoc
201  +tpToTkCosmic1LegSelMuonAssociation + trkCosmic1LegMuonTrackVSelMuonAssoc
202  +tpToStaCosmicSelMuonAssociation + staCosmicMuonTrackVSelMuonAssoc
203  +tpToStaCosmic1LegSelMuonAssociation + staCosmic1LegMuonTrackVSelMuonAssoc
204  +tpToGlbCosmicSelMuonAssociation + glbCosmicMuonTrackVSelMuonAssoc
205  +tpToGlbCosmic1LegSelMuonAssociation + glbCosmic1LegMuonTrackVSelMuonAssoc
206 )
207 
208 gemMuonValidation = cms.Sequence(extractGemMuonsTracks_seq + tpToGEMMuonMuonAssociation + gemMuonTrackVMuonAssoc)
209 me0MuonValidation = cms.Sequence(extractMe0MuonsTracks_seq + tpToME0MuonMuonAssociation + me0MuonTrackVMuonAssoc)
210 
211 ##########################################################################
212 # The full offline muon validation sequence
213 #
214 recoMuonValidation = cms.Sequence(
215  muonValidation_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationDisplaced_seq + muonValidationRMV_seq
216  )
217 
218 # no displaced muons in fastsim
219 from Configuration.Eras.Modifier_fastSim_cff import fastSim
220 fastSim.toReplaceWith(recoMuonValidation, cms.Sequence(muonValidation_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationRMV_seq))
221 
222 # sequence for cosmic muons
223 recoCosmicMuonValidation = cms.Sequence(
224  muonValidationCosmic_seq
225  )
226 
227 # sequences for muon upgrades
228 #
229 _run3_muonValidation = muonValidation_seq.copy() #For full validation
230 #_run3_muonValidation = muonValidation_reduced_seq.copy()
231 _run3_muonValidation += gemMuonValidation
232 
233 _phase2_muonValidation = _run3_muonValidation.copy()
234 _phase2_muonValidation += me0MuonValidation
235 
236 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
237 run3_GEM.toReplaceWith( muonValidation_seq, _run3_muonValidation ) #For full validation
238 run3_GEM.toReplaceWith( recoMuonValidation, _run3_muonValidation )
239 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
240 phase2_muon.toReplaceWith( muonValidation_seq, _phase2_muonValidation ) #For full validation
241 phase2_muon.toReplaceWith( recoMuonValidation, _phase2_muonValidation )