Skip to content

Commit

Permalink
[2018UL] Skimming configs moved to MiniAODv2 and amcatnlo.
Browse files Browse the repository at this point in the history
  • Loading branch information
RHofsaess committed Jan 30, 2023
1 parent 3cec57a commit ea0c015
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 76 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[global]
include = ../gc_kappaSkim_base.cfg
include = ${KAPPA_USER_CONFIG}
workdir = %(userworkdir)s/ZJet_DYJetsToLL_Summer20_MiniAODv2-amcatnloFXFX_upgrade2018_realistic_v16_L1v1-v2_GT_106X_upgrade2018_realistic_v16_L1v1-v1

[CMSSW]
partition lfn modifier = root://cms-xrd-global.cern.ch:1094/
config file = ${CMSSW_BASE}/src/Kappa/Skimming/zjet/configs/jec18ul/kappaSkim_default_cfg.py
dataset =
ZJet_DYJetsToLL_Summer20_MiniAODv2-amcatnloFXFX_realistic_v16_L1v1-v2: /DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/RunIISummer20UL18MiniAODv2-106X_upgrade2018_realistic_v16_L1v1-v2/MINIAODSIM
GLOBALTAG = 106X_upgrade2018_realistic_v16_L1v1
IS_DATA = False


[storage]
;se path = !set by user config!

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

_GT="106X_upgrade2018_realistic_v11_L1v1"
_GT="106X_upgrade2018_realistic_v16_L1v1"
_NEVT=100
_IS_DATA=false
_GRID_PATH_PREFIX="root://cmsxrootd-redirectors.gridka.de:1094/"
_FILE="/store/mc/RunIISummer19UL18MiniAOD/DYJetsToLL_M-50_TuneCP5_13TeV-madgraphMLM-pythia8/MINIAODSIM/106X_upgrade2018_realistic_v11_L1v1-v1/70000/FFEDB6ED-A3B9-0D41-B529-7FE74490AEFD.root"
_GRID_PATH_PREFIX="root://cms-xrd-global.cern.ch:1094/"
_FILE="/store/mc/RunIISummer20UL18MiniAODv2/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/MINIAODSIM/106X_upgrade2018_realistic_v16_L1v1-v2/100000/4E295BA9-D9F7-6643-B993-57789E70C0CB.root"
_DIR="test/${_GT}"

mkdir -p $_DIR
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[global]
include = ../gc_kappaSkim_base.cfg
include = ${KAPPA_USER_CONFIG}
workdir = %(userworkdir)s/ZJet_DoubleMuon_Run2018-UL2018_MiniAODv2_106X_dataRun2_v37

[CMSSW]
partition lfn modifier = root://cms-xrd-global.cern.ch:1094/
config file = ${CMSSW_BASE}/src/Kappa/Skimming/zjet/configs/jec18ul/kappaSkim_default_cfg.py
dataset =
ZJet_DoubleMuon_Run2018A_UL2018_MiniAODv2-v1: /DoubleMuon/Run2018A-UL2018_MiniAODv2-v1/MINIAOD
ZJet_DoubleMuon_Run2018B_UL2018_MiniAODv2-v1: /DoubleMuon/Run2018B-UL2018_MiniAODv2-v1/MINIAOD
ZJet_DoubleMuon_Run2018C_UL2018_MiniAODv2-v1: /DoubleMuon/Run2018C-UL2018_MiniAODv2-v1/MINIAOD
ZJet_DoubleMuon_Run2018D_UL2018_MiniAODv2-v1: /DoubleMuon/Run2018D-UL2018_MiniAODv2-v1/MINIAOD

GLOBALTAG = 106X_dataRun2_v37
IS_DATA = True


[storage]
;se path = !set by user config!

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

_GT="106X_dataRun2_v28"
_GT="106X_dataRun2_v37"
_NEVT=100
_IS_DATA=true
_GRID_PATH_PREFIX="root://cmsxrootd-redirectors.gridka.de:1094/"
_FILE="/store/data/Run2018C/EGamma/MINIAOD/12Nov2019_UL2018-v2/100000/B9C4A7F3-6993-D24F-B1A7-02F511634798.root"
_GRID_PATH_PREFIX="root://cms-xrd-global.cern.ch:1094/"
_FILE="/store/data/Run2018A/DoubleMuon/MINIAOD/UL2018_MiniAODv2-v1/260000/00264E65-8EFD-974C-8A29-866EFA1609D3.root"
_DIR="test/${_GT}"

mkdir -p $_DIR
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[global]
include = ../gc_kappaSkim_base.cfg
include = ${KAPPA_USER_CONFIG}
workdir = %(userworkdir)s/ZJet_EGamma_Run2018_UL2018_MiniAODv2_106X_dataRun2_v37

[CMSSW]
partition lfn modifier = root://cms-xrd-global.cern.ch:1094/
config file = ${CMSSW_BASE}/src/Kappa/Skimming/zjet/configs/jec18ul/kappaSkim_default_cfg.py
dataset =
ZJet_EGamma_Run2018A_UL2018_MiniAODv2-v1: /EGamma/Run2018A-UL2018_MiniAODv2-v1/MINIAOD
ZJet_EGamma_Run2018B_UL2018_MiniAODv2-v1: /EGamma/Run2018B-UL2018_MiniAODv2-v1/MINIAOD
ZJet_EGamma_Run2018C_UL2018_MiniAODv2-v1: /EGamma/Run2018C-UL2018_MiniAODv2-v1/MINIAOD
ZJet_EGamma_Run2018D_UL2018_MiniAODv2-v2: /EGamma/Run2018D-UL2018_MiniAODv2-v2/MINIAOD

GLOBALTAG = 106X_dataRun2_v37
IS_DATA = True


[storage]
;se path = !set by user config!

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

_GT="106X_dataRun2_v20"
_GT="106X_dataRun2_v37"
_NEVT=100
_IS_DATA=true
_GRID_PATH_PREFIX="root://cmsxrootd-redirectors.gridka.de:1094/"
_FILE="/store/data/Run2018A/DoubleMuon/MINIAOD/12Nov2019_UL2018-v2/2710000/A5433C5C-3F0C-C346-885A-8A89316664EA.root"
_GRID_PATH_PREFIX="root://cms-xrd-global.cern.ch:1094/"
_FILE="/store/data/Run2018A/EGamma/MINIAOD/UL2018_MiniAODv2-v1/230000/1DC29AF8-7091-4245-A0D8-CFDF650310CC.root"
_DIR="test/${_GT}"

mkdir -p $_DIR
Expand Down
49 changes: 41 additions & 8 deletions Skimming/zjet/configs/jec18ul/kappaSkim_default_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@
# -- configure KAPPA trigger object
process.kappaTuple.active += cms.vstring('TriggerObjectStandalone')

# CMSSW 94X -> trigger object is 'slimmedPatTrigger'
process.kappaTuple.TriggerObjectStandalone.triggerObjects = cms.PSet(
src=cms.InputTag("slimmedPatTrigger")
)
Expand All @@ -191,6 +190,18 @@
else:
process.kappaTuple.TriggerObjectStandalone.metfilterbits = cms.InputTag("TriggerResults", "", "PAT")

# add BadPFMuonDzFilter as BadPFMuonFilterUpdateDz (see: https://twiki.cern.ch/twiki/bin/viewauth/CMS/MissingETOptionalFiltersRun2#Recipe_for_BadPFMuonDz_filter_in)
from RecoMET.METFilters.BadPFMuonDzFilter_cfi import BadPFMuonDzFilter
process.BadPFMuonFilterUpdateDz=BadPFMuonDzFilter.clone(
muons = cms.InputTag("slimmedMuons"),
vtx = cms.InputTag("offlineSlimmedPrimaryVertices"),
PFCandidates = cms.InputTag("packedPFCandidates"),
minDzBestTrack = cms.double(0.5),
taggingMode = cms.bool(True)
)
process.kappaTuple.TriggerObjectStandalone.metfilterbitslist = cms.vstring("BadPFMuonFilterUpdateDz")
process.path *= process.BadPFMuonFilterUpdateDz


# write out HLT information for trigger names matching regex
process.kappaTuple.Info.hltWhitelist = cms.vstring(
Expand Down Expand Up @@ -219,6 +230,15 @@
process.path *= (process.pfFilter)


#################
# PF Candidates #
#################

process.kappaTuple.active += cms.vstring('packedPFCandidates')
process.kappaTuple.packedPFCandidates.pfCandidates = cms.PSet(
src=cms.InputTag("packedPFCandidates")
)

####################
# Primary Vertices #
####################
Expand Down Expand Up @@ -271,13 +291,14 @@
#######################
# Configure Electrons #
#######################

"""
from RecoEgamma.EgammaTools.EgammaPostRecoTools import setupEgammaPostRecoSeq
setupEgammaPostRecoSeq(process,
runVID=False, #saves CPU time by not needlessly re-running VID, if you want the Fall17V2 IDs, set this to True or remove (default is True)
era='2018-UL')
process.path *= process.egammaPostRecoSeq
"""

from Kappa.Skimming.KElectrons_miniAOD_cff import setupElectrons

Expand Down Expand Up @@ -348,6 +369,7 @@
# process.kappaTask.add(process.egmGsfElectronIDTask)


'''
######################
# Configure JTB Jets #
######################
Expand Down Expand Up @@ -426,7 +448,18 @@
_jet_collection_name = "ak%sGenJetsNoNu" % (_jet_radius)
# GenJets are just KLVs: add collection to whitelist
process.kappaTuple.LV.whitelist += cms.vstring(_jet_collection_name)
'''


from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection

# skim 'out-of-the-box' MiniAOD AK4 jets (uncorrect JECs)
updateJetCollection(process,
jetSource = cms.InputTag('slimmedJets'),
labelName = 'NoJEC',
jetCorrections = ('AK4PFchs', cms.vstring([]), 'None')
)
process.kappaTuple.PatJets.ak4PFJetsCHS = cms.PSet(src=cms.InputTag("updatedPatJetsNoJEC"))

# -- activate KAPPA producers

Expand All @@ -438,9 +471,9 @@
if not options.isData:
process.kappaTuple.active += cms.vstring('LV')
# write out 'ak*GenJetsNoNu' four-vectors
process.kappaTuple.LV.ak4GenJetsNoNu = cms.PSet(src=cms.InputTag("ak4GenJetsNoNu"))
process.kappaTuple.LV.ak8GenJetsNoNu = cms.PSet(src=cms.InputTag("ak8GenJetsNoNu"))

# process.kappaTuple.LV.ak4GenJetsNoNu = cms.PSet(src=cms.InputTag("ak4GenJetsNoNu"))
# process.kappaTuple.LV.ak8GenJetsNoNu = cms.PSet(src=cms.InputTag("ak8GenJetsNoNu"))
process.kappaTuple.LV.ak4GenJets = cms.PSet(src=cms.InputTag("slimmedGenJets"))
#######################
# PileupDensity (rho) #
#######################
Expand All @@ -449,6 +482,7 @@
process.kappaTuple.PileupDensity.whitelist = cms.vstring("fixedGridRhoFastjetAll")
process.kappaTuple.PileupDensity.rename = cms.vstring("fixedGridRhoFastjetAll => pileupDensity")

'''
#################
# Configure MET #
#################
Expand All @@ -467,6 +501,7 @@
# -- end of MET recipe
'''

# wire miniAOD METs to collection from the "KAPPA" process
process.kappaTuple.PatMET.metPF = cms.PSet(src=cms.InputTag("slimmedMETs"), correctionLevel=cms.string('Raw'))
Expand All @@ -476,8 +511,6 @@
# -- activate KAPPA producers
process.kappaTuple.active += cms.vstring('PatMET')



################
# Kappa Output #
################
Expand Down Expand Up @@ -549,12 +582,12 @@

# associate all modules in kappaTask to the end path
process.endpath.associate(process.kappaTask)
process.endpath.associate(process.patAlgosToolsTask)

# for debugging: dump entire cmsRun python configuration
if options.dumpPython:
with open('.'.join(options.outputFile.split('.')[:-1]) + '_dump.py', 'w') as f:
f.write(process.dumpPython())
# sys.exit(1)

def _print_path_info(path):
assert isinstance(path, cms.Path) or isinstance(path, cms.EndPath)
Expand Down

0 comments on commit ea0c015

Please sign in to comment.