37 |
|
if opts.config =="": |
38 |
|
opts.config = "config" |
39 |
|
config = BetterConfigParser() |
40 |
+ |
#config.read('./config7TeV_ZZ') |
41 |
|
config.read(opts.config) |
42 |
|
anaTag = config.get("Analysis","tag") |
43 |
|
|
44 |
|
#get locations: |
45 |
|
Wdir=config.get('Directories','Wdir') |
46 |
< |
MVAdir=config.get('Directories','MVAdir') |
46 |
> |
MVASubdir=config.get('Directories','MVAdir') |
47 |
> |
samplesinfo=config.get('Directories','samplesinfo') |
48 |
|
|
49 |
|
#systematics |
50 |
|
systematics=config.get('systematics','systematics') |
60 |
|
#Evaluate multi: Must Have same treeVars!!! |
61 |
|
|
62 |
|
Apath=opts.path |
63 |
< |
infofile = open(Apath+'/samples.info','r') |
63 |
> |
infofile = open(samplesinfo,'r') |
64 |
|
info = pickle.load(infofile) |
65 |
|
infofile.close() |
66 |
|
arglist=opts.discr #RTight_blavla,bsbsb |
128 |
|
#--> Now the MVA is booked |
129 |
|
|
130 |
|
#Apply samples |
131 |
< |
infofile = open(Apath+'/samples.info','r') |
131 |
> |
infofile = open(samplesinfo,'r') |
132 |
|
Ainfo = pickle.load(infofile) |
133 |
|
infofile.close() |
134 |
|
|
138 |
|
if job.name in namelist: |
139 |
|
#get trees: |
140 |
|
input = TFile.Open(Apath+'/'+job.getpath(),'read') |
141 |
< |
outfile = TFile.Open(job.path+'/'+MVAdir+job.prefix+job.identifier+'.root','recreate') |
141 |
> |
outfile = TFile.Open(Apath+'/'+MVASubdir+job.prefix+job.identifier+'.root','recreate') |
142 |
|
input.cd() |
143 |
|
obj = ROOT.TObject |
144 |
|
for key in ROOT.gDirectory.GetListOfKeys(): |
254 |
|
for MVAinfo in MVAinfos: |
255 |
|
job.addcomment('Added MVA %s'%MVAinfo.MVAname) |
256 |
|
job.addpath(MVAdir) |
257 |
< |
infofile = open(Apath+MVAdir+'/samples.info','w') |
257 |
> |
infofile = open(samplesinfo,'w') |
258 |
|
pickle.dump(Ainfo,infofile) |
259 |
|
infofile.close() |
260 |
|
|