Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-31 23:14:25

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Validation.RecoHI.track_selectors_cff import *
0004 from Validation.RecoMuon.muonValidation_cff import *
0005 
0006 # MuonAssociation labels; hit-by-hit matching only,MuonAssociator
0007 #
0008 import SimMuon.MCTruth.MuonAssociatorByHits_cfi
0009 hiMABH = SimMuon.MCTruth.MuonAssociatorByHits_cfi.muonAssociatorByHits.clone(
0010 # DEFAULTS ###################################
0011 #    EfficiencyCut_track = cms.double(0.),
0012 #    PurityCut_track = cms.double(0.),
0013 #    EfficiencyCut_muon = cms.double(0.),
0014 #    PurityCut_muon = cms.double(0.),
0015 #    includeZeroHitMuons = cms.bool(True),
0016 #    acceptOneStubMatchings = cms.bool(False),
0017 ##############################################
0018     tpTag = 'cutsTpMuons',
0019     #acceptOneStubMatchings = True # this was the OLD setting
0020     PurityCut_track = 0.75, 
0021     PurityCut_muon = 0.75
0022     #EfficiencyCut_track = 0.5 # maybe this could be added
0023     #EfficiencyCut_muon = 0.5 # maybe this could be added
0024     #includeZeroHitMuons = False # maybe this could be added
0025 )
0026 ################################################
0027 
0028 # sim to tracker tracks, 
0029 tpToTkMuonAssociationHI = hiMABH.clone(
0030     tracksTag = 'cutsRecoTrkMuons',
0031     UseTracker = True,
0032     UseMuon = False
0033 )
0034 # sim to sta, and sta:updatedAtVtx
0035 tpToStaMuonAssociationHI = hiMABH.clone(
0036     tracksTag = 'standAloneMuons',
0037     UseTracker = False,
0038     UseMuon = True
0039 )
0040 tpToStaUpdMuonAssociationHI = hiMABH.clone(
0041     tracksTag = 'standAloneMuons:UpdatedAtVtx',
0042     UseTracker = False,
0043     UseMuon = True
0044 )
0045 # sim to glb track 
0046 tpToGlbMuonAssociationHI = hiMABH.clone(
0047     tracksTag = 'globalMuons',
0048     UseTracker = True,
0049     UseMuon = True
0050 )
0051 
0052 # Muon association sequences
0053 # (some are commented out until timing is addressed)
0054 hiMuonAssociation_seq = cms.Sequence(
0055     tpToTkMuonAssociationHI+
0056     tpToStaMuonAssociationHI+
0057     tpToStaUpdMuonAssociationHI+
0058     tpToGlbMuonAssociationHI
0059     )
0060 
0061 #----------------------------------------
0062 
0063 from Validation.RecoMuon.histoParameters_cff import *
0064 
0065 import Validation.RecoMuon.MuonTrackValidator_cfi
0066 MTVhi = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
0067 MTVhi.label_tp_effic = cms.InputTag("cutsTpMuons")
0068 MTVhi.label_tp_fake = cms.InputTag("cutsTpMuons")
0069 MTVhi.maxPt = cms.double(100)
0070 
0071 # MuonTrackValidator parameters
0072 trkMuonTrackVMuonAssocHI = MTVhi.clone(
0073     associatormap  = 'tpToTkMuonAssociationHI',
0074     label          = ['cutsRecoTrkMuons'],
0075     muonHistoParameters = trkMuonHistoParameters
0076 )
0077 glbMuonTrackVMuonAssocHI = MTVhi.clone(
0078     associatormap = 'tpToGlbMuonAssociationHI',
0079     label           = ['globalMuons'],
0080     muonHistoParameters = glbMuonHistoParameters
0081 )
0082 staMuonTrackVMuonAssocHI = MTVhi.clone(
0083     associatormap = 'tpToStaMuonAssociationHI',
0084     label = ('standAloneMuons',),
0085     muonHistoParameters = staMuonHistoParameters
0086 )
0087 staUpdMuonTrackVMuonAssocHI = MTVhi.clone(
0088     associatormap = 'tpToStaUpdMuonAssociationHI',
0089     label = ('standAloneMuons:UpdatedAtVtx',),
0090     muonHistoParameters = staUpdMuonHistoParameters
0091 )
0092 
0093 # Muon validation sequences
0094 hiMuonValidation_seq = cms.Sequence(
0095     trkMuonTrackVMuonAssocHI+
0096     staMuonTrackVMuonAssocHI+
0097     staUpdMuonTrackVMuonAssocHI+
0098     glbMuonTrackVMuonAssocHI
0099     )
0100 
0101 # HI muon prevalidation
0102 hiRecoMuonPrevalidation = cms.Sequence(
0103     cutsRecoTrkMuons
0104   * cutsTpMuons
0105   * hiMuonAssociation_seq
0106 )
0107 
0108 # HI muon validation sequence
0109 hiRecoMuonValidation = cms.Sequence( hiMuonValidation_seq )