1 import FWCore.ParameterSet.Config
as cms
13 patCandidateSummary = cms.EDAnalyzer(
"CandidateSummaryTable",
14 logName = cms.untracked.string(
"patCandidates|PATSummaryTables"),
15 candidates = cms.VInputTag(
16 cms.InputTag(
"patElectrons"),
17 cms.InputTag(
"patLowPtElectrons"),
18 cms.InputTag(
"patMuons"),
19 cms.InputTag(
"patTaus"),
20 cms.InputTag(
"patPhotons"),
21 cms.InputTag(
"patOOTPhotons"),
22 cms.InputTag(
"patJets"),
23 cms.InputTag(
"patMETs"),
27 patCandidatesTask = cms.Task(
29 makePatLowPtElectronsTask,
33 makePatOOTPhotonsTask,
38 _patCandidatesTask = patCandidatesTask.copy()
39 _patCandidatesTask.remove(makePatOOTPhotonsTask)
40 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
41 pp_on_AA.toReplaceWith(patCandidatesTask, _patCandidatesTask)
42 pp_on_AA.toModify(patCandidateSummary.candidates, func =
lambda list: list.remove(cms.InputTag(
"patOOTPhotons")) )
44 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff
import run2_miniAOD_94XFall17
45 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
46 _mAOD = (run2_miniAOD_94XFall17 | run2_miniAOD_80XLegacy)
47 (pp_on_AA | _mAOD).toReplaceWith(patCandidatesTask,
48 patCandidatesTask.copyAndExclude([makePatLowPtElectronsTask]))
49 (pp_on_AA | _mAOD).toModify(patCandidateSummary.candidates,
50 func =
lambda list: list.remove(cms.InputTag(
"patLowPtElectrons")) )
52 patCandidates = cms.Sequence(patCandidateSummary, patCandidatesTask)