This repository has been archived by the owner on Sep 14, 2022. It is now read-only.
/
testPlot.py
56 lines (51 loc) · 2.82 KB
/
testPlot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import datetime
start=datetime.datetime.now()
from input import *
flist=[]
#samples=samplespowheg
#samples.remove('stop')
for s in samples:
for f in groups[s]['sets']:
flist.append(f)
flist.append("data")
flist.append("ap-350")
flist.append("pp-350")
from extLibFull import filterByCutHDF,plotHDF,getModel
model=getModel('BP4')
from pylab import *
print "Starting processing...",
fnam="BP4-4l"
#fnam="BP4-3l"
varList=['mp']
nbin=[25]
xl=[r'$m(\ell^\pm\ell^\pm)$ [GeV]']
yl=[r'Events / 20 GeV']
xr=[[10,510]]
#xl=[r'$E^{miss}_{T}$ [GeV]']
#yl=[r'N events / 5 GeV']
#xr=[[0,100]]
ll=[1]
#cut1='~lowMassRes & (nlep>3) & (isoworst<0.35) & (sipworst<4) & (tWorstId>1)'
cut1='~lowMassRes & (nlep>3) & (ntau<3) & (isoworst<0.35) & (sipworst<4) & (tWorstId>1)' # 4-lep
#cut1='~lowMassRes & (nlep==3) & (ntau<2) & (isoworst<0.35) & (sipworst<4) & (tWorstId>1)' # 3-lep
#cut1='(nlep==3) & (isoworst<0.35) & (sipworst<4) & (sumpt>0.85*275+125) & (dz>80) & (phi1<0.005*275+1.15) & (met>20)'
#cut1='(nlep==3) & (ntau==0) & (isoworst<0.35) & (sipworst<4) & (sumpt>0.85*275+125) & (dz>80) & (phi1<0.005*275+1.15) & (met>20) & ~lowMassRes & (tWorstId>1)'
#cut2='(nlep==3) & (ntau==1) & (isoworst<0.35) & (sipworst<4) & (sumpt>0.85*275+125) & (dz>80) & (phi1<0.005*275+1.15) & (met>20) & ~lowMassRes & (tWorstId>1)'
#cut1='recoPass & (nlep==3) & (isoworst<0.35) & (sipworst<4) & (sumpt>0.85*130+125) & (dz>80) & (phi1<0.005*130+1.15) & (met>20) & ~lowMassRes'
#cut1='recoPass & (nlep==3) & (ntau==0) & (isoworst<0.35) & (sipworst<4) & (sumpt>0.85*130+125) & (dz>80) & (phi1<0.005*130+1.15) & (met>20) & ~lowMassRes'
#cut1='recoPass & (nlep==3) & (ntau==0) & (isoworst<0.35) & (sipworst<4) & (sumpt>0.85*130+125) & (dz>80) & (phi1<0.005*130+1.15) & (met>20) & ~lowMassRes'
#cut2='recoPass & (nlep==3) & (ntau==1) & (isoworst<0.35) & (sipworst<4) & (sumpt>0.85*130+125) & (dz>80) & (phi1<0.005*130+1.15) & (met>20) & ~lowMassRes'
#cut1='(nlep==3) & (ntau<2) & (isoworst<0.35) & (sipworst<4) & ~lowMassRes & recoPass & (tWorstId>1) & (sumpt>0.85*250+125) & (dz>80) & (phi1<0.005*250+1.15) & (met>20)'
#cut1='recoPass & (nlep==3) & (ntau==0) & (isoworst<0.35) & (sipworst<4)'
#cut1='recoPass & ~lowMassRes & (nlep==3) & (isoworst<0.35) & (sipworst<4) & (tWorstId>1) & (dz<30) & (sumpt>150)'
#cut1='recoPass & ~lowMassRes & (nlep>2) & (isoworst<0.35) & (sipworst<4) & (tWorstId>1)'
#cut1='recoPass & ~lowMassRes & (nlep==3) & (isoworst<0.35) & (sipworst<4) & (dz<80) & (sumpt>0.85*275+125) & (phi1<0.005*275+1.15) & (met>20)'
filt1=filterByCutHDF(flist,cut1,varList,model)
#filt2=filterByCutHDF(flist,cut2,varList,model)
#fnam="BP4-4l"
plotHDF(filt1,samples,"appp",350,getModel("BP4"),varList,xl,yl,nbin,xr,fnam+'.pdf',ll,showRatio=False)
savefig(fnam+'.png')
draw()
#fnam="BP4-3l-1tau-medTau"
#plotHDF(filt2,samples,"appp",275,getModel("BP4"),varList,xl,yl,nbin,xr,fnam+'.png')
#draw()