CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WZMuSkim_cff.py
Go to the documentation of this file.
2 
3 ### HLT filter
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 ### Z -> MuMu candidates
11 
12 # Get muons of needed quality for Zs
13 goodMuonsForZ = cms.EDFilter("MuonSelector",
14  src = cms.InputTag("muons"),
15  cut = cms.string('pt > 20 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && isolationR03().sumPt<3.0 && abs(innerTrack().dxy)<1.0'),
16  filter = cms.bool(True)
17  )
18 
19 # build Z-> MuMu candidates
20 dimuons = cms.EDProducer("CandViewShallowCloneCombiner",
21  checkCharge = cms.bool(True),
22  cut = cms.string('mass > 60'),
23  decay = cms.string("goodMuonsForZ@+ goodMuonsForZ@-")
24  )
25 
26 # Z filter
27 dimuonsFilter = cms.EDFilter("CandViewCountFilter",
28  src = cms.InputTag("dimuons"),
29  minNumber = cms.uint32(1)
30  )
31 
32 # Z Skim sequence
33 diMuonSelSeq = cms.Sequence(WZMuHLTFilter *
34  goodMuonsForZ *
35  dimuons *
36  dimuonsFilter
37  )
38 
39 ### W -> MuNu candidates
40 
41 #Get muons of needed quality for Ws
42 goodMuonsForW = cms.EDFilter("MuonViewRefSelector",
43  src = cms.InputTag("muons"),
44  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'),
45  filter = cms.bool(True)
46  )
47 
48 # build W->MuNu candidates using PF MET
49 wmnPFCands = cms.EDProducer("CandViewShallowCloneCombiner",
50  checkCharge = cms.bool(False),
51  cut = cms.string('sqrt((daughter(0).pt+daughter(1).pt)*(daughter(0).pt+daughter(1).pt)-pt*pt)>50'),
52  decay = cms.string("goodMuonsForW pfMet")
53  )
54 
55 # W filter
56 wmnPFFilter = cms.EDFilter("CandViewCountFilter",
57  src = cms.InputTag("wmnPFCands"),
58  minNumber = cms.uint32(1)
59  )
60 
61 # build W->MuNu candidates using TC MET
62 wmnTCCands = 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 tcMet")
66  )
67 
68 # W filter
69 wmnTCFilter = cms.EDFilter("CandViewCountFilter",
70  src = cms.InputTag("wmnTCCands"),
71  minNumber = cms.uint32(1)
72  )
73 
74 
75 # W Skim sequences
76 pfMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
77  goodMuonsForW *
78  wmnPFCands *
79  wmnPFFilter
80  )
81 
82 
83 tcMetWMuNuSeq = cms.Sequence(WZMuHLTFilter *
84  goodMuonsForW *
85  wmnTCCands *
86  wmnTCFilter
87  )
88 
89