{ float sigma1[4]={163.5,20.44,58.95,19.93}; float sigma2[4]={158.3,13.89,34.92,13.11}; int i; TCanvas *c1 = new TCanvas("c1","With and without PXD",10,10,900,500); gStyle->SetOptStat(0); c1->SetGrid(); c1->SetBottomMargin(0.15); c1->SetFillColor(42); c1->SetGrid(); c1->GetFrame()->SetFillColor(21); c1->GetFrame()->SetBorderSize(12); TH2F *cmph= new TH2F("hist","hist",500,0,170,500,0,170); cmph->SetMarkerStyle(20); cmph->SetMarkerSize(2); cmph->SetTitle("Compare sigmas"); cmph->GetXaxis()->SetTitle("simga2"); cmph->GetYaxis()->SetTitle("sigma1"); cmph->Draw(); TF1 f1("f1","x",0.,170.); f1.Draw("same"); f1.GetYaxis()->SetRangeUser(0, 170); auto m = new TMarker(); // m->SetMarkerColor(kRed); // c1->cd(2); // gPad->SetLogz(); // h2->Draw("contz"); // int i; // c1->Update(); float x,y; for (i=0;i<4;i++) { m->SetMarkerStyle(23+i); m->DrawMarker(sigma2[i],sigma1[i]); x = 20.; y = 140 - i*20; m->DrawMarker(x,y); x = 25.; y = 140 - i*20; //if(i == 0) xlabel->DrawText(x, y, "z0 sigma (reconstructed)"); //if(i == 1) xlabel->DrawText(x, y, "d0 sigma (reconstructed)"); //if(i == 2) xlabel->DrawText(x, y, "z0 sigma (detector)"); // if(i == 3) xlabel->DrawText(x, y, "d0 sigma (detector)"); if(i == 0) { // auto txt = "#color[804]{My text #mu {}^{40}_{20}Ca}" auto txt1 = "z0 sigma (reconstructed)"; TLatex l1(x,y,txt1); l1.Draw("same"); } if(i == 1) { // auto txt = "#color[804]{My text #mu {}^{40}_{20}Ca}" auto txt2 = "d0 sigma (reconstructed)"; TLatex l2(x,y,txt2); l2.Draw("same"); } } c1->Update(); // sprintf(title1,"with-without-pxd.eps"); c1->SaveAs("compare-sgmas.pdf"); // scanf("%d",&j); // tg->SetMaximum(400.); // tg ->SetMinimum(0.); // c1->Clear(); // c1->cd(1); }