1 import FWCore.ParameterSet.Config
as cms
2 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
5 unpackedPatTrigger = cms.EDProducer(
"PATTriggerObjectStandAloneUnpacker",
6 patTriggerObjectsStandAlone = cms.InputTag(
'slimmedPatTrigger'),
7 triggerResults = cms.InputTag(
'TriggerResults::HLT'),
8 unpackFilterLabels = cms.bool(
True)
11 run2_miniAOD_80XLegacy.toModify(
13 patTriggerObjectsStandAlone =
"selectedPatTrigger",
14 unpackFilterLabels =
False 17 triggerObjectTable = cms.EDProducer(
"TriggerObjectTableProducer",
18 name= cms.string(
"TrigObj"),
19 src = cms.InputTag(
"unpackedPatTrigger"),
20 l1EG = cms.InputTag(
"caloStage2Digis",
"EGamma"),
21 l1Sum = cms.InputTag(
"caloStage2Digis",
"EtSum"),
22 l1Jet = cms.InputTag(
"caloStage2Digis",
"Jet"),
23 l1Muon = cms.InputTag(
"gmtStage2Digis",
"Muon"),
24 l1Tau = cms.InputTag(
"caloStage2Digis",
"Tau"),
25 selections = cms.VPSet(
27 name = cms.string(
"Electron (PixelMatched e/gamma)"),
29 sel = cms.string(
"type(92) && pt > 7 && coll('hltEgammaCandidates') && filter('*PixelMatchFilter')"),
30 l1seed = cms.string(
"type(-98)"), l1deltaR = cms.double(0.3),
32 qualityBits = cms.string(
"filter('*CaloIdLTrackIdLIsoVL*TrackIso*Filter') + 2*filter('hltEle*WPTight*TrackIsoFilter*') + 4*filter('hltEle*WPLoose*TrackIsoFilter') + 8*filter('*OverlapFilterIsoEle*PFTau*')"),
33 qualityBitsDoc = cms.string(
"1 = CaloIdL_TrackIdL_IsoVL, 2 = WPLoose, 4 = WPTight, 8 = OverlapFilter PFTau"),
36 name = cms.string(
"Photon (PixelMatch-vetoed e/gamma)"),
38 sel = cms.string(
"type(92) && pt > 20 && coll('hltEgammaCandidates') && !filter('*PixelMatchFilter')"),
39 l1seed = cms.string(
"type(-98)"), l1deltaR = cms.double(0.3),
41 qualityBits = cms.string(
"0"), qualityBitsDoc = cms.string(
""),
44 name = cms.string(
"Muon"),
46 sel = cms.string(
"type(83) && pt > 5 && coll('hltIterL3MuonCandidates')"),
47 l1seed = cms.string(
"type(-81)"), l1deltaR = cms.double(0.5),
48 l2seed = cms.string(
"type(83) && coll('hltL2MuonCandidates')"), l2deltaR = cms.double(0.3),
49 qualityBits = cms.string(
"filter('*RelTrkIsoVVLFiltered0p4') + 2*filter('hltL3crIso*Filtered0p07') + 4*filter('*OverlapFilterIsoMu*PFTau*')"), qualityBitsDoc = cms.string(
"1 = TrkIsoVVL, 2 = Iso, 4 = OverlapFilter PFTau"),
52 name = cms.string(
"Tau"),
54 sel = cms.string(
"type(84) && pt > 5 && coll('*Tau*') && ( filter('*LooseChargedIso*') || filter('*MediumChargedIso*') || filter('*TightChargedIso*') || filter('*TightOOSCPhotons*') || filter('hltL2TauIsoFilter') || filter('*OverlapFilterIsoMu*') || filter('*OverlapFilterIsoEle*') || filter('*L1HLTMatched*') || filter('*Dz02*') )"),
55 l1seed = cms.string(
"type(-100)"), l1deltaR = cms.double(0.3),
56 l2seed = cms.string(
"type(84) && coll('hltL2TauJetsL1IsoTauSeeded')"), l2deltaR = cms.double(0.3),
57 qualityBits = cms.string(
"filter('*LooseChargedIso*')+2*filter('*MediumChargedIso*')+4*filter('*TightChargedIso*')+8*filter('*TightOOSCPhotons*')+16*filter('hltL2TauIsoFilter')+32*filter('*OverlapFilterIsoMu*')+64*filter('*OverlapFilterIsoEle*')+128*filter('*L1HLTMatched*')+256*filter('*Dz02*')"), qualityBitsDoc = cms.string(
"1 = LooseChargedIso, 2 = MediumChargedIso, 4 = TightChargedIso, 8 = TightID OOSC photons, 16 = L2p5 pixel iso, 32 = OverlapFilter IsoMu, 64 = OverlapFilter IsoEle, 128 = L1-HLT matched, 256 = Dz"),
60 name = cms.string(
"Jet"),
62 sel = cms.string(
"type(85) && pt > 30 && (coll('hltAK4PFJetsCorrected') || coll('hltMatchedVBF*PFJets*PFTau*OverlapRemoval'))"),
63 l1seed = cms.string(
"type(-99)"), l1deltaR = cms.double(0.3),
64 l2seed = cms.string(
"type(85) && coll('hltAK4CaloJetsCorrectedIDPassed')"), l2deltaR = cms.double(0.3),
65 qualityBits = cms.string(
"filter('*CrossCleaned*LooseChargedIsoPFTau*')"), qualityBitsDoc = cms.string(
"1 = VBF cross-cleaned from loose iso PFTau"),
68 name = cms.string(
"MET"),
70 sel = cms.string(
"type(87) && pt > 30 && coll('hltPFMETProducer')"),
71 l1seed = cms.string(
"type(-87) && coll('L1ETM')"), l1deltaR = cms.double(9999),
72 l1seed_2 = cms.string(
"type(-87) && coll('L1ETMHF')"), l1deltaR_2 = cms.double(9999),
73 l2seed = cms.string(
"type( 87) && coll('hltMetClean')"), l2deltaR = cms.double(9999),
74 qualityBits = cms.string(
"0"), qualityBitsDoc = cms.string(
""),
77 name = cms.string(
"HT"),
79 sel = cms.string(
"type(89) && pt > 100 && coll('hltPFHTJet30')"),
80 l1seed = cms.string(
"type(-89) && coll('L1HTT')"), l1deltaR = cms.double(9999),
81 l1seed_2 = cms.string(
"type(-89) && coll('L1HTTHF')"), l1deltaR_2 = cms.double(9999),
83 qualityBits = cms.string(
"0"), qualityBitsDoc = cms.string(
""),
86 name = cms.string(
"MHT"),
88 sel = cms.string(
"type(90) && pt > 30 && coll('hltPFMHTTightID')"),
89 l1seed = cms.string(
"type(-90) && coll('L1HTM')"), l1deltaR = cms.double(9999),
90 l1seed_2 = cms.string(
"type(-90) && coll('L1HTMHF')"), l1deltaR_2 = cms.double(9999),
92 qualityBits = cms.string(
"0"), qualityBitsDoc = cms.string(
""),
101 selections80X = copy.deepcopy(triggerObjectTable.selections)
102 for sel
in selections80X:
104 sel.sel = cms.string(
"type(83) && pt > 5 && (coll('hlt*L3MuonCandidates') || coll('hlt*TkMuonCands') || coll('hlt*TrkMuonCands'))")
105 sel.qualityBits = cms.string(
"filter('*RelTrkIso*Filtered0p4') + 2*filter('hltL3cr*IsoFiltered0p09') + 4*filter('*OverlapFilter*IsoMu*PFTau*') + 8*filter('hltL3f*IsoFiltered0p09')")
106 sel.qualityBitsDoc = cms.string(
"1 = TrkIsoVVL, 2 = Iso, 4 = OverlapFilter PFTau, 8 = IsoTkMu")
107 elif sel.name==
'Tau':
108 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*') )")
109 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*')")
110 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")
111 elif sel.name==
'Electron (PixelMatched e/gamma)':
113 sel.qualityBits = cms.string(
"filter('*CaloIdLTrackIdLIsoVL*TrackIso*Filter') + 2*filter('hltEle*WPTight*TrackIsoFilter*') + 4*filter('hltEle*WPLoose*TrackIsoFilter') + 8*filter('*OverlapFilter*IsoEle*PFTau*')")
116 run2_miniAOD_80XLegacy.toModify(
118 selections = selections80X
121 triggerObjectTables = cms.Sequence( unpackedPatTrigger + triggerObjectTable )