Skip to content

Commit

Permalink
Merge pull request #42782 from simonepigazzini/add_run3_miniaod_12X_m…
Browse files Browse the repository at this point in the history
…od_130Xback

[130X]: Add run3_miniAOD_12X modifier
  • Loading branch information
cmsbuild authored Sep 15, 2023
2 parents 7ae27f6 + 9fea250 commit edf3ebd
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Configuration/Eras/python/Modifier_run3_miniAOD_12X_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +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()
4 changes: 4 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']]
Expand Down
25 changes: 25 additions & 0 deletions Configuration/PyReleaseValidation/python/relval_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down Expand Up @@ -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')
Expand Down
1 change: 1 addition & 0 deletions Configuration/StandardSequences/python/Eras.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ 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()
_rerun_puppijets_task.add(getattr(process,'ak8PFJetsPuppi'),
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),
Expand Down
5 changes: 3 additions & 2 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit edf3ebd

Please sign in to comment.