diff --git a/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py b/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py index 0051bdf1e234d..adda19de5a864 100644 --- a/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py +++ b/DPGAnalysis/MuonTools/python/muNtupleProducerBkg_cff.py @@ -11,8 +11,9 @@ def muDPGNanoBkgCustomize(process) : - if hasattr(process, "NANOAODoutput"): - process.NANOAODoutput.outputCommands.append("keep nanoaodFlatTable_*Table*_*_*") - process.NANOAODoutput.outputCommands.append("drop edmTriggerResults_*_*_*") + for output in ["NANOEDMAODoutput", "NANOAODoutput", "NANOEDMAODSIMoutput", "NANOAODSIMoutput"]: + if hasattr(process, output): + getattr(process,output).outputCommands.append("keep nanoaodFlatTable_*Table*_*_*") + getattr(process,output).outputCommands.append("drop edmTriggerResults_*_*_*") return process \ No newline at end of file diff --git a/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py b/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py index 2fa4cfbbd6391..18db110d9de6c 100644 --- a/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py +++ b/DPGAnalysis/MuonTools/python/muNtupleProducer_cff.py @@ -34,8 +34,9 @@ def muDPGNanoCustomize(process) : process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorAlong_cfi") process.load("TrackPropagation.SteppingHelixPropagator.SteppingHelixPropagatorOpposite_cfi") - if hasattr(process, "NANOAODoutput"): - process.NANOAODoutput.outputCommands.append("keep nanoaodFlatTable_*Table*_*_*") - process.NANOAODoutput.outputCommands.append("drop edmTriggerResults_*_*_*") + for output in ["NANOEDMAODoutput", "NANOAODoutput", "NANOEDMAODSIMoutput", "NANOAODSIMoutput"]: + if hasattr(process, output): + getattr(process,output).outputCommands.append("keep nanoaodFlatTable_*Table*_*_*") + getattr(process,output).outputCommands.append("drop edmTriggerResults_*_*_*") return process