1 import FWCore.ParameterSet.Config
as cms
4 from PhysicsTools.NanoAOD.triggerObjectTableProducer_cfi
import triggerObjectTableProducer
5 from PhysicsTools.NanoAOD.globalVariablesTableProducer_cfi
import globalVariablesTableProducer
8 unpackedPatTrigger = cms.EDProducer(
"PATTriggerObjectStandAloneUnpacker",
9 patTriggerObjectsStandAlone = cms.InputTag(
'slimmedPatTrigger'),
10 triggerResults = cms.InputTag(
'TriggerResults::HLT'),
11 unpackFilterLabels = cms.bool(
True)
14 def mksel( selection, doc=None, bit=None):
17 selection,ddoc=
OR(selection)
18 if 'AND' in selection:
19 selection,ddoc=
AND(selection)
20 if type(selection)==list:
21 selection,ddoc=
OR(selection)
22 if type(selection)==tuple:
23 selection,ddoc=
AND(selection)
27 return cms.PSet(selection=cms.string(selection),doc=cms.string(doc),bit=cms.uint32(bit))
if bit
is not None else cms.PSet(selection=cms.string(selection),doc=cms.string(doc))
30 if (
not type(tokens)
in [list,tuple]):
32 tokens= [t.strip().rstrip()
for t
in tokens.split(OR_or_AND)]
34 doc=f
' {OR_or_AND} '.
join(tokens)
35 selection = f
"filter('{tokens[0]}')" 36 for token
in tokens[1:]:
37 filter = f
"filter('{token}')" 38 selection = f
"{f}({filter},{selection})" 45 triggerObjectTable = triggerObjectTableProducer.clone(
46 name= cms.string(
"TrigObj"),
47 src = cms.InputTag(
"unpackedPatTrigger"),
48 l1EG = cms.InputTag(
"caloStage2Digis",
"EGamma"),
49 l1Sum = cms.InputTag(
"caloStage2Digis",
"EtSum"),
50 l1Jet = cms.InputTag(
"caloStage2Digis",
"Jet"),
51 l1Muon = cms.InputTag(
"gmtStage2Digis",
"Muon"),
52 l1Tau = cms.InputTag(
"caloStage2Digis",
"Tau"),
53 selections = cms.PSet(
55 doc = cms.string(
"PixelMatched e/gamma"),
57 sel = cms.string(
"type(92) && pt > 7 && coll('hltEgammaCandidates') && filter('*PixelMatchFilter')"),
58 l1seed = cms.string(
"type(-98)"), l1deltaR = cms.double(0.3),
60 skipObjectsNotPassingQualityBits = cms.bool(
True),
61 qualityBits = cms.VPSet(
62 mksel(
"filter('*CaloIdLTrackIdLIsoVL*TrackIso*Filter')",
"CaloIdL_TrackIdL_IsoVL"),
63 mksel(
"filter('hltEle*WPTight*TrackIsoFilter*')",
"1e (WPTight)"),
64 mksel(
"filter('hltEle*WPLoose*TrackIsoFilter')",
"1e (WPLoose)"),
65 mksel(
"filter('*OverlapFilter*IsoEle*PFTau*')",
"OverlapFilter PFTau"),
66 mksel(
"filter('hltEle*Ele*CaloIdLTrackIdLIsoVL*Filter')",
"2e"),
67 mksel(
"filter('hltMu*TrkIsoVVL*Ele*CaloIdLTrackIdLIsoVL*Filter*')",
"1e-1mu"),
68 mksel(
"filter('hlt*OverlapFilterIsoEle*PFTau*')",
"1e-1tau"),
69 mksel(
"filter('hltEle*Ele*Ele*CaloIdLTrackIdLDphiLeg*Filter')",
"3e"),
70 mksel([
"hltL3fL1Mu*DoubleEG*Filtered*",
"hltMu*DiEle*CaloIdLTrackIdLElectronleg*Filter"],
"2e-1mu"),
71 mksel([
"hltL3fL1DoubleMu*EG*Filter*",
"hltDiMu*Ele*CaloIdLTrackIdLElectronleg*Filter"],
"1e-2mu"),
72 mksel((
"hltEle32L1DoubleEGWPTightGsfTrackIsoFilter",
"hltEGL1SingleEGOrFilter"),
"1e (32_L1DoubleEG_AND_L1SingleEGOr)"),
73 mksel(
"filter('hltEle*CaloIdVTGsfTrkIdTGsfDphiFilter')",
"1e (CaloIdVT_GsfTrkIdT)"),
74 mksel(
"path('HLT_Ele*PFJet*')",
"1e (PFJet)"),
75 mksel([
"hltEG175HEFilter",
"hltEG200HEFilter"],
"1e (Photon175_OR_Photon200)"),
80 sel = cms.string(
"type(92) && pt > 15 && coll('hltEgammaCandidates')"),
81 l1seed = cms.string(
"type(-98)"), l1deltaR = cms.double(0.3),
83 skipObjectsNotPassingQualityBits = cms.bool(
True),
84 qualityBits = cms.VPSet(
85 mksel(
"filter('hltEG33L1EG26HEFilter')",
"hltEG33L1EG26HEFilter"),
86 mksel(
"filter('hltEG50HEFilter')",
"hltEG50HEFilter"),
87 mksel(
"filter('hltEG75HEFilter')",
"hltEG75HEFilter"),
88 mksel(
"filter('hltEG90HEFilter')",
"hltEG90HEFilter"),
89 mksel(
"filter('hltEG120HEFilter')",
"hltEG120HEFilter"),
90 mksel(
"filter('hltEG150HEFilter')",
"hltEG150HEFilter"),
91 mksel(
"filter('hltEG175HEFilter')",
"hltEG150HEFilter"),
92 mksel(
"filter('hltEG200HEFilter')",
"hltEG200HEFilter"),
93 mksel(
"filter('hltHtEcal800')",
"hltHtEcal800"),
94 mksel(
"filter('hltEG110EBTightIDTightIsoTrackIsoFilter')",
"hltEG110EBTightIDTightIsoTrackIsoFilter"),
95 mksel(
"filter('hltEG120EBTightIDTightIsoTrackIsoFilter')",
"hltEG120EBTightIDTightIsoTrackIsoFilter"),
96 mksel(
"filter('hltMu17Photon30IsoCaloIdPhotonlegTrackIsoFilter')",
"1mu-1photon"),
97 mksel(
"filter('hltEG30LR9Id85b90eHE12R9Id50b80eR9IdLastFilter')",
"hltEG30LR9Id85b90eHE12R9Id50b80eR9IdLastFilter"),
98 mksel(
"filter('hltEG30LIso60CaloId15b35eHE12R9Id50b80eEcalIsoLastFilter')",
"hltEG30LIso60CaloId15b35eHE12R9Id50b80eEcalIsoLastFilter"),
99 mksel(
"filter('hltEG22Iso60CaloId15b35eHE12R9Id50b80eTrackIsoUnseededLastFilter')",
"hltEG22Iso60CaloId15b35eHE12R9Id50b80eTrackIsoUnseededLastFilter"),
100 mksel(
"filter('hltEG22R9Id85b90eHE12R9Id50b80eR9UnseededLastFilter')",
"hltEG22R9Id85b90eHE12R9Id50b80eR9UnseededLastFilter"),
101 mksel(
"filter('hltEG30Iso60CaloId15b35eR9Id50b90eHE12b10eR9Id50b80eEcalIsoFilter')",
"hltEG30Iso60CaloId15b35eR9Id50b90eHE12b10eR9Id50b80eEcalIsoFilter"),
102 mksel(
"filter('hltEG18TrackIso60Iso60CaloId15b35eR9Id50b90eHE12b10eR9Id50b80eTrackIsoUnseededFilter')",
"hltEG18TrackIso60Iso60CaloId15b35eR9Id50b90eHE12b10eR9Id50b80eTrackIsoUnseededFilter")
107 sel = cms.string(
"type(83) && pt > 5 && (coll('hltIterL3MuonCandidates') || (pt > 45 && coll('hltHighPtTkMuonCands')) || (pt > 95 && coll('hltOldL3MuonCandidates')))"),
108 l1seed = cms.string(
"type(-81)"), l1deltaR = cms.double(0.5),
109 l2seed = cms.string(
"type(83) && coll('hltL2MuonCandidates')"), l2deltaR = cms.double(0.3),
110 skipObjectsNotPassingQualityBits = cms.bool(
True),
111 qualityBits = cms.VPSet(
112 mksel([
"*RelTrkIsoVVLFiltered0p4",
"*RelTrkIsoVVLFiltered"],
"TrkIsoVVL"),
113 mksel([
"hltL3crIso*IsoFiltered0p07",
"hltL3crIso*IsoFiltered0p08",
"hltL3crIso*IsoFiltered"],
"Iso"),
114 mksel(
"filter('*OverlapFilterIsoMu*PFTau*')",
"OverlapFilter PFTau"),
115 mksel([
"hltL3crIsoL1*SingleMu*IsoFiltered0p07",
"hltL3crIsoL1sMu*IsoFiltered0p07",
"hltL3crIsoL1*SingleMu*IsoFiltered0p08",
"hltL3crIsoL1sMu*IsoFiltered0p08",
"hltL3crIsoL1*SingleMu*IsoFiltered",
"hltL3crIsoL1sMu*IsoFiltered"],
"1mu"),
116 mksel(
"filter('hltDiMuon*Filtered*')",
"2mu"),
117 mksel(
"filter('hltMu*TrkIsoVVL*Ele*CaloIdLTrackIdLIsoVL*Filter*')",
"1mu-1e"),
118 mksel(
"filter('hlt*OverlapFilterIsoMu*PFTau*')",
"1mu-1tau"),
119 mksel(
"filter('hltL3fL1TripleMu*')",
"3mu"),
120 mksel([
"hltL3fL1DoubleMu*EG*Filtered*",
"hltDiMu*Ele*CaloIdLTrackIdLElectronleg*Filter"],
"2mu-1e"),
121 mksel([
"hltL3fL1Mu*DoubleEG*Filtered*",
"hltMu*DiEle*CaloIdLTrackIdLElectronleg*Filter"],
"1mu-2e"),
122 mksel([
"hltL3fL1sMu*L3Filtered50*",
"hltL3fL1sMu*TkFiltered50*"],
"1mu (Mu50)"),
123 mksel([
"hltL3fL1sMu*L3Filtered100*",
"hltL3fL1sMu*TkFiltered100*"],
"1mu (Mu100)"),
124 mksel(
"filter('hltMu17Photon30IsoCaloIdMuonlegL3Filtered17Q')",
"1mu-1photon")
129 sel = cms.string(
"type(84) && pt > 5 && coll('*Tau*') && ( filter('*LooseChargedIso*') || filter('*MediumChargedIso*') || filter('*DeepTau*') || filter('*TightChargedIso*') || filter('*TightOOSCPhotons*') || filter('hltL2TauIsoFilter') || filter('*OverlapFilterIsoMu*') || filter('*OverlapFilterIsoEle*') || filter('*L1HLTMatched*') || filter('*Dz02*') || filter('*DoublePFTau*') || filter('*SinglePFTau*') || filter('hlt*SelectedPFTau') || filter('*DisplPFTau*') )"),
130 l1seed = cms.string(
"type(-100)"), l1deltaR = cms.double(0.3),
131 l2seed = cms.string(
"type(84) && coll('hltL2TauJetsL1IsoTauSeeded')"), l2deltaR = cms.double(0.3),
132 skipObjectsNotPassingQualityBits = cms.bool(
True),
133 qualityBits = cms.VPSet(
134 mksel(
"filter('*LooseChargedIso*')",
"LooseChargedIso"),
135 mksel(
"filter('*MediumChargedIso*')",
"MediumChargedIso"),
136 mksel(
"filter('*TightChargedIso*')",
"TightChargedIso"),
137 mksel(
"filter('*DeepTau*')",
"DeepTau"),
138 mksel(
"filter('*TightOOSCPhotons*')",
"TightID OOSC photons"),
139 mksel(
"filter('*Hps*')",
"HPS"),
140 mksel(
"filter('hlt*DoublePFTau*TrackPt1*ChargedIsolation*Dz02*')",
"charged iso di-tau"),
141 mksel(
"filter('hlt*DoublePFTau*DeepTau*L1HLTMatched')",
"deeptau di-tau"),
142 mksel(
"filter('hlt*OverlapFilterIsoEle*WPTightGsf*PFTau*')",
"e-tau"),
143 mksel(
"filter('hlt*OverlapFilterIsoMu*PFTau*')",
"mu-tau"),
144 mksel(
"filter('hlt*SelectedPFTau*L1HLTMatched')",
"single-tau/tau+MET"),
145 mksel(
"filter('hlt*DoublePFTau*TrackPt1*ChargedIso*')",
"run 2 VBF+ditau"),
146 mksel(
"filter('hlt*DoublePFTau*Track*ChargedIso*AgainstMuon')",
"run 3 VBF+ditau"),
147 mksel(
"filter('hltHpsSinglePFTau*HLTMatched')",
"run 3 double PF jets + ditau"),
148 mksel(
"filter('hltHpsOverlapFilterDeepTauDoublePFTau*PFJet*')",
"di-tau + PFJet"),
149 mksel(
"filter('hlt*Double*ChargedIsoDisplPFTau*Dxy*')",
"Displaced Tau"),
150 mksel(
"filter('*Monitoring')",
"Monitoring"),
151 mksel(
"filter('*Reg')",
"regional paths"),
152 mksel(
"filter('*L1Seeded')",
"L1 seeded paths"),
153 mksel(
"filter('*1Prong')",
"1 prong tau paths")
156 BoostedTau = cms.PSet(
157 id = cms.int32(1515),
158 sel = cms.string(
"type(85) && pt > 120 && coll('hltAK8PFJetsCorrected') && filter('hltAK8SinglePFJets*SoftDropMass40*ParticleNetTauTau')"),
159 l1seed = cms.string(
"type(-99)"), l1deltaR = cms.double(0.3),
160 l2seed = cms.string(
"type(85) && coll('hltAK8CaloJetsCorrectedIDPassed')"), l2deltaR = cms.double(0.3),
161 skipObjectsNotPassingQualityBits = cms.bool(
True),
162 qualityBits = cms.VPSet(
163 mksel(
"filter('hltAK8SinglePFJets*SoftDropMass40*ParticleNetTauTau')",
"HLT_AK8PFJetX_SoftDropMass40_PFAK8ParticleNetTauTau0p30"),
164 mksel([
"hltAK8SinglePFJets230SoftDropMass40PNetTauTauTag0p03"])
169 sel = cms.string(
"( type(0) || type(85) || type(86) || type(-99) )"),
170 l1seed = cms.string(
"type(-99)"), l1deltaR = cms.double(0.3),
171 l2seed = cms.string(
"type(85) || type(86) || type(-99)"), l2deltaR = cms.double(0.3),
172 skipObjectsNotPassingQualityBits = cms.bool(
True),
173 qualityBits = cms.VPSet(
174 mksel([
"hlt4PixelOnlyPFCentralJetTightIDPt20"]),
175 mksel([
"hlt3PixelOnlyPFCentralJetTightIDPt30"]),
176 mksel([
"hltPFJetFilterTwoC30"]),
177 mksel([
"hlt4PFCentralJetTightIDPt30"]),
178 mksel([
"hlt4PFCentralJetTightIDPt35"]),
179 mksel([
"hltQuadCentralJet30"]),
180 mksel([
"hlt2PixelOnlyPFCentralJetTightIDPt40"]),
181 mksel([
"hltL1sTripleJet1008572VBFIorHTTIorDoubleJetCIorSingleJet",
"hltL1sTripleJet1058576VBFIorHTTIorDoubleJetCIorSingleJet",
"hltL1sTripleJetVBFIorHTTIorSingleJet"]),
182 mksel([
"hlt3PFCentralJetTightIDPt40"]),
183 mksel([
"hlt3PFCentralJetTightIDPt45"]),
184 mksel([
"hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet",
"hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet"]),
185 mksel([
"hltBTagCaloDeepCSVp17Double"]),
186 mksel([
"hltPFCentralJetLooseIDQuad30"]),
187 mksel([
"hlt1PFCentralJetLooseID75"]),
188 mksel([
"hlt2PFCentralJetLooseID60"]),
189 mksel([
"hlt3PFCentralJetLooseID45"]),
190 mksel([
"hlt4PFCentralJetLooseID40"]),
191 mksel(
"filter('hltHpsOverlapFilterDeepTauDoublePFTau*PFJet*')",
"(Double tau + jet) hltHpsOverlapFilterDeepTauDoublePFTau*PFJet*"),
192 mksel(
"filter('*CrossCleaned*MediumDeepTauDitauWPPFTau*')",
"(VBF cross-cleaned from medium deeptau PFTau) *CrossCleaned*MediumDeepTauDitauWPPFTau*"),
193 mksel(
"filter('*CrossCleanedUsingDiJetCorrChecker*')",
"(VBF cross-cleaned using dijet correlation checker) *CrossCleanedUsingDiJetCorrChecker*"),
194 mksel(
"filter('hltHpsOverlapFilterDeepTauPFTau*PFJet*')",
"(monitoring muon + tau + jet) hltHpsOverlapFilterDeepTauPFTau*PFJet*"),
195 mksel([
"hlt2PFCentralJetTightIDPt50"]),
196 mksel([
"hlt1PixelOnlyPFCentralJetTightIDPt60"]),
197 mksel([
"hlt1PFCentralJetTightIDPt70"]),
198 mksel([
"hltBTagPFDeepJet1p5Single"]),
199 mksel([
"hltBTagPFDeepJet4p5Triple"]),
200 mksel([
"hltBTagCentralJetPt35PFParticleNet2BTagSum0p65",
"hltBTagCentralJetPt30PFParticleNet2BTagSum0p65",
"hltPFJetTwoC30PFBTagParticleNet2BTagSum0p65",
"hltPFCentralJetPt30PNet2BTagMean0p55"]),
201 mksel([
"hlt2PixelOnlyPFCentralJetTightIDPt20",
"hlt1PixelOnlyPFCentralJetTightIDPt50"]),
202 mksel([
"hlt2PFCentralJetTightIDPt30",
"hltPF2CentralJetTightIDPt30"]),
203 mksel([
"hlt1PFCentralJetTightIDPt60"]),
204 mksel([
"hltPF2CentralJetPt30PNet2BTagMean0p50"]),
209 sel = cms.string(
"type(85) && pt > 120"),
210 l1seed = cms.string(
"type(-99)"), l1deltaR = cms.double(0.3),
211 l2seed = cms.string(
"type(85) && coll('hltAK8CaloJetsCorrectedIDPassed')"), l2deltaR = cms.double(0.3),
212 skipObjectsNotPassingQualityBits = cms.bool(
True),
213 qualityBits = cms.VPSet(
214 mksel(
"coll('hltAK8PFJetsCorrected')"),
215 mksel([
"hltAK8SingleCaloJet200"]),
216 mksel(
"coll('hltAK8PFSoftDropJets230')"),
217 mksel([
"hltAK8SinglePFJets230SoftDropMass40BTagParticleNetBB0p35",
218 "hltAK8SinglePFJets250SoftDropMass40BTagParticleNetBB0p35",
219 "hltAK8SinglePFJets275SoftDropMass40BTagParticleNetBB0p35"]),
220 mksel([
"hltAK8DoublePFJetSDModMass30"]),
221 mksel([
"hltAK8DoublePFJetSDModMass50"]),
226 sel = cms.string(
"type(87) && pt > 30 && coll('hltPFMETProducer')"),
227 l1seed = cms.string(
"type(-87) && coll('L1ETM')"), l1deltaR = cms.double(9999),
228 l1seed_2 = cms.string(
"type(-87) && coll('L1ETMHF')"), l1deltaR_2 = cms.double(9999),
229 l2seed = cms.string(
"type( 87) && coll('hltMetClean')"), l2deltaR = cms.double(9999),
230 skipObjectsNotPassingQualityBits = cms.bool(
True),
231 qualityBits = cms.VPSet()
235 sel = cms.string(
"type(89) || type(-89)"),
236 l1seed = cms.string(
"type(-89) && coll('L1HTT')"), l1deltaR = cms.double(9999),
237 l1seed_2 = cms.string(
"type(-89) && coll('L1HTTHF')"), l1deltaR_2 = cms.double(9999),
238 l2seed = cms.string(
"type(89) && coll('hltHtMhtJet30')"), l2deltaR = cms.double(9999),
239 skipObjectsNotPassingQualityBits = cms.bool(
True),
240 qualityBits = cms.VPSet(
241 mksel([
"hltL1sTripleJetVBFIorHTTIorDoubleJetCIorSingleJet"]),
242 mksel([
"hltL1sQuadJetC50IorQuadJetC60IorHTT280IorHTT300IorHTT320IorTripleJet846848VBFIorTripleJet887256VBFIorTripleJet927664VBF",
"hltL1sQuadJetCIorTripleJetVBFIorHTT"]),
243 mksel([
"hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet",
"hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet"]),
244 mksel([
"hltCaloQuadJet30HT300",
"hltCaloQuadJet30HT320"]),
245 mksel([
"hltPFCentralJetsLooseIDQuad30HT300",
"hltPFCentralJetsLooseIDQuad30HT330"]),
246 mksel([
"hltPFHT280Jet30"])
251 sel = cms.string(
"type(90)"),
252 l1seed = cms.string(
"type(-90) && coll('L1HTM')"), l1deltaR = cms.double(9999),
253 l1seed_2 = cms.string(
"type(-90) && coll('L1HTMHF')"), l1deltaR_2 = cms.double(9999),
254 l2seed = cms.string(
"type(90) && coll('hltHtMhtJet30')"), l2deltaR = cms.double(9999),
255 skipObjectsNotPassingQualityBits = cms.bool(
True),
256 qualityBits = cms.VPSet(
257 mksel([
"hltCaloQuadJet30HT300",
"hltCaloQuadJet30HT320"]),
258 mksel([
"hltPFCentralJetsLooseIDQuad30HT300",
"hltPFCentralJetsLooseIDQuad30HT330"])
267 run2_HLTconditions_2016.toModify(
268 triggerObjectTable.selections.Muon,
269 sel =
"type(83) && pt > 5 && (coll('hlt*L3MuonCandidates') || coll('hlt*TkMuonCands') || coll('hlt*TrkMuonCands'))",
270 qualityBits = cms.VPSet(
271 mksel(
"filter('*RelTrkIso*Filtered0p4')",
"TrkIsoVVL"),
272 mksel(
"filter('hltL3cr*IsoFiltered0p09')",
"Iso"),
273 mksel(
"filter('*OverlapFilter*IsoMu*PFTau*')",
"OverlapFilter PFTau"),
274 mksel(
"filter('hltL3f*IsoFiltered0p09')",
"IsoTkMu"),
275 mksel([
"hltL3fL1sMu*L3Filtered50*",
"hltL3fL1sMu*TkFiltered50*"],
"1mu (Mu50)", bit=10)
278 triggerObjectTable.selections.Tau,
279 sel =
"type(84) && pt > 5 && coll('*Tau*') && ( filter('*LooseIso*') || filter('*MediumIso*') || filter('*MediumComb*Iso*') || filter('hltL2TauIsoFilter') || filter('*OverlapFilter*IsoMu*') || filter('*OverlapFilter*IsoEle*') || filter('*L1HLTMatched*') || filter('*Dz02*') )",
280 qualityBits = cms.VPSet(
281 mksel(
"(filter('*LooseIso*')-filter('*VLooseIso*'))",
"LooseIso"),
282 mksel(
"filter('*Medium*Iso*')",
"Medium(Comb)Iso"),
283 mksel(
"filter('*VLooseIso*')",
"VLooseIso"),
285 mksel(
"filter('hltL2TauIsoFilter')",
"L2p5 pixel iso"),
286 mksel(
"filter('*OverlapFilter*IsoMu*')",
"OverlapFilter IsoMu"),
287 mksel(
"filter('*OverlapFilter*IsoEle*')",
"OverlapFilter IsoEle"),
288 mksel(
"filter('*L1HLTMatched*')",
"L1-HLT matched"),
289 mksel(
"filter('*Dz02*')",
"Dz")
293 _run2_HLTconditions = run2_HLTconditions_2016 | run2_HLTconditions_2017 | run2_HLTconditions_2018
295 _run2_2016_jet_filters = [
296 mksel([
"*CrossCleaned*LooseChargedIsoPFTau*"],
"VBF cross-cleaned from loose iso PFTau"),
297 mksel([
"hltBTagCaloCSVp087Triple"],
"hltBTagCaloCSVp087Triple"),
298 mksel([
"hltDoubleCentralJet90"],
"hltDoubleCentralJet90"),
299 mksel([
"hltDoublePFCentralJetLooseID90"],
"hltDoublePFCentralJetLooseID90"),
300 mksel([
"hltL1sTripleJetVBFIorHTTIorDoubleJetCIorSingleJet"],
"hltL1sTripleJetVBFIorHTTIorDoubleJetCIorSingleJet"),
301 mksel([
"hltQuadCentralJet30"],
"hltQuadCentralJet30"),
302 mksel([
"hltQuadPFCentralJetLooseID30"],
"hltQuadPFCentralJetLooseID30"),
303 mksel([
"hltL1sQuadJetC50IorQuadJetC60IorHTT280IorHTT300IorHTT320IorTripleJet846848VBFIorTripleJet887256VBFIorTripleJet927664VBF",
"hltL1sQuadJetCIorTripleJetVBFIorHTT"],
"hltL1sQuadJetC50IorQuadJetC60IorHTT280IorHTT300IorHTT320IorTripleJet846848VBFIorTripleJet887256VBFIorTripleJet927664VBF or hltL1sQuadJetCIorTripleJetVBFIorHTT"),
304 mksel([
"hltQuadCentralJet45"],
"hltQuadCentralJet45"),
305 mksel([
"hltQuadPFCentralJetLooseID45"],
"hltQuadPFCentralJetLooseID45"),
306 mksel([
"hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet",
"hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet"],
"hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet or hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet"),
307 mksel([
"hltBTagCaloCSVp05Double",
"hltBTagCaloDeepCSVp17Double"],
"hltBTagCaloCSVp05Double or hltBTagCaloDeepCSVp17Double"),
308 mksel([
"hltPFCentralJetLooseIDQuad30"],
"hltPFCentralJetLooseIDQuad30"),
309 mksel([
"hlt1PFCentralJetLooseID75"],
"hlt1PFCentralJetLooseID75"),
310 mksel([
"hlt2PFCentralJetLooseID60"],
"hlt2PFCentralJetLooseID60"),
311 mksel([
"hlt3PFCentralJetLooseID45"],
"hlt3PFCentralJetLooseID45"),
312 mksel([
"hlt4PFCentralJetLooseID40"],
"hlt4PFCentralJetLooseID40"),
313 mksel([
"hltBTagPFCSVp070Triple",
"hltBTagPFDeepCSVp24Triple",
"hltBTagPFDeepCSV4p5Triple"],
"hltBTagPFCSVp070Triple or hltBTagPFDeepCSVp24Triple or hltBTagPFDeepCSV4p5Triple"),
314 mksel([
"hltHpsOverlapFilterDeepTauDoublePFTau*PFJet*"],
"Double tau + jet"),
315 mksel([
"*CrossCleaned*MediumDeepTauDitauWPPFTau*"],
"VBF cross-cleaned from medium deeptau PFTau"),
316 mksel([
"*CrossCleanedUsingDiJetCorrChecker*"],
"VBF cross-cleaned using dijet correlation checker"),
317 mksel([
"hltHpsOverlapFilterDeepTauPFTau*PFJet*"],
"monitoring muon + tau + jet"),
319 run2_HLTconditions_2016.toModify(triggerObjectTable.selections.Jet, qualityBits = cms.VPSet(_run2_2016_jet_filters))
321 _run2_2017_jet_filters = copy.deepcopy(_run2_2016_jet_filters)
322 _run2_2017_jet_filters[7] =
mksel([
"hltL1sTripleJet1008572VBFIorHTTIorDoubleJetCIorSingleJet",
"hltL1sTripleJet1058576VBFIorHTTIorDoubleJetCIorSingleJet",
"hltL1sTripleJetVBFIorHTTIorSingleJet"])
323 run2_HLTconditions_2017.toModify(triggerObjectTable.selections.Jet, qualityBits = cms.VPSet(_run2_2017_jet_filters))
325 _run2_2018_jet_filters = copy.deepcopy(_run2_2017_jet_filters)
326 _run2_2018_jet_filters[2] =
mksel([
"hltPFJetFilterTwoC30"])
327 _run2_2018_jet_filters.append(
mksel([
"hltBTagPFDeepCSV1p5Single"]))
328 run2_HLTconditions_2018.toModify(triggerObjectTable.selections.Jet, qualityBits = cms.VPSet(_run2_2018_jet_filters))
331 from PhysicsTools.PatUtils.L1PrefiringWeightProducer_cff
import prefiringweight
333 (run2_muon_2016 & tracker_apv_vfp30_2016).toModify(
335 DataEraECAL = cms.string(
"UL2016preVFP"),
336 DataEraMuon = cms.string(
"2016preVFP")
338 (run2_muon_2016 & ~tracker_apv_vfp30_2016).toModify(
340 DataEraECAL = cms.string(
"UL2016postVFP"),
341 DataEraMuon = cms.string(
"2016postVFP")
344 run2_jme_2017.toModify(
346 DataEraECAL = cms.string(
"UL2017BtoF"),
347 DataEraMuon = cms.string(
"20172018")
350 run2_muon_2018.toModify(
352 DataEraECAL = cms.string(
"None"),
353 DataEraMuon = cms.string(
"20172018")
356 l1PreFiringEventWeightTable = globalVariablesTableProducer.clone(
357 name = cms.string(
"L1PreFiringWeight"),
358 variables = cms.PSet(
359 Nom =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProb"),
"float", doc =
"L1 pre-firing event correction weight (1-probability)", precision=8),
360 Up =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbUp"),
"float", doc =
"L1 pre-firing event correction weight (1-probability), up var.", precision=8),
361 Dn =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbDown"),
"float", doc =
"L1 pre-firing event correction weight (1-probability), down var.", precision=8),
362 Muon_Nom =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbMuon"),
"float", doc =
"Muon L1 pre-firing event correction weight (1-probability)", precision=8),
363 Muon_SystUp =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbMuonSystUp"),
"float", doc =
"Muon L1 pre-firing event correction weight (1-probability), up var. syst.", precision=8),
364 Muon_SystDn =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbMuonSystDown"),
"float", doc =
"Muon L1 pre-firing event correction weight (1-probability), down var. syst.", precision=8),
365 Muon_StatUp =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbMuonStatUp"),
"float", doc =
"Muon L1 pre-firing event correction weight (1-probability), up var. stat.", precision=8),
366 Muon_StatDn =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbMuonStatDown"),
"float", doc =
"Muon L1 pre-firing event correction weight (1-probability), down var. stat.", precision=8),
367 ECAL_Nom =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbECAL"),
"float", doc =
"ECAL L1 pre-firing event correction weight (1-probability)", precision=8),
368 ECAL_Up =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbECALUp"),
"float", doc =
"ECAL L1 pre-firing event correction weight (1-probability), up var.", precision=8),
369 ECAL_Dn =
ExtVar(cms.InputTag(
"prefiringweight:nonPrefiringProbECALDown"),
"float", doc =
"ECAL L1 pre-firing event correction weight (1-probability), down var.", precision=8),
373 l1bits=cms.EDProducer(
"L1TriggerResultsConverter",
374 src=cms.InputTag(
"gtStage2Digis"),
375 legacyL1=cms.bool(
False),
376 storeUnprefireableBit=cms.bool(
True),
377 src_ext=cms.InputTag(
"simGtExtUnprefireable"))
379 triggerObjectTablesTask = cms.Task( unpackedPatTrigger,triggerObjectTable,l1bits)
381 _run2_HLTconditions.toReplaceWith(
382 triggerObjectTablesTask, triggerObjectTablesTask.copyAndAdd(prefiringweight,l1PreFiringEventWeightTable)
def ExtVar(tag, valtype, doc=None, precision=-1)
def chaintoken_(tokens, f, OR_or_AND=None)
def mksel(selection, doc=None, bit=None)
static std::string join(char **cmd)