hist_pre_tag.rescale(1 / (hist_pre_tag.bins()[1] - hist_pre_tag.bins()[0])) if flavor == 'BB': color = 'mediumblue' elif flavor == 'BL': color = 'cornflowerblue' elif flavor == 'CC': color = 'seagreen' elif flavor == 'CL': color = 'mediumspringgreen' else: color = 'gold' plt.figure(1) plt.bar(hist_post_tag.bins(), hist_post_tag.frequencies(), width = (hist_post_tag.bins()[1] - hist_post_tag.bins()[0]), color = color, edgecolor = 'black',\ linewidth = 0.5, bottom = accum_hist_post_tag.frequencies(), label = flavor) plt.figure(2) plt.bar(hist_pre_tag.bins(), hist_pre_tag.frequencies(), width = (hist_pre_tag.bins()[1] - hist_pre_tag.bins()[0]), color = color, edgecolor = 'black', \ linewidth = 0.5, bottom = accum_hist_pre_tag.frequencies(), label = flavor) accum_hist_post_tag.combine(hist_post_tag) accum_hist_pre_tag.combine(hist_pre_tag) # Plotting Data print '...processing Data histograms...' hist_tag_name = pt_label + '_2TAG_LL_' + var + '.pickle' hist_notag_name = pt_label + '_NOT2TAG_LL_' + var + '.pickle' with open(os.path.join(directory, 'Data', var, hist_tag_name), 'rb') as f: hist_post_tag = pickle.load(f) with open(os.path.join(directory, 'Data', var, hist_notag_name), 'rb') as f: