CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
patCandidatesForDimuonsSequences_cff.py
Go to the documentation of this file.
2 
4 
5 # PAT TRACKS
6 
7 # before pat: conversion to track candidates for pat; isolation
8 #from PhysicsTools.PatAlgos.recoLayer0.genericTrackCandidates_cff import *
10 patAODTrackCands.cut = 'pt > 10.'
11 
12 # before pat: MC match
13 #from PhysicsTools.PatAlgos.mcMatchLayer0.trackMuMatch_cfi import *
15 trackMuMatch.maxDeltaR = 0.15
16 trackMuMatch.maxDPtRel = 1.0
17 trackMuMatch.resolveAmbiguities = True
18 trackMuMatch.resolveByMatchQuality = True
19 
20 # pat tracks
21 from PhysicsTools.PatAlgos.producersLayer1.genericParticleProducer_cfi import patGenericParticles
22 
23 allPatTracks = patGenericParticles.clone(
24  src = cms.InputTag("patAODTrackCands"),
25  # isolation configurables
26  userIsolation = cms.PSet(
27  tracker = cms.PSet(
28  veto = cms.double(0.015),
29  src = cms.InputTag("patAODTrackIsoDepositCtfTk"),
30  deltaR = cms.double(0.3),
31  threshold = cms.double(1.5)
32  ),
33  ecal = cms.PSet(
34  src = cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ecal"),
35  deltaR = cms.double(0.3)
36  ),
37  hcal = cms.PSet(
38  src = cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","hcal"),
39  deltaR = cms.double(0.3)
40  ),
41  ),
42  isoDeposits = cms.PSet(
43  tracker = cms.InputTag("patAODTrackIsoDepositCtfTk"),
44  ecal = cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","ecal"),
45  hcal = cms.InputTag("patAODTrackIsoDepositCalByAssociatorTowers","hcal")
46  ),
47  addGenMatch = cms.bool(True),
48  genParticleMatch = cms.InputTag("trackMuMatch")
49 )
50 
52 selectedPatTracks.cut = 'pt > 10.'
53 
54 # PAT MUONS
55 
56 # before pat: MC match
58 muonMatch.maxDeltaR = 0.15
59 muonMatch.maxDPtRel = 1.0
60 muonMatch.resolveAmbiguities = True
61 muonMatch.resolveByMatchQuality = True
62 
63 # pat muons
64 # needed starting from 3_6_1
66 #
68 patMuons.isoDeposits = cms.PSet(
69  tracker = cms.InputTag("muIsoDepositTk"),
70  ecal = cms.InputTag("muIsoDepositCalByAssociatorTowers","ecal"),
71  hcal = cms.InputTag("muIsoDepositCalByAssociatorTowers","hcal"),
72 )
73 patMuons.userIsolation = cms.PSet(
74  hcal = cms.PSet(
75  src = cms.InputTag("muIsoDepositCalByAssociatorTowers","hcal"),
76  deltaR = cms.double(0.3)
77  ),
78  tracker = cms.PSet(
79  veto = cms.double(0.015),
80  src = cms.InputTag("muIsoDepositTk"),
81  deltaR = cms.double(0.3),
82  threshold = cms.double(1.5)
83  ),
84  ecal = cms.PSet(
85  src = cms.InputTag("muIsoDepositCalByAssociatorTowers","ecal"),
86  deltaR = cms.double(0.3)
87  )
88  )
89 
91 selectedPatMuons.cut = 'pt > 0. & abs(eta) < 100.0'
92 
93 # trigger info
95 # to access 8E29 menus
96 #patTrigger.triggerResults = cms.InputTag( "TriggerResults::HLT8E29" )
97 #patTrigger.triggerEvent = cms.InputTag( "hltTriggerSummaryAOD::HLT8E29" )
98 # to access 1E31 menus
99 patTrigger.triggerResults = cms.InputTag( "TriggerResults::HLT" )
100 patTrigger.triggerEvent = cms.InputTag( "hltTriggerSummaryAOD::HLT" )
101 
102 muonTriggerMatchHLTMuons = cms.EDFilter( "PATTriggerMatcherDRDPtLessByR",
103  src = cms.InputTag( "selectedPatMuons" ),
104  matched = cms.InputTag( "patTrigger" ),
105  andOr = cms.bool( False ),
106  filterIdsEnum = cms.vstring( 'TriggerMuon' ), # 'TriggerMuon' is the enum from trigger::TriggerObjectType for HLT muons
107  filterIds = cms.vint32( 0 ),
108  filterLabels = cms.vstring( '*' ),
109  pathNames = cms.vstring( 'HLT_Mu9' ),
110  collectionTags = cms.vstring( '*' ),
111  maxDPtRel = cms.double( 1.0 ),
112  maxDeltaR = cms.double( 0.2 ),
113  resolveAmbiguities = cms.bool( True ),
114  resolveByMatchQuality = cms.bool( True )
115 )
116 
118 #patTriggerEvent.patTriggerMatches = [ "muonTriggerMatchHLTMu9" ]
119 patTriggerEvent.patTriggerMatches = cms.VInputTag( "muonTriggerMatchHLTMuons" )
120 #patTriggerEvent.patTriggerMatches = cms.VInputTag( "muonTriggerMatchHLTMu9" )
121 
122 patTriggerSequence = cms.Sequence(
123  patTrigger *
124  muonTriggerMatchHLTMuons *
125 # muonTriggerMatchHLTMu9 *
126  patTriggerEvent
127 )
128 
129 selectedPatMuonsTriggerMatch = cms.EDProducer( "PATTriggerMatchMuonEmbedder",
130  src = cms.InputTag( "selectedPatMuons" ),
131  matches = cms.VInputTag( "muonTriggerMatchHLTMuons" )
132 )
133 
134 muonTriggerMatchEmbedder = cms.Sequence(
135  selectedPatMuonsTriggerMatch
136 )
137 
138 # pat sequences
139 
140 beforePatTracks = cms.Sequence(
141  patAODTrackCandSequence *
142  trackMuMatch
143 )
144 
145 beforePatMuons = cms.Sequence(
146  muonMatch
147 )
148 
149 beforePat = cms.Sequence(
150  beforePatTracks +
151  beforePatMuons
152 )
153 
154 patCandsSequence = cms.Sequence(
155  patMuons *
156  selectedPatMuons *
157  allPatTracks *
158  selectedPatTracks
159 )
160 
161 goodMuonRecoForDimuon = cms.Sequence(
162  beforePat *
163  patCandsSequence *
164  patTriggerSequence *
165  muonTriggerMatchEmbedder
166 )
167