//translated by Rudolph Magyar from *.top 6/15/99// float dat1(int i, int k) { float dd[25][4] = { 0.6000000, 0.1970178,0., 0.0110226, 1.0000000, 0.2343639,0., 0.0056225, 1.4000000, 0.2859556,0., 0.0068146, 1.8000000, 0.3211388,0., 0.0094180, 2.2000000, 0.3406740,0., 0.0128325, 2.5999999, 0.3468213,0., 0.0161316, 3.0000000, 0.3729560,0., 0.0213239, 3.4000001, 0.3898148,0., 0.0286756, 3.8000000, 0.3995283,0., 0.0394460, 4.2000003, 0.3818182,0., 0.0495974, 4.6000004, 0.4797619,0., 0.0586214, 5.0000005, 0.4630001,0., 0.0727026, 5.6300001, 0.4587501,0., 0.0574292, 6.1999998, 0.3794445,0., 0.0465652, 6.6000004, 0.5195947,0., 0.0614295, 7.0000005, 0.4430556,0., 0.0528028, 7.4000001, 0.5721430,0., 0.0711065, 7.8000002, 0.4681035,0., 0.0548672, 8.4210539, 0.4434211,0., 0.0596923, 9.2400007, 0.3675000,0., 0.0734549, 10.3230782, 0.4923077,0., 0.0614557, 11.4923086, 0.5653847,0., 0.0728043, 12.8153849, 0.4846154,0., 0.0764129, 14.3000011, 0.5950001,0., 0.0774759, 16.9200020, 0.6575000,0., 0.0839068, }; return dd[i][k]; } float dat2(int i, int k) { float dd[25][4] = { 0.6000000, 0.1814706, 0., 0.0483212, 1.4000000, 0.2855073, 0., 0.0344562, 2.2000000, 0.2932759, 0., 0.0291680, 3.0000000, 0.3287931, 0., 0.0280602, 3.8000002, 0.4427853, 0., 0.0335631, 4.6000004, 0.4565069, 0., 0.0348594, 5.4000001, 0.4656433, 0., 0.0283295, 6.2000003, 0.4661951, 0., 0.0272945, 7.0000010, 0.5209731, 0., 0.0300805, 7.7999997, 0.5070423, 0., 0.0276895, 8.6000004, 0.5108268, 0., 0.0313686, 9.4000006, 0.5458905, 0., 0.0278195, 10.2000008, 0.5784591, 0., 0.0259318, 11.0000000, 0.5661765, 0., 0.0281986, 11.8000002, 0.5604939, 0., 0.0259487, 12.6000004, 0.5795082, 0., 0.0302411, 13.4000006, 0.6462291, 0., 0.0251113, 14.2000008, 0.5850720, 0., 0.0288582, 15.0000000, 0.6009868, 0., 0.0272804, 15.8000002, 0.6132979, 0., 0.0280779, 16.6000004, 0.6166667, 0., 0.0249419, 17.3999996, 0.6708862, 0., 0.0277285, 18.1999989, 0.6279241, 0., 0.0251031, 19.0000000, 0.6657535, 0., 0.0273755, 19.7999992, 0.6160854, 0., 0.0293707 }; return dd[i][k]; } int mbias_cha_vs_p() { gROOT->Reset(); c1 = new TCanvas("mbias_cha_vs_p","mbias_cha_vs_p",0,0,600,400); // create a 2D histogram to define the range TH2F *hr = new TH2F("hr","Average E/P vs. P, Towers 0:8", 1,0.,22.,1,0,0.8); hr->SetXTitle("P, GeV/c"); hr->SetYTitle("ECHA/P"); hr->Draw(); c1->GetFrame()->SetFillColor(21); c1->GetFrame()->SetBorderSize(12); float x[1000], y[1000], ex[1000], ey[1000]; // create first graph int n1 = 25; for (int i=0; iSetMarkerColor(kBlue); gr1->SetMarkerStyle(21); gr1->Draw("p"); TText* text = new TText(10,0.25,"Blue: ECHA/P, MinBias"); text->Draw(); int n2 = 25; for (int i=0; iSetMarkerColor(kRed); gr2->SetMarkerStyle(20); gr2->Draw("p"); TText* text = new TText(10,0.20,"Red: ECHA/P, QFL"); text->Draw(); }