From e52db1bd2f2fd8154fe6df78694459cdbfc936e5 Mon Sep 17 00:00:00 2001 From: Simone Pigazzi Date: Fri, 8 Sep 2023 18:14:35 +0200 Subject: [PATCH 1/3] add run3_miniAOD_12X era modifier --- Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py | 3 +++ Configuration/StandardSequences/python/Eras.py | 1 + .../PatAlgos/python/slimming/applySubstructure_cff.py | 5 ++++- PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py | 5 +++-- 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py diff --git a/Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py b/Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py new file mode 100644 index 0000000000000..31e95559b614f --- /dev/null +++ b/Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +run3_miniAOD_12X = cms.Modifier() diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index d79f590b093dc..03c1f53966526 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -80,6 +80,7 @@ def __init__(self): 'trackingPhase2PU140','highBetaStar_2018', 'tracker_apv_vfp30_2016', 'pf_badHcalMitigationOff', 'run2_miniAOD_80XLegacy','run2_miniAOD_94XFall17', + 'run3_miniAOD_12X', 'run2_nanoAOD_106Xv2', 'run3_nanoAOD_122', 'run3_nanoAOD_124', 'hcalHardcodeConditions', 'hcalSkipPacker', diff --git a/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py b/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py index 9b2b392513e70..398e28ca13973 100644 --- a/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py +++ b/PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py @@ -24,6 +24,7 @@ def applySubstructure( process, postfix="" ) : from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL _run2_miniAOD_ANY = (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | run2_miniAOD_UL) from Configuration.Eras.Modifier_pA_2016_cff import pA_2016 + from Configuration.Eras.Modifier_run3_miniAOD_12X_cff import run3_miniAOD_12X if postfix=='': # Avoid recomputing the PUPPI collections that are present in AOD _rerun_puppijets_task = task.copy() @@ -31,7 +32,9 @@ def applySubstructure( process, postfix="" ) : getattr(process,'ak8PFJetsPuppiConstituents'), getattr(process,'ak8PFJetsPuppiSoftDrop'), getattr(process,'ak8PFJetsPuppiSoftDropMass')) - (_run2_miniAOD_ANY | pA_2016 ).toReplaceWith(task, _rerun_puppijets_task) + (_run2_miniAOD_ANY | pA_2016 | run3_miniAOD_12X ).toReplaceWith(task, _rerun_puppijets_task) + (_run2_miniAOD_ANY | pA_2016 | run3_miniAOD_12X ).toModify(getattr(process,'ak8PFJetsPuppiConstituents'+postfix), + cut = cms.string('pt > 170.0 && abs(rapidity()) < 2.4')) else: task.add(getattr(process,'ak8PFJetsPuppi'+postfix), getattr(process,'ak8PFJetsPuppiConstituents'+postfix), diff --git a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py index c164f83fe2380..3230dddce9dc3 100644 --- a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +++ b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py @@ -417,9 +417,10 @@ def _add_deepFlavour(process): process.load('CommonTools.PileupAlgos.Puppi_cff') process.load('RecoJets.JetProducers.ak4PFJets_cfi') from Configuration.Eras.Modifier_pA_2016_cff import pA_2016 + from Configuration.Eras.Modifier_run3_miniAOD_12X_cff import run3_miniAOD_12X _rerun_puppijets_task = task.copy() _rerun_puppijets_task.add(process.puppi, process.ak4PFJetsPuppi) - (_run2_miniAOD_ANY | pA_2016 | pp_on_AA).toReplaceWith(task, _rerun_puppijets_task) + (_run2_miniAOD_ANY | pA_2016 | pp_on_AA | run3_miniAOD_12X).toReplaceWith(task, _rerun_puppijets_task) from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX process.ak4PFJetsPuppiTracksAssociatorAtVertex = cms.EDProducer("JetTracksAssociatorAtVertex", @@ -475,7 +476,7 @@ def _add_metPuppi(process): process.load('RecoMET.METProducers.pfMetPuppi_cfi') _rerun_puppimet_task = task.copy() _rerun_puppimet_task.add(process.puppiNoLep, process.pfMetPuppi) - (_run2_miniAOD_ANY | pA_2016 | pp_on_AA).toReplaceWith(task, _rerun_puppimet_task) + (_run2_miniAOD_ANY | pA_2016 | pp_on_AA | run3_miniAOD_12X).toReplaceWith(task, _rerun_puppimet_task) runMetCorAndUncForMiniAODProduction(process, metType="Puppi", jetCollUnskimmed="slimmedJetsPuppi", From ec98b41b022a054b58c84db3fd98b4b15dee87ec Mon Sep 17 00:00:00 2001 From: Simone Pigazzi Date: Mon, 11 Sep 2023 11:49:46 +0200 Subject: [PATCH 2/3] add description --- Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py b/Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py index 31e95559b614f..8fb28981e85bc 100644 --- a/Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py +++ b/Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py @@ -1,3 +1,8 @@ +""" +The run3_miniAOD_12X modifier has been introduced to allow for PUPPI jet reclustering +while producing MINIAODs in 13_0_X from AODs preodcued in 2022 in 12_6/12_4. +""" + import FWCore.ParameterSet.Config as cms run3_miniAOD_12X = cms.Modifier() From 9fea250738ff0781eade24303e594a214b588124 Mon Sep 17 00:00:00 2001 From: Simone Pigazzi Date: Wed, 13 Sep 2023 16:03:41 +0200 Subject: [PATCH 3/3] RelVal steps for 2022 reMINI and reMINI+NANO --- .../python/relval_standard.py | 4 +++ .../python/relval_steps.py | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/Configuration/PyReleaseValidation/python/relval_standard.py b/Configuration/PyReleaseValidation/python/relval_standard.py index b316f2b6bb44c..5881873de13d7 100644 --- a/Configuration/PyReleaseValidation/python/relval_standard.py +++ b/Configuration/PyReleaseValidation/python/relval_standard.py @@ -523,6 +523,10 @@ workflows[140.112] = ['',['RunCommissioning2022D','HLTDR3_2022','SKIMCOMMISSIONINGRUN3_reHLT_2022','HARVESTRUN3']] workflows[140.113] = ['',['RunCosmics2022D','HLTDR3_2022','SKIMCOSMICSRUN3_reHLT_2022','HARVESTRUN3_COS']] +### run3 (2022) reMINIAOD+NANO ### +workflows[140.201] = ['',['RunJetMET2022D_reMINI', 'REMINIAOD_data2022']] +workflows[140.202] = ['',['RunJetMET2022D_reMINI', 'REMININANO_data2022']] + ### run3 (2023) ### workflows[141.001] = ['',['RunMuon2023B','HLTDR3_2023B','RECONANORUN3_reHLT_2023B','HARVESTRUN3_2023B']] workflows[141.002] = ['',['RunZeroBias2023B','HLTDR3_2023B','RECONANORUN3_ZB_reHLT_2023B','HARVESTRUN3_ZB_2023B']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 9c7a7c71a600a..365952678c3d7 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -565,6 +565,9 @@ steps['RunTau2022E']={'INPUT':InputInfo(dataSet='/Tau/Run2022E-v1/RAW',label='2022E',events=100000,location='STD', ls=Run2022E_LS200)} steps['RunMuonEG2022E']={'INPUT':InputInfo(dataSet='/MuonEG/Run2022E-v1/RAW',label='2022E',events=100000,location='STD', ls=Run2022E_LS200)} +# reMINIAOD for 2022 +steps['RunJetMET2022D_reMINI']={'INPUT':InputInfo(dataSet='/JetMET/Run2022D-16Jun2023-v1/AOD',label='rmaod',events=100000,location='STD', ls=Run2022D_LS25)} + #### run3 #### Run2023B={366727: [[1, 244]]} steps['RunMuon2023B']={'INPUT':InputInfo(dataSet='/Muon0/Run2023B-v1/RAW',label='2023B',events=100000,location='STD', ls=Run2023B)} @@ -3790,6 +3793,28 @@ def gen2021HiMix(fragment,howMuch): steps['REMINIAOD_data2017UL'] = merge([{'--era' : 'Run2_2017'},steps['REMINIAOD_data2016UL']]) steps['REMINIAOD_data2018UL'] = merge([{'--era' : 'Run2_2018'},steps['REMINIAOD_data2016UL']]) +# reMINI 2022 +steps['REMINIAOD_data2022']=merge([{'-s':'PAT', + '--process' : 'PAT', + '--datatier':'MINIAOD', + '--eventcontent':'MINIAOD', + '-n':100, + '--data' : '', + '--scenario' : 'pp', + '--conditions' : 'auto:run3_data', + '--era':'Run3,run3_miniAOD_12X' + }]) +steps['REMININANO_data2022'] = merge([{'-s' : 'PAT,NANO,DQM:@nanoAODDQM', + '--process' : 'PATnano', + '--era' : 'Run3,run3_miniAOD_12X', + '--conditions' : 'auto:run3_data', + '--data' : '', + '--scenario' : 'pp', + '--eventcontent' : 'MINIAOD,NANOEDMAOD,DQM', + '--datatier' : 'MINIAOD,NANOAOD,DQMIO' + }]) + + # Not sure whether the customisations are in the dict as "--customise" or "--era" so try to # remove both. Currently premixing uses "--customise" and everything else uses "--era". try : stepMiniAODData = remove(stepMiniAODDataUP15,'--era')