From d557de233d3e7d5ef6d8d985206cc7bd946a6582 Mon Sep 17 00:00:00 2001 From: Lucas Corcodilos Date: Thu, 14 Jan 2021 11:34:14 -0600 Subject: [PATCH 1/4] Add local nevents (2016 just for now) --- bs_select.py | 5 +++-- bstar_config.json | 49 +++++++++++++++++++++++++++++++++++++++++++++++ helpers.py | 3 ++- 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/bs_select.py b/bs_select.py index fb2b9ca..87ff137 100644 --- a/bs_select.py +++ b/bs_select.py @@ -21,7 +21,8 @@ from TIMBER.Tools.Common import * # Other import argparse -import time +import time, sys +sys.path.append('../TIMBER/') parser = argparse.ArgumentParser() @@ -74,7 +75,7 @@ def run(args): # Determine normalization weight if not a.isData: - norm = (xsec*lumi)/a.genEventCount + norm = (xsec*lumi)/config['NEVENTS'][args.year][setname.split('_')[0]] else: norm = 1. diff --git a/bstar_config.json b/bstar_config.json index 31a1688..a3b0917 100644 --- a/bstar_config.json +++ b/bstar_config.json @@ -82,5 +82,54 @@ "deepAK8w":0.9, "deepAK8top": 0.8 } + }, + "NEVENTS" :{ + "16": { + "signalRH4000": 100000, + "QCDHT1000ext": 10217072, + "QCDHT1500": 3970819, + "signalLH3000": 100000, + "QCDHT1500ext": 7868538, + "signalLH2400": 100000, + "signalLH1200": 100000, + "signalLH3200": 99500, + "QCDHT700ext": 21604533, + "signalRH3000": 100000, + "signalLH4000": 99500, + "QCDHT700": 15629253, + "signalRH2200": 100000, + "signalLH2200": 97000, + "singletop_tWB": 998276, + "singletop_t": 67105876, + "signalRH1200": 100000, + "signalLH2800": 100000, + "signalLH3400": 100000, + "singletop_s": 2989199, + "signalLH1600": 100000, + "singletop_tB": 38811017, + "QCDHT2000": 1991645, + "signalRH2000": 100000, + "signalRH1400": 99800, + "QCDHT2000ext": 4027896, + "signalRH2600": 100000, + "signalRH3600": 100000, + "signalRH1600": 99200, + "signalLH2600": 100000, + "signalLH1400": 100000, + "WjetsHT600": 1026587, + "signalRH2800": 100000, + "singletop_tW": 992024, + "signalLH2000": 100000, + "signalLH3800": 100000, + "QCDHT1000": 4850746, + "signalRH3200": 100000, + "signalLH1800": 100000, + "signalLH3600": 99500, + "signalRH3800": 100000, + "signalRH3400": 100000, + "ttbar": 76915549, + "signalRH1800": 97600, + "signalRH2400": 100000 + } } } diff --git a/helpers.py b/helpers.py index 5543af2..427820f 100644 --- a/helpers.py +++ b/helpers.py @@ -3,12 +3,13 @@ from collections import OrderedDict from TIMBER.Tools.CMS import CMS_lumi -def getNormFactor(setname,year,configPath,genEventCount): +def getNormFactor(setname,year,configPath): # Config loading - will have cuts, xsec, and lumi if isinstance(configPath,str): config = OpenJSON(configPath) else: config = configPath cuts = config['CUTS'][year] lumi = config['lumi'+str(year)] + geneEventCount = config['NEVENTS'][str(year)] # Deal with unique ttbar cases if setname == 'ttbar' and year == '16': From 9c7550b8e173709be54de7a100c9d7d56fa143df Mon Sep 17 00:00:00 2001 From: Lucas Corcodilos Date: Thu, 14 Jan 2021 12:01:49 -0600 Subject: [PATCH 2/4] Add condor venv fix --- condor/run_bstar.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/condor/run_bstar.sh b/condor/run_bstar.sh index 3f58592..2b7b657 100644 --- a/condor/run_bstar.sh +++ b/condor/run_bstar.sh @@ -1,20 +1,24 @@ #!/bin/bash echo "Run script starting" source /cvmfs/cms.cern.ch/cmsset_default.sh -xrdcp root://cmseos.fnal.gov//store/user/lcorcodi/CMSDAS2021env.tgz ./ +xrdcp root://cmsxrootd.fnal.gov//store/user/lcorcodi/CMSDAS2021env.tgz CMSDAS2021env.tgz export SCRAM_ARCH=slc7_amd64_gcc820 -tar -xzf CMSDAS2021env.tgz +tar -xzvf CMSDAS2021env.tgz rm CMSDAS2021env.tgz mkdir tardir; cp tarball.tgz tardir/; cd tardir/ tar -xzf tarball.tgz; rm tarball.tgz -cp -r * ../CMSSW_11_0_1/src/BstarToTW_CMSDAS2021; cd ../CMSSW_11_0_1/src/ +cp -r * ../CMSSW_11_0_1/src/BstarToTW_CMSDAS2021/; cd ../CMSSW_11_0_1/src/ eval `scramv1 runtime -sh` +rm -rf timber-env +python -m virtualenv timber-env source timber-env/bin/activate +cd TIMBER +source setup.sh -cd BstarToTW_CMSDAS2021 +cd ../BstarToTW_CMSDAS2021 echo python bs_select.py $* python bs_select.py $* -cp Presel_*.root ../../ \ No newline at end of file +cp Presel_*.root ../../../ \ No newline at end of file From 9de9f8fb280c9d7727516a1b892f18e54a313ec5 Mon Sep 17 00:00:00 2001 From: Lucas Corcodilos Date: Thu, 14 Jan 2021 12:04:52 -0600 Subject: [PATCH 3/4] Add 2017 and 2018 nevents --- bstar_config.json | 89 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/bstar_config.json b/bstar_config.json index a3b0917..0b793f9 100644 --- a/bstar_config.json +++ b/bstar_config.json @@ -130,6 +130,95 @@ "ttbar": 76915549, "signalRH1800": 97600, "signalRH2400": 100000 + }, + "17": { + "signalRH4000": 100000, + "signalLH1600": 100000, + "signalLH2600": 100000, + "singletop_t": 5982064, + "WjetsHT400": 9441439, + "singletop_tWB": 7977430, + "signalRH3600": 96000, + "signalRH2600": 100000, + "signalRH2800": 100000, + "signalLH3000": 96000, + "signalLH2400": 100000, + "QCDHT2000": 5941306, + "signalRH1600": 100000, + "signalLH2200": 93000, + "signalRH3200": 100000, + "signalLH4200": 96000, + "signalLH3600": 100000, + "signalRH3800": 96000, + "singletop_tB": 3675910, + "signalRH1800": 94000, + "signalLH1800": 100000, + "signalRH1400": 100000, + "ttbar": 197296000, + "signalLH2000": 100000, + "signalLH1400": 100000, + "signalRH2400": 100000, + "WjetsHT800": 8081153, + "QCDHT700": 47630084, + "signalLH1200": 100000, + "signalRH3400": 100000, + "signalLH4000": 96000, + "signalLH3200": 100000, + "signalRH2200": 100000, + "QCDHT1000": 16595628, + "signalLH3400": 100000, + "ttbar-semilep": 197670000, + "singletop_tW": 7794186, + "signalRH2000": 100000, + "QCDHT1500": 11634434, + "signalLH3800": 96000, + "signalRH1200": 100000 + }, + "18": { + "signalRH2200": 100000, + "QCDHT1000": 15466225, + "singletop_tWB": 7623000, + "WjetsHT600": 15298056, + "signalLH3800": 100000, + "QCDHT700": 48158738, + "signalRH2800": 100000, + "signalRH3400": 100000, + "signalRH1600": 100000, + "signalRH3800": 100000, + "WjetsHT800": 14627242, + "QCDHT2000": 5475677, + "signalLH1800": 100000, + "signalRH3200": 100000, + "signalLH2600": 100000, + "signalLH3600": 100000, + "signalLH1600": 100000, + "signalRH2600": 96000, + "signalRH1400": 100000, + "signalLH2800": 100000, + "signalRH2000": 100000, + "signalLH2000": 97000, + "signalRH3600": 100000, + "singletop_tW": 9598000, + "QCDHT1500": 10955087, + "signalLH1200": 100000, + "signalLH3400": 100000, + "singletop_s": 9706000, + "signalLH3200": 100000, + "WjetsHT400": 10071273, + "singletop_t": 154307600, + "signalLH4000": 100000, + "signalRH3000": 100000, + "singletop_tB": 79090800, + "ttbar": 131024000, + "signalRH2400": 100000, + "signalRH1200": 100000, + "signalLH1400": 100000, + "signalRH1800": 100000, + "signalLH2400": 100000, + "signalLH3000": 100000, + "ttbar-semilep": 101550000, + "signalRH4000": 100000, + "signalLH2200": 84000 } } } From 7769c11ff3283130c5a4e52de604539bcbd4418d Mon Sep 17 00:00:00 2001 From: Lucas Corcodilos Date: Thu, 14 Jan 2021 12:09:58 -0600 Subject: [PATCH 4/4] Add arg lists by year --- 2016_args.txt | 30 ++++++++++++++++++++++++++++++ 2017_args.txt | 28 ++++++++++++++++++++++++++++ 2018_args.txt | 28 ++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 2016_args.txt create mode 100644 2017_args.txt create mode 100644 2018_args.txt diff --git a/2016_args.txt b/2016_args.txt new file mode 100644 index 0000000..b1ed3e0 --- /dev/null +++ b/2016_args.txt @@ -0,0 +1,30 @@ +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT1000_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT1500_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT2000_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT700_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataB2_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataB_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataC_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataD_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataE_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataF_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataG_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataH_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1200_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1400_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1600_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1800_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2000_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2200_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2400_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2600_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2800_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3000_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3200_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3400_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3600_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3800_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH4000_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/singletop_tWB_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/singletop_tW_bstar16.root -y 16 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/ttbar_bstar16.root -y 16 diff --git a/2017_args.txt b/2017_args.txt new file mode 100644 index 0000000..11d5c82 --- /dev/null +++ b/2017_args.txt @@ -0,0 +1,28 @@ +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT1000_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT1500_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT2000_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT700_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataB_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataC_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataD_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataE_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataF_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1200_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1400_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1600_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1800_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2000_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2200_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2400_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2600_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2800_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3000_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3200_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3400_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3600_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3800_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH4000_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/singletop_tWB_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/singletop_tW_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/ttbar-semilep_bstar17.root -y 17 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/ttbar_bstar17.root -y 17 diff --git a/2018_args.txt b/2018_args.txt new file mode 100644 index 0000000..3254eea --- /dev/null +++ b/2018_args.txt @@ -0,0 +1,28 @@ +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT1000_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT1500_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT2000_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/QCDHT700_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataA_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataB_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataC1_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataC2_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/dataD_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1200_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1400_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1600_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH1800_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2000_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2200_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2400_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2600_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH2800_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3000_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3200_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3400_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3600_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH3800_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/signalLH4000_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/singletop_tWB_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/singletop_tW_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/ttbar-semilep_bstar18.root -y 18 +-i root://cmsxrootd.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/rootfiles/ttbar_bstar18.root -y 18