def plot_dNdpT(self, pid_selection): """ Plot dNdpT particles in pid_selection Parameters ---------- pid_selection : str Either all charged particles ('ch') or 'pi', 'K' or 'p' """ log.info("1/N_evts dN_ch/dpT plots") figs = [] for sums_est_dir, res_est_dir in zip(get_est_dirs(self.sums, self.considered_ests), get_est_dirs(self.results_post, self.considered_ests)): if sums_est_dir.GetName() != res_est_dir.GetName(): raise IndexError("Order of estimator dirs is different in sums and results_post") res_dir_str = res_est_dir.GetPath().split(":")[1] fig = Figure() fig.plot.palette = 'colorblind' # fig.plot.ncolors = 5 fig.legend.position = 'tr' fig.ytitle = "1/N_{evts} dN/dp_{T} (" + make_estimator_title(sums_est_dir.GetName()) + ")" fig.xtitle = "p_{T} (GeV)" fig.plot.logy = True hists = [] if pid_selection == 'ch': fig.legend.title = "#pi^{#pm}, K^{#pm}, p, #Lambda, #Xi, #Omega" pid_numbers = [kPIMINUS, kPIPLUS, kKMINUS, kKPLUS, kPROTON, kANTIPROTON, kLAMBDA, kANTILAMBDA, kXI, kANTIXI, kOMEGAMINUS, kOMEGAPLUS] if pid_selection == 'pi': fig.legend.title = "#pi^{#pm}" pid_numbers = [kPIMINUS, kPIPLUS] if pid_selection == 'K': fig.legend.title = "K^{#pm}" pid_numbers = [kKMINUS, kKPLUS] if pid_selection == 'p': fig.legend.title = "p, #bar{p}" pid_numbers = [kPROTON, kANTIPROTON] for perc_bin, classifier_bin in zip(self.perc_bins[sums_est_dir.GetName()], self.nch_edges[sums_est_dir.GetName()]): hists.append(get_pT_distribution(res_est_dir, pid_numbers, classifier_bin, normalized=False)) hists[-1].title = "{0}%-{1}%".format(perc_bin[1] * 100, perc_bin[0] * 100) # add MB last to be consistent with colors in other plots; the very first and very last bin we look at classifier_bin_mb = (self.nch_edges[sums_est_dir.GetName()][0][0], self.nch_edges[sums_est_dir.GetName()][-1][-1]) hists.append(get_pT_distribution(res_est_dir, pid_numbers, classifier_bin_mb, normalized=False)) hists[-1].title = "MB" # scale by bin width [h.Scale(1, "width") for h in hists] [fig.add_plottable(p, p.title) for p in hists] fig.save_to_root_file(self.f_out, "dN{0}dpT".format(pid_selection), res_dir_str) figs.append(fig) return figs
def plot_dNdpT(self, pid_selection): """ Plot dNdpT particles in pid_selection Parameters ---------- pid_selection : str Either all charged particles ('ch') or 'pi', 'K' or 'p' """ log.info("1/N_evts dN_ch/dpT plots") figs = [] for sums_est_dir, res_est_dir in zip(get_est_dirs(self.sums, self.considered_ests), get_est_dirs(self.results_post, self.considered_ests)): if sums_est_dir.GetName() != res_est_dir.GetName(): raise IndexError("Order of estimator dirs is different in sums and results_post") res_dir_str = res_est_dir.GetPath().split(":")[1] fig = Figure() fig.plot.palette = 'colorblind' # fig.plot.ncolors = 5 fig.legend.position = 'tr' fig.ytitle = "1/N_{evts} dN/dp_{T} (" + make_estimator_title(sums_est_dir.GetName()) + ")" fig.xtitle = "p_{T} (GeV)" fig.plot.logy = True hists = [] if pid_selection == 'ch': fig.legend.title = "#pi^{#pm}, K^{#pm}, p, #Lambda, #Xi, #Omega" pid_numbers = [kPIMINUS, kPIPLUS, kKMINUS, kKPLUS, kPROTON, kANTIPROTON, kLAMBDA, kANTILAMBDA, kXI, kANTIXI, kOMEGAMINUS, kOMEGAPLUS] if pid_selection == 'pi': fig.legend.title = "#pi^{#pm}" pid_numbers = [kPIMINUS, kPIPLUS] if pid_selection == 'K': fig.legend.title = "K^{#pm}" pid_numbers = [kKMINUS, kKPLUS] if pid_selection == 'p': fig.legend.title = "p, #bar{p}" pid_numbers = [kPROTON, kANTIPROTON] for perc_bin, classifier_bin in zip(self.perc_bins[sums_est_dir.GetName()], self.nch_edges[sums_est_dir.GetName()]): hists.append(get_pT_distribution(res_est_dir, pid_numbers, classifier_bin, normalized=False)) hists[-1].title = "{0}%-{1}%".format(perc_bin[1] * 100, perc_bin[0] * 100) # add MB last to be consistent with colors in other plots; the very first and very last bin we look at classifier_bin_mb = (self.nch_edges[sums_est_dir.GetName()][0][0], self.nch_edges[sums_est_dir.GetName()][-1][-1]) hists.append(get_pT_distribution(res_est_dir, pid_numbers, classifier_bin_mb, normalized=False)) hists[-1].title = "MB" # scale by bin width [h.Scale(1, "width") for h in hists] [fig.add_plottable(p, p.title) for p in hists] fig.save_to_root_file(self.f, "dN{0}dpT".format(pid_selection), res_dir_str) figs.append(fig) return figs
def plot_pT_HM_div_pt_MB(self, scale_nMPI): log.info("Plot dN_{HM}/dpT / dN_{MB}/dpT ratios scaled with nMPI") figs = [] for sums_est_dir, res_est_dir in zip(get_est_dirs(self.sums, self.considered_ests), get_est_dirs(self.results_post, self.considered_ests)): if sums_est_dir.GetName() != res_est_dir.GetName(): raise IndexError("Order of estimator dirs is different in sums and results_post") res_dir_str = res_est_dir.GetPath().split(":")[1] fig = Figure() fig.plot.palette = 'root' fig.plot.ncolors = 7 fig.xtitle = "p_{T} (GeV)" fig.legend.title = make_estimator_title(sums_est_dir.GetName()) if scale_nMPI: fig.ytitle = ("#left[ #frac{dN^{HM}}{dp_{T}} / #frac{dN^{MB}}{dp_{T}} #right] " "#times #left[ #frac{<N_{MPI}^{MB}>}{<N_{MPI}^{HM}>} #right]") else: fig.ytitle = "#frac{dN^{HM}}{dp_{T}} / #frac{dN^{MB}}{dp_{T}}" charged_particles = [kPIMINUS, kPIPLUS, kKMINUS, kKPLUS, kPROTON, kANTIPROTON, kLAMBDA, kANTILAMBDA, kXI, kANTIXI, kOMEGAMINUS, kOMEGAPLUS] # get the MB distribution which will be used to devide the nch-binned distributions classifier_bin_mb = (self.nch_edges[sums_est_dir.GetName()][0][0], self.nch_edges[sums_est_dir.GetName()][-1][-1]) pt_dist_mb = get_pT_distribution(res_est_dir, charged_particles, classifier_bin_mb, normalized=False) mean_nmpi_mb = get_mean_nMPI(sums_est_dir, classifier_bin_mb) for perc_bin, classifier_bin in zip(self.perc_bins[sums_est_dir.GetName()], self.nch_edges[sums_est_dir.GetName()]): # get the pt distribution in this Nch interval pt_dist_in_interval = get_pT_distribution(res_est_dir, charged_particles, classifier_bin, normalized=False) title = "{0}%-{1}%".format(perc_bin[1] * 100, perc_bin[0] * 100) if scale_nMPI: mean_nmpi_hm = get_mean_nMPI(sums_est_dir, classifier_bin) fig.add_plottable((pt_dist_in_interval / pt_dist_mb) * (mean_nmpi_mb / mean_nmpi_hm), title) name = "pt_hm_div_pt_mb_scaled_nMPI" else: fig.add_plottable((pt_dist_in_interval / pt_dist_mb), title) name = "pt_hm_div_pt_mb" fig.save_to_root_file(self.f_out, name, res_dir_str) figs.append(fig) return figs
def plot_pT_HM_div_pt_MB(self, scale_nMPI): log.info("Plot dN_{HM}/dpT / dN_{MB}/dpT ratios scaled with nMPI") figs = [] for sums_est_dir, res_est_dir in zip(get_est_dirs(self.sums, self.considered_ests), get_est_dirs(self.results_post, self.considered_ests)): if sums_est_dir.GetName() != res_est_dir.GetName(): raise IndexError("Order of estimator dirs is different in sums and results_post") res_dir_str = res_est_dir.GetPath().split(":")[1] fig = Figure() fig.plot.palette = 'root' fig.plot.ncolors = 7 fig.xtitle = "p_{T} (GeV)" fig.legend.title = make_estimator_title(sums_est_dir.GetName()) if scale_nMPI: fig.ytitle = ("#left[ #frac{dN^{HM}}{dp_{T}} / #frac{dN^{MB}}{dp_{T}} #right] " "#times #left[ #frac{<N_{MPI}^{MB}>}{<N_{MPI}^{HM}>} #right]") else: fig.ytitle = "#frac{dN^{HM}}{dp_{T}} / #frac{dN^{MB}}{dp_{T}}" charged_particles = [kPIMINUS, kPIPLUS, kKMINUS, kKPLUS, kPROTON, kANTIPROTON, kLAMBDA, kANTILAMBDA, kXI, kANTIXI, kOMEGAMINUS, kOMEGAPLUS] # get the MB distribution which will be used to devide the nch-binned distributions classifier_bin_mb = (self.nch_edges[sums_est_dir.GetName()][0][0], self.nch_edges[sums_est_dir.GetName()][-1][-1]) pt_dist_mb = get_pT_distribution(res_est_dir, charged_particles, classifier_bin_mb, normalized=False) mean_nmpi_mb = get_mean_nMPI(sums_est_dir, classifier_bin_mb) for perc_bin, classifier_bin in zip(self.perc_bins[sums_est_dir.GetName()], self.nch_edges[sums_est_dir.GetName()]): # get the pt distribution in this Nch interval pt_dist_in_interval = get_pT_distribution(res_est_dir, charged_particles, classifier_bin, normalized=False) title = "{0}%-{1}%".format(perc_bin[1] * 100, perc_bin[0] * 100) if scale_nMPI: mean_nmpi_hm = get_mean_nMPI(sums_est_dir, classifier_bin) fig.add_plottable((pt_dist_in_interval / pt_dist_mb) * (mean_nmpi_mb / mean_nmpi_hm), title) name = "pt_hm_div_pt_mb_scaled_nMPI" else: fig.add_plottable((pt_dist_in_interval / pt_dist_mb), title) name = "pt_hm_div_pt_mb" fig.save_to_root_file(self.f, name, res_dir_str) figs.append(fig) return figs
def plot_pt_distribution_ratios(self): # create particle ratio vs pT plots log.info("Computing histograms vs pt") results_path = self.results_post.GetPath().split(":")[1] # file.root:/internal/root/path # Loop over all estimators in the Sums list: figs = [] def get_new_figure(): fig = Figure() fig.xtitle = 'p_{T} (GeV)' fig.plot.ymin = 0 fig.plot.xmax = 10 fig.plot.palette = 'colorblind' # fig.plot.palette_ncolors = len(nch_edges) - 1 fig.legend.position = 'br' return fig for est_dir in get_est_dirs(self.results_post, self.considered_ests): dirname = '{0}/{1}/pid_ratios/'.format(results_path, est_dir.GetName()) mult_binned_pt_dists = {} mult_binned_pt_dists['proton'] = [ get_pT_distribution(est_dir, [kANTIPROTON, kPROTON], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['pi_ch'] = [ get_pT_distribution(est_dir, [kPIMINUS, kPIPLUS], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['xi'] = [ get_pT_distribution(est_dir, [kANTIXI, kXI], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['omega'] = [ get_pT_distribution(est_dir, [kOMEGAMINUS, kOMEGAPLUS], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['lambda'] = [ get_pT_distribution(est_dir, [kANTILAMBDA, kLAMBDA], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['k0s'] = [ get_pT_distribution(est_dir, [kK0S], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['k_ch'] = [ get_pT_distribution(est_dir, [kKPLUS, kKMINUS], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['pi0'] = [ get_pT_distribution(est_dir, [kPI0], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] perc_titles = ["{0}%-{1}%".format(perc_bin[1] * 100, perc_bin[0] * 100) for perc_bin in self.perc_bins[est_dir.GetName()]] fig = get_new_figure() name = "proton_over_pich__vs__pt" fig.ytitle = "(p+#bar{p})/#pi^{+-}" fig.plot.ymax = .3 fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['proton'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "Xi_over_pich__vs__pt" fig.plot.ymax = .06 fig.legend.position = 'tl' fig.ytitle = "#Xi/#pi^{+-}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['xi'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "OmegaCh_over_pich__vs__pt" fig.plot.ymax = .005 fig.legend.position = 'tl' fig.ytitle = "#Omega_{ch}/#pi^{+-} " fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['omega'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) # Ratios to pi0 fig = get_new_figure() name = "pich_over_pi0__vs__pt" fig.plot.ymax = 2.5 fig.legend.position = 'bl' fig.ytitle = "#pi^{+-}/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['pi_ch'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "proton_over_pi0__vs__pt" fig.plot.ymax = 1 fig.legend.position = 'tr' fig.ytitle = "p/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['proton'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "K0S_over_pi0__vs__pt" fig.plot.ymax = 1.4 fig.legend.position = 'tl' fig.ytitle = "K^{0}_{S}/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['k0s'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "Lambda_over_pi0__vs__pt" fig.plot.ymax = .9 fig.legend.position = 'tl' fig.ytitle = "#Lambda/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['lambda'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "Xi_over_pi0__vs__pt" fig.plot.ymax = .08 fig.legend.position = 'tl' fig.ytitle = "#Xi/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['xi'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "OmegaCh_over_pi0__vs__pt" fig.plot.ymax = .005 fig.legend.position = 'tl' fig.ytitle = "#Omega_{ch}/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['omega'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) # Ratios to K0S fig = get_new_figure() name = "proton_over_K0S__vs__pt" fig.plot.ymax = 2.6 fig.legend.position = 'tr' fig.ytitle = "p/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['proton'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "Lambda_over_K0S__vs__pt" fig.plot.ymax = 1 fig.legend.position = 'bl' fig.ytitle = "#Lambda/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['lambda'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "Xi_over_K0S__vs__pt" fig.plot.ymax = .2 fig.legend.position = 'tl' fig.ytitle = "#Xi/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['xi'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "OmegaCh_over_K0S__vs__pt" fig.plot.ymax = .012 fig.legend.position = 'tl' fig.ytitle = "#Omega_{ch}/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['omega'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) fig = get_new_figure() name = "Kaon_over_pich__vs__pt" fig.plot.ymax = 1 fig.legend.position = 'tl' fig.ytitle = "(K^{+} + K^{-}) / (#pi^{+} +#pi^{-})" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['k_ch'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f_out, name, dirname) figs.append(fig) return figs
def plot_pt_distribution_ratios(self): # create particle ratio vs pT plots log.info("Computing histograms vs pt") results_path = self.results_post.GetPath().split(":")[1] # file.root:/internal/root/path # Loop over all estimators in the Sums list: figs = [] def get_new_figure(): fig = Figure() fig.xtitle = 'p_{T} (GeV)' fig.plot.ymin = 0 fig.plot.xmax = 10 fig.plot.palette = 'colorblind' # fig.plot.palette_ncolors = len(nch_edges) - 1 fig.legend.position = 'br' return fig for est_dir in get_est_dirs(self.results_post, self.considered_ests): dirname = '{0}/{1}/pid_ratios/'.format(results_path, est_dir.GetName()) mult_binned_pt_dists = {} mult_binned_pt_dists['proton'] = [ get_pT_distribution(est_dir, [kANTIPROTON, kPROTON], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['pi_ch'] = [ get_pT_distribution(est_dir, [kPIMINUS, kPIPLUS], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['xi'] = [ get_pT_distribution(est_dir, [kANTIXI, kXI], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['omega'] = [ get_pT_distribution(est_dir, [kOMEGAMINUS, kOMEGAPLUS], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['lambda'] = [ get_pT_distribution(est_dir, [kANTILAMBDA, kLAMBDA], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['k0s'] = [ get_pT_distribution(est_dir, [kK0S], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['k_ch'] = [ get_pT_distribution(est_dir, [kKPLUS, kKMINUS], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] mult_binned_pt_dists['pi0'] = [ get_pT_distribution(est_dir, [kPI0], classifier_bin_interval) for classifier_bin_interval in self.nch_edges[est_dir.GetName()] ] perc_titles = ["{0}%-{1}%".format(perc_bin[1] * 100, perc_bin[0] * 100) for perc_bin in self.perc_bins[est_dir.GetName()]] fig = get_new_figure() name = "proton_over_pich__vs__pt" fig.ytitle = "(p+#bar{p})/#pi^{+-}" fig.plot.ymax = .3 fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['proton'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "Xi_over_pich__vs__pt" fig.plot.ymax = .06 fig.legend.position = 'tl' fig.ytitle = "#Xi/#pi^{+-}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['xi'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "OmegaCh_over_pich__vs__pt" fig.plot.ymax = .005 fig.legend.position = 'tl' fig.ytitle = "#Omega_{ch}/#pi^{+-} " fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['omega'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) # Ratios to pi0 fig = get_new_figure() name = "pich_over_pi0__vs__pt" fig.plot.ymax = 2.5 fig.legend.position = 'bl' fig.ytitle = "#pi^{+-}/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['pi_ch'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "proton_over_pi0__vs__pt" fig.plot.ymax = 1 fig.legend.position = 'tr' fig.ytitle = "p/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['proton'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "K0S_over_pi0__vs__pt" fig.plot.ymax = 1.4 fig.legend.position = 'tl' fig.ytitle = "K^{0}_{S}/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['k0s'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "Lambda_over_pi0__vs__pt" fig.plot.ymax = .9 fig.legend.position = 'tl' fig.ytitle = "#Lambda/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['lambda'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "Xi_over_pi0__vs__pt" fig.plot.ymax = .08 fig.legend.position = 'tl' fig.ytitle = "#Xi/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['xi'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "OmegaCh_over_pi0__vs__pt" fig.plot.ymax = .005 fig.legend.position = 'tl' fig.ytitle = "#Omega_{ch}/#pi^{0}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['omega'], mult_binned_pt_dists['pi0'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) # Ratios to K0S fig = get_new_figure() name = "proton_over_K0S__vs__pt" fig.plot.ymax = 2.6 fig.legend.position = 'tr' fig.ytitle = "p/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['proton'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "Lambda_over_K0S__vs__pt" fig.plot.ymax = 1 fig.legend.position = 'bl' fig.ytitle = "#Lambda/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['lambda'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "Xi_over_K0S__vs__pt" fig.plot.ymax = .2 fig.legend.position = 'tl' fig.ytitle = "#Xi/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['xi'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "OmegaCh_over_K0S__vs__pt" fig.plot.ymax = .012 fig.legend.position = 'tl' fig.ytitle = "#Omega_{ch}/K^{0}_{S}" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['omega'], mult_binned_pt_dists['k0s'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) fig = get_new_figure() name = "Kaon_over_pich__vs__pt" fig.plot.ymax = 1 fig.legend.position = 'tl' fig.ytitle = "(K^{+} + K^{-}) / (#pi^{+} +#pi^{-})" fig.legend.title = make_estimator_title(est_dir.GetName()) [ fig.add_plottable(h1 / h2, legend_title=title) for h1, h2, title in zip(mult_binned_pt_dists['k_ch'], mult_binned_pt_dists['pi_ch'], perc_titles) ] fig.save_to_root_file(self.f, name, dirname) figs.append(fig) return figs