void pretty_plot_2g_bcal(){ gStyle->SetPadBottomMargin(0.15); gStyle->SetPadLeftMargin(0.2); gStyle->SetPadRightMargin(0.05); TCanvas *c1=new TCanvas("c1","c1",900,800); c1->cd(); TH1D *h1=(TH1D*)BCAL2GammaMassVsE_v2->ProjectionY("h1",11,30); h1->GetXaxis()->SetRangeUser(0.,0.3); h1->SetFillColor(5); TF1 *f1=new TF1("f1","gaus(0)+gaus(3)+pol2(6)",0.02,0.3); f1->SetParameters(18000,0.135,0.01,2000,0.135,0.02,100.); h1->Fit("f1","r"); h1->SetXTitle("M_{#gamma#gamma} [GeV/c^{2}]"); h1->GetXaxis()->SetLabelSize(0.045); h1->GetXaxis()->SetTitleSize(0.055); h1->SetYTitle("Candidates / 2 MeV/c^{2}"); h1->GetYaxis()->SetLabelSize(0.045); h1->GetYaxis()->SetTitleSize(0.055); h1->GetYaxis()->SetTitleOffset(1.75); h1->SetTitle("Barrel Lead-Scintillating Fiber Calorimeter"); h1->Draw("hist"); h1->Draw("same"); TLatex lat1; lat1.SetTextSize(0.045); lat1.DrawLatex(0.2,16000,"#frac{#sigma(M_{#gamma#gamma})}{M_{#gamma#gamma}}=6.8%"); lat1.SetTextSize(0.03); lat1.DrawLatex(0.18,14000,"1.0 GeV < E_{#gamma#gamma} < 3.0 GeV"); lat1.SetTextSize(0.04); lat1.DrawLatex(0.19,9500,"Design goal"); lat1.SetTextSize(0.03); lat1.DrawLatex(0.18,8000,"#frac{#sigma(E)}{E} = #frac{5.4%}{#sqrt{E[GeV]}} #oplus 2.3%"); }