CMS 3D CMS Logo

WZMuSkim_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 import copy
6 WZMuHLTFilter = copy.deepcopy(hltHighLevel)
7 WZMuHLTFilter.throw = cms.bool(False)
8 WZMuHLTFilter.HLTPaths = ["HLT_Mu9","HLT_Mu11","HLT_Mu15","HLT_Mu15_v*"]
9 
10 
11 
12 # Get muons of needed quality for Zs
13 looseMuonsForZ = cms.EDFilter("MuonSelector",
14  src = cms.InputTag("muons"),
15  cut = cms.string('pt > 10 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && abs(innerTrack().dxy)<2.0'),
16  filter = cms.bool(True)
17  )
18 
19 tightMuonsForZ = cms.EDFilter("MuonSelector",
20  src = cms.InputTag("looseMuonsForZ"),
21  cut = cms.string('pt > 20'),
22  filter = cms.bool(True)
23  )
24 
25 # build Z-> MuMu candidates
26 dimuons = cms.EDProducer("CandViewShallowCloneCombiner",
27  checkCharge = cms.bool(False),
28  cut = cms.string('mass > 30'),
29  decay = cms.string("tightMuonsForZ looseMuonsForZ")
30  )
31 
32 # Z filter
33 dimuonsFilter = cms.EDFilter("CandViewCountFilter",
34  src = cms.InputTag("dimuons"),
35  minNumber = cms.uint32(1)
36  )
37 
38 # Z filter
39 dimuonsFilter = cms.EDFilter("CandViewCountFilter",
40  src = cms.InputTag("dimuons"),
41  minNumber = cms.uint32(1)
42  )
43 
44 # Z Skim sequence
45 diMuonSelSeq = cms.Sequence(WZMuHLTFilter *
46  looseMuonsForZ *
47  tightMuonsForZ *
48  dimuons *
49  dimuonsFilter
50  )
51 
52 
53 
54 #Get muons of needed quality for Ws
55 goodMuonsForW = cms.EDFilter("MuonViewRefSelector",
56  src = cms.InputTag("muons"),
57  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'),
58  filter = cms.bool(True)
59  )
60 
61 # build W->MuNu candidates using PF MET
62 wmnPFCands = cms.EDProducer("CandViewShallowCloneCombiner",
63  checkCharge = cms.bool(False),
64  cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
65  decay = cms.string("goodMuonsForW pfMet")
66  )
67 
68 # W filter
69 wmnPFFilter = cms.EDFilter("CandViewCountFilter",
70  src = cms.InputTag("wmnPFCands"),
71  minNumber = cms.uint32(1)
72  )
73 
74 # build W->MuNu candidates using TC MET
75 wmnTCCands = cms.EDProducer("CandViewShallowCloneCombiner",
76  checkCharge = cms.bool(False),
77  cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
78  decay = cms.string("goodMuonsForW tcMet")
79  )
80 
81 # W filter
82 wmnTCFilter = cms.EDFilter("CandViewCountFilter",
83  src = cms.InputTag("wmnTCCands"),
84  minNumber = cms.uint32(1)
85  )
86 
87 
88 # W Skim sequences
89 pfMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
90  goodMuonsForW *
91  wmnPFCands *
92  wmnPFFilter
93  )
94 
95 
96 tcMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
97  goodMuonsForW *
98  wmnTCCands *
99  wmnTCFilter
100  )
101 
102 
hltHighLevel_cfi