#include "StandardLabels.C" void t_distributionB(void) { TFile *f = new TFile("hd_root.root"); TH1D *t_all = (TH1D*)gROOT->FindObject("t_all"); TH1D *t_KK = (TH1D*)gROOT->FindObject("t_KK"); TH1D *t_PiPi = (TH1D*)gROOT->FindObject("t_PiPi"); TH1D *t_KK_coherent = (TH1D*)gROOT->FindObject("t_KK_coherent"); TH1D *t_coherent = (TH1D*)gROOT->FindObject("t_coherent"); TH1D *t_PiPi_coherent = (TH1D*)gROOT->FindObject("t_PiPi_coherent"); //gStyle->SetPadBottomMargin(0.15); //gStyle->SetPadRightMargin(0.2); t_coherent->Rebin(4); t_PiPi_coherent->Rebin(4); t_KK_coherent->Rebin(4); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); c1->SetGridy(); c1->SetLogy(); t_coherent->SetLineWidth(3); t_PiPi_coherent->SetLineWidth(3); t_KK_coherent->SetLineWidth(3); t_PiPi_coherent->SetLineColor(kRed); t_KK_coherent->SetLineColor(kBlue); t_coherent->SetTitle("PYTHIA generated #pi^{+}#pi^{-}"); t_coherent->SetXTitle("Invariant mass W of #pi^{+}#pi^{-} (GeV)"); t_coherent->SetStats(0); //t_all->GetYaxis()->SetRangeUser(1.0, 30000.0); t_coherent->Draw(); t_PiPi_coherent->Draw("same"); t_KK_coherent->Draw("same"); TLegend *leg = new TLegend(0.11, 0.75, 0.5, 0.89); leg->SetFillColor(kWhite); leg->AddEntry(t_coherent, "all reactions, coherent peak"); leg->AddEntry(t_PiPi_coherent, "#pi^{+}#pi^{-} coherent peak"); leg->AddEntry(t_KK_coherent, "K^{+}K^{-} coherent peak"); leg->Draw(); StandardLabels1D(t_coherent, "0.5^{o} #leq #theta_{#pm} #leq 10^{o}", "#gamma p #rightarrow p + - (?)", "generated events only", ""); c1->SaveAs("t_distributionB.pdf"); c1->SaveAs("t_distributionB.png"); }