Skip to content

Commit

Permalink
Merge pull request #31072 from slava77/CMSSW_10_6_X_2020-08-05-1100/s…
Browse files Browse the repository at this point in the history
…ign1107/reminiULenable

migrate from run2_miniAOD_devel to run2_miniAOD_UL for miniAOD setup UL workflows
  • Loading branch information
cmsbuild authored Aug 7, 2020
2 parents eec165c + bd0bca6 commit baf41ec
Show file tree
Hide file tree
Showing 12 changed files with 62 additions and 60 deletions.
4 changes: 2 additions & 2 deletions CommonTools/PileupAlgos/python/Puppi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@
)
)

from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(
puppi,
EtaMinUseDeltaZ = 2.4,
PtMaxCharged = 20.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def applyDeepBtagging( process, postfix="" ) :
'pfMassIndependentDeepDoubleCvBJetTags:probHcc',
) + pfDeepBoostedJetTagsAll
)
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(_btagDiscriminators,
names = _btagDiscriminators.names + pfParticleNetJetTagsAll + pfHiggsInteractionNetTagsProbs)
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(_btagDiscriminators,
names = _btagDiscriminators.names + pfParticleNetJetTagsAll + pfHiggsInteractionNetTagsProbs)
updateJetCollection(
process,
jetSource = cms.InputTag('slimmedJetsAK8NoDeepTags'),
Expand Down
4 changes: 2 additions & 2 deletions PhysicsTools/PatAlgos/python/slimming/lostTracks_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
phase1Pixel.toModify(lostTracks, covarianceVersion =1 )

from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(lostTracks, passThroughCut="pt>2", allowMuonId=True)
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(lostTracks, passThroughCut="pt>2", allowMuonId=True)

32 changes: 16 additions & 16 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def miniAOD_customizeCommon(process):
process.patMuons.computeSoftMuonMVA = True

process.patMuons.addTriggerMatching = True
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
from Configuration.Eras.Modifier_run2_muon_2016_cff import run2_muon_2016
from Configuration.Eras.Modifier_run2_muon_2017_cff import run2_muon_2017
from Configuration.Eras.Modifier_run2_muon_2018_cff import run2_muon_2018
run2_muon_2016.toModify( process.patMuons, effectiveAreaVec = [0.0735,0.0619,0.0465,0.0433,0.0577])
run2_muon_2017.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064])
run2_muon_2018.toModify( process.patMuons, effectiveAreaVec = [0.0566, 0.0562, 0.0363, 0.0119, 0.0064])
run2_muon_2016.toModify( process.patMuons, mvaTrainingFile = "RecoMuon/MuonIdentification/data/mu_2016_BDTG.weights.xml")
run2_miniAOD_devel.toModify( process.patMuons, getdBFromTrack = True)
run2_miniAOD_UL.toModify( process.patMuons, getdBFromTrack = True)
process.patMuons.computePuppiCombinedIso = True
#
# disable embedding of electron and photon associated objects already stored by the ReducedEGProducer
Expand All @@ -55,7 +55,7 @@ def miniAOD_customizeCommon(process):
process.patElectrons.usePfCandidateMultiMap = True
process.patElectrons.pfCandidateMultiMap = cms.InputTag("reducedEgamma","reducedGsfElectronPfCandMap")
process.patElectrons.electronIDSources = cms.PSet()
run2_miniAOD_devel.toModify( process.patElectrons, getdBFromTrack = True)
run2_miniAOD_UL.toModify( process.patElectrons, getdBFromTrack = True)
from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
run2_miniAOD_80XLegacy.toModify(process.patElectrons,
addPFClusterIso = cms.bool(True),
Expand Down Expand Up @@ -388,7 +388,7 @@ def miniAOD_customizeCommon(process):

from Configuration.Eras.Modifier_run2_tau_ul_2016_cff import run2_tau_ul_2016
from Configuration.Eras.Modifier_run2_tau_ul_2018_cff import run2_tau_ul_2018
for era in [run2_miniAOD_devel,run2_tau_ul_2016,run2_tau_ul_2018]:
for era in [run2_miniAOD_UL,run2_tau_ul_2016,run2_tau_ul_2018]:
era.toReplaceWith(process.slimmedTaus,
getattr(process, _updatedTauNameNew).clone(src = _noUpdatedTauName))
era.toReplaceWith(process.deepTauIDTask,
Expand All @@ -403,24 +403,24 @@ def miniAOD_customizeCommon(process):
_makePatTausTaskWithDeadECalVeto.add(
process.hpsPFTauDiscriminationByDeadECALElectronRejectionForMiniAOD
)
run2_miniAOD_devel.toReplaceWith(
run2_miniAOD_UL.toReplaceWith(
process.makePatTausTask, _makePatTausTaskWithDeadECalVeto
)
_withDeadEcalTauIDPs = cms.PSet(
process.patTaus.tauIDSources,
againstElectronDeadECAL = cms.InputTag("hpsPFTauDiscriminationByDeadECALElectronRejectionForMiniAOD")
)
run2_miniAOD_devel.toModify(process.patTaus,
tauIDSources = _withDeadEcalTauIDPs)
run2_miniAOD_UL.toModify(process.patTaus,
tauIDSources = _withDeadEcalTauIDPs)
#... and to boosted taus
run2_miniAOD_devel.toModify(process.hpsPFTauDiscriminationByDeadECALElectronRejectionBoosted,
extrapolateToECalEntrance = True)
run2_miniAOD_UL.toModify(process.hpsPFTauDiscriminationByDeadECALElectronRejectionBoosted,
extrapolateToECalEntrance = True)
_withDeadEcalTauIDBoostedPs = cms.PSet(
process.patTausBoosted.tauIDSources,
againstElectronDeadECAL = cms.InputTag("hpsPFTauDiscriminationByDeadECALElectronRejectionBoosted")
)
run2_miniAOD_devel.toModify(process.patTausBoosted,
tauIDSources = _withDeadEcalTauIDBoostedPs)
run2_miniAOD_UL.toModify(process.patTausBoosted,
tauIDSources = _withDeadEcalTauIDBoostedPs)

#-- Adding customization for 80X 2016 legacy reMiniAOD and 2018 heavy ions
from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
Expand Down Expand Up @@ -526,8 +526,8 @@ def miniAOD_customizeCommon(process):
graph_path="RecoMET/METPUSubtraction/data/deepmet/deepmet_resp_v1_2016.pb"
)

run2_miniAOD_devel.toModify(task, func=lambda t: t.add(process.deepMETsResolutionTune, process.deepMETsResponseTune))
run2_miniAOD_devel.toModify(process.slimmedMETs, addDeepMETs = True)
run2_miniAOD_UL.toModify(task, func=lambda t: t.add(process.deepMETsResolutionTune, process.deepMETsResponseTune))
run2_miniAOD_UL.toModify(process.slimmedMETs, addDeepMETs = True)

# add DetIdAssociatorRecords to EventSetup (for isolatedTracks)
process.load("TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff")
Expand Down Expand Up @@ -606,9 +606,9 @@ def miniAOD_customizeData(process):
process.load("RecoCTPPS.Configuration.recoCTPPS_cff")
task = getPatAlgosToolsTask(process)
from Configuration.Eras.Modifier_ctpps_2016_cff import ctpps_2016
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
(ctpps_2016 & ~run2_miniAOD_devel).toModify(task, func=lambda t: t.add(process.ctppsLocalTrackLiteProducer, process.ctppsProtons))
(ctpps_2016 & run2_miniAOD_devel).toModify(task, func=lambda t: t.add(process.recoCTPPSTask))
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
(ctpps_2016 & ~run2_miniAOD_UL).toModify(task, func=lambda t: t.add(process.ctppsLocalTrackLiteProducer, process.ctppsProtons))
(ctpps_2016 & run2_miniAOD_UL).toModify(task, func=lambda t: t.add(process.recoCTPPSTask))

def miniAOD_customizeAllData(process):
miniAOD_customizeCommon(process)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ def produceMET(self, process, metType, metModuleSequence, postfix):
getattr(process, _myPatMet).metSource = cms.InputTag("pfMet"+postfix)
getattr(process, _myPatMet).srcPFCands = copy.copy(self.getvalue("pfCandCollection"))
if metType == "PF":
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(getattr(process, _myPatMet), srcLeptons = \
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(getattr(process, _myPatMet), srcLeptons = \
cms.VInputTag(copy.copy(self.getvalue("electronCollection")) if self.getvalue("onMiniAOD") else
cms.InputTag("pfeGammaToCandidate","electrons"),
copy.copy(self.getvalue("muonCollection")),
Expand Down Expand Up @@ -627,8 +627,8 @@ def getCorrectedMET(self, process, metType, correctionLevel,produceIntermediateC
_myPatMet = "pat"+metType+"Met"+postfix
getattr(process, _myPatMet).computeMETSignificance = cms.bool(self.getvalue("computeMETSignificance"))
getattr(process, _myPatMet).srcPFCands = copy.copy(self.getvalue("pfCandCollection"))
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(getattr(process, _myPatMet), srcLeptons = \
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(getattr(process, _myPatMet), srcLeptons = \
cms.VInputTag(copy.copy(self.getvalue("electronCollection")) if self.getvalue("onMiniAOD") else
cms.InputTag("pfeGammaToCandidate","electrons"),
copy.copy(self.getvalue("muonCollection")),
Expand All @@ -651,8 +651,8 @@ def getCorrectedMET(self, process, metType, correctionLevel,produceIntermediateC
_myPatMet = "patMETs"+postfix
getattr(process, _myPatMet).computeMETSignificance = cms.bool(self.getvalue("computeMETSignificance"))
getattr(process, _myPatMet).srcPFCands=copy.copy(self.getvalue("pfCandCollection"))
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(getattr(process, _myPatMet), srcLeptons = \
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(getattr(process, _myPatMet), srcLeptons = \
cms.VInputTag(copy.copy(self.getvalue("electronCollection")) if self.getvalue("onMiniAOD") else
cms.InputTag("pfeGammaToCandidate","electrons"),
copy.copy(self.getvalue("muonCollection")),
Expand Down Expand Up @@ -829,8 +829,8 @@ def getMETUncertainties(self, process, metType, metModName, electronCollection,
useDeltaRforFootprint = cms.bool(False)
)
if self.getvalue("Puppi"):
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(pfCandsNoJets, useDeltaRforFootprint = True)
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(pfCandsNoJets, useDeltaRforFootprint = True)
addToProcessAndTask("pfCandsNoJets"+postfix, pfCandsNoJets, process, task)
metUncSequence += getattr(process, "pfCandsNoJets"+postfix)

Expand All @@ -841,9 +841,9 @@ def getMETUncertainties(self, process, metType, metModName, electronCollection,
useDeltaRforFootprint = cms.bool(False)
)
if not self.getvalue("onMiniAOD"):
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(pfCandsNoJetsNoEle, useDeltaRforFootprint = True)
run2_miniAOD_devel.toModify(pfCandsNoJetsNoEle, veto = cms.InputTag("pfeGammaToCandidate","electrons"))
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(pfCandsNoJetsNoEle, useDeltaRforFootprint = True)
run2_miniAOD_UL.toModify(pfCandsNoJetsNoEle, veto = cms.InputTag("pfeGammaToCandidate","electrons"))
addToProcessAndTask("pfCandsNoJetsNoEle"+postfix, pfCandsNoJetsNoEle, process, task)
metUncSequence += getattr(process, "pfCandsNoJetsNoEle"+postfix)

Expand All @@ -854,8 +854,8 @@ def getMETUncertainties(self, process, metType, metModName, electronCollection,
useDeltaRforFootprint = cms.bool(False)
)
if not self.getvalue("onMiniAOD"):
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(pfCandsNoJetsNoEleNoMu, useDeltaRforFootprint = True)
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(pfCandsNoJetsNoEleNoMu, useDeltaRforFootprint = True)
addToProcessAndTask("pfCandsNoJetsNoEleNoMu"+postfix, pfCandsNoJetsNoEleNoMu, process, task)
metUncSequence += getattr(process, "pfCandsNoJetsNoEleNoMu"+postfix)

Expand All @@ -866,8 +866,8 @@ def getMETUncertainties(self, process, metType, metModName, electronCollection,
useDeltaRforFootprint = cms.bool(False)
)
if self.getvalue("Puppi"):
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(pfCandsNoJetsNoEleNoMuNoTau, useDeltaRforFootprint = True)
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(pfCandsNoJetsNoEleNoMuNoTau, useDeltaRforFootprint = True)
addToProcessAndTask("pfCandsNoJetsNoEleNoMuNoTau"+postfix, pfCandsNoJetsNoEleNoMuNoTau, process, task)
metUncSequence += getattr(process, "pfCandsNoJetsNoEleNoMuNoTau"+postfix)

Expand All @@ -878,9 +878,9 @@ def getMETUncertainties(self, process, metType, metModName, electronCollection,
useDeltaRforFootprint = cms.bool(False)
)
if not self.getvalue("onMiniAOD"):
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(pfCandsForUnclusteredUnc, useDeltaRforFootprint = True)
run2_miniAOD_devel.toModify(pfCandsForUnclusteredUnc, veto = cms.InputTag("pfeGammaToCandidate","photons"))
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(pfCandsForUnclusteredUnc, useDeltaRforFootprint = True)
run2_miniAOD_UL.toModify(pfCandsForUnclusteredUnc, veto = cms.InputTag("pfeGammaToCandidate","photons"))
addToProcessAndTask("pfCandsForUnclusteredUnc"+postfix, pfCandsForUnclusteredUnc, process, task)
metUncSequence += getattr(process, "pfCandsForUnclusteredUnc"+postfix)

Expand Down Expand Up @@ -1484,8 +1484,8 @@ def recomputeRawMetFromPfcs(self, process, pfCandCollection, onMiniAOD, patMetMo
addToProcessAndTask(_myPatMet, getattr(process,'patMETs' ).clone(), process, task)
getattr(process, _myPatMet).metSource = cms.InputTag("pfMetT1"+postfix)
getattr(process, _myPatMet).computeMETSignificance = cms.bool(self.getvalue("computeMETSignificance"))
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(getattr(process, _myPatMet), srcLeptons = \
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(getattr(process, _myPatMet), srcLeptons = \
cms.VInputTag(copy.copy(self.getvalue("electronCollection")) if self.getvalue("onMiniAOD") else
cms.InputTag("pfeGammaToCandidate","electrons"),
copy.copy(self.getvalue("muonCollection")),
Expand Down
8 changes: 4 additions & 4 deletions RecoCTPPS/ProtonReconstruction/python/ctppsProtons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from Configuration.Eras.Modifier_ctpps_2017_cff import ctpps_2017
from Configuration.Eras.Modifier_ctpps_2018_cff import ctpps_2018

from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL

def applyDefaultSettings(ctppsProtons):
ctppsProtons.association_cuts_45.x_cut_apply = False
Expand All @@ -30,7 +30,7 @@ def applyDefaultSettings(ctppsProtons):
ctppsProtons.association_cuts_56.th_y_cut_apply = False

# update for re-miniAOD
run2_miniAOD_devel.toModify(ctppsProtons,
run2_miniAOD_UL.toModify(ctppsProtons,
pixelDiscardBXShiftedTracks = True,
association_cuts_45 = dict(ti_tr_min = -1.5, ti_tr_max = 2.0),
association_cuts_56 = dict(ti_tr_min = -1.5, ti_tr_max = 2.0),
Expand All @@ -44,7 +44,7 @@ def apply2017Settings(ctppsProtons):
ctppsProtons.association_cuts_56.xi_cut_value = 0.015

# update for re-miniAOD
run2_miniAOD_devel.toModify(ctppsProtons,
run2_miniAOD_UL.toModify(ctppsProtons,
association_cuts_45 = dict(
x_cut_apply = False,
y_cut_apply = False,
Expand Down Expand Up @@ -83,7 +83,7 @@ def apply2018Settings(ctppsProtons):
ctppsProtons.association_cuts_56.th_y_cut_value = 20E-6

# update for re-miniAOD
run2_miniAOD_devel.toModify(ctppsProtons,
run2_miniAOD_UL.toModify(ctppsProtons,
association_cuts_45 = dict(
x_cut_apply = True,
x_cut_value = 4. * 0.16008188,
Expand Down
5 changes: 3 additions & 2 deletions RecoEgamma/EgammaPhotonProducers/python/reducedEgamma_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@

from RecoEgamma.EgammaPhotonProducers.reducedEgamma_tools import calibrateReducedEgamma
from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
modifyReducedEGammaRun2MiniAOD9XFall17_ = run2_miniAOD_94XFall17.makeProcessModifier(calibrateReducedEgamma)
from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
modifyReducedEGammaRun2MiniAOD8XLegacy_ = run2_miniAOD_80XLegacy.makeProcessModifier(calibrateReducedEgamma)
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
modifyReducedEGammaRun2MiniAOD = (
run2_miniAOD_94XFall17 | run2_miniAOD_80XLegacy | run2_miniAOD_UL).makeProcessModifier(calibrateReducedEgamma)
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toModify( reducedEgamma, ootPhotons = cms.InputTag("") )
4 changes: 2 additions & 2 deletions RecoEgamma/EgammaTools/python/calibratedEgammas_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
run2_miniAOD_80XLegacy.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2016Legacy)

from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
run2_miniAOD_devel.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)
from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(calibratedEgammaSettings,correctionFile = _correctionFile2017UL)

calibratedEgammaPatSettings = calibratedEgammaSettings.clone(
recHitCollectionEB = cms.InputTag('reducedEgamma','reducedEBRecHits'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ def appendEgamma8XLegacyAppendableModifiers (modifiers):
modifiers.append(egamma8XLegacyEtScaleSysModifier)

from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
run2_miniAOD_94XFall17.toModify(egamma_modifications,appendReducedEgammaEnergyScaleAndSmearingModifier)

from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
(run2_miniAOD_94XFall17 | run2_miniAOD_UL).toModify(egamma_modifications,appendReducedEgammaEnergyScaleAndSmearingModifier)

from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
#80X doesnt have the bug which prevents GsfTracks used to match conversions so set true
run2_miniAOD_80XLegacy.toModify(egamma9X105XUpdateModifier,allowGsfTrackForConvs = True)
Expand Down
Loading

0 comments on commit baf41ec

Please sign in to comment.