CMS 3D CMS Logo

WMuSkim_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 import copy
6 WMuHLTFilter = copy.deepcopy(hltHighLevel)
7 WMuHLTFilter.throw = cms.bool(False)
8 WMuHLTFilter.HLTPaths = ["HLT_Mu*","HLT_IsoMu*"]
9 
10 #Get muons of needed quality for Ws
11 goodMuonsForW = cms.EDFilter("MuonViewRefSelector",
12  src = cms.InputTag("muons"),
13  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'),
14  filter = cms.bool(True)
15  )
16 
17 # build W->MuNu candidates using PF MET
18 wmnPFCands = cms.EDProducer("CandViewShallowCloneCombiner",
19  checkCharge = cms.bool(False),
20  cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
21  decay = cms.string("goodMuonsForW pfMet")
22  )
23 
24 # W filter
25 wmnPFFilter = cms.EDFilter("CandViewCountFilter",
26  src = cms.InputTag("wmnPFCands"),
27  minNumber = cms.uint32(1)
28  )
29 
30 # build W->MuNu candidates using TC MET
31 wmnTCCands = cms.EDProducer("CandViewShallowCloneCombiner",
32  checkCharge = cms.bool(False),
33  cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
34  decay = cms.string("goodMuonsForW tcMet")
35  )
36 
37 # W filter
38 wmnTCFilter = cms.EDFilter("CandViewCountFilter",
39  src = cms.InputTag("wmnTCCands"),
40  minNumber = cms.uint32(1)
41  )
42 
43 
44 # W Skim sequences
45 pfMetWMuNuSeq = cms.Sequence(WMuHLTFilter *
46  goodMuonsForW *
47  wmnPFCands *
48  wmnPFFilter
49  )
50 
51 
52 tcMetWMuNuSeq = cms.Sequence(WMuHLTFilter *
53  goodMuonsForW *
54  wmnTCCands *
55  wmnTCFilter
56  )
57 
58 
hltHighLevel_cfi