ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/producePlots.py
Revision: 1.1
Committed: Fri Jul 19 10:12:50 2013 UTC (11 years, 9 months ago) by nmohr
Content type: text/x-python
Branch: MAIN
CVS Tags: HEAD
Error occurred while calculating annotation data.
Log Message:
Helper to produce all BDT plots

File Contents

# Content
1 import os, subprocess
2
3 def runPlot(opts):
4 command = './stack_from_dc.py -D %(dc)s -B %(bin)s -C %(config)s -V %(var)s' %(opts)
5 print command
6 subprocess.call([command], shell=True)
7 command = './stack_from_dc.py -D %(dc)s -B %(bin)s -C %(config)s -V %(var)s -M %(mlfit)s' %opts
8 print command
9 subprocess.call([command], shell=True)
10
11
12 def runAll():
13 path = '/shome/nmohr/VHbb/lhcp/DCs/VVBDTs/mBDT/'
14 configuration = '8TeVconfig/configPlotVVmBDT'
15 #path = '/shome/nmohr/VHbb/lhcp/DCs/VVBDTs/BDT/'
16 #configuration = '8TeVconfig/configPlotVVBDT'
17 modes = ['Wln','Wtn','Znn','Zll']
18 cards = {'Wln': 'combined_vhbb_DC_BDT_VV_8TeV.txt', 'Wtn': 'Wtn_BDT_newBinning_125_UsingVVasSignal.txt', 'Znn': 'vhbb_Znn_J12_combo_bbb_8TeV.txt', 'Zll': 'vhbb_DC_BDT_ZZbb_Zll_8TeV.txt'}
19 bins = {'Wln': [['ch1_Wenu','BDT_Wln_VV'],['ch1_Wenu2','BDT_Wln_VV'],['ch1_Wenu3','BDT_Wln_VV'],['ch2_Wmunu','BDT_Wln_VV'],['ch2_Wmunu2','BDT_Wln_VV'],['ch2_Wmunu3','BDT_Wln_VV']],'Wtn': [['Wtn','BDT_Wtn_VV']], 'Znn':[['ZnunuLowPt','BDT_Znn_VV_LowPt'],['ZnunuMedPt','BDT_Znn_VV_MedPt'], ['ZnunuHighPt','BDT_Znn_VV_HighPt']], 'Zll': [['ZmmLowPt','BDT_Zll_VV'],['ZmmHighPt','BDT_Zll_VV'],['ZeeLowPt','BDT_Zll_VV'],['ZeeHighPt','BDT_Zll_VV']]}
20
21
22 ####mBDT VH#########
23 path = '/shome/nmohr/VHbb/lhcp/DCs/Unblinding/Combo/mBDT/125/'
24 #path = '/shome/nmohr/VHbb/lhcp/DCs/Unblinding/Combo/Fix7TeV'
25 configuration = '8TeVconfig/configPlotmBDT'
26 #path = '/shome/nmohr/VHbb/lhcp/DCs/Unblinding/Combo/BDT/125/'
27 #configuration = '8TeVconfig/configPlotBDT'
28 #FOr VH
29 cards = {'Wln': 'vhbb_Wln_8TeV.txt', 'Wtn': 'vhbb_Wtn_8TeV.txt', 'Znn': 'vhbb_Znn_8TeV.txt', 'Zll': 'vhbb_Zll_8TeV.txt'}
30 bins = {'Wln': [['ch1_Wenu','BDT_Wln'],['ch1_Wenu2','BDT_Wln'],['ch1_Wenu3','BDT_Wln'],['ch1_Wenu3','BDT_Wln_Last'],['ch2_Wmunu','BDT_Wln'],['ch2_Wmunu2','BDT_Wln'],['ch2_Wmunu3','BDT_Wln'],['ch2_Wmunu3','BDT_Wln_Last']],'Wtn': [['Wtn','BDT_Wtn']], 'Znn':[['ZnunuLowPt_8TeV','BDT_Znn_LowPt'],['ZnunuMedPt_8TeV','BDT_Znn_MedPt'], ['ZnunuHighPt_8TeV','BDT_Znn_HighPt'], ['ZnunuHighPt_8TeV','BDT_Znn_HighPt_Last']], 'Zll': [['ZmmLowPt','BDT_Zll'],['ZmmHighPt','BDT_Zll'],['ZeeLowPt','BDT_Zll'],['ZeeHighPt','BDT_Zll']]}
31 ####MJJ VH#########
32 #path = '/shome/nmohr/VHbb/lhcp/DCs/Unblinding/Combo/MJJ/125/'
33 #configuration = '8TeVconfig/configPlotMJJ'
34 #bins = {'Wln': [['ch1_Wenu','MJJ_Wln'],['ch1_Wenu3','MJJ_Wln'],['ch2_Wmunu','MJJ_Wln'],['ch2_Wmunu2','MJJ_Wln'],['ch2_Wmunu3','MJJ_Wln']],'Wtn': [['Wtn','MJJ_Wtn']], 'Znn':[['ZnunuLowPt_8TeV','MJJ_Znn_LowPt'],['ZnunuMedPt_8TeV','MJJ_Znn_MedPt'], ['ZnunuHighPt_8TeV','MJJ_Znn_HighPt']], 'Zll': [['ZmmLowPt','MJJ_Zll'],['ZmmMedPt','MJJ_Zll'],['ZmmHighPt','MJJ_Zll'],['ZeeLowPt','MJJ_Zll'],['ZeeMedPt','MJJ_Zll'],['ZeeHighPt','MJJ_Zll']]}
35
36 ####7TeV#########
37 #path = '/shome/nmohr/VHbb/lhcp/DCs/Unblinding/Combo/Fix7TeV/'
38 #configuration = '8TeVconfig/configPlot7TeV'
39 #modes = ['Wln','Znn','Zll']
40 #modes = ['Wln']
41 #cards = {'Wln': 'vhbb_Wln_7TeV.txt', 'Znn': 'vhbb_Znn_7TeV.txt', 'Zll': 'vhbb_Zll_7TeV.txt'}
42 #bins = {'Wln': [['ch1_Wenu','BDT_Wln'],['ch1_Wenu2','BDT_Wln'],['ch2_Wmunu','BDT_Wln'],['ch2_Wmunu2','BDT_Wln']], 'Znn':[['ch1','BDT_Znn'], ['ch2','BDT_Znn']], 'Zll': [['card1','BDT_Zll'],['card2','BDT_Zll'],['card3','BDT_Zll'],['card4','BDT_Zll']]}
43 for mode in modes:
44 for bin in bins[mode]:
45 opts = {}
46 opts['bin'] = bin[0]
47 opts['var'] = bin[1]
48 opts['config'] = '%s' %configuration
49 opts['dc'] = '%s%s' %(path,cards[mode])
50 opts['mlfit'] = '%s/mlfit.root' %(path)
51 runPlot(opts)
52
53 runAll()