From 14ed8391611437d930107e3a2cff327c538ae6d2 Mon Sep 17 00:00:00 2001 From: Jeongeun Lee Date: Wed, 25 Mar 2020 13:07:36 +0100 Subject: [PATCH 1/2] update event content structure and remove no use drops --- .../python/RecoEcal_EventContent_cff.py | 133 ++++++++---------- .../python/BeamSpot_EventContent_cff.py | 14 +- .../python/RecoVertex_EventContent_cff.py | 52 +++---- 3 files changed, 79 insertions(+), 120 deletions(-) diff --git a/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py b/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py index 5630fc8f54e1f..5c1a8253792ef 100644 --- a/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py +++ b/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py @@ -1,62 +1,5 @@ import FWCore.ParameterSet.Config as cms -# Full Event content -RecoEcalFEVT = cms.PSet( - outputCommands = cms.untracked.vstring( - #selected digis - 'keep *_selectDigi_*_*', - # Hits - 'keep *_reducedEcalRecHitsEB_*_*', - 'keep *_reducedEcalRecHitsEE_*_*', - 'keep *_reducedEcalRecHitsES_*_*', - 'keep *_interestingEcalDetId*_*_*', - 'keep *_ecalWeightUncalibRecHit_*_*', - 'keep *_ecalPreshowerRecHit_*_*', - # Barrel clusters - 'keep *_hybridSuperClusters_*_*', - 'keep *_correctedHybridSuperClusters_*_*', - # Endcap clusters - 'keep *_multi5x5*_*_*', - 'keep *_correctedMulti5x5*_*_*', - # Preshower clusters - 'keep recoPreshowerClusters_multi5x5SuperClustersWithPreshower_*_*', - 'keep recoPreshowerClusterShapes_multi5x5PreshowerClusterShape_*_*', - # Particle Flow superclusters - 'keep *_particleFlowSuperClusterECAL_*_*', - 'keep *_particleFlowSuperClusterOOTECAL_*_*', - # DROP statements - 'drop recoBasicClusters_multi5x5BasicClusters_multi5x5BarrelBasicClusters_*', - 'drop recoSuperClusters_multi5x5SuperClusters_multi5x5BarrelSuperClusters_*') -) -# RECO content -RecoEcalRECO = cms.PSet( - outputCommands = cms.untracked.vstring( - #selected digis - 'keep *_selectDigi_*_*', - # Hits - 'keep EcalRecHitsSorted_reducedEcalRecHitsEE_*_*', - 'keep EcalRecHitsSorted_reducedEcalRecHitsEB_*_*', - 'keep EcalRecHitsSorted_reducedEcalRecHitsES_*_*', - # Barrel clusters - 'keep *_hybridSuperClusters_*_*', - 'keep recoSuperClusters_correctedHybridSuperClusters_*_*', - # Endcap clusters - 'keep *_multi5x5SuperClusters_*_*', - 'keep recoSuperClusters_multi5x5SuperClusters_*_*', - 'keep recoSuperClusters_multi5x5SuperClustersWithPreshower_*_*', - 'keep recoSuperClusters_correctedMulti5x5SuperClustersWithPreshower_*_*', - # Preshower clusters - 'keep recoPreshowerClusters_multi5x5SuperClustersWithPreshower_*_*', - 'keep recoPreshowerClusterShapes_multi5x5PreshowerClusterShape_*_*', - # Particle Flow superclusters - 'keep *_particleFlowSuperClusterECAL_*_*', - 'keep *_particleFlowSuperClusterOOTECAL_*_*', - # DROP statements - 'drop recoClusterShapes_*_*_*', - 'drop recoBasicClustersToOnerecoClusterShapesAssociation_*_*_*', - 'drop recoBasicClusters_multi5x5BasicClusters_multi5x5BarrelBasicClusters_*', - 'drop recoSuperClusters_multi5x5SuperClusters_multi5x5BarrelSuperClusters_*') -) # AOD content RecoEcalAOD = cms.PSet( outputCommands = cms.untracked.vstring( @@ -80,25 +23,16 @@ 'keep recoSuperClusters_particleFlowSuperClusterECAL_*_*', 'keep recoCaloClusters_particleFlowSuperClusterECAL_*_*', 'keep recoSuperClusters_particleFlowSuperClusterOOTECAL_*_*', - 'keep recoCaloClusters_particleFlowSuperClusterOOTECAL_*_*', - ) + 'keep recoCaloClusters_particleFlowSuperClusterOOTECAL_*_*') ) - -_phase2_hgcal_scCommands = ['keep *_particleFlowSuperClusterHGCal_*_*', 'keep *_particleFlowSuperClusterHGCalFromMultiCl_*_*'] _phase2_hgcal_scCommandsAOD = ['keep recoSuperClusters_particleFlowSuperClusterHGCal__*', 'keep recoCaloClusters_particleFlowSuperClusterHGCal__*', 'keep recoSuperClusters_particleFlowSuperClusterHGCalFromMultiCl__*', 'keep recoCaloClusters_particleFlowSuperClusterHGCalFromMultiCl__*'] -_phase2_hgcal_RecoEcalFEVT = RecoEcalFEVT.clone() -_phase2_hgcal_RecoEcalFEVT.outputCommands += _phase2_hgcal_scCommands -_phase2_hgcal_RecoEcalRECO = RecoEcalRECO.clone() -_phase2_hgcal_RecoEcalRECO.outputCommands += _phase2_hgcal_scCommands -_phase2_hgcal_RecoEcalAOD = RecoEcalAOD.clone() -_phase2_hgcal_RecoEcalAOD.outputCommands += _phase2_hgcal_scCommandsAOD + from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal -phase2_hgcal.toReplaceWith( RecoEcalFEVT, _phase2_hgcal_RecoEcalFEVT ) -phase2_hgcal.toReplaceWith( RecoEcalRECO, _phase2_hgcal_RecoEcalRECO ) -phase2_hgcal.toReplaceWith( RecoEcalAOD , _phase2_hgcal_RecoEcalAOD ) +phase2_hgcal.toModify(RecoEcalAOD, + outputCommands = RecoEcalAOD.outputCommands + _phase2_hgcal_scCommandsAOD) from Configuration.Eras.Modifier_pA_2016_cff import pA_2016 from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb @@ -107,11 +41,54 @@ from Configuration.Eras.Modifier_ppRef_2017_cff import ppRef_2017 #HI-specific products needed in pp scenario special configurations for e in [pA_2016, peripheralPbPb, pp_on_AA_2018, pp_on_XeXe_2017, ppRef_2017]: - for ec in [RecoEcalAOD.outputCommands, RecoEcalRECO.outputCommands, RecoEcalFEVT.outputCommands]: - e.toModify( ec, func=lambda outputCommands: outputCommands.extend(['keep recoSuperClusters_correctedIslandBarrelSuperClusters_*_*', - 'keep recoSuperClusters_correctedIslandEndcapSuperClusters_*_*' - ]) - ) - for ec in [RecoEcalRECO.outputCommands, RecoEcalFEVT.outputCommands]: - e.toModify( ec, func=lambda outputCommands: outputCommands.extend(['keep recoCaloClusters_islandBasicClusters_*_*']) - ) + e.toModify( RecoEcalAOD.outputCommands, + func=lambda outputCommands: outputCommands.extend(['keep recoSuperClusters_correctedIslandBarrelSuperClusters_*_*', + 'keep recoSuperClusters_correctedIslandEndcapSuperClusters_*_*']) + ) +# RECO content +RecoEcalRECO = cms.PSet( + outputCommands = cms.untracked.vstring( + # Barrel clusters + 'keep *_hybridSuperClusters_*_*', + 'keep recoSuperClusters_correctedHybridSuperClusters_*_*', + # Endcap clusters + 'keep *_multi5x5SuperClusters_*_*', + 'keep recoSuperClusters_multi5x5SuperClusters_*_*', + 'keep recoSuperClusters_multi5x5SuperClustersWithPreshower_*_*', + # Particle Flow superclusters + 'keep *_particleFlowSuperClusterECAL_*_*', + 'keep *_particleFlowSuperClusterOOTECAL_*_*', + # DROP statements # not used + #'drop recoClusterShapes_*_*_*', + #'drop recoBasicClustersToOnerecoClusterShapesAssociation_*_*_*', + #'drop recoBasicClusters_multi5x5BasicClusters_multi5x5BarrelBasicClusters_*', + #'drop recoSuperClusters_multi5x5SuperClusters_multi5x5BarrelSuperClusters_*') + ) +) +RecoEcalRECO.outputCommands.extend(RecoEcalAOD.outputCommands) +_phase2_hgcal_scCommands = ['keep *_particleFlowSuperClusterHGCal_*_*', + 'keep *_particleFlowSuperClusterHGCalFromMultiCl_*_*'] +phase2_hgcal.toModify(RecoEcalRECO, + outputCommands = RecoEcalRECO.outputCommands + _phase2_hgcal_scCommands) + +for e in [pA_2016, peripheralPbPb, pp_on_AA_2018, pp_on_XeXe_2017, ppRef_2017]: + e.toModify( RecoEcalRECO.outputCommands, + func=lambda outputCommands: outputCommands.extend(['keep recoCaloClusters_islandBasicClusters_*_*']) + ) +# Full Event content +RecoEcalFEVT = cms.PSet( + outputCommands = cms.untracked.vstring( + # Hits + 'keep *_reducedEcalRecHitsEB_*_*', + 'keep *_reducedEcalRecHitsEE_*_*', + 'keep *_reducedEcalRecHitsES_*_*', + 'keep *_interestingEcalDetId*_*_*', + 'keep *_ecalWeightUncalibRecHit_*_*', + 'keep *_ecalPreshowerRecHit_*_*', + # Barrel clusters + 'keep *_correctedHybridSuperClusters_*_*', + # Endcap clusters + 'keep *_multi5x5*_*_*', + 'keep *_correctedMulti5x5*_*_*') +) +RecoEcalFEVT.outputCommands.extend(RecoEcalRECO.outputCommands) diff --git a/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py b/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py index 4e9e39f0c05b3..b56baac30ebf0 100644 --- a/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py +++ b/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py @@ -1,15 +1,17 @@ import FWCore.ParameterSet.Config as cms -#Full Event content -BeamSpotFEVT = cms.PSet( +#AOD content +BeamSpotAOD = cms.PSet( outputCommands = cms.untracked.vstring('keep *_offlineBeamSpot_*_*') ) #RECO content BeamSpotRECO = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_offlineBeamSpot_*_*') + outputCommands = cms.untracked.vstring() ) -#AOD content -BeamSpotAOD = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_offlineBeamSpot_*_*') +BeamSpotRECO.outputCommands.extend(BeamSpotAOD.outputCommands) +#Full Event content +BeamSpotFEVT = cms.PSet( + outputCommands = cms.untracked.vstring() ) +BeamSpotFEVT.outputCommands.extend(BeamSpotRECO.outputCommands) diff --git a/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py b/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py index 06c851f4b7c18..97df1a1eaaf1c 100644 --- a/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py +++ b/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py @@ -1,22 +1,4 @@ import FWCore.ParameterSet.Config as cms - -RecoVertexFEVT = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_offlinePrimaryVertices__*', - 'keep *_offlinePrimaryVerticesWithBS_*_*', - 'keep *_offlinePrimaryVerticesFromCosmicTracks_*_*', - 'keep *_nuclearInteractionMaker_*_*', - 'keep *_generalV0Candidates_*_*', - 'keep *_inclusiveSecondaryVertices_*_*') -) -#RECO content -RecoVertexRECO = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_offlinePrimaryVertices__*', - 'keep *_offlinePrimaryVerticesWithBS_*_*', - 'keep *_offlinePrimaryVerticesFromCosmicTracks_*_*', - 'keep *_nuclearInteractionMaker_*_*', - 'keep *_generalV0Candidates_*_*', - 'keep *_inclusiveSecondaryVertices_*_*') -) #AOD content RecoVertexAOD = cms.PSet( outputCommands = cms.untracked.vstring('keep *_offlinePrimaryVertices__*', @@ -35,21 +17,19 @@ 'keep *_trackTimeValueMapProducer_*_*' ] _phase2_tktiming_layer_RecoVertexEventContent = [ 'keep *_offlinePrimaryVertices4DnoPID__*', - 'keep *_offlinePrimaryVertices4DnoPIDWithBS__*', - 'keep *_tofPID_*_*'] - -def _phase2_tktiming_AddNewContent(mod): - temp = mod.outputCommands + _phase2_tktiming_RecoVertexEventContent - phase2_timing.toModify( mod, outputCommands = temp ) - -_phase2_tktiming_AddNewContent(RecoVertexFEVT) -_phase2_tktiming_AddNewContent(RecoVertexRECO) -_phase2_tktiming_AddNewContent(RecoVertexAOD) - -def _phase2_tktiming_layer_AddNewContent(mod): - temp = mod.outputCommands + _phase2_tktiming_layer_RecoVertexEventContent - phase2_timing_layer.toModify( mod, outputCommands = temp ) - -_phase2_tktiming_layer_AddNewContent(RecoVertexFEVT) -_phase2_tktiming_layer_AddNewContent(RecoVertexRECO) -_phase2_tktiming_layer_AddNewContent(RecoVertexAOD) + 'keep *_offlinePrimaryVertices4DnoPIDWithBS__*', + 'keep *_tofPID_*_*'] +phase2_timing.toModify( RecoVertexAOD, + outputCommands = RecoVertexAOD.outputCommands + _phase2_tktiming_RecoVertexEventContent) +phase2_timing_layer.toModify( RecoVertexAOD, + outputCommands = RecoVertexAOD.outputCommands + _phase2_tktiming_layer_RecoVertexEventContent) +#RECO content +RecoVertexRECO = cms.PSet( + outputCommands = cms.untracked.vstring() +) +RecoVertexRECO.outputCommands.extend(RecoVertexAOD.outputCommands) +#FEVT content +RecoVertexFEVT = cms.PSet( + outputCommands = cms.untracked.vstring() +) +RecoVertexFEVT.outputCommands.extend(RecoVertexRECO.outputCommands) From c9604227d0c95611df9726985561055c10d194c7 Mon Sep 17 00:00:00 2001 From: Jeongeun Lee Date: Mon, 20 Apr 2020 14:49:27 +0200 Subject: [PATCH 2/2] update eventcontent, fix redundant line --- .../python/RecoEcal_EventContent_cff.py | 17 ++++++++--------- .../python/BeamSpot_EventContent_cff.py | 2 ++ .../python/RecoVertex_EventContent_cff.py | 3 +++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py b/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py index 5c1a8253792ef..66bf090fbf014 100644 --- a/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py +++ b/RecoEcal/Configuration/python/RecoEcal_EventContent_cff.py @@ -45,6 +45,7 @@ func=lambda outputCommands: outputCommands.extend(['keep recoSuperClusters_correctedIslandBarrelSuperClusters_*_*', 'keep recoSuperClusters_correctedIslandEndcapSuperClusters_*_*']) ) + # RECO content RecoEcalRECO = cms.PSet( outputCommands = cms.untracked.vstring( @@ -53,17 +54,15 @@ 'keep recoSuperClusters_correctedHybridSuperClusters_*_*', # Endcap clusters 'keep *_multi5x5SuperClusters_*_*', - 'keep recoSuperClusters_multi5x5SuperClusters_*_*', 'keep recoSuperClusters_multi5x5SuperClustersWithPreshower_*_*', # Particle Flow superclusters 'keep *_particleFlowSuperClusterECAL_*_*', 'keep *_particleFlowSuperClusterOOTECAL_*_*', - # DROP statements # not used - #'drop recoClusterShapes_*_*_*', - #'drop recoBasicClustersToOnerecoClusterShapesAssociation_*_*_*', - #'drop recoBasicClusters_multi5x5BasicClusters_multi5x5BarrelBasicClusters_*', - #'drop recoSuperClusters_multi5x5SuperClusters_multi5x5BarrelSuperClusters_*') - ) + # DROP statements + 'drop recoClusterShapes_*_*_*', + 'drop recoBasicClustersToOnerecoClusterShapesAssociation_*_*_*', + 'drop recoBasicClusters_multi5x5BasicClusters_multi5x5BarrelBasicClusters_*', + 'drop recoSuperClusters_multi5x5SuperClusters_multi5x5BarrelSuperClusters_*') ) RecoEcalRECO.outputCommands.extend(RecoEcalAOD.outputCommands) _phase2_hgcal_scCommands = ['keep *_particleFlowSuperClusterHGCal_*_*', @@ -75,6 +74,7 @@ e.toModify( RecoEcalRECO.outputCommands, func=lambda outputCommands: outputCommands.extend(['keep recoCaloClusters_islandBasicClusters_*_*']) ) + # Full Event content RecoEcalFEVT = cms.PSet( outputCommands = cms.untracked.vstring( @@ -88,7 +88,6 @@ # Barrel clusters 'keep *_correctedHybridSuperClusters_*_*', # Endcap clusters - 'keep *_multi5x5*_*_*', - 'keep *_correctedMulti5x5*_*_*') + 'keep *_multi5x5*_*_*') ) RecoEcalFEVT.outputCommands.extend(RecoEcalRECO.outputCommands) diff --git a/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py b/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py index b56baac30ebf0..fa492c47bf0ec 100644 --- a/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py +++ b/RecoVertex/BeamSpotProducer/python/BeamSpot_EventContent_cff.py @@ -4,11 +4,13 @@ BeamSpotAOD = cms.PSet( outputCommands = cms.untracked.vstring('keep *_offlineBeamSpot_*_*') ) + #RECO content BeamSpotRECO = cms.PSet( outputCommands = cms.untracked.vstring() ) BeamSpotRECO.outputCommands.extend(BeamSpotAOD.outputCommands) + #Full Event content BeamSpotFEVT = cms.PSet( outputCommands = cms.untracked.vstring() diff --git a/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py b/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py index 97df1a1eaaf1c..00327cd5ec7a3 100644 --- a/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py +++ b/RecoVertex/Configuration/python/RecoVertex_EventContent_cff.py @@ -1,4 +1,5 @@ import FWCore.ParameterSet.Config as cms + #AOD content RecoVertexAOD = cms.PSet( outputCommands = cms.untracked.vstring('keep *_offlinePrimaryVertices__*', @@ -23,11 +24,13 @@ outputCommands = RecoVertexAOD.outputCommands + _phase2_tktiming_RecoVertexEventContent) phase2_timing_layer.toModify( RecoVertexAOD, outputCommands = RecoVertexAOD.outputCommands + _phase2_tktiming_layer_RecoVertexEventContent) + #RECO content RecoVertexRECO = cms.PSet( outputCommands = cms.untracked.vstring() ) RecoVertexRECO.outputCommands.extend(RecoVertexAOD.outputCommands) + #FEVT content RecoVertexFEVT = cms.PSet( outputCommands = cms.untracked.vstring()