Skip to content

Commit

Permalink
Make customize work fully with cmsDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
kdlong committed Nov 16, 2021
1 parent 76313a2 commit 3e03e6f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
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
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)
4 changes: 4 additions & 0 deletions PhysicsTools/NanoAOD/python/muons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@
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 @@ -275,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]))

2 changes: 1 addition & 1 deletion PhysicsTools/NanoAOD/python/nano_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

(run2_nanoAOD_92X | run2_miniAOD_80XLegacy | run2_nanoAOD_94X2016 | run2_nanoAOD_94X2016 | \
run2_nanoAOD_94XMiniAODv1 | run2_nanoAOD_94XMiniAODv2 | \
run2_nanoAOD_102Xv1 | run2_nanoAOD_LowPU).toReplaceWith(nanoSequenceFS, nanoSequenceFS.copyAndExclude([genVertexTable, genVertexT0Table]))
run2_nanoAOD_102Xv1).toReplaceWith(nanoSequenceFS, nanoSequenceFS.copyAndExclude([genVertexTable, genVertexT0Table]))

# GenVertex only stored in newer MiniAOD
nanoSequenceMC = nanoSequenceFS.copy()
Expand Down

0 comments on commit 3e03e6f

Please sign in to comment.