float dat1(int i, int k) { float dd[9][4] = { 0.5000000, 0.2032801, 0., 0.0074016, 1.5000000, 0.1750048, 0., 0.0041545, 2.5000000, 0.1257404, 0., 0.0076406, 3.5000000, 0.0683140, 0., 0.0110888, 4.5000000, 0.1049370, 0., 0.0266719, 5.5000000, 0.0310185, 0., 0.0185445, 6.5000000, 0.0227041, 0., 0.0102301, 7.5000000, 0.0244048, 0., 0.0119308, 8.5000000, 0.0375000, 0., 0.0250260 }; return dd[i][k]; } float dat2(int i, int k) { float dd[6][4] = { 0.5000000, 0.2233434, 0, 0.0317605, 1.5000000, 0.1638513, 0, 0.0186609, 2.5000000, 0.0956099, 0, 0.0143173, 3.5000000, 0.0676181, 0, 0.0117128, 4.5000000, 0.0508562, 0, 0.0100735, 5.5000000, 0.0220012, 0, 0.0047466 }; return dd[i][k]; } int mbias_zeros_vs_p() { gROOT->Reset(); c1 = new TCanvas("mbias_zeros_vs_p","mbias_zeros_vs_p",0,0,600,400); // create a 2D histogram to define the range TH2F *hr = new TH2F("hr","Fraction of \"zeros\" vs momentum", 1,0.,12.,1,0,0.3); hr->SetXTitle("P, GeV/c"); hr->Draw(); c1->GetFrame()->SetFillColor(21); c1->GetFrame()->SetBorderSize(12); float x[1000], y[1000], ex[1000], ey[1000]; // create first graph int n1 = 9; for (int i=0; iSetMarkerColor(kBlue); gr1->SetMarkerStyle(21); gr1->Draw("LP"); TText* text = new TText(4.,0.25,"QFL: red circles"); text->Draw(); int n2 = 6; for (int i=0; iSetMarkerColor(kRed); gr2->SetMarkerStyle(20); gr2->Draw("LP"); TText* text = new TText(4.,0.22,"Minbias: blue squares"); text->Draw(); }