Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-02-21 00:31:40

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