Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-15 22:20:45

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 *
0011 #from PhysicsTools.PatAlgos.producersLayer1.hemisphereProducer_cfi import *
0012 
0013 # One module to count objects
0014 selectedPatCandidateSummary = cms.EDAnalyzer("CandidateSummaryTable",
0015     logName = cms.untracked.string("selectedPatCanddiates|PATSummaryTables"),
0016     candidates = cms.VInputTag(
0017         cms.InputTag("selectedPatElectrons"),
0018         cms.InputTag("selectedPatLowPtElectrons"),
0019         cms.InputTag("selectedPatMuons"),
0020         cms.InputTag("selectedPatDisplacedMuons"),
0021         cms.InputTag("selectedPatTaus"),
0022         cms.InputTag("selectedPatPhotons"),
0023         cms.InputTag("selectedPatOOTPhotons"),
0024         cms.InputTag("selectedPatJets"),
0025     )
0026 )
0027 
0028 selectedPatCandidatesTask = cms.Task(
0029     selectedPatElectrons,
0030     selectedPatLowPtElectrons,
0031     selectedPatMuons,
0032     selectedPatDisplacedMuons,
0033     selectedPatTaus,
0034     selectedPatPhotons,
0035     selectedPatOOTPhotons,
0036     selectedPatJets
0037 )
0038 
0039 selectedPatCandidates = cms.Sequence(selectedPatCandidateSummary, selectedPatCandidatesTask)
0040 
0041 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0042 pp_on_AA.toReplaceWith(selectedPatCandidatesTask, selectedPatCandidatesTask.copyAndExclude([selectedPatOOTPhotons]))
0043 pp_on_AA.toModify(selectedPatCandidateSummary.candidates, func = lambda list: list.remove(cms.InputTag("selectedPatOOTPhotons")) )
0044 
0045 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
0046 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
0047 _mAOD = (run2_miniAOD_94XFall17 | run2_miniAOD_80XLegacy)
0048 (pp_on_AA | _mAOD).toReplaceWith(selectedPatCandidatesTask,
0049                                  selectedPatCandidatesTask.copyAndExclude([selectedPatLowPtElectrons]))
0050 (pp_on_AA | _mAOD).toModify(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 | _mAOD | run2_miniAOD_UL | Run2_2016_HIPM).toReplaceWith(selectedPatCandidatesTask,
0056                                                    selectedPatCandidatesTask.copyAndExclude([selectedPatDisplacedMuons]))
0057 (pp_on_AA | _mAOD | 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]))