CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ZmumuStandalonSelection_cff.py
Go to the documentation of this file.
3 patMuons.addGenMatch = cms.bool(False)
4 
5 goodVertex = cms.EDFilter("VertexSelector",
6  src = cms.InputTag("offlinePrimaryVertices"),
7  cut = cms.string("(!isFake) & ndof > 3 & abs(z) < 15 & position.Rho < 2"),
8  filter = cms.bool(True)
9 )
10 
11 goodMuons = cms.EDFilter("PATMuonSelector",
12  src = cms.InputTag("patMuons"),
13  cut = cms.string(
14  'pt > 10 && abs(eta) < 2.5 && isGlobalMuon && isTrackerMuon '
15  ' && innerTrack.hitPattern.numberOfValidTrackerHits > 9 & innerTrack.hitPattern.numberOfValidPixelHits > 0'
16  ' && abs(dB) < 0.2 && globalTrack.normalizedChi2 < 10'
17  ' && globalTrack.hitPattern.numberOfValidMuonHits > 0 && numberOfMatches > 1'
18  ),
19  filter = cms.bool(True)
20 )
21 
22 goodMuonsPFIso = cms.EDFilter("PATMuonRefSelector",
23  src = cms.InputTag("goodMuons"),
24  cut = cms.string('(pfIsolationR04().sumChargedHadronPt - pfIsolationR04().sumPUPt)<0.1*pt'),
25  filter = cms.bool(False)
26 )
27 
28 goldenZmumuCandidatesGe0IsoMuons = cms.EDProducer("CandViewShallowCloneCombiner",
29  checkCharge = cms.bool(True),
30  # require one of the muons with pT > 20
31  cut = cms.string('charge = 0 & max(daughter(0).pt,daughter(1).pt)>20'),
32  decay = cms.string("goodMuons@+ goodMuons@-")
33 )
34 
35 # Currently disabled as this produces duplicate muons; we don't need it anyway currently
36 #goldenZmumuCandidatesGe1IsoMuons = goldenZmumuCandidatesGe0IsoMuons.clone(
37 # decay = cms.string("goodMuons@+ goodMuonsPFIso@-")
38 #)
39 
40 goldenZmumuCandidatesGe2IsoMuons = goldenZmumuCandidatesGe0IsoMuons.clone(
41  decay = cms.string("goodMuonsPFIso@+ goodMuonsPFIso@-")
42 )
43 
44 goldenZmumuFilter = cms.EDFilter("CandViewCountFilter",
45  src = cms.InputTag("goldenZmumuCandidatesGe0IsoMuons"), # loose selection
46  #src = cms.InputTag("goldenZmumuCandidatesGe1IsoMuons"), # tight selection
47  minNumber = cms.uint32(1)
48 )
49 
50 goldenZmumuSelectionSequence = cms.Sequence(
51  goodVertex
52  * patMuons
53  * goodMuons
54  * goodMuonsPFIso
55  * goldenZmumuCandidatesGe0IsoMuons
56 # * goldenZmumuCandidatesGe1IsoMuons
57  * goldenZmumuCandidatesGe2IsoMuons
58  * goldenZmumuFilter
59 )