File indexing completed on 2024-07-24 04:45:06
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from PhysicsTools.PatAlgos.selectionLayer1.electronSelector_cfi import *
0004 from PhysicsTools.PatAlgos.selectionLayer1.lowPtElectronSelector_cfi import *
0005 from PhysicsTools.PatAlgos.selectionLayer1.muonSelector_cfi import *
0006 from PhysicsTools.PatAlgos.selectionLayer1.displacedMuonSelector_cfi import *
0007 from PhysicsTools.PatAlgos.selectionLayer1.tauSelector_cfi import *
0008 from PhysicsTools.PatAlgos.selectionLayer1.photonSelector_cfi import *
0009 from PhysicsTools.PatAlgos.selectionLayer1.ootPhotonSelector_cff import *
0010 from PhysicsTools.PatAlgos.selectionLayer1.jetSelector_cfi import selectedPatJets as _selectedPatJets
0011
0012
0013 selectedPatJets = _selectedPatJets.clone()
0014
0015
0016 selectedPatCandidateSummary = cms.EDAnalyzer("CandidateSummaryTable",
0017 logName = cms.untracked.string("selectedPatCanddiates|PATSummaryTables"),
0018 candidates = cms.VInputTag(
0019 cms.InputTag("selectedPatElectrons"),
0020 cms.InputTag("selectedPatLowPtElectrons"),
0021 cms.InputTag("selectedPatMuons"),
0022 cms.InputTag("selectedPatDisplacedMuons"),
0023 cms.InputTag("selectedPatTaus"),
0024 cms.InputTag("selectedPatPhotons"),
0025 cms.InputTag("selectedPatOOTPhotons"),
0026 cms.InputTag("selectedPatJets"),
0027 )
0028 )
0029
0030 selectedPatCandidatesTask = cms.Task(
0031 selectedPatElectrons,
0032 selectedPatLowPtElectrons,
0033 selectedPatMuons,
0034 selectedPatDisplacedMuons,
0035 selectedPatTaus,
0036 selectedPatPhotons,
0037 selectedPatOOTPhotons,
0038 selectedPatJets
0039 )
0040
0041 selectedPatCandidates = cms.Sequence(selectedPatCandidateSummary, selectedPatCandidatesTask)
0042
0043 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0044 pp_on_AA.toReplaceWith(selectedPatCandidatesTask, selectedPatCandidatesTask.copyAndExclude([selectedPatOOTPhotons]))
0045 pp_on_AA.toModify(selectedPatCandidateSummary.candidates, func = lambda list: list.remove(cms.InputTag("selectedPatOOTPhotons")) )
0046
0047 (pp_on_AA).toReplaceWith(
0048 selectedPatCandidatesTask,
0049 selectedPatCandidatesTask.copyAndExclude([selectedPatLowPtElectrons])).toModify(
0050 selectedPatCandidateSummary.candidates,
0051 func = lambda list: list.remove(cms.InputTag("selectedPatLowPtElectrons")) )
0052
0053 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
0054 from Configuration.Eras.Era_Run2_2016_HIPM_cff import Run2_2016_HIPM
0055 (pp_on_AA | run2_miniAOD_UL | Run2_2016_HIPM).toReplaceWith(selectedPatCandidatesTask,
0056 selectedPatCandidatesTask.copyAndExclude([selectedPatDisplacedMuons]))
0057 (pp_on_AA | run2_miniAOD_UL | Run2_2016_HIPM).toModify(selectedPatCandidateSummary.candidates,
0058 func = lambda list: list.remove(cms.InputTag("selectedPatDisplacedMuons")) )
0059
0060 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0061 fastSim.toReplaceWith(selectedPatCandidatesTask, selectedPatCandidatesTask.copyAndExclude([selectedPatDisplacedMuons]))