Skip to content

Commit

Permalink
Merge branch 'UL_ditau' of github.com:danielwinterbottom/ICHiggsTauTa…
Browse files Browse the repository at this point in the history
…u into UL_ditau
  • Loading branch information
Ksavva1021 committed Jul 21, 2023
2 parents c4f06c1 + d0a203f commit ccd0a1c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5383,7 +5383,7 @@ def MergeXBins(hist):


if not options.no_plot:
if options.extra_name != '': vname = options.extra_name
if options.extra_name != '': vname = var_name + '_' +options.extra_name
else: vname = var_name


Expand Down
15 changes: 14 additions & 1 deletion Analysis/HiggsTauTauRun2/scripts/makeDatacards_tauSF.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ def BINS(start,end,interval,offset):
run_cmd_2=''
run_cmd_3=''
run_cmd_4=''
run_cmd_5=''
run_cmd_6=''
run_cmd_7=''
run_cmd_8=''

extra=''
if ',' in var_used: extra = '--do_unrolling=0'
Expand Down Expand Up @@ -170,15 +174,24 @@ def BINS(start,end,interval,offset):
if ch == 'mt':

cuts='m_vis>40&&fabs(eta_1)<2.1&&trg_singlemuon'

if options.v2p5:
run_cmd_3 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65" --wp=%(wp)s --v2p5' % vars()
run_cmd_4 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s&&deepTauVsEle_tight_2>0.5)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65_tightVsEle" --wp=%(wp)s --v2p5' % vars()
run_cmd_5 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1>70)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTGt70" --wp=%(wp)s --v2p5' % vars()
run_cmd_6 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1>70)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s&&deepTauVsEle_tight_2>0.5)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTGt70_tightVsEle" --wp=%(wp)s --v2p5' % vars()
run_cmd_7 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s)\' --method=8 --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65_aiso" --wp=%(wp)s --do_aiso --v2p5' % vars()
run_cmd_8 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s&&deepTauVsEle_tight_2>0.5)\' --method=8 --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65_tightVsEle_aiso" --wp=%(wp)s --do_aiso --v2p5' % vars()

else:
run_cmd_3 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65" --wp=%(wp)s ' % vars()
run_cmd_4 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s&&deepTauVsEle_tight_2>0.5)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65_tightVsEle" --wp=%(wp)s ' % vars()
run_cmd_5 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1>70)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTGt70" --wp=%(wp)s' % vars()
run_cmd_6 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1>70)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s&&deepTauVsEle_tight_2>0.5)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTGt70_tightVsEle" --wp=%(wp)s' % vars()
run_cmd_7 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s)\' --method=8 --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65_aiso" --wp=%(wp)s --do_aiso' % vars()
run_cmd_8 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&%(cuts)s&&deepTauVsEle_tight_2>0.5)\' --method=8 --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\'%(var_used)s%(bin_used)s\' %(add_cond)s --ratio_range="0.5,1.5" %(extra_mt)s --datacard="%(cat)s_mTLt65_tightVsEle_aiso" --wp=%(wp)s --do_aiso' % vars()

commands = [run_cmd_3, run_cmd_4]
commands = [run_cmd_3, run_cmd_4, run_cmd_5, run_cmd_6, run_cmd_7,run_cmd_8]
if ',' in var_used: var_name=var_used.replace(',','_vs_')

for i in range(0,len(commands)):
Expand Down
66 changes: 50 additions & 16 deletions Analysis/HiggsTauTauRun2/scripts/make_tauSF_control_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ def BINS(start,end,interval,offset):
parser.add_option('--output_folder', help= 'Name of output folder to create', default='plots')
parser.add_option("--batch", dest="batch", action='store_true', default=False, help="Submit on batch.")
parser.add_option('--wp', help= 'Name of VsJet WP to use', default='medium')
parser.add_option('--wpvsele', help= 'Name of VsEle WP to use', default='vvloose')
parser.add_option('--sf_option', help= 'Select which SFs you want to apply', default='none')
parser.add_option("--v2p5", dest="v2p5", action='store_true', default=False, help="Use DeepTau v2p5")
(options, args) = parser.parse_args()

# initialising variables
output_folder = options.output_folder
channels = options.channel.split(',')
years = options.years.split(',')
wp=options.wp

wpvsele=options.wpvsele
print 'Processing channels: %(channels)s' % vars()
print 'Processing years: %(years)s' % vars()

Expand All @@ -72,8 +74,10 @@ def BINS(start,end,interval,offset):
# check whether path is in an exitisting directory
if not os.path.isdir('%(output_folder)s' % vars()):
os.system("mkdir %(output_folder)s" % vars())
if not os.path.isdir('%(output_folder)s/jobs' % vars()):
os.system("mkdir %(output_folder)s/jobs" % vars())
if not os.path.isdir('%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele' % vars()):
os.system("mkdir %(output_folder)s/%(wp)svsjets_%(wpvsele)svsele" % vars())
if not os.path.isdir('%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/jobs' % vars()):
os.system("mkdir %(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/jobs" % vars())

categories_et = ["inclusive",'dm0','dm1','dm10','dm11']
categories_mt = ["inclusive",'dm0','dm1','dm10','dm11']
Expand All @@ -97,23 +101,41 @@ def BINS(start,end,interval,offset):
['pt_1', BINS(0,200,5,1)],
['iso_1', BINS(0.8,1,0.01,0.01)],
['iso_2', BINS(0.8,1,0.01,0.01)],
['iso_2_V2p5', BINS(0.95,1,0.01,0.01)],
#['met', BINS(0,200,10,1)],
#['pt_vis', BINS(0,300,10,1)],
#['pt_tt', BINS(0,300,10,1)],
#['dR', BINS(0,7,0.03,0.03)],
#['mt_1', BINS(0,150,5,1)],
#['met_dphi_1', BINS(0,3.2,0.03,0.03)],
#['met_dphi_2', BINS(0,3.2,0.03,0.03)],
]
]
if wp == "loose":
iso_2_start = 0.92
iso_2_bin = 0.005
if wp == "medium":
iso_2_start = 0.95
iso_2_bin = 0.005
if wp == "tight":
iso_2_start = 0.975
iso_2_bin = 0.0025
if wp == "vtight":
iso_2_start =0.985
iso_2_bin = 0.0025
if wp == "vvtight":
iso_2_start =0.985
iso_2_bin = 0.0025

var_mt = [
['m_vis', BINS(0,300,10,1)],
['iso_2', BINS(0.8,1,0.01,0.01)],
#['iso_2_V2p5', BINS(0.8,1,0.01,0.01)],
['iso_2_V2p5', BINS(iso_2_start,1,iso_2_bin,0.01)],
#['n_jets', BINS(0,8,1,1)],
#['eta_1',BINS(-2.1,2.1,0.1,0.1)],
#['eta_2',BINS(-2.1,2.1,0.1,0.1)],
['tau_decay_mode_2',BINS(0,12,1,1)],
['pt_2', BINS(0,200,5,1)],
['pt_2_extended', '[0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,210,230,260,300]'],
#['pt_1', BINS(0,200,5,1)],
#['tau_decay_mode_2,pt_2', '[0,1,10,11],[20,25,30,35,40,50,60,80,100,200]'],
#['met', BINS(0,200,10,1)],
Expand All @@ -128,6 +150,7 @@ def BINS(start,end,interval,offset):
['m_vis', BINS(0,300,10,1)],
#['n_jets', BINS(0,8,1,1)],
['iso_2', BINS(0.8,1,0.01,0.01)],
['iso_2_V2p5', BINS(0.95,1,0.01,0.01)],
#['eta_1',BINS(-2.1,2.1,0.1,0.1)],
#['eta_2',BINS(-2.1,2.1,0.1,0.1)],
['tau_decay_mode_2',BINS(0,12,1,1)],
Expand All @@ -152,26 +175,26 @@ def BINS(start,end,interval,offset):
'zmm': var_zmm}

for year in years:
if not os.path.isdir('%(output_folder)s/%(year)s' % vars()):
os.system("mkdir %(output_folder)s/%(year)s" % vars())
if not os.path.isdir('%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s' % vars()):
os.system("mkdir %(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s" % vars())
CFG = config_files[year]
for ch in channels:
if not os.path.isdir('%(output_folder)s/%(year)s/%(ch)s' % vars()):
os.system("mkdir %(output_folder)s/%(year)s/%(ch)s" % vars())
if not os.path.isdir('%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s/%(ch)s' % vars()):
os.system("mkdir %(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s/%(ch)s" % vars())
if ch=='tt': method='8'
else: method='12'

sf='1.'

if 'ptbinned' in options.sf_option or 'dmbinned' in options.sf_option:
if 'dmbinned' in options.sf_option: json_name = '%(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/input/tau_SF_dm_binned.json' % vars()
if 'dmbinned' in options.sf_option: json_name = '%(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/tau_SF_strings_dm_binned_%(wp)svsjet_%(wpvsele)svsele_v2p5.json' % vars()
else: json_name= '%(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/input/tau_SF_pt_binned.json' % vars()
with open(json_name) as json_file:
sf_data = json.load(json_file)
if ch == 'et':
sf=sf_data['%(wp)svsjet_tightvsele' % vars()][year]
else:
sf=sf_data['%(wp)svsjet_vvloosevsele' % vars()][year]
sf=sf_data['%(wp)svsjet_%(wpvsele)svsele' % vars()][year]


if 'pt_2' in sf and ch =='tt':
Expand Down Expand Up @@ -207,7 +230,12 @@ def BINS(start,end,interval,offset):
add_cond = '--add_wt=\'wt_prefire*%(sf)s\'' % vars()
else: add_cond = '--add_wt=\'wt_prefire*%(sf)s\'' % vars()

add_cond+=' --wp=%(wp)s ' % vars()
if wpvsele == "tight":
tight_wpvsele='&&deepTauVsEle_tight_2>0.5'
else:
tight_wpvsele=''
add_cond+=' --wp=%(wp)s' % vars()
if options.v2p5: add_cond+=' --v2p5'

if year == "2016_preVFP" or year == "2016_postVFP":
pt1_cut = 23
Expand All @@ -224,8 +252,12 @@ def BINS(start,end,interval,offset):
if ch == 'tt':
run_cmd = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(m_vis>40&&m_vis<80)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"%(var_used)s%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5"' % vars()
elif ch == 'mt':
run_cmd = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<40)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singlemuon&&fabs(eta_1)<2.1)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"%(var_used)s%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt40" ' % vars()
run_cmd_2 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singlemuon&&fabs(eta_1)<2.1)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"%(var_used)s%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt65" ' % vars()
if var_used == 'pt_2_extended':
run_cmd = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<40)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singlemuon&&fabs(eta_1)<2.1)%(tight_wpvsele)s\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"pt_2%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt40" --log_y --extra_name extended' % vars()
run_cmd_2 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singlemuon&&fabs(eta_1)<2.1)%(tight_wpvsele)s\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"pt_2%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt65" --log_y --extra_name extended' % vars()
else:
run_cmd = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<40)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singlemuon&&fabs(eta_1)<2.1)%(tight_wpvsele)s\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"%(var_used)s%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt40" ' % vars()
run_cmd_2 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singlemuon&&fabs(eta_1)<2.1)%(tight_wpvsele)s\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"%(var_used)s%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt65" ' % vars()
elif ch == 'et':
run_cmd = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<40)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singleelectron)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"%(var_used)s%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt40" ' % vars()
run_cmd_2 = 'python %(cmssw_base)s/src/UserCode/ICHiggsTauTau/Analysis/HiggsTauTauRun2/scripts/HiggsTauTauPlot.py --cfg=%(CFG)s --channel=%(ch)s --sel=\'(mt_1<65)\' --set_alias=\'%(cat)s:({%(cat)s}&&m_vis>40&&m_vis<80&&pt_1>25&&trg_singleelectron)\' --method=%(method)s --cat=%(cat)s --outputfolder=%(output_folder)s/%(year)s/%(ch)s --ggh_masses_powheg='' --bbh_masses_powheg='' --var=\"%(var_used)s%(bin_used)s\" %(add_cond)s --ratio_range="0.5,1.5" --datacard="%(cat)s_mTLt65" ' % vars()
Expand All @@ -235,11 +267,13 @@ def BINS(start,end,interval,offset):

for i in range(0,len(commands)):
if commands[i] is '': continue
job_file = '%(output_folder)s/jobs/%(var_used)s_%(cat)s_%(ch)s_%(year)s_%(i)i.sh' % vars()
if var_used == 'pt_2_extended':
job_file = '%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/jobs/pt_2_extended_%(cat)s_%(ch)s_%(year)s_%(i)i.sh' % vars()
else:
job_file = '%(output_folder)s/%(wp)svsjets_%(wpvsele)svsele/jobs/%(var_used)s_%(cat)s_%(ch)s_%(year)s_%(i)i.sh' % vars()
CreateBatchJob(job_file,cmssw_base,[commands[i]])
if 'm_vis' in var_used:
os.system('sed -i \'s/m_vis>40&&m_vis<80/1/g\' %(job_file)s ' % vars())
if 'mt_1' in var_used:
os.system('sed -i \'s/mt_1<65/1/g\' %(job_file)s ' % vars())
SubmitBatchJob(job_file,time=180,memory=24,cores=1)

1 change: 1 addition & 0 deletions python/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def SetAxisTitles(plot, channel):
titles = {}
titles['iso_1'] = ['I^{'+lep1_label+'}_{rel}','Events / '+bin_width+' GeV', 'I^{'+lep1_label+'}_{rel}']
titles['iso_2'] = ['I^{'+lep2_label+'}_{rel}','Events / '+bin_width+' GeV', 'I^{'+lep2_label+'}_{rel}']
titles['iso_2_V2p5'] = ['I^{'+lep2_label+'}_{rel}','Events / '+bin_width+' GeV', 'I^{'+lep2_label+'}_{rel}']
titles['pt_1'] = ['p_{T}^{'+lep1_label+'} (GeV)','Events / '+bin_width+' GeV', 'dN/dp_{T}^{'+lep1_label+'} (1/GeV)']
titles['pt_2'] = ['p_{T}^{'+lep2_label+'} (GeV)','Events / '+bin_width+' GeV', 'dN/dp_{T}^{'+lep2_label+'} (1/GeV)']
titles['met'] = ['E_{T}^{miss} (GeV)','Events / '+bin_width+' GeV', 'dN/dE_{T}^{miss} (1/GeV)']
Expand Down

0 comments on commit ccd0a1c

Please sign in to comment.