//Plots a graph of the branching ratio of the higgs at different masses void grapher2() { gROOT->Reset(); //resets root int i; //data Float_t x1[] ={80,90,100,110,120,130,140,150,160,170,180,190,200} ; //higgs masses Float_t y1[] = {.824,.830,.812,.770,.678,.525,.342,.174,.0383,.00840,.00540,.00342,.00260};//bb Float_t y2[] = {.0786,.0794,.0793,.0765,.0685,.0539,.0355,.0183,.0108,.000905,.000588,.000376,.000288} ;//tt Float_t y3[] = {.000581,.00192,.0103,.0447,.133,.289,.486,.685,.905,.966,.935,.777,.735};//ww Float_t y4[] ={.000156,.000391,.00105,.00408,.0151,.0383,.0671,.0819,.0415,.0224,.0573,.218,.261};//zz c1 = new TCanvas("c1","gerrors2",10,10,700,700); //makes a new canvas c1->SetFillColor(0); //make it white //first histogram TH1F *hr1 = new TH1F("hr","The Rise and Fall of MahiggWWy",13,80,200); hr1->SetXTitle("Higgs Mass (GeV)"); //x axis title hr1->SetYTitle("Branching Ratio"); //y axis title hr1->SetStats(0); //remove statistics box hr1->SetFillColor(kYellow); hr->GetXaxis()->CenterTitle(); //center titles hr->GetYaxis()->CenterTitle(); hr->SetLabelOffset (.002,"Y"); //move the y axis labels closer to axis for (i=0;i<13;i++) hr1->AddBinContent(i+1,y1[i]+y2[i]+y3[i]+y4[i]); //sets the bin content hr1->Draw("C"); //draws the first histogram with a curved line //second histogram TH1F *hr2 = new TH1F("hr","The Rise and Fall of MahiggWWy",13,80,200); hr2->SetFillColor(kGreen); //sets the fill color to green for (i=0;i<13;i++) hr2->AddBinContent(i+1,y1[i]+y2[i]+y3[i]); hr2->Draw("CSAME"); //draws this histogram with a smooth line on the same axis //third histogram TH1F *hr3 = new TH1F("hr","The Rise and Fall of MahiggWWy",13,80,200); hr3->SetFillColor(kBlue); for (i=0;i<13;i++) hr3->AddBinContent(i+1,y1[i]+y3[i]); hr3->Draw("CSAME"); //fourth histogram TH1F *hr4 = new TH1F("hr","The Rise and Fall of MahiggWWy",13,80,200); hr4->SetFillColor(kRed); for (i=0;i<13;i++) hr4->AddBinContent(i+1,y1[i]); hr4->Draw("CSAME"); TPaveText *zz = new TPaveText(186,.82,194,.92,"BL"); //creates a PaveText zz->SetBorderSize(0); //no borders zz->SetFillColor(0); //white interior zz->AddText("ZZ"); //text: ZZ zz->Draw("ARC"); //draws the PaveText TPaveText *ww = new TPaveText(162,.4,180,.5,"BL"); ww->SetBorderSize(0); ww->SetFillColor(0); ww->AddText("W^{+}W^{-}"); //Latex: $W^+W^-$ ww->Draw("ARC"); TPaveText *bb = new TPaveText(100,.3,110,.4,"BLARC"); bb->SetBorderSize(0); bb->SetFillColor(0); bb->AddText("b#bar{b}"); //Latex: b\bar{b} bb->Draw("ARC"); TPaveText *tt = new TPaveText(90,.85,105,.95,"BLARC"); tt->SetBorderSize(0); tt->SetFillColor(0); tt->AddText("#tau^{+}#tau^{-}"); //Latex: $\tau^+\tau^-$ tt->Draw("ARC"); //outputs to a postscript file c1->Print("Graph2.eps","eps"); }