Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add run3_miniAOD_12X era modifier #42740

Merged
merged 3 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 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,3 @@
import FWCore.ParameterSet.Config as cms

simonepigazzini marked this conversation as resolved.
Show resolved Hide resolved
run3_miniAOD_12X = cms.Modifier()
1 change: 1 addition & 0 deletions Configuration/StandardSequences/python/Eras.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,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',
'run3_ecal_devel',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ 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 ).toModify(getattr(process,'ak8PFJetsPuppiConstituents'+postfix),
(_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),
simonepigazzini marked this conversation as resolved.
Show resolved Hide resolved
cut = cms.string('pt > 170.0 && abs(rapidity()) < 2.4'))
else:
task.add(getattr(process,'ak8PFJetsPuppi'+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