// Reads the points from a txt file and produces a simple comparison graph. int read_graph_txt_AMPT_data() { auto c=new TCanvas(); c->SetGridy(); TGraphErrors graph1("./data.txt","%lg %lg %lg 0"); // * means not select this column of data TGraphErrors graph2("./ALICE.txt","%lg %lg %lg 0"); // * means not select this column of data graph1.SetMarkerStyle(20); graph1.SetMarkerColor(kBlue); graph2.SetMarkerStyle(20); graph2.SetMarkerColor(kRed); // MultiGraph // TMultiGraph *mg = new TMultiGraph(); TMultiGraph (mg); mg.Add(&graph1); mg.Add(&graph2); mg.GetXaxis()->SetTitle("p_{T}(GeV)"); mg.GetYaxis()->SetTitle("dN/dp_{T}(GeV^{2})"); //mg.GetYaxis()->SetTitle("#sigma (GeV/c^{2})"); mg.GetXaxis()->CenterTitle(); mg.GetYaxis()->CenterTitle(); //mg.GetYaxis()->SetRangeUser(0.0, 5000); mg.DrawClone("ALP"); c->Update(); // c->GetFrame()->SetBorderSize(12); c->Modified(); //c->SetLogy(); //c->SetLogx(); //c->BuildLegend(); return 0; }