print 'after the selections, backgrounds are', backgrounds print 'after the selections, signals are', signals samples = [] samples = info.get_samples(signals + backgrounds) print "XXXXXXXXXXXXXXXX" print 'filelist is', filelist #tc = TreeCache(cuts,samples,path,config, []) #to be compatible with mergecaching tc = TreeCache( cuts, samples, path, config, filelist=filelist, mergeplot=opts.mergeplot, sample_to_merge=sample_to_cache_, mergeCachingPart=mergeCachingPart, plotMergeCached=opts.mergecachingplot, remove_sys=remove_sys_ ) # created cached tree i.e. create new skimmed trees using the list of cuts #for mergesubcaching step, need to continue even if some root files are missing to perform the caching in parallel if sample_to_cache_ or mergeCachingPart: tc = TreeCache(cuts, samples, path, config, filelist=filelist, mergeplot=opts.mergeplot, sample_to_merge=None,
MVA_Vars['Nominal'] = MVA_Vars['Nominal'].split(' ') #Infofile info = ParseInfo(samplesinfo, path) #Workdir workdir = ROOT.gDirectory.GetPath() TrainCut = '%s & EventForTraining==1' % TCut EvalCut = '%s & EventForTraining==0' % TCut cuts = [TrainCut, EvalCut] samples = [] samples = info.get_samples(signals + backgrounds) tc = TreeCache(cuts, samples, path, config) output = ROOT.TFile.Open(fnameOutput, "RECREATE") print '\n\t>>> READING EVENTS <<<\n' signal_samples = info.get_samples(signals) background_samples = info.get_samples(backgrounds) #TRAIN trees Tbackgrounds = [] TbScales = [] Tsignals = [] TsScales = [] #EVAL trees Ebackgrounds = []