in_files = glob.glob(os.path.join(base_path_in, '*')) merge(in_files, __file__, jobs, ('sample', 'subJob'), argParser, istest=args.isTest) if args.inData: os.system("hadd -f " + base_path_in + "/events.root " + base_path_in + '/*/events.root') samples_to_plot = ['Data'] if args.inData else sample_manager.getOutputs() for sample_output in samples_to_plot: if args.isTest and sample_output != 'DY': continue if args.inData: output_dir = makePathTimeStamped(base_path_out) in_file = base_path_in + '/events.root' else: output_dir = makePathTimeStamped(base_path_out + '/' + sample_output) in_file = base_path_in + '/' + sample_output + '/events.root' fakerates = createFakeRatesWithJetBins('tauttl', None, None, in_file) for fr in fakerates.bin_collection: ttl = fakerates.getFakeRate(fr).getEfficiency() p = Plot(signal_hist=ttl, name='ttl_' + fr, year=int(args.year)) p.draw2D(output_dir=output_dir, names=['ttl_' + fr])
if args.separateTriggers == 'cumulative': out_dir = os.getcwd( ) + '/data/Results/' + args.separateTriggers + '/' + f_name + '/' + timestamp p = Plot(eff_list, trigger_list, trigger_cat_name + '_' + v, eff_list[0].GetXaxis().GetTitle(), eff_list[0].GetYaxis().GetTitle(), extra_text=extra_text) names = [ trigger_cat_name + '_' + v + '_' + k for k in trigger_list ] if '2D' in v: p.draw2D(output_dir=out_dir + '/' + sample, names=names) else: p.drawHist(output_dir=out_dir + '/' + sample) else: to_merge = [eff_list[c] for c in CATEGORIES] eff_lists['all'] = mergeEfficiencies(to_merge, 'all') for v in eff_lists['all'].keys(): eff_list = [eff.getEfficiency() for eff in eff_lists['all'][v]] out_dir = os.getcwd() + '/data/Results/' + str( args.separateTriggers) + '/' + f_name + '/' + timestamp p = Plot(eff_list, trigger_list, v, eff_list[0].GetXaxis().GetTitle(), eff_list[0].GetYaxis().GetTitle(),