ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/prepare_environment.py
(Generate patch)

Comparing UserCode/VHbb/python/prepare_environment.py (file contents):
Revision 1.5 by peller, Sat May 12 06:50:49 2012 UTC vs.
Revision 1.7 by peller, Fri May 25 08:15:00 2012 UTC

# Line 3 | Line 3 | from copytree import copytree
3   from printcolor import printc
4   from samplesclass import sample
5   import pickle
6 + import sys
7  
8 <
8 < prefix='ZllH.May8Reg.'
8 > prefix='ZllH.May23Like.'
9  
10   lumi=4980
11  
12 < pathIN='/scratch/May08/'
13 < pathOUT='/scratch/May08/env/'
12 > #pathIN='/scratch/May08/'
13 > #pathOUT='/scratch/May08/env/'
14 >
15 > pathIN=sys.argv[1]
16 > pathOUT=sys.argv[2]
17  
18   weightexpression='((0.46502*PUweight+0.53498*PUweight2011B)*weightTrig)'
19  
# Line 20 | Line 23 | Precut='& V.pt > 50 & V.mass > 75. & V.m
23  
24  
25   #Montecarlos
26 < InFiles0 = ['WW_TuneZ2_7TeV_pythia6_tauola', 'WZ_TuneZ2_7TeV_pythia6_tauola','ZZ_TuneZ2_7TeV_pythia6_tauola','TTJets_TuneZ2_7TeV-madgraph-tauola','T_TuneZ2_s-channel_7TeV-powheg-tauola','T_TuneZ2_t-channel_7TeV-powheg-tauola', 'T_TuneZ2_tW-channel-DR_7TeV-powheg-tauola','Tbar_TuneZ2_s-channel_7TeV-powheg-tauola','Tbar_TuneZ2_t-channel_7TeV-powheg-tauola', 'Tbar_TuneZ2_tW-channel-DR_7TeV-powheg-tauola','ZH_ZToLL_HToBB_M-110_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-115_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-120_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-125_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-130_7TeV-powheg-herwigpp']
27 < samplenames0 =['WW','WZ','ZZ','TT','ST_s','ST_t','ST_tW','STbar_s','STbar_t','STbar_tW','ZH110','ZH115','ZH120','ZH125','ZH130']
28 < sampletypes0 =['BKG','BKG','BKG','BKG','BKG','BKG','BKG','BKG','BKG','BKG','SIG','SIG','SIG','SIG','SIG']
29 < samplesgroup0=['VV','VV','VV','TT','ST','ST','ST','ST','ST','ST','ZH','ZH','ZH','ZH','ZH']
30 < xsecs0 = [42.9, 18.3, 5.9, 165, 3.19, 41.92, 7.87, 1.44, 22.65, 7.87, 0.4721*0.100974*0.745, 0.4107*0.100974*0.704, 0.3598*0.100974*0.648, 0.3158*0.100974*0.577, 0.2778*0.100974*0.493]
31 < SF0=[1.0,1.0,1.0,1.04,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
26 > InFiles0 = ['WW_TuneZ2_7TeV_pythia6_tauola', 'WZ_TuneZ2_7TeV_pythia6_tauola','ZZ_TuneZ2_7TeV_pythia6_tauola','TTJets_TuneZ2_7TeV-madgraph-tauola','T_TuneZ2_s-channel_7TeV-powheg-tauola','T_TuneZ2_t-channel_7TeV-powheg-tauola', 'T_TuneZ2_tW-channel-DR_7TeV-powheg-tauola','Tbar_TuneZ2_s-channel_7TeV-powheg-tauola','Tbar_TuneZ2_t-channel_7TeV-powheg-tauola', 'Tbar_TuneZ2_tW-channel-DR_7TeV-powheg-tauola','ZH_ZToLL_HToBB_M-110_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-115_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-120_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-125_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-130_7TeV-powheg-herwigpp','ZH_ZToLL_HToBB_M-135_7TeV-powheg-herwigpp']
27 > samplenames0 =['WW','WZ','ZZ','TT','ST_s','ST_t','ST_tW','STbar_s','STbar_t','STbar_tW','ZH110','ZH115','ZH120','ZH125','ZH130','ZH135']
28 > sampletypes0 =['BKG','BKG','BKG','BKG','BKG','BKG','BKG','BKG','BKG','BKG','SIG','SIG','SIG','SIG','SIG','SIG']
29 > samplesgroup0=['VV','VV','VV','TT','ST','ST','ST','ST','ST','ST','ZH','ZH','ZH','ZH','ZH','ZH']
30 > xsecs0 = [42.9, 18.3, 5.9, 165, 3.19, 41.92, 7.87, 1.44, 22.65, 7.87, 0.4721*0.100974*0.745, 0.4107*0.100974*0.704, 0.3598*0.100974*0.648, 0.3158*0.100974*0.577, 0.2778*0.100974*0.493,0.2453*0.100974*0.403]
31 > SF0=[1.0,1.0,1.0,1.03224,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]
32   Aprefix0 = ['']
33   cut0 = ['(Vtype == 1 || Vtype == 0) && EVENT.json && hbhe']
34  
# Line 36 | Line 39 | samplenames1 =['Zudsg','Zbb','Zcc']
39   sampletypes1 =['BKG']*3
40   samplesgroup1=['DYlight','DYb','DYc']
41   xsecs1 = [3048]*3
42 < SF1=[1.00,0.95,1.24]
42 > SF1=[1.0513,1.19108,0.970138]
43   Aprefix1 = ['udsg_120_', 'b_120_','c_120_']
44   cut1 = ['(Vtype == 1 || Vtype == 0) & EVENT.json & hbhe & eventFlav != 5 & eventFlav != 4 & genZpt <= 120.','(Vtype == 1 || Vtype == 0) & EVENT.json & hbhe & eventFlav == 5 & genZpt <= 120.','(Vtype == 1 || Vtype == 0) & EVENT.json & hbhe & eventFlav == 4 & genZpt <= 120.']
45  
# Line 46 | Line 49 | samplenames2 =['Zudsg_pt120','Zbb_pt120'
49   sampletypes2 =['BKG']*3
50   samplesgroup2=['DYlight','DYb','DYc']
51   xsecs2 = [30]*3
52 < SF2=[1.00,0.95,1.24]
52 > SF2=[1.0513,1.19108,0.970138]
53   Aprefix2 = ['udsg_120_', 'b_120_','c_120_']
54   cut2 = ['(Vtype == 1 || Vtype == 0) & EVENT.json & hbhe & eventFlav != 5 & eventFlav != 4 & genZpt > 120.','(Vtype == 1 || Vtype == 0) & EVENT.json & hbhe & eventFlav == 5 & genZpt > 120.','(Vtype == 1 || Vtype == 0) & EVENT.json & hbhe & eventFlav == 4 & genZpt > 120.']
55  
# Line 69 | Line 72 | info = []
72   # i>1 because no WW sample!!! only temporary fix
73  
74   for i in range(0,len(InFiles0)):
75 <    copytree(pathIN,pathOUT,prefix,InFiles0[i],Aprefix0[0],cut0[0]+Precut)
75 >    #copytree(pathIN,pathOUT,prefix,InFiles0[i],Aprefix0[0],cut0[0]+Precut)
76      info.append(sample(samplenames0[i],sampletypes0[i]))
77      info[-1].path=pathOUT
78      info[-1].identifier=Aprefix0[0]+InFiles0[i]
# Line 82 | Line 85 | for i in range(0,len(InFiles0)):
85      info[-1].addtreecut(cut0[0])
86  
87   for i in range(3):
88 <    copytree(pathIN,pathOUT,prefix,InFiles1[i],Aprefix1[i],cut1[i]+Precut)
88 >    #copytree(pathIN,pathOUT,prefix,InFiles1[i],Aprefix1[i],cut1[i]+Precut)
89      info.append(sample(samplenames1[i],sampletypes1[i]))
90      info[-1].path=pathOUT
91      info[-1].identifier=Aprefix1[i]+InFiles1[i]
# Line 95 | Line 98 | for i in range(3):
98      info[-1].addtreecut(cut1[i])
99      
100   for i in range(3):
101 <    copytree(pathIN,pathOUT,prefix,InFiles2[i],Aprefix2[i],cut2[i]+Precut)
101 >    #copytree(pathIN,pathOUT,prefix,InFiles2[i],Aprefix2[i],cut2[i]+Precut)
102      info.append(sample(samplenames2[i],sampletypes2[i]))
103      info[-1].path=pathOUT
104      info[-1].identifier=Aprefix2[i]+InFiles2[i]

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines