31 |
|
help="path to samples") |
32 |
|
parser.add_option("-S", "--samples", dest="names", default="", |
33 |
|
help="samples you want to run on") |
34 |
< |
parser.add_option("-C", "--config", dest="config", default="", |
34 |
> |
parser.add_option("-C", "--config", dest="config", default=[], action="append", |
35 |
|
help="configuration file") |
36 |
|
(opts, args) = parser.parse_args(argv) |
37 |
|
if opts.config =="": |
42 |
|
|
43 |
|
#get locations: |
44 |
|
Wdir=config.get('Directories','Wdir') |
45 |
– |
|
45 |
|
MVAdir=config.get('Directories','MVAdir') |
46 |
|
|
47 |
|
#systematics |
69 |
|
doinfo=bool(int(opts.update)) |
70 |
|
|
71 |
|
MVAlist=arglist.split(',') |
72 |
+ |
MVAdir=config.get('Directories','vhbbpath') |
73 |
|
|
74 |
|
#CONFIG |
75 |
|
#factory |
83 |
|
#MVAinfofiles=[] |
84 |
|
MVAinfos=[] |
85 |
|
for MVAname in MVAlist: |
86 |
< |
MVAinfofile = open(Wdir+'/weights/'+factoryname+'_'+MVAname+'.info','r') |
86 |
> |
MVAinfofile = open(MVAdir+'/data/'+factoryname+'_'+MVAname+'.info','r') |
87 |
|
MVAinfos.append(pickle.load(MVAinfofile)) |
88 |
|
MVAinfofile.close() |
89 |
|
|
122 |
|
# reader.AddSpectator(spectators[i],MVA_spectator_buffer[i]) |
123 |
|
#Load raeder |
124 |
|
for i in range(0,len(readers)): |
125 |
< |
readers[i].BookMVA(MVAinfos[i].MVAname,MVAinfos[i].getweightfile()) |
125 |
> |
readers[i].BookMVA(MVAinfos[i].MVAname,MVAdir+'/data/'+MVAinfos[i].getweightfile()) |
126 |
|
#--> Now the MVA is booked |
127 |
|
|
128 |
|
#Apply samples |
135 |
|
if eval(job.active): |
136 |
|
if job.name in namelist: |
137 |
|
#get trees: |
138 |
< |
input = TFile.Open(job.getpath(),'read') |
138 |
> |
input = TFile.Open(Apath+'/'+job.getpath(),'read') |
139 |
|
outfile = TFile.Open(job.path+'/'+MVAdir+job.prefix+job.identifier+'.root','recreate') |
140 |
|
input.cd() |
141 |
|
obj = ROOT.TObject |