Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-17 23:32:01

0001 #
0002 # Production configuration for FullSim: muon track validation using MuonAssociatorByHits
0003 #
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 from Validation.RecoMuon.selectors_cff import *
0007 from Validation.RecoMuon.track_selectors_cff import *
0008 from Validation.RecoMuon.associators_cff import *
0009 from Validation.RecoMuon.histoParameters_cff import *
0010 
0011 from Validation.RecoMuon.RecoMuonValidator_cff import *
0012 
0013 import Validation.RecoMuon.MuonTrackValidator_cfi
0014 MTV = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone(
0015 # DEFAULTS ###################################
0016 #    label_tp = "mix:MergedTrackTruth",
0017 #    label_tp_refvector = False,
0018 #    muonTPSelector = cms.PSet(muonTPSet),
0019 ##############################################
0020     label_tp = ("TPmu"),
0021     label_tp_refvector = True
0022 )
0023 MTV.muonTPSelector.src = ("TPmu")
0024 ##############################################
0025 
0026 trkMuonTrackVTrackAssoc = MTV.clone(
0027     associatormap = 'tpToTkmuTrackAssociation',
0028     associators = ('trackAssociatorByHits',),
0029     #label = ('generalTracks',),
0030     label = ('probeTracks',),
0031     label_tp = ("TPtrack"),
0032     muonHistoParameters = trkMuonHistoParameters
0033 )
0034 trkMuonTrackVTrackAssoc.muonTPSelector.src = ("TPtrack")
0035 # MuonAssociatorByHits used for all track collections
0036 
0037 trkProbeTrackVMuonAssoc = MTV.clone(
0038     associatormap = 'tpToTkMuonAssociation',
0039     #label = ('generalTracks',),
0040     label = ('probeTracks',),
0041     label_tp = ("TPtrack"),
0042     muonHistoParameters = trkMuonHistoParameters
0043 )
0044 trkProbeTrackVMuonAssoc.muonTPSelector.src = ("TPtrack")
0045 staSeedTrackVMuonAssoc = MTV.clone(
0046     associatormap = 'tpToStaSeedAssociation',
0047     label = ('seedsOfSTAmuons',),
0048     muonHistoParameters = staSeedMuonHistoParameters
0049 )
0050 staMuonTrackVMuonAssoc = MTV.clone(
0051     associatormap = 'tpToStaMuonAssociation',
0052     label = ('standAloneMuons',),
0053     muonHistoParameters = staMuonHistoParameters
0054 )
0055 staUpdMuonTrackVMuonAssoc = MTV.clone(
0056     associatormap = 'tpToStaUpdMuonAssociation',
0057     label = ('standAloneMuons:UpdatedAtVtx',),
0058     muonHistoParameters = staUpdMuonHistoParameters
0059 )
0060 glbMuonTrackVMuonAssoc = MTV.clone(
0061     associatormap = 'tpToGlbMuonAssociation',
0062     label = ('globalMuons',),
0063     muonHistoParameters = glbMuonHistoParameters
0064 )
0065 staRefitMuonTrackVMuonAssoc = MTV.clone(
0066     associatormap = 'tpToStaRefitMuonAssociation',
0067     label = ('refittedStandAloneMuons',),
0068     muonHistoParameters = staMuonHistoParameters
0069 )
0070 staRefitUpdMuonTrackVMuonAssoc = MTV.clone(
0071     associatormap = 'tpToStaRefitUpdMuonAssociation',
0072     label = ('refittedStandAloneMuons:UpdatedAtVtx',),
0073     muonHistoParameters = staUpdMuonHistoParameters
0074 )
0075 displacedTrackVMuonAssoc = MTV.clone(
0076     associatormap = 'tpToDisplacedTrkMuonAssociation',
0077     label = ('displacedTracks',),
0078     label_tp = ("TPtrack"),
0079     muonTPSelector = displacedMuonTPSet,
0080     muonHistoParameters = displacedTrkMuonHistoParameters
0081 )
0082 displacedTrackVMuonAssoc.muonTPSelector.src = ("TPtrack")
0083 
0084 displacedStaSeedTrackVMuonAssoc = MTV.clone(
0085     associatormap = 'tpToDisplacedStaSeedAssociation',
0086     label = ('seedsOfDisplacedSTAmuons',),
0087     muonTPSelector = displacedMuonTPSet,
0088     muonHistoParameters = displacedStaSeedMuonHistoParameters
0089 )
0090 displacedStaSeedTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
0091 
0092 displacedStaMuonTrackVMuonAssoc = MTV.clone(
0093     associatormap = 'tpToDisplacedStaMuonAssociation',
0094     label = ('displacedStandAloneMuons',),
0095     muonTPSelector = displacedMuonTPSet,
0096     muonHistoParameters = displacedStaMuonHistoParameters
0097 )
0098 displacedStaMuonTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
0099 
0100 displacedGlbMuonTrackVMuonAssoc = MTV.clone(
0101     associatormap = 'tpToDisplacedGlbMuonAssociation',
0102     label = ('displacedGlobalMuons',),
0103     muonTPSelector = displacedMuonTPSet,
0104     muonHistoParameters = displacedGlbMuonHistoParameters
0105 )
0106 displacedGlbMuonTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
0107 
0108 tevMuonFirstTrackVMuonAssoc = MTV.clone(
0109     associatormap = 'tpToTevFirstMuonAssociation',
0110     label = ('tevMuons:firstHit',),
0111     muonHistoParameters = glbMuonHistoParameters
0112 )
0113 tevMuonPickyTrackVMuonAssoc = MTV.clone(
0114     associatormap = 'tpToTevPickyMuonAssociation',
0115     label = ('tevMuons:picky',),
0116     muonHistoParameters = glbMuonHistoParameters
0117 )
0118 tevMuonDytTrackVMuonAssoc = MTV.clone(
0119     associatormap = 'tpToTevDytMuonAssociation',
0120     label = ('tevMuons:dyt',),
0121     muonHistoParameters = glbMuonHistoParameters
0122 )
0123 tunepMuonTrackVMuonAssoc = MTV.clone(
0124     associatormap = 'tpToTunePMuonAssociation',
0125     label = ('tunepMuonTracks',),
0126     muonHistoParameters = glbMuonHistoParameters
0127 )
0128 pfMuonTrackVMuonAssoc = MTV.clone(
0129     associatormap = 'tpToPFMuonAssociation',
0130     label = ('pfMuonTracks',),
0131     label_tp = ("TPpfmu"),
0132     muonHistoParameters = glbMuonHistoParameters
0133 )
0134 pfMuonTrackVMuonAssoc.muonTPSelector.src = ("TPpfmu")
0135 
0136 recomuMuonTrackVMuonAssoc = MTV.clone(
0137     associatormap = 'tpTorecoMuonMuonAssociation',
0138     label = ('recoMuonTracks',),
0139     muonHistoParameters = glbMuonHistoParameters
0140 )
0141 gemMuonTrackVMuonAssoc = MTV.clone(
0142     associatormap = 'tpToGEMMuonMuonAssociation',
0143     label = ('extractGemMuons',),
0144     muonHistoParameters = gemMuonHistoParameters
0145 )
0146 me0MuonTrackVMuonAssoc = MTV.clone(
0147     associatormap = 'tpToME0MuonMuonAssociation',
0148     label = ('extractMe0Muons',),
0149     muonTPSelector = me0MuonTPSet,
0150     muonHistoParameters = me0MuonHistoParameters
0151 )
0152 me0MuonTrackVMuonAssoc.muonTPSelector.src = ("TPmu")
0153 
0154 MTVcosmic = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone(
0155 # DEFAULTS ###################################
0156 #    label_tp = "mix:MergedTrackTruth",
0157 #    label_tp_refvector = False,
0158 ##############################################
0159     parametersDefiner = 'CosmicParametersDefinerForTP',
0160     muonTPSelector = cosmicMuonTPSet
0161 )
0162 ##############################################
0163 
0164 # cosmics 2-leg reco
0165 trkCosmicMuonTrackVSelMuonAssoc = MTVcosmic.clone(
0166     associatormap = 'tpToTkCosmicSelMuonAssociation',
0167     label = ('ctfWithMaterialTracksP5LHCNavigation',),
0168     BiDirectional_RecoToSim_association = False,
0169     muonHistoParameters = trkCosmicMuonHistoParameters
0170 )
0171 staCosmicMuonTrackVSelMuonAssoc = MTVcosmic.clone(
0172     associatormap = 'tpToStaCosmicSelMuonAssociation',
0173     label = ('cosmicMuons',),
0174     BiDirectional_RecoToSim_association = False,
0175     muonHistoParameters = staCosmicMuonHistoParameters
0176 )
0177 glbCosmicMuonTrackVSelMuonAssoc = MTVcosmic.clone(
0178     associatormap = 'tpToGlbCosmicSelMuonAssociation',
0179     label = ('globalCosmicMuons',),
0180     BiDirectional_RecoToSim_association = False,
0181     muonHistoParameters = glbCosmicMuonHistoParameters
0182 )
0183 # cosmics 1-leg reco
0184 trkCosmic1LegMuonTrackVSelMuonAssoc = MTVcosmic.clone(
0185     associatormap = 'tpToTkCosmic1LegSelMuonAssociation',
0186     label = ('ctfWithMaterialTracksP5',),
0187     muonHistoParameters = trkCosmic1LegMuonHistoParameters
0188 )
0189 staCosmic1LegMuonTrackVSelMuonAssoc = MTVcosmic.clone(
0190     associatormap = 'tpToStaCosmic1LegSelMuonAssociation',
0191     label = ('cosmicMuons1Leg',),
0192     muonHistoParameters = staCosmic1LegMuonHistoParameters
0193 )
0194 glbCosmic1LegMuonTrackVSelMuonAssoc = MTVcosmic.clone(
0195     associatormap = 'tpToGlbCosmic1LegSelMuonAssociation',
0196     label = ('globalCosmicMuons1Leg',),
0197     muonHistoParameters = glbCosmic1LegMuonHistoParameters
0198 )
0199 
0200 ##########################################################################                                                        
0201 ### Customization for Phase II samples                                                                                           
0202 ###
0203 
0204 trkMuonTrackVTrackAssoc_phase2 = trkMuonTrackVTrackAssoc.clone(                                                                  
0205     muonHistoParameters = trkMuonHistoParameters_phase2                                                
0206 )
0207 trkProbeTrackVMuonAssoc_phase2 = trkProbeTrackVMuonAssoc.clone(
0208     muonHistoParameters = trkMuonHistoParameters_phase2                                                
0209 )
0210 staSeedTrackVMuonAssoc_phase2 = staSeedTrackVMuonAssoc.clone(
0211     muonHistoParameters = staSeedMuonHistoParameters                                                    
0212 )
0213 staMuonTrackVMuonAssoc_phase2 = staMuonTrackVMuonAssoc.clone(
0214     muonHistoParameters = staMuonHistoParameters_phase2                                                 
0215 )
0216 staUpdMuonTrackVMuonAssoc_phase2 = staUpdMuonTrackVMuonAssoc.clone(
0217     muonHistoParameters = staUpdMuonHistoParameters_phase2                                          
0218 )
0219 glbMuonTrackVMuonAssoc_phase2 = glbMuonTrackVMuonAssoc.clone(
0220     muonHistoParameters = glbMuonHistoParameters_phase2                                                 
0221 )
0222 pfMuonTrackVMuonAssoc_phase2 = pfMuonTrackVMuonAssoc.clone(                                                                      
0223     muonHistoParameters = glbMuonHistoParameters_phase2                                                  
0224 )
0225 recomuMuonTrackVMuonAssoc_phase2 = recomuMuonTrackVMuonAssoc.clone(
0226     muonHistoParameters = recoMuonHistoParameters_phase2      
0227 )
0228 tunepMuonTrackVMuonAssoc_phase2 = tunepMuonTrackVMuonAssoc.clone(
0229     muonHistoParameters = glbMuonHistoParameters_phase2      
0230 )
0231 displacedStaMuonTrackVMuonAssoc_phase2 = displacedStaMuonTrackVMuonAssoc.clone(
0232     muonHistoParameters = displacedStaMuonHistoParameters_phase2   
0233 )
0234 displacedGlbMuonTrackVMuonAssoc_phase2 = displacedGlbMuonTrackVMuonAssoc.clone(
0235     muonHistoParameters = displacedGlbMuonHistoParameters_phase2               
0236 )
0237 displacedTrackVMuonAssoc_phase2 = displacedTrackVMuonAssoc.clone(
0238     muonHistoParameters = displacedTrkMuonHistoParameters_phase2   
0239 )
0240 gemMuonTrackVMuonAssoc_phase2 = gemMuonTrackVMuonAssoc.clone(
0241     muonHistoParameters = gemMuonHistoParameters_phase2 
0242 )
0243 
0244 ##################################################################################
0245 # Muon validation sequences using MuonTrackValidator
0246 #
0247 muonValidation_seq = cms.Sequence(
0248     probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc
0249     +trackAssociatorByHits + tpToTkmuTrackAssociation + trkMuonTrackVTrackAssoc
0250     +seedsOfSTAmuons_seq + tpToStaSeedAssociation + staSeedTrackVMuonAssoc
0251     +tpToStaMuonAssociation + staMuonTrackVMuonAssoc
0252     +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc
0253     +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc
0254     +pfMuonTracks_seq + tpToPFMuonAssociation + pfMuonTrackVMuonAssoc
0255     +recoMuonTracks_seq + tpTorecoMuonMuonAssociation + recomuMuonTrackVMuonAssoc
0256 )
0257 
0258 muonValidation_noTABH_seq = cms.Sequence(
0259     probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc
0260     +seedsOfSTAmuons_seq + tpToStaSeedAssociation + staSeedTrackVMuonAssoc
0261     +tpToStaMuonAssociation + staMuonTrackVMuonAssoc
0262     +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc
0263     +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc
0264     +pfMuonTracks_seq + tpToPFMuonAssociation + pfMuonTrackVMuonAssoc
0265     +recoMuonTracks_seq + tpTorecoMuonMuonAssociation + recomuMuonTrackVMuonAssoc
0266 )
0267 
0268 muonValidationTEV_seq = cms.Sequence(
0269     tpToTevFirstMuonAssociation + tevMuonFirstTrackVMuonAssoc
0270     +tpToTevPickyMuonAssociation + tevMuonPickyTrackVMuonAssoc
0271     +tpToTevDytMuonAssociation + tevMuonDytTrackVMuonAssoc
0272     +tunepMuonTracks_seq + tpToTunePMuonAssociation + tunepMuonTrackVMuonAssoc
0273 )
0274 
0275 muonValidationRefit_seq = cms.Sequence(
0276     tpToStaRefitMuonAssociation + staRefitMuonTrackVMuonAssoc
0277     +tpToStaRefitUpdMuonAssociation + staRefitUpdMuonTrackVMuonAssoc
0278 )
0279 
0280 muonValidationDisplaced_seq = cms.Sequence(
0281     seedsOfDisplacedSTAmuons_seq + tpToDisplacedStaSeedAssociation + displacedStaSeedTrackVMuonAssoc
0282     +tpToDisplacedStaMuonAssociation + displacedStaMuonTrackVMuonAssoc
0283     +tpToDisplacedTrkMuonAssociation + displacedTrackVMuonAssoc
0284     +tpToDisplacedGlbMuonAssociation + displacedGlbMuonTrackVMuonAssoc
0285 )
0286 
0287 recoMuonValidation_reduced_seq = cms.Sequence(
0288     probeTracks_seq + tpToTkMuonAssociation + trkProbeTrackVMuonAssoc_phase2
0289     +tpToStaUpdMuonAssociation + staUpdMuonTrackVMuonAssoc_phase2
0290     +tpToGlbMuonAssociation + glbMuonTrackVMuonAssoc_phase2
0291     +tunepMuonTracks_seq + tpToTunePMuonAssociation + tunepMuonTrackVMuonAssoc_phase2
0292     +pfMuonTracks_seq + tpToPFMuonAssociation + pfMuonTrackVMuonAssoc_phase2
0293     +recoMuonTracks_seq + tpTorecoMuonMuonAssociation + recomuMuonTrackVMuonAssoc_phase2
0294     +tpToDisplacedStaMuonAssociation + displacedStaMuonTrackVMuonAssoc_phase2
0295     +tpToDisplacedTrkMuonAssociation + displacedTrackVMuonAssoc_phase2
0296     +tpToDisplacedGlbMuonAssociation + displacedGlbMuonTrackVMuonAssoc_phase2
0297 )
0298 
0299 muonValidationCosmic_seq = cms.Sequence(
0300     tpToTkCosmicSelMuonAssociation + trkCosmicMuonTrackVSelMuonAssoc
0301     +tpToTkCosmic1LegSelMuonAssociation + trkCosmic1LegMuonTrackVSelMuonAssoc
0302     +tpToStaCosmicSelMuonAssociation + staCosmicMuonTrackVSelMuonAssoc
0303     +tpToStaCosmic1LegSelMuonAssociation + staCosmic1LegMuonTrackVSelMuonAssoc
0304     +tpToGlbCosmicSelMuonAssociation + glbCosmicMuonTrackVSelMuonAssoc
0305     +tpToGlbCosmic1LegSelMuonAssociation + glbCosmic1LegMuonTrackVSelMuonAssoc
0306 )
0307 
0308 gemMuonValidation = cms.Sequence(extractGemMuonsTracks_seq + tpToGEMMuonMuonAssociation + gemMuonTrackVMuonAssoc)
0309 me0MuonValidation = cms.Sequence(extractMe0MuonsTracks_seq + tpToME0MuonMuonAssociation + me0MuonTrackVMuonAssoc)
0310 
0311 gemMuonValidation_phase2 = cms.Sequence(extractGemMuonsTracks_seq + tpToGEMMuonMuonAssociation + gemMuonTrackVMuonAssoc_phase2) 
0312 
0313 ##########################################################################
0314 # The full offline muon validation sequence
0315 #
0316 recoMuonValidation = cms.Sequence( TPtrack_seq + TPmu_seq + TPpfmu_seq +
0317     muonValidation_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationDisplaced_seq + muonValidationRMV_seq
0318     )
0319 
0320 # optionally omit TABH
0321 recoMuonValidation_noTABH = cms.Sequence( TPtrack_seq + TPmu_seq + TPpfmu_seq +
0322     muonValidation_noTABH_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationDisplaced_seq + muonValidationRMV_seq
0323     )
0324 
0325 # ... and also displaced muons
0326 recoMuonValidation_noTABH_noDisplaced = cms.Sequence( TPtrack_seq + TPmu_seq + TPpfmu_seq +
0327     muonValidation_noTABH_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationRMV_seq
0328     )
0329 
0330 # no displaced muons in fastsim
0331 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0332 fastSim.toReplaceWith(recoMuonValidation, cms.Sequence(cms.SequencePlaceholder("TPtrack") + cms.SequencePlaceholder("TPmu") + cms.SequencePlaceholder("TPpfmu") + muonValidation_seq + muonValidationTEV_seq + muonValidationRefit_seq + muonValidationRMV_seq))
0333 
0334 # sequence for cosmic muons
0335 recoCosmicMuonValidation = cms.Sequence(
0336     muonValidationCosmic_seq
0337     )
0338 
0339 # sequences for muon upgrades
0340 #
0341 _run3_muonValidation = recoMuonValidation.copy()
0342 _run3_muonValidation += gemMuonValidation
0343 
0344 _phase2_muonValidation = cms.Sequence(TPtrack_seq + TPmu_seq + TPpfmu_seq + recoMuonValidation_reduced_seq)
0345 _phase2_muonValidation += gemMuonValidation_phase2
0346 _phase2_muonValidation += me0MuonValidation
0347 
0348 _phase2_ge0_muonValidation =  cms.Sequence(TPtrack_seq + TPmu_seq + TPpfmu_seq + recoMuonValidation_reduced_seq)
0349 _phase2_ge0_muonValidation += gemMuonValidation_phase2
0350 
0351 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
0352 run3_GEM.toReplaceWith( recoMuonValidation, _run3_muonValidation )
0353 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
0354 phase2_muon.toReplaceWith( recoMuonValidation, _phase2_muonValidation )
0355 from Configuration.Eras.Modifier_phase2_GE0_cff import phase2_GE0
0356 phase2_GE0.toReplaceWith( recoMuonValidation, _phase2_ge0_muonValidation )
0357