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 diff --git a/CondorHelper.py b/CondorHelper.py index 3da7120..6bce8eb 100644 --- a/CondorHelper.py +++ b/CondorHelper.py @@ -29,10 +29,14 @@ if options.inputs != '': commands.append("tar czvf tarball.tgz "+options.inputs) +import os +os.sys('mkdir -p condor/logs/') +os.sys('mkdir -p logs/') + # Make JDL from template timestr = time.strftime("%Y%m%d-%H%M%S") out_jdl = 'temp_'+timestr+'_jdl' -commands.append("sed 's$TEMPSCRIPT$"+options.runscript+"$g' $CMSSW_BASE/src/BstarToTW_CMSDAS2020/condor/templates/jdl_template > "+out_jdl) +commands.append("sed 's$TEMPSCRIPT$"+options.runscript+"$g' $CMSSW_BASE/src/TIMBER/TIMBER/Utilities/Condor/templates/jdl_template > "+out_jdl) commands.append("sed -i 's$TEMPARGS$"+options.args+"$g' "+out_jdl) commands.append("condor_submit "+out_jdl+" -debugfile condor_submit_debug.log") commands.append("mv "+out_jdl+" condor/logs/") diff --git a/README.md b/README.md index e761dd0..50a3a38 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,11 @@ git pull origin master ## Submitting jobs +Modify username in `condor/run_bstar.sh` e.g.: +``` +root://cmseos.fnal.gov//store/user/cmantill/bstar_select_tau21/ +``` + Testing one ``` python CondorHelper.py -r condor/run_bstar.sh -a test_args.txt -i "bs_select.py bstar.cc bstar_config.json helpers.py" @@ -63,4 +68,9 @@ python CondorHelper.py -r condor/run_bstar.sh -a test_args.txt -i "bs_select.py For 2016 (then change args file for other years): ``` python CondorHelper.py -r condor/run_bstar.sh -a 2016_args.txt -i "bs_select.py bstar.cc bstar_config.json helpers.py" +``` + +Check jobs +``` +condor_q ``` \ No newline at end of file diff --git a/bs_select.py b/bs_select.py index e5e9333..cd70f51 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..0b793f9 100644 --- a/bstar_config.json +++ b/bstar_config.json @@ -82,5 +82,143 @@ "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 + }, + "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 + } } } diff --git a/condor/run_bstar.sh b/condor/run_bstar.sh index 6d97953..a6c1c27 100644 --- a/condor/run_bstar.sh +++ b/condor/run_bstar.sh @@ -2,34 +2,25 @@ echo "Run script starting" ls source /cvmfs/cms.cern.ch/cmsset_default.sh -xrdcp root://cmseos.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/CMSSW_11_0_1_cmsdas.tgz ./ +xrdcp root://cmseos.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/CMSDAS2021env.tgz ./ export SCRAM_ARCH=slc7_amd64_gcc820 -scramv1 project CMSSW CMSSW_11_0_1 -tar -xzf CMSSW_11_0_1_cmsdas.tgz -rm CMSSW_11_0_1_cmsdas.tgz -cd CMSSW_11_0_1/src/ -eval `scramv1 runtime -sh` -ls -lrth - -#source timber-env/bin/activate -#python -c 'import TIMBER.Analyzer' -rm -rf timber-env - -#mkdir new; cd new; -#xrdcp root://cmseos.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/timber-env.tgz ./ -xrdcp root://cmseos.fnal.gov//store/user/cmsdas/2021/long_exercises/BstarTW/timber-env.tar.gz ./ -tar -xzf timber-env.tar.gz -source timber-env/bin/activate -python -c 'import TIMBER.Analyzer' -cd ../../../ +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/ +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 -ls -python -c 'import TIMBER.Analyzer' +cd ../BstarToTW_CMSDAS2021 echo python bs_select.py $* python bs_select.py $* -#xrdcp Presel_*.root root://cmseos.fnal.gov//store/user/cmantill/bstar_select_tau21/ +xrdcp Presel_*.root root://cmseos.fnal.gov//store/user/cmantill/bstar_select_tau21/ 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':