CMS 3D CMS Logo

triggerObjects_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
4 import copy
5 
6 unpackedPatTrigger = cms.EDProducer("PATTriggerObjectStandAloneUnpacker",
7  patTriggerObjectsStandAlone = cms.InputTag('slimmedPatTrigger'),
8  triggerResults = cms.InputTag('TriggerResults::HLT'),
9  unpackFilterLabels = cms.bool(True)
10 )
11 # ERA-dependent configuration
12 run2_miniAOD_80XLegacy.toModify(
13  unpackedPatTrigger,
14  patTriggerObjectsStandAlone = "selectedPatTrigger",
15  unpackFilterLabels = False
16 )
17 
18 triggerObjectTable = cms.EDProducer("TriggerObjectTableProducer",
19  name= cms.string("TrigObj"),
20  src = cms.InputTag("unpackedPatTrigger"),
21  l1EG = cms.InputTag("caloStage2Digis","EGamma"),
22  l1Sum = cms.InputTag("caloStage2Digis","EtSum"),
23  l1Jet = cms.InputTag("caloStage2Digis","Jet"),
24  l1Muon = cms.InputTag("gmtStage2Digis","Muon"),
25  l1Tau = cms.InputTag("caloStage2Digis","Tau"),
26  selections = cms.VPSet(
27  cms.PSet(
28  name = cms.string("Electron (PixelMatched e/gamma)"), # this selects also photons for the moment!
29  id = cms.int32(11),
30  sel = cms.string("type(92) && pt > 7 && coll('hltEgammaCandidates') && filter('*PixelMatchFilter')"),
31  l1seed = cms.string("type(-98)"), l1deltaR = cms.double(0.3),
32  #l2seed = cms.string("type(92) && coll('')"), l2deltaR = cms.double(0.5),
33  skipObjectsNotPassingQualityBits = cms.bool(True),
34  qualityBits = cms.string(
35  "filter('*CaloIdLTrackIdLIsoVL*TrackIso*Filter') + " \
36  "2*filter('hltEle*WPTight*TrackIsoFilter*') + " \
37  "4*filter('hltEle*WPLoose*TrackIsoFilter') + " \
38  "8*filter('*OverlapFilter*IsoEle*PFTau*') + " \
39  "16*filter('hltEle*Ele*CaloIdLTrackIdLIsoVL*Filter') + " \
40  "32*filter('hltMu*TrkIsoVVL*Ele*CaloIdLTrackIdLIsoVL*Filter*') + " \
41  "64*filter('hlt*OverlapFilterIsoEle*PFTau*') + " \
42  "128*filter('hltEle*Ele*Ele*CaloIdLTrackIdLDphiLeg*Filter') + " \
43  "256*max(filter('hltL3fL1Mu*DoubleEG*Filtered*'),filter('hltMu*DiEle*CaloIdLTrackIdLElectronleg*Filter')) + " \
44  "512*max(filter('hltL3fL1DoubleMu*EG*Filter*'),filter('hltDiMu*Ele*CaloIdLTrackIdLElectronleg*Filter')) + " \
45  "1024*min(filter('hltEle32L1DoubleEGWPTightGsfTrackIsoFilter'),filter('hltEGL1SingleEGOrFilter')) + " \
46  "2048*filter('hltEle*CaloIdVTGsfTrkIdTGsfDphiFilter') + " \
47  "4096*path('HLT_Ele*PFJet*') + " \
48  "8192*max(filter('hltEG175HEFilter'),filter('hltEG200HEFilter'))"),
49  qualityBitsDoc = cms.string("1 = CaloIdL_TrackIdL_IsoVL, 2 = 1e (WPTight), 4 = 1e (WPLoose), 8 = OverlapFilter PFTau, 16 = 2e, 32 = 1e-1mu, 64 = 1e-1tau, 128 = 3e, 256 = 2e-1mu, 512 = 1e-2mu, 1024 = 1e (32_L1DoubleEG_AND_L1SingleEGOr), 2048 = 1e (CaloIdVT_GsfTrkIdT), 4096 = 1e (PFJet), 8192 = 1e (Photon175_OR_Photon200)"),
50  ),
51  cms.PSet(
52  name = cms.string("Photon"),
53  id = cms.int32(22),
54  sel = cms.string("type(92) && pt > 20 && coll('hltEgammaCandidates')"),
55  l1seed = cms.string("type(-98)"), l1deltaR = cms.double(0.3),
56  #l2seed = cms.string("type(92) && coll('')"), l2deltaR = cms.double(0.5),
57  skipObjectsNotPassingQualityBits = cms.bool(True),
58  qualityBits = cms.string(
59  "filter('hltEG33L1EG26HEFilter') + " \
60  "2*filter('hltEG50HEFilter') + " \
61  "4*filter('hltEG75HEFilter') + " \
62  "8*filter('hltEG90HEFilter') + " \
63  "16*filter('hltEG120HEFilter') + " \
64  "32*filter('hltEG150HEFilter') + " \
65  "64*filter('hltEG175HEFilter') + " \
66  "128*filter('hltEG200HEFilter') + " \
67  "256*filter('hltHtEcal800') + " \
68  "512*filter('hltEG110EBTightIDTightIsoTrackIsoFilter') + " \
69  "1024*filter('hltEG120EBTightIDTightIsoTrackIsoFilter') + " \
70  "2048*filter('hltMu17Photon30IsoCaloIdPhotonlegTrackIsoFilter')"),
71  qualityBitsDoc = cms.string("Single Photon filters: 1 = hltEG33L1EG26HEFilter, 2 = hltEG50HEFilter, 4 = hltEG75HEFilter, 8 = hltEG90HEFilter, 16 = hltEG120HEFilter, 32 = hltEG150HEFilter, 64 = hltEG175HEFilter, 128 = hltEG200HEFilter, 256 = hltHtEcal800, 512 = hltEG110EBTightIDTightIsoTrackIsoFilter, 1024 = hltEG120EBTightIDTightIsoTrackIsoFilter, 2048 = 1mu-1photon"),
72  ),
73  cms.PSet(
74  name = cms.string("Muon"),
75  id = cms.int32(13),
76  sel = cms.string("type(83) && pt > 5 && (coll('hltIterL3MuonCandidates') || (pt > 45 && coll('hltHighPtTkMuonCands')) || (pt > 95 && coll('hltOldL3MuonCandidates')))"),
77  l1seed = cms.string("type(-81)"), l1deltaR = cms.double(0.5),
78  l2seed = cms.string("type(83) && coll('hltL2MuonCandidates')"), l2deltaR = cms.double(0.3),
79  skipObjectsNotPassingQualityBits = cms.bool(True),
80  qualityBits = cms.string(
81  "max(filter('*RelTrkIsoVVLFiltered0p4'),filter('*RelTrkIsoVVLFiltered')) + " \
82  "2*max(max(filter('hltL3crIso*IsoFiltered0p07'),filter('hltL3crIso*IsoFiltered0p08')),filter('hltL3crIso*IsoFiltered')) + " \
83  "4*filter('*OverlapFilterIsoMu*PFTau*') + " \
84  "8*max(max(max(filter('hltL3crIsoL1*SingleMu*IsoFiltered0p07'),filter('hltL3crIsoL1sMu*IsoFiltered0p07')),max(filter('hltL3crIsoL1*SingleMu*IsoFiltered0p08'),filter('hltL3crIsoL1sMu*IsoFiltered0p08'))),max(filter('hltL3crIsoL1*SingleMu*IsoFiltered'),filter('hltL3crIsoL1sMu*IsoFiltered'))) + " \
85  "16*filter('hltDiMuon*Filtered*') + " \
86  "32*filter('hltMu*TrkIsoVVL*Ele*CaloIdLTrackIdLIsoVL*Filter*') + " \
87  "64*filter('hlt*OverlapFilterIsoMu*PFTau*') + " \
88  "128*filter('hltL3fL1TripleMu*') + " \
89  "256*max(filter('hltL3fL1DoubleMu*EG*Filtered*'),filter('hltDiMu*Ele*CaloIdLTrackIdLElectronleg*Filter')) + " \
90  "512*max(filter('hltL3fL1Mu*DoubleEG*Filtered*'),filter('hltMu*DiEle*CaloIdLTrackIdLElectronleg*Filter')) + " \
91  "1024*max(filter('hltL3fL1sMu*L3Filtered50*'),filter('hltL3fL1sMu*TkFiltered50*')) + " \
92  "2048*max(filter('hltL3fL1sMu*L3Filtered100*'),filter('hltL3fL1sMu*TkFiltered100*')) + " \
93  "4096*filter('hltMu17Photon30IsoCaloIdMuonlegL3Filtered17Q')"),
94  qualityBitsDoc = cms.string("1 = TrkIsoVVL, 2 = Iso, 4 = OverlapFilter PFTau, 8 = 1mu, 16 = 2mu, 32 = 1mu-1e, 64 = 1mu-1tau, 128 = 3mu, 256 = 2mu-1e, 512 = 1mu-2e, 1024 = 1mu (Mu50), 2048 = 1mu (Mu100), 4096 = 1mu-1photon"),
95  ),
96  cms.PSet(
97  name = cms.string("Tau"),
98  id = cms.int32(15),
99  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*') )"), #All trigger objects from a Tau collection + passing at least one filter
100  l1seed = cms.string("type(-100)"), l1deltaR = cms.double(0.3),
101  l2seed = cms.string("type(84) && coll('hltL2TauJetsL1IsoTauSeeded')"), l2deltaR = cms.double(0.3),
102  skipObjectsNotPassingQualityBits = cms.bool(True),
103  qualityBits = cms.string(
104  "filter('*LooseChargedIso*') + " \
105  "2*filter('*MediumChargedIso*') + " \
106  "4*filter('*TightChargedIso*') + " \
107  "8*filter('*DeepTau*') + " \
108  "16*filter('*TightOOSCPhotons*') + " \
109  "32*filter('*Hps*') + " \
110  "64*filter('hlt*DoublePFTau*TrackPt1*ChargedIsolation*Dz02*') + " \
111  "128*filter('hlt*DoublePFTau*DeepTau*L1HLTMatched') + " \
112  "256*filter('hlt*OverlapFilterIsoEle*WPTightGsf*PFTau*') + " \
113  "512*filter('hlt*OverlapFilterIsoMu*PFTau*') + " \
114  "1024*filter('hlt*SelectedPFTau*L1HLTMatched') + " \
115  "2048*filter('hlt*DoublePFTau*TrackPt1*ChargedIso*') + " \
116  "4096*filter('hlt*DoublePFTau*Track*ChargedIso*AgainstMuon') + " \
117  "8192*filter('hltHpsSinglePFTau*HLTMatched') + " \
118  "16384*filter('hltHpsOverlapFilterDeepTauDoublePFTau*PFJet*') + " \
119  "32768*filter('hlt*Double*ChargedIsoDisplPFTau*Dxy*') + " \
120  "65536*filter('*Monitoring') + " \
121  "131072*filter('*Reg') + " \
122  "262144*filter('*L1Seeded') + " \
123  "524288*filter('*1Prong')"),
124  qualityBitsDoc = cms.string("1 = LooseChargedIso, 2 = MediumChargedIso, 4 = TightChargedIso, 8 = DeepTau, 16 = TightID OOSC photons, 32 = HPS, 64 = charged iso di-tau, 128 = deeptau di-tau, 256 = e-tau, 512 = mu-tau, 1024 = single-tau/tau+MET, 2048 = run 2 VBF+ditau, 4096 = run 3 VBF+ditau, 8192 = run 3 double PF jets + ditau, 16384 = di-tau + PFJet, 32768 = Displaced Tau, 65536 = Monitoring, 131072 = regional paths, 262144 = L1 seeded paths, 524288 = 1 prong tau paths"),
125  ),
126  cms.PSet(
127  name = cms.string("BoostedTau"),
128  id = cms.int32(1515),
129  sel = cms.string("type(85) && pt > 120 && coll('hltAK8PFJetsCorrected') && filter('hltAK8SinglePFJets*SoftDropMass40*ParticleNetTauTau')"),
130  l1seed = cms.string("type(-99)"), l1deltaR = cms.double(0.3),
131  l2seed = cms.string("type(85) && coll('hltAK8CaloJetsCorrectedIDPassed')"), l2deltaR = cms.double(0.3),
132  skipObjectsNotPassingQualityBits = cms.bool(True),
133  qualityBits = cms.string(
134  "filter('hltAK8SinglePFJets*SoftDropMass40*ParticleNetTauTau')"
135  ),
136  qualityBitsDoc = cms.string("Bit 0 for HLT_AK8PFJetX_SoftDropMass40_PFAK8ParticleNetTauTau0p30"),
137  ),
138  cms.PSet(
139  name = cms.string("Jet"),
140  id = cms.int32(1),
141  sel = cms.string("( type(0) || type(85) || type(86) || type(-99) )"),
142  l1seed = cms.string("type(-99)"), l1deltaR = cms.double(0.3),
143  l2seed = cms.string("type(85) || type(86) || type(-99)"), l2deltaR = cms.double(0.3),
144  skipObjectsNotPassingQualityBits = cms.bool(True),
145  qualityBits = cms.string(
146  "1 * filter('hlt4PixelOnlyPFCentralJetTightIDPt20') + " \
147  "2 * filter('hlt3PixelOnlyPFCentralJetTightIDPt30') + " \
148  "4 * filter('hltPFJetFilterTwoC30') + " \
149  "8 * filter('hlt4PFCentralJetTightIDPt30') + " \
150  "16 * filter('hlt4PFCentralJetTightIDPt35') + " \
151  "32 * filter('hltQuadCentralJet30') + " \
152  "64 * filter('hlt2PixelOnlyPFCentralJetTightIDPt40') + " \
153  "128 * max(filter('hltL1sTripleJet1008572VBFIorHTTIorDoubleJetCIorSingleJet'), max(filter('hltL1sTripleJet1058576VBFIorHTTIorDoubleJetCIorSingleJet'), filter('hltL1sTripleJetVBFIorHTTIorSingleJet') ) ) + " \
154  "256 * filter('hlt3PFCentralJetTightIDPt40') + " \
155  "512 * filter('hlt3PFCentralJetTightIDPt45') + " \
156  "1024 * max(filter('hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet'), filter('hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet') ) + " \
157  "2048 * filter('hltBTagCaloDeepCSVp17Double') + " \
158  "4096 * filter('hltPFCentralJetLooseIDQuad30') + " \
159  "8192 * filter('hlt1PFCentralJetLooseID75') + " \
160  "16384 * filter('hlt2PFCentralJetLooseID60') + " \
161  "32768 * filter('hlt3PFCentralJetLooseID45') + " \
162  "65536 * filter('hlt4PFCentralJetLooseID40') + " \
163  "131072 * filter('hltBTagPFDeepCSV4p5Triple') + " \
164  "262144 * filter('hltHpsOverlapFilterDeepTauDoublePFTau*PFJet*') + " \
165  "524288 * filter('*CrossCleaned*MediumDeepTauDitauWPPFTau*') + " \
166  "1048576 * filter('*CrossCleanedUsingDiJetCorrChecker*') + " \
167  "2097152 * filter('hltHpsOverlapFilterDeepTauPFTau*PFJet*') + " \
168  "4194304 * filter('hlt2PFCentralJetTightIDPt50') + " \
169  "8388608 * filter('hlt1PixelOnlyPFCentralJetTightIDPt60') + " \
170  "16777216 * filter('hlt1PFCentralJetTightIDPt70') + " \
171  "33554432 * filter('hltBTagPFDeepJet1p5Single') + " \
172  "67108864 * filter('hltBTagPFDeepJet4p5Triple') + " \
173  "134217728 * max(filter('hltBTagCentralJetPt35PFParticleNet2BTagSum0p65'), max(filter('hltBTagCentralJetPt30PFParticleNet2BTagSum0p65'), filter('hltPFJetTwoC30PFBTagParticleNet2BTagSum0p65') ) ) + " \
174  "268435456 * filter('hltBTagPFDeepCSV1p5Single')"
175 
176  ),
177  qualityBitsDoc = cms.string(
178  "Jet bits: bit 0 for hlt4PixelOnlyPFCentralJetTightIDPt20, bit 1 for hlt3PixelOnlyPFCentralJetTightIDPt30, bit 2 for hltPFJetFilterTwoC30, bit 3 for hlt4PFCentralJetTightIDPt30," \
179  " bit 4 for hlt4PFCentralJetTightIDPt35, bit 5 for hltQuadCentralJet30, bit 6 for hlt2PixelOnlyPFCentralJetTightIDPt40," \
180  " bit 7 for hltL1sTripleJet1008572VBFIorHTTIorDoubleJetCIorSingleJet' or hltL1sTripleJet1058576VBFIorHTTIorDoubleJetCIorSingleJet' or 'hltL1sTripleJetVBFIorHTTIorSingleJet," \
181  " bit 8 for hlt3PFCentralJetTightIDPt40, bit 9 for hlt3PFCentralJetTightIDPt45," \
182  " bit 10 for hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet' or 'hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet," \
183  " bit 11 for hltBTagCaloDeepCSVp17Double, bit 12 for hltPFCentralJetLooseIDQuad30, bit 13 for hlt1PFCentralJetLooseID75," \
184  " bit 14 for hlt2PFCentralJetLooseID60, bit 15 for hlt3PFCentralJetLooseID45, bit 16 for hlt4PFCentralJetLooseID40," \
185  " bit 17 for hltBTagPFDeepCSV4p5Triple, bit 18 for (Double tau + jet) hltHpsOverlapFilterDeepTauDoublePFTau*PFJet*," \
186  " bit 19 for (VBF cross-cleaned from medium deeptau PFTau) *CrossCleaned*MediumDeepTauDitauWPPFTau*," \
187  " bit 20 for (VBF cross-cleaned using dijet correlation checker) *CrossCleanedUsingDiJetCorrChecker*," \
188  " bit 21 for (monitoring muon + tau + jet) hltHpsOverlapFilterDeepTauPFTau*PFJet*," \
189  " bit 22 for hlt2PFCentralJetTightIDPt50, bit 23 for hlt1PixelOnlyPFCentralJetTightIDPt60, bit 24 for hlt1PFCentralJetTightIDPt70," \
190  " bit 25 for hltBTagPFDeepJet1p5Single, bit 26 for hltBTagPFDeepJet4p5Triple," \
191  " bit 27 for hltBTagCentralJetPt35PFParticleNet2BTagSum0p65 or hltBTagCentralJetPt30PFParticleNet2BTagSum0p65 or hltPFJetTwoC30PFBTagParticleNet2BTagSum0p65," \
192  " bit 28 for hltBTagPFDeepCSV1p5Single")
193  ),
194  cms.PSet(
195  name = cms.string("FatJet"),
196  id = cms.int32(6),
197  sel = cms.string("type(85) && pt > 120 && coll('hltAK8PFJetsCorrected')"),
198  l1seed = cms.string("type(-99)"), l1deltaR = cms.double(0.3),
199  l2seed = cms.string("type(85) && coll('hltAK8CaloJetsCorrectedIDPassed')"), l2deltaR = cms.double(0.3),
200  skipObjectsNotPassingQualityBits = cms.bool(True),
201  qualityBits = cms.string("0"), qualityBitsDoc = cms.string(""),
202  ),
203  cms.PSet(
204  name = cms.string("MET"),
205  id = cms.int32(2),
206  sel = cms.string("type(87) && pt > 30 && coll('hltPFMETProducer')"),
207  l1seed = cms.string("type(-87) && coll('L1ETM')"), l1deltaR = cms.double(9999),
208  l1seed_2 = cms.string("type(-87) && coll('L1ETMHF')"), l1deltaR_2 = cms.double(9999),
209  l2seed = cms.string("type( 87) && coll('hltMetClean')"), l2deltaR = cms.double(9999),
210  skipObjectsNotPassingQualityBits = cms.bool(True),
211  qualityBits = cms.string("0"), qualityBitsDoc = cms.string(""),
212  ),
213  cms.PSet(
214  name = cms.string("HT"),
215  id = cms.int32(3),
216  sel = cms.string("type(89) || type(-89)"),
217  l1seed = cms.string("type(-89) && coll('L1HTT')"), l1deltaR = cms.double(9999),
218  l1seed_2 = cms.string("type(-89) && coll('L1HTTHF')"), l1deltaR_2 = cms.double(9999),
219  l2seed = cms.string("type(89) && coll('hltHtMhtJet30')"), l2deltaR = cms.double(9999),
220  skipObjectsNotPassingQualityBits = cms.bool(True),
221  qualityBits = cms.string(
222  "1 * filter('hltL1sTripleJetVBFIorHTTIorDoubleJetCIorSingleJet') + " \
223  "2 * max(filter('hltL1sQuadJetC50IorQuadJetC60IorHTT280IorHTT300IorHTT320IorTripleJet846848VBFIorTripleJet887256VBFIorTripleJet927664VBF'), filter('hltL1sQuadJetCIorTripleJetVBFIorHTT')) + " \
224  "4 * max(filter('hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet'), filter('hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet')) + " \
225  "8 * max(filter('hltCaloQuadJet30HT300'), filter('hltCaloQuadJet30HT320')) + " \
226  "16 * max(filter('hltPFCentralJetsLooseIDQuad30HT300'), filter('hltPFCentralJetsLooseIDQuad30HT330'))"
227  ),
228  qualityBitsDoc = cms.string(
229  "HT bits: bit 0 for hltL1sTripleJetVBFIorHTTIorDoubleJetCIorSingleJet, bit 1 for hltL1sQuadJetC50IorQuadJetC60IorHTT280IorHTT300IorHTT320IorTripleJet846848VBFIorTripleJet887256VBFIorTripleJet927664VBF or hltL1sQuadJetCIorTripleJetVBFIorHTT, " \
230  "bit 2 for hltL1sQuadJetC60IorHTT380IorHTT280QuadJetIorHTT300QuadJet or hltL1sQuadJetC50to60IorHTT280to500IorHTT250to340QuadJet, " \
231  "bit 3 for hltCaloQuadJet30HT300 or hltCaloQuadJet30HT320, bit 4 for hltPFCentralJetsLooseIDQuad30HT300 or hltPFCentralJetsLooseIDQuad30HT330"
232  ),
233  ),
234  cms.PSet(
235  name = cms.string("MHT"),
236  id = cms.int32(4),
237  sel = cms.string("type(90)"),
238  l1seed = cms.string("type(-90) && coll('L1HTM')"), l1deltaR = cms.double(9999),
239  l1seed_2 = cms.string("type(-90) && coll('L1HTMHF')"), l1deltaR_2 = cms.double(9999),
240  l2seed = cms.string("type(90) && coll('hltHtMhtJet30')"), l2deltaR = cms.double(9999),
241  skipObjectsNotPassingQualityBits = cms.bool(True),
242  qualityBits = cms.string(
243  "1 * max(filter('hltCaloQuadJet30HT300'), filter('hltCaloQuadJet30HT320')) + " \
244  "2 * max(filter('hltPFCentralJetsLooseIDQuad30HT300'), filter('hltPFCentralJetsLooseIDQuad30HT330'))"
245  ),
246  qualityBitsDoc = cms.string
247  (
248  "MHT bits: bit 0 for hltCaloQuadJet30HT300 or hltCaloQuadJet30HT320, bit 1 for hltPFCentralJetsLooseIDQuad30HT300 or hltPFCentralJetsLooseIDQuad30HT330"
249  ),
250  ),
251 
252  ),
253 )
254 
255 # ERA-dependent configuration
256 # Tune filter and collection names to 2016 HLT menus
257 # FIXME: check non-lepton objects and cross check leptons
258 selections2016 = copy.deepcopy(triggerObjectTable.selections)
259 for sel in selections2016:
260  if sel.name=='Muon':
261  sel.sel = cms.string("type(83) && pt > 5 && (coll('hlt*L3MuonCandidates') || coll('hlt*TkMuonCands') || coll('hlt*TrkMuonCands'))")
262  sel.qualityBits = cms.string("filter('*RelTrkIso*Filtered0p4') + 2*filter('hltL3cr*IsoFiltered0p09') + 4*filter('*OverlapFilter*IsoMu*PFTau*') + 8*filter('hltL3f*IsoFiltered0p09') + 1024*max(filter('hltL3fL1sMu*L3Filtered50*'),filter('hltL3fL1sMu*TkFiltered50*'))")
263  sel.qualityBitsDoc = cms.string("1 = TrkIsoVVL, 2 = Iso, 4 = OverlapFilter PFTau, 8 = IsoTkMu, 1024 = 1mu (Mu50)")
264  elif sel.name=='Tau':
265  sel.sel = cms.string("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*') )")
266  sel.qualityBits = cms.string("(filter('*LooseIso*')-filter('*VLooseIso*'))+2*filter('*Medium*Iso*')+4*filter('*VLooseIso*')+8*0+16*filter('hltL2TauIsoFilter')+32*filter('*OverlapFilter*IsoMu*')+64*filter('*OverlapFilter*IsoEle*')+128*filter('*L1HLTMatched*')+256*filter('*Dz02*')")
267  sel.qualityBitsDoc = cms.string("1 = LooseIso, 2 = Medium(Comb)Iso, 4 = VLooseIso, 8 = None, 16 = L2p5 pixel iso, 32 = OverlapFilter IsoMu, 64 = OverlapFilter IsoEle, 128 = L1-HLT matched, 256 = Dz")
268 
269 run2_HLTconditions_2016.toModify(
270  triggerObjectTable,
271  selections = selections2016
272 )
273 
274 from PhysicsTools.PatUtils.L1PrefiringWeightProducer_cff import prefiringweight
275 #Next lines are for UL2016 maps
276 (run2_muon_2016 & tracker_apv_vfp30_2016).toModify( prefiringweight, DataEraECAL = cms.string("UL2016preVFP"), DataEraMuon = cms.string("2016preVFP"))
277 (run2_muon_2016 & ~tracker_apv_vfp30_2016).toModify( prefiringweight, DataEraECAL = cms.string("UL2016postVFP"), DataEraMuon = cms.string("2016postVFP"))
278 #Next line is for UL2017 maps
279 run2_jme_2017.toModify( prefiringweight, DataEraECAL = cms.string("UL2017BtoF"), DataEraMuon = cms.string("20172018"))
280 #Next line is for UL2018 maps
281 run2_muon_2018.toModify( prefiringweight, DataEraECAL = cms.string("None"), DataEraMuon = cms.string("20172018"))
282 
283 #For pre-UL 2017 reprocessing, one should use the original maps and no muon jet protection
284 for modifier in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2:
285  modifier.toModify( prefiringweight, DataEraECAL = cms.string("2017BtoF"), DataEraMuon = cms.string("20172018"))
286  modifier.toModify( prefiringweight, JetMaxMuonFraction = cms.double(-1.) )
287 #For pre-UL 2016 reprocessing, same thing
288 run2_nanoAOD_94X2016.toModify( prefiringweight, DataEraECAL = cms.string("2016BtoH"), DataEraMuon = cms.string("2016") )
289 run2_nanoAOD_94X2016.toModify( prefiringweight, JetMaxMuonFraction = cms.double(-1.) )
290 
291 l1PreFiringEventWeightTable = cms.EDProducer("GlobalVariablesTableProducer",
292  name = cms.string("L1PreFiringWeight"),
293  variables = cms.PSet(
294  Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProb"), "float", doc = "L1 pre-firing event correction weight (1-probability)", precision=8),
295  Up = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbUp"), "float", doc = "L1 pre-firing event correction weight (1-probability), up var.", precision=8),
296  Dn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbDown"), "float", doc = "L1 pre-firing event correction weight (1-probability), down var.", precision=8),
297  Muon_Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuon"), "float", doc = "Muon L1 pre-firing event correction weight (1-probability)", precision=8),
298  Muon_SystUp = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonSystUp"), "float", doc = "Muon L1 pre-firing event correction weight (1-probability), up var. syst.", precision=8),
299  Muon_SystDn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonSystDown"), "float", doc = "Muon L1 pre-firing event correction weight (1-probability), down var. syst.", precision=8),
300  Muon_StatUp = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonStatUp"), "float", doc = "Muon L1 pre-firing event correction weight (1-probability), up var. stat.", precision=8),
301  Muon_StatDn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbMuonStatDown"), "float", doc = "Muon L1 pre-firing event correction weight (1-probability), down var. stat.", precision=8),
302  ECAL_Nom = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbECAL"), "float", doc = "ECAL L1 pre-firing event correction weight (1-probability)", precision=8),
303  ECAL_Up = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbECALUp"), "float", doc = "ECAL L1 pre-firing event correction weight (1-probability), up var.", precision=8),
304  ECAL_Dn = ExtVar(cms.InputTag("prefiringweight:nonPrefiringProbECALDown"), "float", doc = "ECAL L1 pre-firing event correction weight (1-probability), down var.", precision=8),
305  )
306 )
307 
308 l1bits=cms.EDProducer("L1TriggerResultsConverter",
309  src=cms.InputTag("gtStage2Digis"),
310  legacyL1=cms.bool(False),
311  storeUnprefireableBit=cms.bool(True),
312  src_ext=cms.InputTag("simGtExtUnprefireable"))
313 
314 triggerObjectTablesTask = cms.Task( unpackedPatTrigger,triggerObjectTable,l1bits)
315 
316 _triggerObjectTablesTask_withL1PreFiring = triggerObjectTablesTask.copy()
317 _triggerObjectTablesTask_withL1PreFiring.add(prefiringweight,l1PreFiringEventWeightTable)
318 (run2_HLTconditions_2016 | run2_HLTconditions_2017 | run2_HLTconditions_2018).toReplaceWith(triggerObjectTablesTask,_triggerObjectTablesTask_withL1PreFiring)
319 
320 (run2_miniAOD_80XLegacy | run2_nanoAOD_94X2016 | run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_102Xv1).toModify(l1bits, storeUnprefireableBit=False)
def ExtVar(tag, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:31