CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch12/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 goodMuonsForZ = cms.EDFilter("MuonSelector",
00014                              src = cms.InputTag("muons"),
00015                              cut = cms.string('pt > 20 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && isolationR03().sumPt<3.0 && abs(innerTrack().dxy)<1.0'),
00016                              filter = cms.bool(True)                                
00017                              )
00018 
00019 # build Z-> MuMu candidates
00020 dimuons = cms.EDProducer("CandViewShallowCloneCombiner",
00021                          checkCharge = cms.bool(True),
00022                          cut = cms.string('mass > 60'),
00023                          decay = cms.string("goodMuonsForZ@+ goodMuonsForZ@-")
00024                          )
00025 
00026 # Z filter
00027 dimuonsFilter = cms.EDFilter("CandViewCountFilter",
00028                              src = cms.InputTag("dimuons"),
00029                              minNumber = cms.uint32(1)
00030                              )
00031 
00032 # Z Skim sequence
00033 diMuonSelSeq = cms.Sequence(WZMuHLTFilter *
00034                             goodMuonsForZ *
00035                             dimuons *
00036                             dimuonsFilter
00037                             )
00038 
00039 ### W -> MuNu candidates
00040 
00041 #Get muons of needed quality for Ws
00042 goodMuonsForW = cms.EDFilter("MuonViewRefSelector",
00043                              src = cms.InputTag("muons"),
00044                              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'),
00045                              filter = cms.bool(True)
00046                              )
00047 
00048 # build W->MuNu candidates using PF MET
00049 wmnPFCands = cms.EDProducer("CandViewShallowCloneCombiner",
00050                             checkCharge = cms.bool(False),
00051                             cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
00052                             decay = cms.string("goodMuonsForW pfMet")
00053                             )
00054 
00055 # W filter
00056 wmnPFFilter = cms.EDFilter("CandViewCountFilter",
00057                            src = cms.InputTag("wmnPFCands"),
00058                            minNumber = cms.uint32(1)
00059                            )
00060 
00061 # build W->MuNu candidates using TC MET
00062 wmnTCCands = 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 tcMet")
00066                             )
00067 
00068 # W filter
00069 wmnTCFilter = cms.EDFilter("CandViewCountFilter",
00070                            src = cms.InputTag("wmnTCCands"),
00071                            minNumber = cms.uint32(1)
00072                            )
00073 
00074 
00075 # W Skim sequences
00076 pfMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
00077                              goodMuonsForW *
00078                              wmnPFCands *
00079                              wmnPFFilter
00080                              )
00081 
00082 
00083 tcMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
00084                              goodMuonsForW *
00085                              wmnTCCands *
00086                              wmnTCFilter
00087                              )
00088 
00089