1 import FWCore.ParameterSet.Config
as cms
13 selectedPatCandidateSummary = cms.EDAnalyzer(
"CandidateSummaryTable",
14 logName = cms.untracked.string(
"selectedPatCanddiates|PATSummaryTables"),
15 candidates = cms.VInputTag(
16 cms.InputTag(
"selectedPatElectrons"),
17 cms.InputTag(
"selectedPatLowPtElectrons"),
18 cms.InputTag(
"selectedPatMuons"),
19 cms.InputTag(
"selectedPatTaus"),
20 cms.InputTag(
"selectedPatPhotons"),
21 cms.InputTag(
"selectedPatOOTPhotons"),
22 cms.InputTag(
"selectedPatJets"),
26 selectedPatCandidatesTask = cms.Task(
28 selectedPatLowPtElectrons,
32 selectedPatOOTPhotons,
36 selectedPatCandidates = cms.Sequence(selectedPatCandidateSummary, selectedPatCandidatesTask)
38 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
39 pp_on_AA.toReplaceWith(selectedPatCandidatesTask, selectedPatCandidatesTask.copyAndExclude([selectedPatOOTPhotons]))
40 pp_on_AA.toModify(selectedPatCandidateSummary.candidates, func =
lambda list: list.remove(cms.InputTag(
"selectedPatOOTPhotons")) )
42 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff
import run2_miniAOD_94XFall17
43 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
44 _mAOD = (run2_miniAOD_94XFall17 | run2_miniAOD_80XLegacy)
45 (pp_on_AA | _mAOD).toReplaceWith(selectedPatCandidatesTask,
46 selectedPatCandidatesTask.copyAndExclude([selectedPatLowPtElectrons]))
47 (pp_on_AA | _mAOD).toModify(selectedPatCandidateSummary.candidates,
48 func =
lambda list: list.remove(cms.InputTag(
"selectedPatLowPtElectrons")) )