diff --git a/data/jme/Summer19UL16APV_V7_DATA.tgz b/data/jme/Summer19UL16APV_V7_DATA.tgz new file mode 100644 index 00000000000..54f1d835b40 Binary files /dev/null and b/data/jme/Summer19UL16APV_V7_DATA.tgz differ diff --git a/data/jme/Summer19UL16APV_V7_MC.tgz b/data/jme/Summer19UL16APV_V7_MC.tgz new file mode 100644 index 00000000000..204528b30ae Binary files /dev/null and b/data/jme/Summer19UL16APV_V7_MC.tgz differ diff --git a/data/jme/Summer19UL16_V7_DATA.tgz b/data/jme/Summer19UL16_V7_DATA.tgz new file mode 100644 index 00000000000..54ab4c3f1ac Binary files /dev/null and b/data/jme/Summer19UL16_V7_DATA.tgz differ diff --git a/data/jme/Summer19UL16_V7_MC.tgz b/data/jme/Summer19UL16_V7_MC.tgz new file mode 100644 index 00000000000..d169cde13c1 Binary files /dev/null and b/data/jme/Summer19UL16_V7_MC.tgz differ diff --git a/data/jme/Summer19UL17_RunB_V5_DATA.tgz b/data/jme/Summer19UL17_RunB_V5_DATA.tgz new file mode 100644 index 00000000000..53ac255a532 Binary files /dev/null and b/data/jme/Summer19UL17_RunB_V5_DATA.tgz differ diff --git a/data/jme/Summer19UL17_RunB_V6_DATA.tar.gz b/data/jme/Summer19UL17_RunB_V6_DATA.tar.gz deleted file mode 100644 index 23c8df7fe31..00000000000 Binary files a/data/jme/Summer19UL17_RunB_V6_DATA.tar.gz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunB_V6_DATA.tgz b/data/jme/Summer19UL17_RunB_V6_DATA.tgz deleted file mode 100644 index 23c8df7fe31..00000000000 Binary files a/data/jme/Summer19UL17_RunB_V6_DATA.tgz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunC_V5_DATA.tgz b/data/jme/Summer19UL17_RunC_V5_DATA.tgz new file mode 100644 index 00000000000..c65981ee5db Binary files /dev/null and b/data/jme/Summer19UL17_RunC_V5_DATA.tgz differ diff --git a/data/jme/Summer19UL17_RunC_V6_DATA.tar.gz b/data/jme/Summer19UL17_RunC_V6_DATA.tar.gz deleted file mode 100644 index 78844629b12..00000000000 Binary files a/data/jme/Summer19UL17_RunC_V6_DATA.tar.gz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunC_V6_DATA.tgz b/data/jme/Summer19UL17_RunC_V6_DATA.tgz deleted file mode 100644 index 78844629b12..00000000000 Binary files a/data/jme/Summer19UL17_RunC_V6_DATA.tgz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunD_V5_DATA.tgz b/data/jme/Summer19UL17_RunD_V5_DATA.tgz new file mode 100644 index 00000000000..990a6fdd32c Binary files /dev/null and b/data/jme/Summer19UL17_RunD_V5_DATA.tgz differ diff --git a/data/jme/Summer19UL17_RunD_V6_DATA.tar.gz b/data/jme/Summer19UL17_RunD_V6_DATA.tar.gz deleted file mode 100644 index dc73d8149c4..00000000000 Binary files a/data/jme/Summer19UL17_RunD_V6_DATA.tar.gz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunD_V6_DATA.tgz b/data/jme/Summer19UL17_RunD_V6_DATA.tgz deleted file mode 100644 index dc73d8149c4..00000000000 Binary files a/data/jme/Summer19UL17_RunD_V6_DATA.tgz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunE_V5_DATA.tgz b/data/jme/Summer19UL17_RunE_V5_DATA.tgz new file mode 100644 index 00000000000..97cd1da76bf Binary files /dev/null and b/data/jme/Summer19UL17_RunE_V5_DATA.tgz differ diff --git a/data/jme/Summer19UL17_RunE_V6_DATA.tar.gz b/data/jme/Summer19UL17_RunE_V6_DATA.tar.gz deleted file mode 100644 index 3201b5c6c2a..00000000000 Binary files a/data/jme/Summer19UL17_RunE_V6_DATA.tar.gz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunE_V6_DATA.tgz b/data/jme/Summer19UL17_RunE_V6_DATA.tgz deleted file mode 100644 index 3201b5c6c2a..00000000000 Binary files a/data/jme/Summer19UL17_RunE_V6_DATA.tgz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunF_V5_DATA.tgz b/data/jme/Summer19UL17_RunF_V5_DATA.tgz new file mode 100644 index 00000000000..370c14c7eaf Binary files /dev/null and b/data/jme/Summer19UL17_RunF_V5_DATA.tgz differ diff --git a/data/jme/Summer19UL17_RunF_V6_DATA.tar.gz b/data/jme/Summer19UL17_RunF_V6_DATA.tar.gz deleted file mode 100644 index 46385fb8c13..00000000000 Binary files a/data/jme/Summer19UL17_RunF_V6_DATA.tar.gz and /dev/null differ diff --git a/data/jme/Summer19UL17_RunF_V6_DATA.tgz b/data/jme/Summer19UL17_RunF_V6_DATA.tgz deleted file mode 100644 index 46385fb8c13..00000000000 Binary files a/data/jme/Summer19UL17_RunF_V6_DATA.tgz and /dev/null differ diff --git a/data/jme/Summer19UL17_V6_DATA.tgz b/data/jme/Summer19UL17_V6_DATA.tgz deleted file mode 100644 index 2213a39e058..00000000000 Binary files a/data/jme/Summer19UL17_V6_DATA.tgz and /dev/null differ diff --git a/data/jme/Summer19UL17_V6_MC.tar.gz b/data/jme/Summer19UL17_V6_MC.tar.gz deleted file mode 100644 index 3082c520997..00000000000 Binary files a/data/jme/Summer19UL17_V6_MC.tar.gz and /dev/null differ diff --git a/data/jme/Summer19UL17_V6_MC.tgz b/data/jme/Summer19UL17_V6_MC.tgz deleted file mode 100644 index 3082c520997..00000000000 Binary files a/data/jme/Summer19UL17_V6_MC.tgz and /dev/null differ diff --git a/data/jme/Summer20UL16APV_JRV3_MC.tgz b/data/jme/Summer20UL16APV_JRV3_MC.tgz new file mode 100644 index 00000000000..b1bc36f4eb6 Binary files /dev/null and b/data/jme/Summer20UL16APV_JRV3_MC.tgz differ diff --git a/data/jme/Summer20UL16_JRV3_MC.tgz b/data/jme/Summer20UL16_JRV3_MC.tgz new file mode 100644 index 00000000000..aec46f5ce15 Binary files /dev/null and b/data/jme/Summer20UL16_JRV3_MC.tgz differ diff --git a/python/postprocessing/data/pileup/PileupHistogram-UL2016-100bins_withVar.root b/python/postprocessing/data/pileup/PileupHistogram-UL2016-100bins_withVar.root new file mode 100644 index 00000000000..d580dc22510 Binary files /dev/null and b/python/postprocessing/data/pileup/PileupHistogram-UL2016-100bins_withVar.root differ diff --git a/python/postprocessing/data/pileup/PileupHistogram-UL2017-100bins_withVar.root b/python/postprocessing/data/pileup/PileupHistogram-UL2017-100bins_withVar.root new file mode 100644 index 00000000000..d4596b3d72e Binary files /dev/null and b/python/postprocessing/data/pileup/PileupHistogram-UL2017-100bins_withVar.root differ diff --git a/python/postprocessing/data/pileup/PileupHistogram-UL2018-100bins_withVar.root b/python/postprocessing/data/pileup/PileupHistogram-UL2018-100bins_withVar.root new file mode 100644 index 00000000000..9f3feb1565c Binary files /dev/null and b/python/postprocessing/data/pileup/PileupHistogram-UL2018-100bins_withVar.root differ diff --git a/python/postprocessing/data/pileup/mcPileupUL2016.root b/python/postprocessing/data/pileup/mcPileupUL2016.root new file mode 100644 index 00000000000..400ee9989fc Binary files /dev/null and b/python/postprocessing/data/pileup/mcPileupUL2016.root differ diff --git a/python/postprocessing/data/pileup/mcPileupUL2017.root b/python/postprocessing/data/pileup/mcPileupUL2017.root new file mode 100644 index 00000000000..6219d707752 Binary files /dev/null and b/python/postprocessing/data/pileup/mcPileupUL2017.root differ diff --git a/python/postprocessing/data/pileup/mcPileupUL2018.root b/python/postprocessing/data/pileup/mcPileupUL2018.root index bb6bd31c6a3..e564a48275b 100644 Binary files a/python/postprocessing/data/pileup/mcPileupUL2018.root and b/python/postprocessing/data/pileup/mcPileupUL2018.root differ diff --git a/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2016_postVFP.root b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2016_postVFP.root new file mode 100644 index 00000000000..1d9cf91eca5 Binary files /dev/null and b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2016_postVFP.root differ diff --git a/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2016_preVFP.root b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2016_preVFP.root new file mode 100644 index 00000000000..3e5bf239ae4 Binary files /dev/null and b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2016_preVFP.root differ diff --git a/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2017.root b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2017.root new file mode 100644 index 00000000000..57222d23e81 Binary files /dev/null and b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2017.root differ diff --git a/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2018.root b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2018.root new file mode 100644 index 00000000000..84b36c414a6 Binary files /dev/null and b/python/postprocessing/data/tau/TauES_dm_DeepTau2017v2p1VSjet_UL2018.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2016_postVFP.root b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2016_postVFP.root new file mode 100644 index 00000000000..422b1baee0a Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2016_postVFP.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2016_preVFP.root b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2016_preVFP.root new file mode 100644 index 00000000000..6421746471d Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2016_preVFP.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2017.root b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2017.root new file mode 100644 index 00000000000..b205d27c848 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2017.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2018.root b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2018.root new file mode 100644 index 00000000000..f9b7c445da3 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_dm_DeepTau2017v2p1VSjet_UL2018.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2016_postVFP.root b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2016_postVFP.root new file mode 100644 index 00000000000..372b6f26c4f Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2016_postVFP.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2016_preVFP.root b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2016_preVFP.root new file mode 100644 index 00000000000..1ed04d236c0 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2016_preVFP.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2017.root b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2017.root new file mode 100644 index 00000000000..51cbd602f54 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2017.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2018.root b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2018.root new file mode 100644 index 00000000000..605019b9c70 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_eta_DeepTau2017v2p1VSe_UL2018.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2016_postVFP.root b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2016_postVFP.root new file mode 100644 index 00000000000..6efe2daad62 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2016_postVFP.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2016_preVFP.root b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2016_preVFP.root new file mode 100644 index 00000000000..94561fbfa6a Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2016_preVFP.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2017.root b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2017.root new file mode 100644 index 00000000000..16b943c01b3 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2017.root differ diff --git a/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2018.root b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2018.root new file mode 100644 index 00000000000..90a96ec4cd5 Binary files /dev/null and b/python/postprocessing/data/tau/TauID_SF_pt_DeepTau2017v2p1VSjet_UL2018.root differ diff --git a/python/postprocessing/framework/postprocessor.py b/python/postprocessing/framework/postprocessor.py index 1c750368eda..0764ccc4814 100755 --- a/python/postprocessing/framework/postprocessor.py +++ b/python/postprocessing/framework/postprocessor.py @@ -193,7 +193,10 @@ def run(self): inTree.SetEntryList(elist) else: # initialize reader - inTree = InputTree(inTree, elist) + if elist: + inTree = InputTree(inTree, elist) + else: + inTree = InputTree(inTree) # prepare output file if not self.noOut: diff --git a/python/postprocessing/framework/treeReaderArrayTools.py b/python/postprocessing/framework/treeReaderArrayTools.py index 2a2d4226aa3..139edfa8c6a 100644 --- a/python/postprocessing/framework/treeReaderArrayTools.py +++ b/python/postprocessing/framework/treeReaderArrayTools.py @@ -3,7 +3,7 @@ ROOT.PyConfig.IgnoreCommandLineOptions = True -def InputTree(tree, entrylist=None): +def InputTree(tree, entrylist=ROOT.MakeNullPointer(ROOT.TEntryList)): """add to the PyROOT wrapper of a TTree a TTreeReader and methods readBranch, arrayReader, valueReader""" if hasattr(tree, '_ttreereader'): return tree # don't initialize twice @@ -116,7 +116,7 @@ def _makeValueReader(tree, typ, nam): def _remakeAllReaders(tree): - _ttreereader = ROOT.TTreeReader(tree, getattr(tree, '_entrylist', None)) + _ttreereader = ROOT.TTreeReader(tree, getattr(tree, '_entrylist', ROOT.MakeNullPointer(ROOT.TEntryList))) _ttreereader._isClean = True _ttrvs = {} for k in tree._ttrvs.keys(): diff --git a/python/postprocessing/helpers/TauIDSFTool.py b/python/postprocessing/helpers/TauIDSFTool.py index 9b883de3070..17e75a83868 100644 --- a/python/postprocessing/helpers/TauIDSFTool.py +++ b/python/postprocessing/helpers/TauIDSFTool.py @@ -1,12 +1,15 @@ # Author: Izaak Neutelings (July 2019) # https://twiki.cern.ch/twiki/bin/viewauth/CMS/TauIDRecommendationForRun2 # Source: https://github.com/cms-tau-pog/TauIDSFs +from __future__ import print_function import os from math import sqrt from PhysicsTools.NanoAODTools.postprocessing.tools import ensureTFile, extractTH1 datapath = os.path.join(os.environ.get('CMSSW_BASE','CMSSW_BASE'),"src/PhysicsTools/NanoAODTools/python/postprocessing/data/tau") -campaigns = ['2016Legacy','2017ReReco','2018ReReco'] - +campaigns = [ + '2016Legacy','2017ReReco','2018ReReco', + 'UL2016_preVFP', 'UL2016_postVFP', 'UL2017', 'UL2018', +] class TauIDSFTool: @@ -20,14 +23,17 @@ def __init__(self, year, id, wp='Tight', dm=False, emb=False, emb: use SFs for embedded samples otherVSlepWP: extra uncertainty if you are using a different DeepTauVSe/mu WP than used in the measurement """ - assert year in campaigns, "You must choose a year from %s."%(', '.join(campaigns)) + if "UL" in year and "VSmu" in id: + print(">>> TauIDSFTool: Warning! Using pre-UL (%r) SFs for %s..."%(year,id)) + year = '2016Legacy' if '2016' in year else '2017ReReco' if '2017' in year else '2018ReReco' + assert year in campaigns, "You must choose a year from %s! Got %r."%(', '.join(campaigns),year) self.ID = id self.WP = wp self.verbose = verbose self.extraUnc = None if id in ['MVAoldDM2017v2','DeepTau2017v2p1VSjet']: - if dm: + if dm: # DM-dependent SFs if emb: if 'oldDM' in id: raise IOError("Scale factors for embedded samples not available for ID '%s'!"%id) @@ -46,7 +52,7 @@ def __init__(self, year, id, wp='Tight', dm=False, emb=False, self.extraUnc = 0.05 else: self.extraUnc = 0.03 - else: + else: # pT-dependent SFs if emb: if 'oldDM' in id: raise IOError("Scale factors for embedded samples not available for ID '%s'!"%id) @@ -93,7 +99,8 @@ def getSFvsPT(self, pt, genmatch=5, unc=None): elif unc=='Up': return sf+errUp elif unc=='Down': - return sf-errDown + sfDown = (sf-errDown) if errDown>> TauESTool: Warning! Using pre-UL (%r) TESs at high pT (for uncertainties only)..."%(year)) + year_highpt = '2016Legacy' if '2016' in year else '2017ReReco' if '2017' in year else '2018ReReco' + else: + year_highpt = year + assert year in campaigns, "You must choose a year from %s! Got %r."%(', '.join(campaigns),year) + assert year_highpt in campaigns, "You must choose a year from %s! Got %r."%(', '.join(campaigns),year_highpt) file_lowpt = ensureTFile(os.path.join(path,"TauES_dm_%s_%s.root"%(id,year))) - file_highpt = ensureTFile(os.path.join(path,"TauES_dm_%s_%s_ptgt100.root"%(id,year))) + file_highpt = ensureTFile(os.path.join(path,"TauES_dm_%s_%s_ptgt100.root"%(id,year_highpt))) self.hist_lowpt = extractTH1(file_lowpt,'tes') self.hist_highpt = extractTH1(file_highpt,'tes') self.hist_lowpt.SetDirectory(0) @@ -181,9 +196,10 @@ def getTES(self, pt, dm, genmatch=5, unc=None): if unc=='Up': tes += err elif unc=='Down': - tes -= err + tes = (tes-err) if err>> TauFESTool: Warning! Using pre-UL (%r) energy scales for e -> tau fakes..."%(year)) + year = '2016Legacy' if '2016' in year else '2017ReReco' if '2017' in year else '2018ReReco' + assert year in campaigns, "You must choose a year from %s! Got %r."%(', '.join(campaigns),year) file = ensureTFile(os.path.join(path,"TauFES_eta-dm_%s_%s.root"%(id,year))) graph = file.Get('fes') FESs = { 'barrel': { }, 'endcap': { } } @@ -221,7 +242,7 @@ def __init__(self, year, id='DeepTau2017v2p1VSe', path=datapath): y = graph.GetY()[i] yup = graph.GetErrorYhigh(i) ylow = graph.GetErrorYlow(i) - FESs[region][dm] = (y-ylow,y,y+yup) + FESs[region][dm] = (max(0,y-ylow),y,y+yup) # prevent negative FES i += 1 file.Close() self.FESs = FESs diff --git a/python/postprocessing/modules/common/puWeightProducer.py b/python/postprocessing/modules/common/puWeightProducer.py index fd7f15f692f..b9062b43ee1 100644 --- a/python/postprocessing/modules/common/puWeightProducer.py +++ b/python/postprocessing/modules/common/puWeightProducer.py @@ -158,3 +158,47 @@ def analyze(self, event): doSysVar=True) puAutoWeight_2018 = lambda: puWeightProducer( "auto", pufile_data2018, "pu_mc", "pileup", verbose=False) + +# Ultra legacy + +# 2016 +pufile_dataUL2016 = "%s/src/PhysicsTools/NanoAODTools/python/postprocessing/data/pileup/PileupHistogram-UL2016-100bins_withVar.root" % os.environ[ + 'CMSSW_BASE'] +pufile_mcUL2016 = "%s/src/PhysicsTools/NanoAODTools/python/postprocessing/data/pileup/mcPileupUL2016.root" % os.environ[ + 'CMSSW_BASE'] +puWeight_UL2016 = lambda: puWeightProducer(pufile_mcUL2016, + pufile_dataUL2016, + "pu_mc", + "pileup", + verbose=False, + doSysVar=True) +puAutoWeight_UL2016 = lambda: puWeightProducer( + "auto", pufile_dataUL2016, "pu_mc", "pileup", verbose=False) + +# 2017 +pufile_dataUL2017 = "%s/src/PhysicsTools/NanoAODTools/python/postprocessing/data/pileup/PileupHistogram-UL2017-100bins_withVar.root" % os.environ[ + 'CMSSW_BASE'] +pufile_mcUL2017 = "%s/src/PhysicsTools/NanoAODTools/python/postprocessing/data/pileup/mcPileupUL2017.root" % os.environ[ + 'CMSSW_BASE'] +puWeight_UL2017 = lambda: puWeightProducer(pufile_mcUL2017, + pufile_dataUL2017, + "pu_mc", + "pileup", + verbose=False, + doSysVar=True) +puAutoWeight_UL2017 = lambda: puWeightProducer( + "auto", pufile_dataUL2017, "pu_mc", "pileup", verbose=False) + +# 2018 +pufile_dataUL2018 = "%s/src/PhysicsTools/NanoAODTools/python/postprocessing/data/pileup/PileupHistogram-UL2018-100bins_withVar.root" % os.environ[ + 'CMSSW_BASE'] +pufile_mcUL2018 = "%s/src/PhysicsTools/NanoAODTools/python/postprocessing/data/pileup/mcPileupUL2018.root" % os.environ[ + 'CMSSW_BASE'] +puWeight_UL2018 = lambda: puWeightProducer(pufile_mcUL2018, + pufile_dataUL2018, + "pu_mc", + "pileup", + verbose=False, + doSysVar=True) +puAutoWeight_UL2018 = lambda: puWeightProducer( + "auto", pufile_dataUL2018, "pu_mc", "pileup", verbose=False) diff --git a/python/postprocessing/modules/jme/jetmetHelperRun2.py b/python/postprocessing/modules/jme/jetmetHelperRun2.py index e53d52a4e6f..d38c623c34b 100644 --- a/python/postprocessing/modules/jme/jetmetHelperRun2.py +++ b/python/postprocessing/modules/jme/jetmetHelperRun2.py @@ -7,11 +7,14 @@ from PhysicsTools.NanoAODTools.postprocessing.modules.jme.fatJetUncertainties import * # JEC dict +# https://twiki.cern.ch/twiki/bin/viewauth/CMS/JECDataMC#Recommended_for_MC jecTagsMC = { '2016': 'Summer16_07Aug2017_V11_MC', '2017': 'Fall17_17Nov2017_V32_MC', '2018': 'Autumn18_V19_MC', - 'UL2017': 'Summer19UL17_V6_MC', + 'UL2016_preVFP': 'Summer19UL16APV_V7_MC', + 'UL2016': 'Summer19UL16_V7_MC', + 'UL2017': 'Summer19UL17_V5_MC', 'UL2018': 'Summer19UL18_V5_MC', } @@ -21,11 +24,14 @@ '2018': 'Autumn18_FastSimV1_MC', } +# https://twiki.cern.ch/twiki/bin/viewauth/CMS/JECDataMC#Recommended_for_Data archiveTagsDATA = { '2016': 'Summer16_07Aug2017_V11_DATA', '2017': 'Fall17_17Nov2017_V32_DATA', '2018': 'Autumn18_V19_DATA', - 'UL2017': 'Summer19UL17_V6_DATA', + 'UL2016_preVFP': 'Summer19UL16APV_V7_DATA', + 'UL2016': 'Summer19UL16_V7_DATA', + 'UL2017': 'Summer19UL17_V5_DATA', 'UL2018': 'Summer19UL18_V5_DATA' } @@ -46,21 +52,32 @@ '2018B': 'Autumn18_RunB_V19_DATA', '2018C': 'Autumn18_RunC_V19_DATA', '2018D': 'Autumn18_RunD_V19_DATA', - 'UL2017B': 'Summer19UL17_RunB_V6_DATA', - 'UL2017C': 'Summer19UL17_RunC_V6_DATA', - 'UL2017D': 'Summer19UL17_RunD_V6_DATA', - 'UL2017E': 'Summer19UL17_RunE_V6_DATA', - 'UL2017F': 'Summer19UL17_RunF_V6_DATA', + 'UL2016_preVFPB': 'Summer19UL16APV_RunBCD_V7_DATA', + 'UL2016_preVFPC': 'Summer19UL16APV_RunBCD_V7_DATA', + 'UL2016_preVFPD': 'Summer19UL16APV_RunBCD_V7_DATA', + 'UL2016_preVFPE': 'Summer19UL16APV_RunEF_V7_DATA', + 'UL2016_preVFPF': 'Summer19UL16APV_RunEF_V7_DATA', + 'UL2016F': 'Summer19UL16_RunFGH_V7_DATA', + 'UL2016G': 'Summer19UL16_RunFGH_V7_DATA', + 'UL2016H': 'Summer19UL16_RunFGH_V7_DATA', + 'UL2017B': 'Summer19UL17_RunB_V5_DATA', + 'UL2017C': 'Summer19UL17_RunC_V5_DATA', + 'UL2017D': 'Summer19UL17_RunD_V5_DATA', + 'UL2017E': 'Summer19UL17_RunE_V5_DATA', + 'UL2017F': 'Summer19UL17_RunF_V5_DATA', 'UL2018A': 'Summer19UL18_RunA_V5_DATA', 'UL2018B': 'Summer19UL18_RunB_V5_DATA', 'UL2018C': 'Summer19UL18_RunC_V5_DATA', 'UL2018D': 'Summer19UL18_RunD_V5_DATA', } +# https://twiki.cern.ch/twiki/bin/view/CMS/JetResolution jerTagsMC = { '2016': 'Summer16_25nsV1_MC', '2017': 'Fall17_V3_MC', '2018': 'Autumn18_V7b_MC', + 'UL2016_preVFP': 'Summer20UL16APV_JRV3_MC', + 'UL2016': 'Summer20UL16_JRV3_MC', 'UL2017': 'Summer19UL17_JRV2_MC', 'UL2018': 'Summer19UL18_JRV2_MC', } @@ -72,6 +89,8 @@ '2017': [1.09, 1.14, 1.04], # Use 2017 values for 2018 until 2018 are released '2018': [1.09, 1.14, 1.04], + 'UL2016_preVFP': [1.00, 1.00, 1.00], # placeholder + 'UL2016': [1.00, 1.00, 1.00], # placeholder 'UL2017': [1.00, 1.00, 1.00], # placeholder 'UL2018': [1.00, 1.00, 1.00], # placeholder } @@ -84,6 +103,8 @@ '2017': [0.982, 0.978, 0.986], # Use 2017 values for 2018 until 2018 are released '2018': [0.982, 0.978, 0.986], + 'UL2016_preVFP': [1.000, 1.000, 1.000], # placeholder + 'UL2016': [1.000, 1.000, 1.000], # placeholder 'UL2017': [1.000, 1.000, 1.000], # placeholder 'UL2018': [1.000, 1.000, 1.000], # placeholder }