{ c1 = new TCanvas("c1","c1 title", 200, 100, 800, 600); c1->SetGrid(); // // double x1[200], y1[200]; int n1=0; ifstream fin("higgs_gg_14.txt"); char line[255]; fin.getline(line,sizeof(line)); // skipping the 1st dummy line while (fin >> x1[n1] >> y1[n1] ) n1++; cout<<"number of data at 14 TeV = "<> x2[n2] >> y2[n2] ) n2++; cout<<"number of data at 7 TeV = "<SetLineColor(2); g2->SetLineColor(4); g1->SetLineWidth(2); g2->SetLineWidth(2); g1->GetXaxis()->SetTitle("m_{H} [GeV]"); g1->GetYaxis()->SetTitle("cross section [pb]"); gPad->SetLogy(); g1 -> Draw("AL"); g2 -> Draw("SAME L"); // leg = new TLegend(0.6,0.77,0.93,0.9,"pp->H via gluon fusion"); leg->AddEntry(g1,"ECM=14 TeV","l"); leg->AddEntry(g2,"ECM= 7 TeV","l"); leg->SetFillColor(10); leg->Draw(); // c1->Print("gluon_fusion.png"); }