#include using namespace std; #include "StandardLabels.C" void pip_theta_cm(void) { TFile *f1 = new TFile("../hd_root.root"); TH1D *theta_pip_cm_thrown = (TH1D*)gROOT->FindObject("theta_pip_cm_thrown"); TH1D *theta_pip_cm = (TH1D*)gROOT->FindObject("theta_pip_cm"); TCanvas *c1 = new TCanvas("c1"); c1->SetTicks(); c1->SetGridy(); double max = theta_pip_cm_thrown->GetMaximum()*1.05; TH2D *axes = new TH2D("axes", "#pi^{+} #theta_{CM}", 100, 0.0, 180.0, 100, 0.0, max); axes->SetStats(0); axes->SetXTitle("#theta CM (degrees)"); axes->Draw(); theta_pip_cm_thrown->SetLineColor(kBlack); theta_pip_cm_thrown->SetLineWidth(3); theta_pip_cm->SetLineColor(kRed); theta_pip_cm->SetLineWidth(3); theta_pip_cm_thrown->Draw("same"); theta_pip_cm->Draw("same"); TLegend *leg = new TLegend(0.651, 0.731, 0.892, 0.886); leg->SetFillColor(kWhite); leg->AddEntry(theta_pip_cm_thrown, "generated"); leg->AddEntry(theta_pip_cm, "reconstructed"); leg->Draw(); StandardLabels(axes, "100k #pi^{+}#pi^{-} events generated" , "E_{#gamma} =5.5GeV" , "P4 kinematic fit done." , ""); c1->SaveAs("pip_theta_cm.png"); c1->SaveAs("pip_theta_cm.pdf"); }