{ #include double mh[99], bb[99],tautau[99],mumu[99],ss[99]; double cc[99],tt[99],gg[99],gamgam[99],Zgam[99],WW[99],ZZ[99],width[99]; // int n=0; ifstream fin("br.sm1.txt"); while (fin>>mh[n]>>bb[n]>>tautau[n]>>mumu[n]>>ss[n]>>cc[n]>>tt[n]) n++; fin.close(); n=0; ifstream fin("br.sm2.txt"); while (fin>>mh[n]>>gg[n]>>gamgam[n]>>Zgam[n]>>WW[n]>>ZZ[n]>>width[n]) n++; fin.close(); // htautau = new TGraph(n,mh,tautau); hcc = new TGraph(n,mh,cc); htt = new TGraph(n,mh,tt); hWW = new TGraph(n,mh,WW); hZZ = new TGraph(n,mh,ZZ); htautau->SetMaximum(2.); htautau->SetMinimum(1.e-5); htautau->Draw("L"); gPad->SetLogy(); htautau->GetXaxis()->SetRangeUser(100.,500.); htautau->GetXaxis()->SetTitle("Higgs mass (GeV)"); htautau->GetYaxis()->SetTitle("Branching Ratio"); htautau->SetTitle("Branching Ratio of Standard Model Higgs"); c1->SetGrid(); htt->SetLineColor(2); hcc->SetLineColor(7); hWW->SetLineColor(4); hZZ->SetLineColor(6); htautau->Draw("AL"); htt->Draw("SAME L"); hcc->Draw("SAME L"); hWW->Draw("SAME L"); hZZ->Draw("SAME L"); z1=new TLine(100.,1.,500.,1.); z1->Draw(); leg = new TLegend(0.80 ,0.35 ,0.92,0.75); leg->AddEntry(hWW,"WW","l"); leg->AddEntry(hZZ,"ZZ","l"); leg->AddEntry(htt,"tt","l"); leg->AddEntry(hcc,"cc","l"); leg->AddEntry(htautau,"#tau#tau","l"); leg->SetFillColor(10); leg->SetBorderSize(0); leg->Draw(); c1->Print("hdecay.png"); }