CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DPGAnalysis/Skims/python/WZMuSkim_cff.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 ### HLT filter
00004 import copy
00005 from HLTrigger.HLTfilters.hltHighLevel_cfi import *
00006 WZMuHLTFilter = copy.deepcopy(hltHighLevel)
00007 WZMuHLTFilter.throw = cms.bool(False)
00008 WZMuHLTFilter.HLTPaths = ["HLT_Mu9","HLT_Mu11","HLT_Mu15","HLT_Mu15_v*"]
00009 
00010 ### Z -> MuMu candidates
00011 
00012 # Get muons of needed quality for Zs
00013 looseMuonsForZ = cms.EDFilter("MuonSelector",
00014                              src = cms.InputTag("muons"),
00015                              cut = cms.string('pt > 10 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && abs(innerTrack().dxy)<2.0'),
00016                              filter = cms.bool(True)                                
00017                              )
00018 
00019 tightMuonsForZ = cms.EDFilter("MuonSelector",
00020                              src = cms.InputTag("looseMuonsForZ"),
00021                              cut = cms.string('pt > 20'),
00022                              filter = cms.bool(True)                                
00023                              )
00024 
00025 # build Z-> MuMu candidates
00026 dimuons = cms.EDProducer("CandViewShallowCloneCombiner",
00027                          checkCharge = cms.bool(False),
00028                          cut = cms.string('mass > 30'),
00029                          decay = cms.string("tightMuonsForZ looseMuonsForZ")
00030                          )
00031 
00032 # Z filter
00033 dimuonsFilter = cms.EDFilter("CandViewCountFilter",
00034                              src = cms.InputTag("dimuons"),
00035                              minNumber = cms.uint32(1)
00036                              )
00037 
00038 # Z filter
00039 dimuonsFilter = cms.EDFilter("CandViewCountFilter",
00040                              src = cms.InputTag("dimuons"),
00041                              minNumber = cms.uint32(1)
00042                              )
00043 
00044 # Z Skim sequence
00045 diMuonSelSeq = cms.Sequence(WZMuHLTFilter *
00046                             looseMuonsForZ *
00047                             tightMuonsForZ *
00048                             dimuons *
00049                             dimuonsFilter
00050                             )
00051 
00052 ### W -> MuNu candidates
00053 
00054 #Get muons of needed quality for Ws
00055 goodMuonsForW = cms.EDFilter("MuonViewRefSelector",
00056                              src = cms.InputTag("muons"),
00057                              cut = cms.string('isGlobalMuon=1 && isTrackerMuon=1 && abs(eta)<2.1 && abs(globalTrack().dxy)<0.2 && pt>20. && globalTrack().normalizedChi2<10 && globalTrack().hitPattern().numberOfValidTrackerHits>10 && globalTrack().hitPattern().numberOfValidMuonHits>0 && globalTrack().hitPattern().numberOfValidPixelHits>0 && numberOfMatches>1 && (isolationR03().sumPt+isolationR03().emEt+isolationR03().hadEt)<0.15*pt'),
00058                              filter = cms.bool(True)
00059                              )
00060 
00061 # build W->MuNu candidates using PF MET
00062 wmnPFCands = cms.EDProducer("CandViewShallowCloneCombiner",
00063                             checkCharge = cms.bool(False),
00064                             cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
00065                             decay = cms.string("goodMuonsForW pfMet")
00066                             )
00067 
00068 # W filter
00069 wmnPFFilter = cms.EDFilter("CandViewCountFilter",
00070                            src = cms.InputTag("wmnPFCands"),
00071                            minNumber = cms.uint32(1)
00072                            )
00073 
00074 # build W->MuNu candidates using TC MET
00075 wmnTCCands = cms.EDProducer("CandViewShallowCloneCombiner",
00076                             checkCharge = cms.bool(False),
00077                             cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
00078                             decay = cms.string("goodMuonsForW tcMet")
00079                             )
00080 
00081 # W filter
00082 wmnTCFilter = cms.EDFilter("CandViewCountFilter",
00083                            src = cms.InputTag("wmnTCCands"),
00084                            minNumber = cms.uint32(1)
00085                            )
00086 
00087 
00088 # W Skim sequences
00089 pfMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
00090                              goodMuonsForW *
00091                              wmnPFCands *
00092                              wmnPFFilter
00093                              )
00094 
00095 
00096 tcMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
00097                              goodMuonsForW *
00098                              wmnTCCands *
00099                              wmnTCFilter
00100                              )
00101 
00102