CMS 3D CMS Logo

selectedPatCandidates_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
10 #from PhysicsTools.PatAlgos.producersLayer1.hemisphereProducer_cfi import *
11 
12 # One module to count objects
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"),
23  )
24 )
25 
26 selectedPatCandidatesTask = cms.Task(
27  selectedPatElectrons,
28  selectedPatLowPtElectrons,
29  selectedPatMuons,
30  selectedPatTaus,
31  selectedPatPhotons,
32  selectedPatOOTPhotons,
33  selectedPatJets
34 )
35 
36 selectedPatCandidates = cms.Sequence(selectedPatCandidateSummary, selectedPatCandidatesTask)
37 
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")) )
41 
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")) )
lowPtElectronSelector_cfi
jetSelector_cfi
electronSelector_cfi
muonSelector_cfi
ootPhotonSelector_cff
photonSelector_cfi
tauSelector_cfi