Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-07-03 00:42:28

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from PhysicsTools.JetMCAlgos.AK4GenJetFlavourInfos_cfi import *
0004 from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import *
0005 from PhysicsTools.NanoAOD.common_cff import *
0006 from PhysicsTools.NanoAOD.jetMC_cff import *
0007 from PhysicsTools.NanoAOD.genparticles_cff import *
0008 from PhysicsTools.PatAlgos.slimming.genParticles_cff import *
0009 from PhysicsTools.PatAlgos.slimming.packedGenParticles_cfi import *
0010 from PhysicsTools.PatAlgos.slimming.prunedGenParticles_cfi import *
0011 from PhysicsTools.PatAlgos.slimming.slimmedGenJetsFlavourInfos_cfi import *
0012 from PhysicsTools.PatAlgos.slimming.slimmedGenJets_cfi   import *
0013 from RecoJets.Configuration.GenJetParticles_cff import *
0014 from RecoJets.Configuration.RecoGenJets_cff import *
0015 from HLTrigger.NGTScouting.hltVertices_cfi import *
0016 from HLTrigger.NGTScouting.hltEGammaPacker_cfi import *
0017 from HLTrigger.NGTScouting.hltPhotons_cfi import *
0018 from HLTrigger.NGTScouting.hltElectrons_cfi import *
0019 from HLTrigger.NGTScouting.hltMuons_cfi import *
0020 from HLTrigger.NGTScouting.hltTracks_cfi import *
0021 from HLTrigger.NGTScouting.hltJets_cfi import *
0022 from HLTrigger.NGTScouting.hltTaus_cfi import *
0023 from HLTrigger.NGTScouting.hltTracksters_cfi import *
0024 from HLTrigger.NGTScouting.hltSums_cfi import *
0025 from HLTrigger.NGTScouting.hltTriggerAcceptFilter_cfi import hltTriggerAcceptFilter,dstTriggerAcceptFilter
0026 
0027 NanoGenTable = cms.Sequence(
0028     prunedGenParticlesWithStatusOne
0029     + prunedGenParticles
0030     + finalGenParticles
0031     + genParticleTable
0032     + genParticlesForJetsNoNu
0033     + ak4GenJetsNoNu
0034     + selectedHadronsAndPartonsForGenJetsFlavourInfos
0035     + packedGenParticles
0036     + slimmedGenJets
0037     + ak4GenJetFlavourInfos
0038     + slimmedGenJetsFlavourInfos
0039     + genJetTable
0040     + genJetFlavourTable
0041 )
0042 
0043 hltNanoProducer = cms.Sequence(
0044     NanoGenTable
0045     #+ hltTriggerAcceptFilter
0046     + hltVertexTable
0047     + hltPixelTrackTable
0048     + hltGeneralTrackTable
0049     + hltEgammaPacker
0050     + hltPhotonTable
0051     + hltElectronTable
0052     + hltPhase2L3MuonIdTracks
0053     + hltMuonTable
0054     + hltPFCandidateTable
0055     + hltJetTable
0056     + hltTrackstersTable
0057     + hltTauTable
0058     + hltTauExtTable
0059     + METTable
0060     + HTTable
0061 )
0062 
0063 dstNanoProducer = cms.Sequence(
0064     NanoGenTable
0065     + dstTriggerAcceptFilter
0066     + hltVertexTable
0067     + hltPixelTrackTable
0068     + hltGeneralTrackTable
0069     + hltEgammaPacker
0070     + hltPhotonTable
0071     + hltElectronTable
0072     + hltPhase2L3MuonIdTracks
0073     + hltMuonTable
0074     + hltPFCandidateTable
0075     + hltJetTable
0076     + hltTauTable
0077     + hltTrackstersTable
0078     + hltTauExtTable
0079     + METTable
0080     + HTTable
0081 )
0082 
0083 def hltNanoCustomize(process):
0084 
0085     if hasattr(process, "NANOAODSIMoutput"):
0086         # process.genJetTable.cut = "pt > 10"
0087         # process.genJetFlavourTable.deltaR = 0.3
0088         process.genParticleTable.externalVariables = cms.PSet() # remove iso as external variable from PhysicsTools/NanoAOD/python/genparticles_cff.py:37 (hopefully temporarily)
0089         process.NANOAODSIMoutput.outputCommands.append(
0090             "keep nanoaodFlatTable_*Table*_*_*"
0091         )
0092         process.NANOAODSIMoutput.SelectEvents = cms.untracked.PSet(
0093             SelectEvents = cms.vstring(
0094                 [p for p in process.paths if p.startswith('HLT_') or p.startswith('DST_')]
0095             )
0096         )
0097 
0098     return process
0099 
0100 def hltNanoValCustomize(process):
0101     if hasattr(process, "dstNanoProducer"):
0102         process.dstNanoProducer += (process.hltTrackstersAssociationOneToManyTable + process.hltSimCl2CPOneToOneFlatTable)
0103 
0104     return process