1 import FWCore.ParameterSet.Config
as cms
6 from RecoMET.METFilters.badGlobalMuonTaggersMiniAOD_cff
import badGlobalMuonTaggerMAOD, cloneGlobalMuonTaggerMAOD
7 badGlobalMuonTagger = badGlobalMuonTaggerMAOD.clone(
11 cloneGlobalMuonTagger = cloneGlobalMuonTaggerMAOD.clone(
16 BadPFMuonTagger = BadPFMuonFilter.clone(
17 PFCandidates = cms.InputTag(
"packedPFCandidates"),
18 muons = cms.InputTag(
"slimmedMuons"),
19 vtx = cms.InputTag(
"offlineSlimmedPrimaryVertices"),
25 BadChargedCandidateTagger = BadChargedCandidateFilter.clone(
26 PFCandidates = cms.InputTag(
"packedPFCandidates"),
27 muons = cms.InputTag(
"slimmedMuons"),
28 vtx = cms.InputTag(
"offlineSlimmedPrimaryVertices"),
32 extraFlagsTable = cms.EDProducer(
"GlobalVariablesTableProducer",
34 Flag_BadGlobalMuon =
ExtVar(cms.InputTag(
"badGlobalMuonTagger:notBadEvent"), bool, doc =
"Bad muon flag"),
35 Flag_CloneGlobalMuon =
ExtVar(cms.InputTag(
"cloneGlobalMuonTagger:notBadEvent"), bool, doc =
"Clone muon flag"),
36 Flag_BadPFMuonFilter =
ExtVar(cms.InputTag(
"BadPFMuonTagger"), bool, doc =
"Bad PF muon flag"),
37 Flag_BadChargedCandidateFilter =
ExtVar(cms.InputTag(
"BadChargedCandidateTagger"), bool, doc =
"Bad charged hadron flag"),
42 ecalBadCalibFilterNanoTagger = ecalBadCalibFilter.clone(
43 taggingMode = cms.bool(
True)
47 for modifier
in run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_102Xv1:
48 modifier.toModify(extraFlagsTable, variables= cms.PSet())
49 modifier.toModify(extraFlagsTable, variables = dict(Flag_ecalBadCalibFilterV2 =
ExtVar(cms.InputTag(
"ecalBadCalibFilterNanoTagger"), bool, doc =
"Bad ECAL calib flag (updatedxtal list)")))
53 extraFlagsProducersTask = cms.Task()
54 extraFlagsTableTask = cms.Task()
57 extraFlagsProducersTask_80x = cms.Task(badGlobalMuonTagger,cloneGlobalMuonTagger,BadPFMuonTagger,BadChargedCandidateTagger)
58 extraFlagsProducersTask_102x = cms.Task(ecalBadCalibFilterNanoTagger)
60 run2_miniAOD_80XLegacy.toReplaceWith(extraFlagsProducersTask, extraFlagsProducersTask_80x)
61 run2_miniAOD_80XLegacy.toReplaceWith(extraFlagsTableTask, cms.Task(extraFlagsTable))
63 (run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_102Xv1).toReplaceWith(extraFlagsProducersTask, extraFlagsProducersTask_102x)
64 (run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | run2_nanoAOD_102Xv1).toReplaceWith(extraFlagsTableTask, cms.Task(extraFlagsTable))
The muon bad track filter (2016) ________________________________________________||.
The charged hadron track track filter (2016) ____________________________________||.