Skip to content

Commit

Permalink
Merge pull request cms-sw#10 from kdlong/WmassNanoProd_106X_lowPU
Browse files Browse the repository at this point in the history
Update low pileup recipe to work with high pileup setup
  • Loading branch information
kdlong authored Nov 19, 2021
2 parents b9b7820 + 3e03e6f commit 5272516
Show file tree
Hide file tree
Showing 13 changed files with 155 additions and 20 deletions.
3 changes: 3 additions & 0 deletions Configuration/Eras/python/Modifier_run2_nanoAOD_LowPU_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import FWCore.ParameterSet.Config as cms

run2_nanoAOD_LowPU = cms.Modifier()
2 changes: 1 addition & 1 deletion Configuration/StandardSequences/python/Eras.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(self):
'trackingLowPU', 'trackingPhase1', 'ctpps_2016', 'trackingPhase2PU140','highBetaStar_2018',
'tracker_apv_vfp30_2016', 'pf_badHcalMitigation', 'run2_miniAOD_80XLegacy','run2_miniAOD_94XFall17', 'run2_nanoAOD_92X',
'run2_nanoAOD_94XMiniAODv1', 'run2_nanoAOD_94XMiniAODv2', 'run2_nanoAOD_94X2016',
'run2_miniAOD_devel', 'run2_nanoAOD_102Xv1', 'run2_nanoAOD_106Xv1',
'run2_miniAOD_devel', 'run2_nanoAOD_102Xv1', 'run2_nanoAOD_106Xv1', 'run2_nanoAOD_LowPU',
'run2_tau_ul_2016', 'run2_tau_ul_2018',
'hcalHardcodeConditions', 'hcalSkipPacker',
'run2_HLTconditions_2016','run2_HLTconditions_2017','run2_HLTconditions_2018',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
absEta_0_1-R9_0.940_1.000-gainEle_12 runNumber 307042 307063 1.002 0.00059 0.0 0.00086 0.0
absEta_0_1-R9_0.000_0.940-gainEle_12 runNumber 307042 307063 1.0053 0.00059 0.0 0.00068 0.0
absEta_0_1-R9_0.940_1.000-gainEle_12 runNumber 306929 306929 1.0099 0.00542 0.0 0.00086 0.0
absEta_0_1-R9_0.000_0.940-gainEle_12 runNumber 306929 306929 1.0132 0.00542 0.0 0.00068 0.0
absEta_0_1-R9_0.940_1.000-gainEle_12 runNumber 307082 307082 1.0016 0.001 0.0 0.00086 0.0
absEta_0_1-R9_0.000_0.940-gainEle_12 runNumber 307082 307082 1.0049 0.001 0.0 0.00068 0.0
absEta_0_1-R9_0.940_1.000-gainEle_12 runNumber 306936 306936 1.0055 0.001 0.0 0.00086 0.0
absEta_0_1-R9_0.000_0.940-gainEle_12 runNumber 306936 306936 1.0088 0.001 0.0 0.00068 0.0
absEta_0_1-R9_0.940_1.000-gainEle_12 runNumber 307073 307076 1.0018 0.00083 0.0 0.00086 0.0
absEta_0_1-R9_0.000_0.940-gainEle_12 runNumber 307073 307076 1.0051 0.00083 0.0 0.00068 0.0
absEta_0_1-R9_0.940_1.000-gainEle_12 runNumber 307014 307017 1.0017 0.00074 0.0 0.00086 0.0
absEta_0_1-R9_0.000_0.940-gainEle_12 runNumber 307014 307017 1.005 0.00074 0.0 0.00068 0.0
absEta_1.566_2-R9_0.940_1.000-gainEle_12 runNumber 307042 307063 1.0195 0.00205 0.0 0.00122 0.0
absEta_1.566_2-R9_0.000_0.940-gainEle_12 runNumber 307042 307063 1.0292 0.00205 0.0 0.00152 0.0
absEta_1.566_2-R9_0.940_1.000-gainEle_12 runNumber 306929 306929 1.0175 0.01018 0.0 0.00122 0.0
absEta_1.566_2-R9_0.000_0.940-gainEle_12 runNumber 306929 306929 1.0272 0.01018 0.0 0.00152 0.0
absEta_1.566_2-R9_0.940_1.000-gainEle_12 runNumber 307082 307082 1.0165 0.00403 0.0 0.00122 0.0
absEta_1.566_2-R9_0.000_0.940-gainEle_12 runNumber 307082 307082 1.0262 0.00403 0.0 0.00152 0.0
absEta_1.566_2-R9_0.940_1.000-gainEle_12 runNumber 306936 306936 1.0197 0.00332 0.0 0.00122 0.0
absEta_1.566_2-R9_0.000_0.940-gainEle_12 runNumber 306936 306936 1.0294 0.00332 0.0 0.00152 0.0
absEta_1.566_2-R9_0.940_1.000-gainEle_12 runNumber 307073 307076 1.0162 0.00266 0.0 0.00122 0.0
absEta_1.566_2-R9_0.000_0.940-gainEle_12 runNumber 307073 307076 1.0259 0.00266 0.0 0.00152 0.0
absEta_1.566_2-R9_0.940_1.000-gainEle_12 runNumber 307014 307017 1.015 0.00268 0.0 0.00122 0.0
absEta_1.566_2-R9_0.000_0.940-gainEle_12 runNumber 307014 307017 1.0247 0.00268 0.0 0.00152 0.0
absEta_1_1.4442-R9_0.000_0.940-gainEle_12 runNumber 307042 307063 1.0024 0.00194 0.0 0.00049 0.0
absEta_1_1.4442-R9_0.940_1.000-gainEle_12 runNumber 307042 307063 0.9958 0.00194 0.0 0.0017 0.0
absEta_1_1.4442-R9_0.000_0.940-gainEle_12 runNumber 306929 306929 1.0035 0.02043 0.0 0.00049 0.0
absEta_1_1.4442-R9_0.940_1.000-gainEle_12 runNumber 306929 306929 0.9969 0.02043 0.0 0.0017 0.0
absEta_1_1.4442-R9_0.000_0.940-gainEle_12 runNumber 307082 307082 1.0056 0.00407 0.0 0.00049 0.0
absEta_1_1.4442-R9_0.940_1.000-gainEle_12 runNumber 307082 307082 0.999 0.00407 0.0 0.0017 0.0
absEta_1_1.4442-R9_0.000_0.940-gainEle_12 runNumber 306936 306936 1.0087 0.003 0.0 0.00049 0.0
absEta_1_1.4442-R9_0.940_1.000-gainEle_12 runNumber 306936 306936 1.0021 0.003 0.0 0.0017 0.0
absEta_1_1.4442-R9_0.000_0.940-gainEle_12 runNumber 307073 307076 1.0056 0.00312 0.0 0.00049 0.0
absEta_1_1.4442-R9_0.940_1.000-gainEle_12 runNumber 307073 307076 0.999 0.00312 0.0 0.0017 0.0
absEta_1_1.4442-R9_0.000_0.940-gainEle_12 runNumber 307014 307017 1.0014 0.00234 0.0 0.00049 0.0
absEta_1_1.4442-R9_0.940_1.000-gainEle_12 runNumber 307014 307017 0.9948 0.00234 0.0 0.0017 0.0
absEta_2_2.5-R9_0.000_0.940-gainEle_12 runNumber 307082 307082 1.0367 0.0044 0.0 0.00198 0.0
absEta_2_2.5-R9_0.940_1.000-gainEle_12 runNumber 307082 307082 1.0224 0.0044 0.0 0.00223 0.0
absEta_2_2.5-R9_0.000_0.940-gainEle_12 runNumber 306929 306929 1.0196 0.01017 0.0 0.00198 0.0
absEta_2_2.5-R9_0.940_1.000-gainEle_12 runNumber 306929 306929 1.0056 0.01017 0.0 0.00223 0.0
absEta_2_2.5-R9_0.000_0.940-gainEle_12 runNumber 306936 306936 1.0351 0.00371 0.0 0.00198 0.0
absEta_2_2.5-R9_0.940_1.000-gainEle_12 runNumber 306936 306936 1.0208 0.00371 0.0 0.00223 0.0
absEta_2_2.5-R9_0.000_0.940-gainEle_12 runNumber 307073 307076 1.0362 0.00349 0.0 0.00198 0.0
absEta_2_2.5-R9_0.940_1.000-gainEle_12 runNumber 307073 307076 1.0219 0.00349 0.0 0.00223 0.0
absEta_2_2.5-R9_0.000_0.940-gainEle_12 runNumber 307014 307017 1.036 0.003 0.0 0.00198 0.0
absEta_2_2.5-R9_0.940_1.000-gainEle_12 runNumber 307014 307017 1.0217 0.003 0.0 0.00223 0.0
absEta_2_2.5-R9_0.000_0.940-gainEle_12 runNumber 307042 307063 1.0438 0.00226 0.0 0.00198 0.0
absEta_2_2.5-R9_0.940_1.000-gainEle_12 runNumber 307042 307063 1.0294 0.00226 0.0 0.00223 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#category Emean err_Emean rho err_rho phi err_phi
absEta_0_1-R9_0.940_1.000 6.60 0 0.0155 0.003339 M_PI_2 M_PI_2
absEta_0_1-R9_0.000_0.940 6.73 0 0.0163 0.001009 M_PI_2 M_PI_2
absEta_1_1.4442-R9_0.940_1.000 6.76 0 0.0196 0.005245 M_PI_2 M_PI_2
absEta_1_1.4442-R9_0.000_0.940 6.77 0 0.024266 0.000458 M_PI_2 M_PI_2
absEta_1.566_2-R9_0.940_1.000 6.52 0 0.028676 0.001985 M_PI_2 M_PI_2
absEta_1.566_2-R9_0.000_0.940 6.72 0 0.030133 0.002296 M_PI_2 M_PI_2
absEta_2_2.5-R9_0.940_1.000 6.54 0 0.03625 0.000041 M_PI_2 M_PI_2
absEta_2_2.5-R9_0.000_0.940 6.73 0 0.034610 0.001928 M_PI_2 M_PI_2
Binary file not shown.
Binary file not shown.
40 changes: 33 additions & 7 deletions PhysicsTools/NanoAOD/python/electrons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from Configuration.Eras.Modifier_run2_nanoAOD_106Xv1_cff import run2_nanoAOD_106Xv1
from Configuration.Eras.Modifier_run2_egamma_2017_cff import run2_egamma_2017
from Configuration.Eras.Modifier_run2_egamma_2018_cff import run2_egamma_2018
from Configuration.Eras.Modifier_run2_nanoAOD_LowPU_cff import run2_nanoAOD_LowPU


from PhysicsTools.NanoAOD.common_cff import *
import PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi
Expand Down Expand Up @@ -47,7 +49,7 @@
run2_egamma_2018.toModify(slimmedElectronsUpdated, src = cms.InputTag("slimmedElectrons"))
run2_nanoAOD_106Xv1.toModify(slimmedElectronsUpdated, src = cms.InputTag("slimmedElectrons"))
####because run2_egamma_2017 and run2_egamma_2018 can modify things further, need the following line to resort back
for modifier in run2_miniAOD_80XLegacy,run2_nanoAOD_94X2016,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_102Xv1:
for modifier in run2_miniAOD_80XLegacy,run2_nanoAOD_94X2016,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_102Xv1,run2_nanoAOD_LowPU:
modifier.toModify(slimmedElectronsUpdated, src = cms.InputTag("slimmedElectronsTo106X"))


Expand Down Expand Up @@ -136,7 +138,7 @@ def _get_bitmapVIDForEle_docstring(modules,WorkingPoints):
_bitmapVIDForEleHEEP_docstring = _get_bitmapVIDForEle_docstring(electron_id_modules_WorkingPoints_nanoAOD.modules,bitmapVIDForEleHEEP.WorkingPoints)


for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1:
for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1,run2_nanoAOD_LowPU:
modifier.toModify(bitmapVIDForEle, src = "slimmedElectronsUpdated")
modifier.toModify(bitmapVIDForEleSpring15, src = "slimmedElectronsUpdated")
modifier.toModify(bitmapVIDForEleSum16, src = "slimmedElectronsUpdated")
Expand All @@ -157,19 +159,19 @@ def _get_bitmapVIDForEle_docstring(modules,WorkingPoints):
run2_nanoAOD_94X2016.toModify(isoForEle,
EAFile_MiniIso = "RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt",
EAFile_PFIso = "RecoEgamma/ElectronIdentification/data/Summer16/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_80X.txt")
for modifier in run2_egamma_2017,run2_egamma_2018,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1:
for modifier in run2_egamma_2017,run2_egamma_2018,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1,run2_nanoAOD_LowPU:
modifier.toModify(isoForEle, src = "slimmedElectronsUpdated")

ptRatioRelForEle = cms.EDProducer("ElectronJetVarProducer",
srcJet = cms.InputTag("updatedJets"),
srcLep = cms.InputTag("slimmedElectrons"),
srcVtx = cms.InputTag("offlineSlimmedPrimaryVertices"),
)
for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1:
for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1,run2_nanoAOD_LowPU:
modifier.toModify(ptRatioRelForEle, srcLep = "slimmedElectronsUpdated")

seedGainEle = cms.EDProducer("ElectronSeedGainProducer", src = cms.InputTag("slimmedElectrons"))
for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1:
for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1,run2_nanoAOD_LowPU:
modifier.toModify(seedGainEle, src = "slimmedElectronsUpdated")

import RecoEgamma.EgammaTools.calibratedEgammas_cff
Expand Down Expand Up @@ -205,6 +207,13 @@ def _get_bitmapVIDForEle_docstring(modules,WorkingPoints):
)
run2_nanoAOD_102Xv1.toModify(calibratedPatElectrons102X, src = "slimmedElectronsUpdated")

# use the dedicated electron energy and scale corrections
calibratedPatElectronsLowPU = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatElectrons.clone(
produceCalibratedObjs = False,
correctionFile = cms.string("PhysicsTools/NanoAOD/data/ScalesSmearings/Run2017_LowPU_v2"),
)
run2_nanoAOD_LowPU.toModify(calibratedPatElectronsLowPU, src = "slimmedElectronsUpdated")

slimmedElectronsWithUserData = cms.EDProducer("PATElectronUserDataEmbedder",
src = cms.InputTag("slimmedElectrons"),
userFloats = cms.PSet(
Expand Down Expand Up @@ -256,7 +265,7 @@ def _get_bitmapVIDForEle_docstring(modules,WorkingPoints):
jetForLepJetVar = cms.InputTag("ptRatioRelForEle:jetForLepJetVar") # warning: Ptr is null if no match is found
),
)
for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1:
for modifier in run2_egamma_2017,run2_egamma_2018,run2_miniAOD_80XLegacy,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_nanoAOD_94X2016,run2_nanoAOD_102Xv1,run2_nanoAOD_106Xv1,run2_nanoAOD_LowPU:
modifier.toModify(slimmedElectronsWithUserData, src = "slimmedElectronsUpdated")

run2_egamma_2017.toModify(slimmedElectronsWithUserData.userFloats,
Expand Down Expand Up @@ -296,6 +305,14 @@ def _get_bitmapVIDForEle_docstring(modules,WorkingPoints):
ecalTrkEnergyPostCorrNew = cms.InputTag("calibratedPatElectrons94X","ecalTrkEnergyPostCorr"),
)

run2_nanoAOD_LowPU.toModify(slimmedElectronsWithUserData.userFloats,
ecalTrkEnergyErrPostCorrNew = cms.InputTag("calibratedPatElectronsLowPU","ecalTrkEnergyErrPostCorr"),
ecalTrkEnergyPreCorrNew = cms.InputTag("calibratedPatElectronsLowPU","ecalTrkEnergyPreCorr"),
ecalTrkEnergyPostCorrNew = cms.InputTag("calibratedPatElectronsLowPU","ecalTrkEnergyPostCorr"),
ecalEnergyPreCorrNew = cms.InputTag("calibratedPatElectronsLowPU","ecalEnergyPreCorr"),
ecalEnergyPostCorrNew = cms.InputTag("calibratedPatElectronsLowPU","ecalEnergyPostCorr"),
)

run2_nanoAOD_102Xv1.toModify(slimmedElectronsWithUserData.userFloats,
ecalTrkEnergyErrPostCorrNew = cms.InputTag("calibratedPatElectrons102X","ecalTrkEnergyErrPostCorr"),
ecalTrkEnergyPreCorrNew = cms.InputTag("calibratedPatElectrons102X","ecalTrkEnergyPreCorr"),
Expand Down Expand Up @@ -442,14 +459,19 @@ def _get_bitmapVIDForEle_docstring(modules,WorkingPoints):
#the94X miniAOD V2 had a bug in the scale and smearing for electrons in the E/p comb
#therefore we redo it but but we need use a new name for the userFloat as we cant override existing userfloats
#for technical reasons
for modifier in run2_egamma_2017,run2_egamma_2018,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_miniAOD_80XLegacy,run2_nanoAOD_102Xv1:
for modifier in run2_egamma_2017,run2_egamma_2018,run2_nanoAOD_94XMiniAODv1,run2_nanoAOD_94XMiniAODv2,run2_miniAOD_80XLegacy,run2_nanoAOD_102Xv1,run2_nanoAOD_LowPU:
modifier.toModify(electronTable.variables,
pt = Var("pt*userFloat('ecalTrkEnergyPostCorrNew')/userFloat('ecalTrkEnergyPreCorrNew')", float, precision=-1, doc="p_{T}"),
energyErr = Var("userFloat('ecalTrkEnergyErrPostCorrNew')", float, precision=6, doc="energy error of the cluster-track combination"),
eCorr = Var("userFloat('ecalTrkEnergyPostCorrNew')/userFloat('ecalTrkEnergyPreCorrNew')", float, doc="ratio of the calibrated energy/miniaod energy"),
scEtOverPt = Var("(superCluster().energy()/(pt*userFloat('ecalTrkEnergyPostCorrNew')/userFloat('ecalTrkEnergyPreCorrNew')*cosh(superCluster().eta())))-1",float,doc="(supercluster transverse energy)/pt-1",precision=8),
)

run2_nanoAOD_LowPU.toModify(electronTable.variables,
ecalCorr = Var("userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')",float, doc="ratio of the calibrated ecal energy / miniaod ecal energy"),
pfIso03_all = Var("userFloat('PFIsoAll')",float,doc="PF isolation dR=0.3, total (with rho*EA PU corrections)"),
)

# scale and smearing only when available
for modifier in run2_nanoAOD_94X2016,:
modifier.toModify(electronTable.variables,
Expand Down Expand Up @@ -548,6 +570,10 @@ def _get_bitmapVIDForEle_docstring(modules,WorkingPoints):
run2_nanoAOD_94XMiniAODv1.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd94XScale_sequence)
run2_nanoAOD_94XMiniAODv2.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd94XScale_sequence)

_withTo106XAndUpdateAndLowPUScale_sequence = _withTo106XAndUpdate_sequence.copy()
_withTo106XAndUpdateAndLowPUScale_sequence.replace(slimmedElectronsWithUserData, calibratedPatElectronsLowPU + slimmedElectronsWithUserData)
run2_nanoAOD_LowPU.toReplaceWith(electronSequence, _withTo106XAndUpdateAndLowPUScale_sequence)

_withTo106XAndUpdateAnd_bitmapVIDForEleSpring15AndSum16_sequence = _withTo106XAndUpdate_sequence.copy()
_withTo106XAndUpdateAnd_bitmapVIDForEleSpring15AndSum16_sequence.replace(slimmedElectronsWithUserData, bitmapVIDForEleSpring15 + bitmapVIDForEleSum16 + slimmedElectronsWithUserData)
run2_nanoAOD_94X2016.toReplaceWith(electronSequence, _withTo106XAndUpdateAnd_bitmapVIDForEleSpring15AndSum16_sequence)
Expand Down
5 changes: 4 additions & 1 deletion PhysicsTools/NanoAOD/python/extraflags_cff.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_run2_nanoAOD_LowPU_cff import run2_nanoAOD_LowPU
from PhysicsTools.NanoAOD.common_cff import *

# Bad/clone muon filters - tagging mode to keep the event
Expand Down Expand Up @@ -40,8 +41,10 @@
extraFlagsProducers = cms.Sequence(badGlobalMuonTagger + cloneGlobalMuonTagger + BadPFMuonTagger + BadChargedCandidateTagger)

from RecoMET.METFilters.ecalBadCalibFilter_cfi import *
run2_nanoAOD_LowPU.toModify(ecalBadCalibFilter, EcalRecHitSource = 'reducedEgamma:reducedEERecHits')

ecalBadCalibFilterNanoTagger = ecalBadCalibFilter.clone(
taggingMode = cms.bool(True)
taggingMode = cms.bool(True),
)

extraFlagsProducers102x = cms.Sequence(ecalBadCalibFilterNanoTagger)
7 changes: 6 additions & 1 deletion PhysicsTools/NanoAOD/python/muons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from Configuration.Eras.Modifier_run2_nanoAOD_94X2016_cff import run2_nanoAOD_94X2016
from Configuration.Eras.Modifier_run2_nanoAOD_94XMiniAODv1_cff import run2_nanoAOD_94XMiniAODv1
from Configuration.Eras.Modifier_run2_nanoAOD_94XMiniAODv2_cff import run2_nanoAOD_94XMiniAODv2
from Configuration.Eras.Modifier_run2_nanoAOD_LowPU_cff import run2_nanoAOD_LowPU
from Configuration.Eras.Modifier_run2_nanoAOD_102Xv1_cff import run2_nanoAOD_102Xv1
from PhysicsTools.NanoAOD.common_cff import *
import PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi
Expand Down Expand Up @@ -243,9 +244,11 @@
)


for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2:
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_LowPU:
modifier.toModify(muonTable.variables, puppiIsoId = None, softMva = None)

run2_nanoAOD_LowPU.toModify(muonTable, externalVariables = cms.PSet())

run2_nanoAOD_102Xv1.toModify(muonTable.variables, puppiIsoId = None)


Expand Down Expand Up @@ -274,3 +277,5 @@
muonMC = cms.Sequence(muonsMCMatchForTable + muonMCTable)
muonTables = cms.Sequence(muonFSRphotons + muonFSRassociation + muonMVATTH + muonMVALowPt + geopro + tracksfrommuons + trackrefit + trackrefitbs + muonTable + muonExternalVecVarsTable + fsrTable)

run2_nanoAOD_LowPU.toReplaceWith(muonTables, muonTables.copyAndExclude([geopro, tracksfrommuons, trackrefit, trackrefitbs, muonExternalVecVarsTable]))

Loading

0 comments on commit 5272516

Please sign in to comment.