import FWCore.ParameterSet.Config as cms

# To run and store the decisions of the MET filters

#> The iso-based HBHE noise filter
from CommonTools.RecoAlgos.HBHENoiseFilterResultProducer_cfi import HBHENoiseFilterResultProducer
# no filtering on the largest number of zeros found in a single RBX in the event
HBHENoiseFilterResultProducer.minZeros = cms.int32(99999)
HBHENoiseFilterResultProducer.IgnoreTS4TS5ifJetInLowBVRegion = cms.bool(False) 
HBHENoiseFilterResultProducer.defaultDecision = cms.string("HBHENoiseFilterResultRun2Loose")

#> The ECAL dead cell trigger primitive filter
from RecoMET.METFilters.EcalDeadCellTriggerPrimitiveFilter_cfi import EcalDeadCellTriggerPrimitiveFilter
EcalDeadCellTriggerPrimitiveFilter.taggingMode = cms.bool(True)

#> The ECAL dead cell boundary energy filter
from RecoMET.METFilters.EcalDeadCellBoundaryEnergyFilter_cfi import EcalDeadCellBoundaryEnergyFilter
EcalDeadCellBoundaryEnergyFilter.taggingMode = cms.bool(True)

#> The EE bad SuperCrystal filter
from RecoMET.METFilters.eeBadScFilter_cfi import eeBadScFilter
eeBadScFilter.badscEE = [-1023023, 1048098, -1078063, -1043093]
eeBadScFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.CSCTightHalo2015Filter_cfi import CSCTightHalo2015Filter
CSCTightHalo2015Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.globalTightHalo2016Filter_cfi import globalTightHalo2016Filter
globalTightHalo2016Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.globalSuperTightHalo2016Filter_cfi import globalSuperTightHalo2016Filter
globalSuperTightHalo2016Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.chargedHadronTrackResolutionFilter_cfi import chargedHadronTrackResolutionFilter
chargedHadronTrackResolutionFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.muonBadTrackFilter_cfi import muonBadTrackFilter
muonBadTrackFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadPFMuonFilter_cfi import BadPFMuonFilter
BadPFMuonFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadChargedCandidateFilter_cfi import BadChargedCandidateFilter
BadChargedCandidateFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadPFMuonSummer16Filter_cfi import BadPFMuonSummer16Filter
BadPFMuonSummer16Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadChargedCandidateSummer16Filter_cfi import BadChargedCandidateSummer16Filter
BadChargedCandidateSummer16Filter.taggingMode = cms.bool(True)

#> Finally define the met filter sequence
metFilters = cms.Sequence(
    HBHENoiseFilterResultProducer *
    EcalDeadCellTriggerPrimitiveFilter *
    EcalDeadCellBoundaryEnergyFilter *
    eeBadScFilter *
    CSCTightHalo2015Filter *
    globalTightHalo2016Filter *
    globalSuperTightHalo2016Filter *
    chargedHadronTrackResolutionFilter *
    muonBadTrackFilter *
    BadPFMuonFilter *
    BadChargedCandidateFilter *
    BadPFMuonSummer16Filter *
    BadChargedCandidateSummer16Filter
)

b0bd4251991e0169c98fb0c87787d735d1900121
<mask token>

<mask token>
HBHENoiseFilterResultProducer.minZeros = cms.int32(99999)
HBHENoiseFilterResultProducer.IgnoreTS4TS5ifJetInLowBVRegion = cms.bool(False)
HBHENoiseFilterResultProducer.defaultDecision = cms.string(
    'HBHENoiseFilterResultRun2Loose')
<mask token>
EcalDeadCellTriggerPrimitiveFilter.taggingMode = cms.bool(True)
<mask token>
EcalDeadCellBoundaryEnergyFilter.taggingMode = cms.bool(True)
<mask token>
eeBadScFilter.badscEE = [-1023023, 1048098, -1078063, -1043093]
eeBadScFilter.taggingMode = cms.bool(True)
<mask token>
CSCTightHalo2015Filter.taggingMode = cms.bool(True)
<mask token>
globalTightHalo2016Filter.taggingMode = cms.bool(True)
<mask token>
globalSuperTightHalo2016Filter.taggingMode = cms.bool(True)
<mask token>
chargedHadronTrackResolutionFilter.taggingMode = cms.bool(True)
<mask token>
muonBadTrackFilter.taggingMode = cms.bool(True)
<mask token>
BadPFMuonFilter.taggingMode = cms.bool(True)
<mask token>
BadChargedCandidateFilter.taggingMode = cms.bool(True)
<mask token>
BadPFMuonSummer16Filter.taggingMode = cms.bool(True)
<mask token>
BadChargedCandidateSummer16Filter.taggingMode = cms.bool(True)
metFilters = cms.Sequence(HBHENoiseFilterResultProducer *
    EcalDeadCellTriggerPrimitiveFilter * EcalDeadCellBoundaryEnergyFilter *
    eeBadScFilter * CSCTightHalo2015Filter * globalTightHalo2016Filter *
    globalSuperTightHalo2016Filter * chargedHadronTrackResolutionFilter *
    muonBadTrackFilter * BadPFMuonFilter * BadChargedCandidateFilter *
    BadPFMuonSummer16Filter * BadChargedCandidateSummer16Filter)

import FWCore.ParameterSet.Config as cms
from CommonTools.RecoAlgos.HBHENoiseFilterResultProducer_cfi import HBHENoiseFilterResultProducer
HBHENoiseFilterResultProducer.minZeros = cms.int32(99999)
HBHENoiseFilterResultProducer.IgnoreTS4TS5ifJetInLowBVRegion = cms.bool(False)
HBHENoiseFilterResultProducer.defaultDecision = cms.string(
    'HBHENoiseFilterResultRun2Loose')
from RecoMET.METFilters.EcalDeadCellTriggerPrimitiveFilter_cfi import EcalDeadCellTriggerPrimitiveFilter
EcalDeadCellTriggerPrimitiveFilter.taggingMode = cms.bool(True)
from RecoMET.METFilters.EcalDeadCellBoundaryEnergyFilter_cfi import EcalDeadCellBoundaryEnergyFilter
EcalDeadCellBoundaryEnergyFilter.taggingMode = cms.bool(True)
from RecoMET.METFilters.eeBadScFilter_cfi import eeBadScFilter
eeBadScFilter.badscEE = [-1023023, 1048098, -1078063, -1043093]
eeBadScFilter.taggingMode = cms.bool(True)
from RecoMET.METFilters.CSCTightHalo2015Filter_cfi import CSCTightHalo2015Filter
CSCTightHalo2015Filter.taggingMode = cms.bool(True)
from RecoMET.METFilters.globalTightHalo2016Filter_cfi import globalTightHalo2016Filter
globalTightHalo2016Filter.taggingMode = cms.bool(True)
from RecoMET.METFilters.globalSuperTightHalo2016Filter_cfi import globalSuperTightHalo2016Filter
globalSuperTightHalo2016Filter.taggingMode = cms.bool(True)
from RecoMET.METFilters.chargedHadronTrackResolutionFilter_cfi import chargedHadronTrackResolutionFilter
chargedHadronTrackResolutionFilter.taggingMode = cms.bool(True)
from RecoMET.METFilters.muonBadTrackFilter_cfi import muonBadTrackFilter
muonBadTrackFilter.taggingMode = cms.bool(True)
from RecoMET.METFilters.BadPFMuonFilter_cfi import BadPFMuonFilter
BadPFMuonFilter.taggingMode = cms.bool(True)
from RecoMET.METFilters.BadChargedCandidateFilter_cfi import BadChargedCandidateFilter
BadChargedCandidateFilter.taggingMode = cms.bool(True)
from RecoMET.METFilters.BadPFMuonSummer16Filter_cfi import BadPFMuonSummer16Filter
BadPFMuonSummer16Filter.taggingMode = cms.bool(True)
from RecoMET.METFilters.BadChargedCandidateSummer16Filter_cfi import BadChargedCandidateSummer16Filter
BadChargedCandidateSummer16Filter.taggingMode = cms.bool(True)
metFilters = cms.Sequence(HBHENoiseFilterResultProducer *
    EcalDeadCellTriggerPrimitiveFilter * EcalDeadCellBoundaryEnergyFilter *
    eeBadScFilter * CSCTightHalo2015Filter * globalTightHalo2016Filter *
    globalSuperTightHalo2016Filter * chargedHadronTrackResolutionFilter *
    muonBadTrackFilter * BadPFMuonFilter * BadChargedCandidateFilter *
    BadPFMuonSummer16Filter * BadChargedCandidateSummer16Filter)

import FWCore.ParameterSet.Config as cms

# To run and store the decisions of the MET filters

#> The iso-based HBHE noise filter
from CommonTools.RecoAlgos.HBHENoiseFilterResultProducer_cfi import HBHENoiseFilterResultProducer
# no filtering on the largest number of zeros found in a single RBX in the event
HBHENoiseFilterResultProducer.minZeros = cms.int32(99999)
HBHENoiseFilterResultProducer.IgnoreTS4TS5ifJetInLowBVRegion = cms.bool(False) 
HBHENoiseFilterResultProducer.defaultDecision = cms.string("HBHENoiseFilterResultRun2Loose")

#> The ECAL dead cell trigger primitive filter
from RecoMET.METFilters.EcalDeadCellTriggerPrimitiveFilter_cfi import EcalDeadCellTriggerPrimitiveFilter
EcalDeadCellTriggerPrimitiveFilter.taggingMode = cms.bool(True)

#> The ECAL dead cell boundary energy filter
from RecoMET.METFilters.EcalDeadCellBoundaryEnergyFilter_cfi import EcalDeadCellBoundaryEnergyFilter
EcalDeadCellBoundaryEnergyFilter.taggingMode = cms.bool(True)

#> The EE bad SuperCrystal filter
from RecoMET.METFilters.eeBadScFilter_cfi import eeBadScFilter
eeBadScFilter.badscEE = [-1023023, 1048098, -1078063, -1043093]
eeBadScFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.CSCTightHalo2015Filter_cfi import CSCTightHalo2015Filter
CSCTightHalo2015Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.globalTightHalo2016Filter_cfi import globalTightHalo2016Filter
globalTightHalo2016Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.globalSuperTightHalo2016Filter_cfi import globalSuperTightHalo2016Filter
globalSuperTightHalo2016Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.chargedHadronTrackResolutionFilter_cfi import chargedHadronTrackResolutionFilter
chargedHadronTrackResolutionFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.muonBadTrackFilter_cfi import muonBadTrackFilter
muonBadTrackFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadPFMuonFilter_cfi import BadPFMuonFilter
BadPFMuonFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadChargedCandidateFilter_cfi import BadChargedCandidateFilter
BadChargedCandidateFilter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadPFMuonSummer16Filter_cfi import BadPFMuonSummer16Filter
BadPFMuonSummer16Filter.taggingMode = cms.bool(True)

from RecoMET.METFilters.BadChargedCandidateSummer16Filter_cfi import BadChargedCandidateSummer16Filter
BadChargedCandidateSummer16Filter.taggingMode = cms.bool(True)

#> Finally define the met filter sequence
metFilters = cms.Sequence(
    HBHENoiseFilterResultProducer *
    EcalDeadCellTriggerPrimitiveFilter *
    EcalDeadCellBoundaryEnergyFilter *
    eeBadScFilter *
    CSCTightHalo2015Filter *
    globalTightHalo2016Filter *
    globalSuperTightHalo2016Filter *
    chargedHadronTrackResolutionFilter *
    muonBadTrackFilter *
    BadPFMuonFilter *
    BadChargedCandidateFilter *
    BadPFMuonSummer16Filter *
    BadChargedCandidateSummer16Filter
)
