CMS 3D CMS Logo

SelectingProcedure_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 
6 
7 
8 
9 doubleMuonHLTTrigger = cms.EDFilter("TriggerResultsFilter",
10  hltResults = cms.InputTag("TriggerResults","","HLT"),
11  l1tResults = cms.InputTag(""),
12  throw = cms.bool(False),
13  triggerConditions = cms.vstring("HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v* OR HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_DZ_v*")
14 )
15 
16 
17 
18 
19 patMuonsAfterKinCuts = cms.EDFilter("PATMuonSelector",
20  src = cms.InputTag("slimmedMuons"),
21  cut = cms.string("pt > 8 && abs(eta) < 2.5"),
22  filter = cms.bool(True)
23 )
24 
25 
26 # For impact parameter (w.r.t. to PV) requirements, a vector collection is needed, therefore only dB < 0.2 required.
27 # The default requirements (in C++):
28 # 1) fabs(recoMu.muonBestTrack()->dxy(vertex->position())) < 0.2 ----> similar to dB < 0.2
29 # 2) fabs(recoMu.muonBestTrack()->dz(vertex->position())) < 0.5
30 patMuonsAfterTightID = cms.EDFilter("PATMuonSelector",
31  src = cms.InputTag("patMuonsAfterKinCuts"),
32  cut = cms.string(
33  "isPFMuon && isGlobalMuon"
34  " && muonID('GlobalMuonPromptTight')"
35  " && numberOfMatchedStations > 1"
36  " && innerTrack.hitPattern.trackerLayersWithMeasurement > 5"
37  " && innerTrack.hitPattern.numberOfValidPixelHits > 0"
38  " && dB < 0.2"
39  ),
40  filter = cms.bool(True)
41 )
42 
43 patMuonsAfterMediumID = cms.EDFilter("PATMuonSelector",
44  src = cms.InputTag("patMuonsAfterKinCuts"),
45  cut = cms.string("isMediumMuon"),
46  filter = cms.bool(True)
47 )
48 
49 patMuonsAfterLooseID = cms.EDFilter("PATMuonSelector",
50  src = cms.InputTag("patMuonsAfterKinCuts"),
51  cut = cms.string("isLooseMuon"),
52  filter = cms.bool(True)
53 )
54 
55 patMuonsAfterID = patMuonsAfterLooseID.clone()
56 
57 ZmumuCandidates = cms.EDProducer("CandViewShallowCloneCombiner",
58  checkCharge = cms.bool(True),
59  # require one of the muons with pT > 17 GeV, and an invariant mass > 20 GeV
60  cut = cms.string('charge = 0 & max(daughter(0).pt, daughter(1).pt) > 17 & mass > 20 & daughter(0).isGlobalMuon & daughter(1).isGlobalMuon'),
61  decay = cms.string("patMuonsAfterID@+ patMuonsAfterID@-")
62 )
63 
64 
65 ZmumuCandidatesFilter = cms.EDFilter("CandViewCountFilter",
66  src = cms.InputTag("ZmumuCandidates"),
67  minNumber = cms.uint32(1),
68 )
69 
70 selectedMuonsForEmbedding = cms.EDProducer("MuMuForEmbeddingSelector",
71  ZmumuCandidatesCollection = cms.InputTag("ZmumuCandidates")
72 )
73 
74 makePatMuonsZmumuSelection = cms.Sequence(
75  doubleMuonHLTTrigger
76  + patMuonsAfterKinCuts
77  + patMuonsAfterID
78  + ZmumuCandidates
79  + ZmumuCandidatesFilter
80  + selectedMuonsForEmbedding
81 )