CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
triggerMatcher_cfi.py
Go to the documentation of this file.
2 
3 # Examples for configurations of the trigger match for various physics objects
4 #
5 # A detailed description is given in
6 # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATTrigger#PATTriggerMatcher
7 # Cuts on the parameters
8 # - 'maxDPtRel' and
9 # - 'maxDeltaR'
10 # are NOT tuned (using old values from TQAF MC match, January 2008)
11 
12 
13 ## Default example matches ##
14 
15 # firing trigger objects used in succeeding HLT path 'HLT_Mu20'
16 cleanMuonTriggerMatchHLTMu20 = cms.EDProducer(
17  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR only, best match by DeltaR
18 , src = cms.InputTag( "cleanPatMuons" )
19 , matched = cms.InputTag( "patTrigger" ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
20 , matchedCuts = cms.string( 'path( "HLT_Mu20_v*" )' )
21 , maxDPtRel = cms.double( 0.5 )
22 , maxDeltaR = cms.double( 0.5 )
23 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
24 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
25 )
26 
27 # firing trigger objects used in succeeding HLT path 'HLT_DoubleMu6'
28 cleanMuonTriggerMatchHLTDoubleMu6 = cms.EDProducer(
29  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR only, best match by DeltaR
30 , src = cms.InputTag( "cleanPatMuons" )
31 , matched = cms.InputTag( "patTrigger" ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
32 , matchedCuts = cms.string( 'path( "HLT_DoubleMu6_v*" )' )
33 , maxDPtRel = cms.double( 0.5 )
34 , maxDeltaR = cms.double( 0.5 )
35 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
36 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
37 )
38 
39 # firing trigger objects used in succeeding HLT path 'HLT_Photon26_IsoVL_Photon18'
40 cleanPhotonTriggerMatchHLTPhoton26IsoVLPhoton18 = cms.EDProducer(
41  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR only, best match by DeltaR
42 , src = cms.InputTag( "cleanPatPhotons" )
43 , matched = cms.InputTag( "patTrigger" ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
44 , matchedCuts = cms.string( 'path( "HLT_Photon26_IsoVL_Photon18_v*" )' )
45 , maxDPtRel = cms.double( 0.5 )
46 , maxDeltaR = cms.double( 0.5 )
47 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
48 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
49 )
50 
51 # firing trigger objects used in succeeding HLT path 'HLT_Ele27_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT'
52 cleanElectronTriggerMatchHLTEle27CaloIdVTCaloIsoTTrkIdTTrkIsoT = cms.EDProducer(
53  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR only, best match by DeltaR
54 , src = cms.InputTag( "cleanPatElectrons" )
55 , matched = cms.InputTag( "patTrigger" ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
56 , matchedCuts = cms.string( 'path( "HLT_Ele27_CaloIdVT_CaloIsoT_TrkIdT_TrkIsoT_v*" )' )
57 , maxDPtRel = cms.double( 0.5 )
58 , maxDeltaR = cms.double( 0.5 )
59 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
60 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
61 )
62 
63 # firing trigger objects used in succeeding HLT path 'HLT_DoubleIsoPFTau20_Trk5'
64 cleanTauTriggerMatchHLTDoubleIsoPFTau20Trk5 = cms.EDProducer(
65  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR only, best match by DeltaR
66 , src = cms.InputTag( "cleanPatTaus" )
67 , matched = cms.InputTag( "patTrigger" ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
68 , matchedCuts = cms.string( 'path( "HLT_DoubleIsoPFTau20_Trk5_v*" )' )
69 , maxDPtRel = cms.double( 0.5 )
70 , maxDeltaR = cms.double( 0.5 )
71 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
72 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
73 )
74 
75 # firing trigger objects used in succeeding HLT path 'HLT_Jet240'
76 cleanJetTriggerMatchHLTJet240 = cms.EDProducer(
77  "PATTriggerMatcherDRLessByR" # match by DeltaR only, best match by DeltaR
78 , src = cms.InputTag( 'cleanPatJets' )
79 , matched = cms.InputTag( 'patTrigger' ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
80 , matchedCuts = cms.string( 'path( "HLT_Jet240_v*" )' )
81 , maxDPtRel = cms.double( 3.0 )
82 , maxDeltaR = cms.double( 0.4 )
83 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
84 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
85 )
86 
87 # firing trigger objects used in succeeding HLT path 'HLT_MET100'
88 metTriggerMatchHLTMET100 = cms.EDProducer(
89  "PATTriggerMatcherDRLessByR" # match by DeltaR only, best match by DeltaR
90 , src = cms.InputTag( 'patMETs' )
91 , matched = cms.InputTag( 'patTrigger' ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
92 , matchedCuts = cms.string( 'path( "HLT_MET100_v*" )' )
93 , maxDPtRel = cms.double( 3.0 )
94 , maxDeltaR = cms.double( 0.4 )
95 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
96 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
97 )
98 
99 # firing trigger objects used in succeeding HLT path 'HLT_Mu17_CentralJet30_v' (x-trigger)
100 cleanMuonTriggerMatchHLTMu17CentralJet30 = cms.EDProducer(
101  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR only, best match by DeltaR
102 , src = cms.InputTag( "cleanPatMuons" )
103 , matched = cms.InputTag( "patTrigger" ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
104 , matchedCuts = cms.string( 'type( "TriggerMuon" ) && path( "HLT_Mu17_CentralJet30_v*" )' )
105 , maxDPtRel = cms.double( 0.5 )
106 , maxDeltaR = cms.double( 0.5 )
107 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
108 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
109 )
110 cleanJetTriggerMatchHLTMu17CentralJet30 = cms.EDProducer(
111  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR only, best match by DeltaR
112 , src = cms.InputTag( "cleanPatJets" )
113 , matched = cms.InputTag( "patTrigger" ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
114 , matchedCuts = cms.string( 'type( "TriggerJet" ) && path( "HLT_Mu17_CentralJet30_v*" )' )
115 , maxDPtRel = cms.double( 3.0 )
116 , maxDeltaR = cms.double( 0.4 )
117 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
118 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
119 )
120 
121 
122 triggerMatchingDefaultSequence = cms.Sequence(
123  cleanMuonTriggerMatchHLTMu20
124 + cleanMuonTriggerMatchHLTDoubleMu6
125 + cleanPhotonTriggerMatchHLTPhoton26IsoVLPhoton18
126 + cleanElectronTriggerMatchHLTEle27CaloIdVTCaloIsoTTrkIdTTrkIsoT
127 + cleanTauTriggerMatchHLTDoubleIsoPFTau20Trk5
128 + cleanJetTriggerMatchHLTJet240
129 + metTriggerMatchHLTMET100
130 + cleanMuonTriggerMatchHLTMu17CentralJet30
131 + cleanJetTriggerMatchHLTMu17CentralJet30
132 )
133 
134 
135 ## Further examples ##
136 
137 # L1 e/gammas by original collection
138 cleanElectronTriggerMatchL1EGammaCollection = cms.EDProducer(
139  "PATTriggerMatcherDRLessByR" # match by DeltaR only, best match by DeltaR
140 , src = cms.InputTag( 'cleanPatElectrons' )
141 , matched = cms.InputTag( 'patTrigger' ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
142 , matchedCuts = cms.string( 'coll( "l1extraParticles:NonIsolated" ) || coll( "l1extraParticles:Isolated" )' )
143 , maxDPtRel = cms.double( 0.5 )
144 , maxDeltaR = cms.double( 0.5 )
145 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
146 , resolveByMatchQuality = cms.bool( False ) # take first match found per reco object
147 )
148 
149 # L1 and HLT muons by ID
150 cleanMuonTriggerMatchTriggerMuon = cms.EDProducer(
151  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR and DeltaPt, best match by DeltaR
152 , src = cms.InputTag( 'cleanPatMuons' )
153 , matched = cms.InputTag( 'patTrigger' ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
154 , matchedCuts = cms.string( 'type( "TriggerL1Mu" ) || type( "TriggerMuon" )' )
155 , maxDPtRel = cms.double( 0.5 )
156 , maxDeltaR = cms.double( 0.5 )
157 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
158 , resolveByMatchQuality = cms.bool( False ) # take first match found per reco object
159 )
160 
161 # firing trigger objects used in succeeding HLT paths of PD /SingleMu
162 cleanMuonTriggerMatchPDSingleMu = cms.EDProducer(
163  "PATTriggerMatcherDRDPtLessByR" # match by DeltaR and DeltaPt, best match by DeltaR
164 , src = cms.InputTag( 'cleanPatMuons' )
165 , matched = cms.InputTag( 'patTrigger' ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
166 , matchedCuts = cms.string( 'path( "HLT_IsoMu12_v*" ) || path( "HLT_IsoMu15_v*" ) || path( "HLT_IsoMu17_v*" ) || path( "HLT_IsoMu24_v*" ) || path( "HLT_IsoMu30_v*" ) || path( "HLT_L1SingleMu10_v*" ) || path( "HLT_L1SingleMu20_v*" ) || path( "HLT_L2Mu10_v*" ) || path( "HLT_L2Mu20_v*" ) || path( "HLT_Mu3_v*" ) || path( "HLT_Mu5_v*" ) || path( "HLT_Mu8_v*" ) || path( "HLT_Mu12_v*" ) || path( "HLT_Mu15_v*" ) || path( "HLT_Mu20_v*" ) || path( "HLT_Mu24_v*" ) || path( "HLT_Mu30_v*" )' )
167 , maxDPtRel = cms.double( 0.5 )
168 , maxDeltaR = cms.double( 0.5 )
169 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
170 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
171 )
172 
173 # all trigger objects used in HLT path 'HLT_Mu20' (fake MET)
174 metTriggerMatchHLTMu20 = cms.EDProducer(
175  "PATTriggerMatcherDRLessByR" # match by DeltaR only, best match by DeltaR
176 , src = cms.InputTag( 'patMETs' )
177 , matched = cms.InputTag( 'patTrigger' ) # default producer label as defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerProducer_cfi.py
178 , matchedCuts = cms.string( 'path( "HLT_Mu20_v*" )' )
179 , maxDPtRel = cms.double( 0.5 )
180 , maxDeltaR = cms.double( 0.5 )
181 , resolveAmbiguities = cms.bool( True ) # only one match per trigger object
182 , resolveByMatchQuality = cms.bool( True ) # take best match found per reco object: by DeltaR here (s. above)
183 )