#include "StandardLabels.C" void KK_background(void) { TFile *f = new TFile("hd_root.root"); TH1D *Wplus_minusKK = (TH1D*)gROOT->FindObject("Wplus_minusKK"); TH1D *WpipiKK = (TH1D*)gROOT->FindObject("WpipiKK"); TH1D *Wplus_minusKK_coherent = (TH1D*)gROOT->FindObject("Wplus_minusKK_coherent"); TH1D *WpipiKK_coherent = (TH1D*)gROOT->FindObject("WpipiKK_coherent"); //gStyle->SetPadBottomMargin(0.15); //gStyle->SetPadRightMargin(0.2); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); c1->SetGridy(); WpipiKK_coherent->SetLineColor(kMagenta); WpipiKK_coherent->SetFillColor(kMagenta); WpipiKK_coherent->SetFillStyle(3000); Wplus_minusKK->GetXaxis()->SetRangeUser(0.2, 1.1); Wplus_minusKK->SetTitle("PYTHIA generated background"); Wplus_minusKK->Draw(); WpipiKK->Draw("same"); WpipiKK_coherent->Draw("same"); TLegend *leg = new TLegend(0.15, 0.6, 0.75, 0.85); leg->SetFillColor(kWhite); leg->AddEntry(Wplus_minusKK, "perfect PID"); leg->AddEntry(WpipiKK, "No PID (pion assumption)"); leg->AddEntry(WpipiKK_coherent, "No PID (pion assumption) 8.5#leqE_{#gamma}#leq9.5"); leg->Draw(); StandardLabels1D(Wplus_minusKK, "0.5^{o} #leq #theta_{#pm} #leq 10^{o}", "#gamma p #rightarrow p K^{+} K^{-}", "generated events only", ""); c1->SaveAs("KK_background.pdf"); c1->SaveAs("KK_background.png"); }