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_Mu8_TrkIsoVVL_DZ_Mass8_v*") # from 2017 on (up to Run 3, it seems)
14  # triggerConditions = cms.vstring("HLT_Mu17_TrkIsoVVL_Mu8_TrkIsoVVL_DZ_v* OR HLT_Mu17_TrkIsoVVL_TkMu8_TrkIsoVVL_DZ_v*") # for 2016
15 )
16 
17 
18 
19 
20 patMuonsAfterKinCuts = cms.EDFilter("PATMuonSelector",
21  src = cms.InputTag("slimmedMuons"),
22  cut = cms.string("pt > 8 && abs(eta) < 2.5"),
23  filter = cms.bool(True)
24 )
25 
26 
27 # For impact parameter (w.r.t. to PV) requirements, a vector collection is needed, therefore only dB < 0.2 required.
28 # The default requirements (in C++):
29 # 1) fabs(recoMu.muonBestTrack()->dxy(vertex->position())) < 0.2 ----> similar to dB < 0.2
30 # 2) fabs(recoMu.muonBestTrack()->dz(vertex->position())) < 0.5
31 patMuonsAfterTightID = cms.EDFilter("PATMuonSelector",
32  src = cms.InputTag("patMuonsAfterKinCuts"),
33  cut = cms.string(
34  "isPFMuon && isGlobalMuon"
35  " && muonID('GlobalMuonPromptTight')"
36  " && numberOfMatchedStations > 1"
37  " && innerTrack.hitPattern.trackerLayersWithMeasurement > 5"
38  " && innerTrack.hitPattern.numberOfValidPixelHits > 0"
39  " && dB < 0.2"
40  ),
41  filter = cms.bool(True)
42 )
43 
44 patMuonsAfterMediumID = cms.EDFilter("PATMuonSelector",
45  src = cms.InputTag("patMuonsAfterKinCuts"),
46  cut = cms.string("isMediumMuon"),
47  filter = cms.bool(True)
48 )
49 
50 patMuonsAfterLooseID = cms.EDFilter("PATMuonSelector",
51  src = cms.InputTag("patMuonsAfterKinCuts"),
52  cut = cms.string("isLooseMuon"),
53  filter = cms.bool(True)
54 )
55 
56 patMuonsAfterID = patMuonsAfterLooseID.clone()
57 
58 ZmumuCandidates = cms.EDProducer("CandViewShallowCloneCombiner",
59  checkCharge = cms.bool(True),
60  # require one of the muons with pT > 17 GeV, and an invariant mass > 20 GeV
61  cut = cms.string('charge = 0 & max(daughter(0).pt, daughter(1).pt) > 17 & mass > 20 & daughter(0).isGlobalMuon & daughter(1).isGlobalMuon'),
62  decay = cms.string("patMuonsAfterID@+ patMuonsAfterID@-")
63 )
64 
65 
66 ZmumuCandidatesFilter = cms.EDFilter("CandViewCountFilter",
67  src = cms.InputTag("ZmumuCandidates"),
68  minNumber = cms.uint32(1)
69  # filter = cms.bool(True)
70 )
71 
72 selectedMuonsForEmbedding = cms.EDProducer("MuMuForEmbeddingSelector",
73  ZmumuCandidatesCollection = cms.InputTag("ZmumuCandidates"),
74  use_zmass = cms.bool(False),
75  inputTagVertex = cms.InputTag("offlinePrimaryVertices"),
76  inputTagBeamSpot = cms.InputTag("offlineBeamSpot"),
77  PuppiMet = cms.InputTag("slimmedMETsPuppi"),
78  Met = cms.InputTag("slimmedMETs"),
79 )
80 
81 makePatMuonsZmumuSelection = cms.Sequence(
82  doubleMuonHLTTrigger
83  + patMuonsAfterKinCuts
84  + patMuonsAfterID
85  + ZmumuCandidates
86  + ZmumuCandidatesFilter
87  + selectedMuonsForEmbedding
88 )
The trigger filter module.