Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from PhysicsTools.PatAlgos.producersLayer1.electronProducer_cff import *
0004 from PhysicsTools.PatAlgos.producersLayer1.lowPtElectronProducer_cff import *
0005 from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cff import *
0006 from PhysicsTools.PatAlgos.producersLayer1.displacedMuonProducer_cff import *
0007 from PhysicsTools.PatAlgos.producersLayer1.tauProducer_cff import *
0008 from PhysicsTools.PatAlgos.producersLayer1.photonProducer_cff import *
0009 from PhysicsTools.PatAlgos.producersLayer1.ootPhotonProducer_cff import *
0010 from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cff import *
0011 from PhysicsTools.PatAlgos.producersLayer1.metProducer_cff import *
0012 
0013 ## module to count objects
0014 patCandidateSummary = cms.EDAnalyzer("CandidateSummaryTable",
0015     logName = cms.untracked.string("patCandidates|PATSummaryTables"),
0016     candidates = cms.VInputTag(
0017         cms.InputTag("patElectrons"),
0018         cms.InputTag("patLowPtElectrons"),
0019         cms.InputTag("patMuons"),
0020         cms.InputTag("patDisplacedMuons"),
0021         cms.InputTag("patTaus"),
0022         cms.InputTag("patPhotons"),
0023         cms.InputTag("patOOTPhotons"),
0024         cms.InputTag("patJets"),
0025         cms.InputTag("patMETs"),
0026     )
0027 )
0028 
0029 patCandidatesTask = cms.Task(
0030     makePatElectronsTask,
0031     makePatLowPtElectronsTask,
0032     makePatMuonsTask,
0033     makePatDisplacedMuonsTask,
0034     makePatTausTask,
0035     makePatPhotonsTask,
0036     makePatOOTPhotonsTask,
0037     makePatJetsTask,
0038     makePatMETsTask
0039 )
0040 
0041 _patCandidatesTask = patCandidatesTask.copy()
0042 _patCandidatesTask.remove(makePatOOTPhotonsTask)
0043 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0044 pp_on_AA.toReplaceWith(patCandidatesTask, _patCandidatesTask)
0045 pp_on_AA.toModify(patCandidateSummary.candidates, func = lambda list: list.remove(cms.InputTag("patOOTPhotons")) )
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(patCandidatesTask,
0051                                  patCandidatesTask.copyAndExclude([makePatLowPtElectronsTask]))
0052 (pp_on_AA | _mAOD).toModify(patCandidateSummary.candidates,
0053                             func = lambda list: list.remove(cms.InputTag("patLowPtElectrons")) )
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(patCandidatesTask,
0058                                                    patCandidatesTask.copyAndExclude([makePatDisplacedMuonsTask]))
0059 (pp_on_AA | _mAOD | run2_miniAOD_UL | Run2_2016_HIPM).toModify(patCandidateSummary.candidates,
0060                                               func = lambda list: list.remove(cms.InputTag("patDisplacedMuons")) )
0061 
0062 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0063 fastSim.toReplaceWith(patCandidatesTask, patCandidatesTask.copyAndExclude([makePatDisplacedMuonsTask]))
0064 
0065 patCandidates = cms.Sequence(patCandidateSummary, patCandidatesTask)
0066