{ gROOT->Reset(); Int_t MAXRESULTS = 30; Float_t analysisIndex[MAXRESULTS]; Float_t ZeroArray[MAXRESULTS]; TString analysisDescription[MAXRESULTS]; Float_t analysisLuminosityPb[MAXRESULTS]; Float_t centralValue[MAXRESULTS]; Float_t statErrorPos[MAXRESULTS]; Float_t statErrorNeg[MAXRESULTS]; Float_t systErrorPos[MAXRESULTS]; Float_t systErrorNeg[MAXRESULTS]; Float_t statSystErrorPos[MAXRESULTS]; Float_t statSystErrorNeg[MAXRESULTS]; Float_t lumiErrorPos[MAXRESULTS]; Float_t lumiErrorNeg[MAXRESULTS]; for (Int_t j = 0; j < MAXRESULTS; j++) { analysisIndex[j] = j + 1; ZeroArray[j] = 0.; } Int_t i = -1; // You can put in all of the different analyses here. i++; analysisDescription[i] = "Combined"; analysisLuminosityPb[i] = 350.; centralValue[i] = 7.14; statErrorPos[i] = 0.60; statErrorNeg[i] = 0.60; systErrorPos[i] = 0.86; systErrorNeg[i] = 0.86; i++; analysisDescription[i] = "All-hadronic: Vertex Tag"; analysisLuminosityPb[i] = 311.; centralValue[i] = 8.0; statErrorPos[i] = 1.7; statErrorNeg[i] = 1.7; systErrorPos[i] = 3.3; systErrorNeg[i] = 2.2; i++; analysisDescription[i] = "MET+Jets: Vertex Tag"; analysisLuminosityPb[i] = 311.0.; centralValue[i] = 6.1; statErrorPos[i] = 1.2; statErrorNeg[i] = 1.2; systErrorPos[i] = 1.4; systErrorNeg[i] = 1.0; i++; analysisDescription[i] = "Lepton+Jets: Vertex Tag"; analysisLuminosityPb[i] = 318.; centralValue[i] = 8.9; statErrorPos[i] = 0.9; statErrorNeg[i] = 0.9; systErrorPos[i] = 1.2; systErrorNeg[i] = 0.9; i++; analysisDescription[i] = "Lepton+Jets: Soft Muon Tag"; analysisLuminosityPb[i] = 193.; centralValue[i] = 5.3; statErrorPos[i] = 3.3; statErrorNeg[i] = 3.3; systErrorPos[i] = 1.3; systErrorNeg[i] = 1.0; i++; analysisDescription[i] = "Lepton+Jets: Kinematic ANN"; analysisLuminosityPb[i] = 347.; centralValue[i] = 6.3; statErrorPos[i] = 0.8; statErrorNeg[i] = 0.8; systErrorPos[i] = 1.0; systErrorNeg[i] = 1.0; i++; analysisDescription[i] = "Lepton+Track (not included yet)"; analysisLuminosityPb[i] = 360.; centralValue[i] = 10.1; statErrorPos[i] = 2.2; statErrorNeg[i] = 2.2; systErrorPos[i] = 1.4; systErrorNeg[i] = 1.4; i++; analysisDescription[i] = "Dilepton: Combined"; analysisLuminosityPb[i] = 200.; centralValue[i] = 7.0; statErrorPos[i] = 2.4; statErrorNeg[i] = 2.1; systErrorPos[i] = 1.7; systErrorNeg[i] = 1.2; /* i++; analysisDescription[i] = "Dilepton"; analysisLuminosityPb[i] = 193.; centralValue[i] = 8.4; statErrorPos[i] = 3.2; statErrorNeg[i] = 2.7; systErrorPos[i] = 1.6; systErrorNeg[i] = 1.2; i++; analysisDescription[i] = "Lepton+Track"; analysisLuminosityPb[i] = 200.; centralValue[i] = 7.0; statErrorPos[i] = 2.7; statErrorNeg[i] = 2.3; systErrorPos[i] = 1.5; systErrorNeg[i] = 1.4; */ //Set up a graph with statistical uncertainties only... grStat = new TGraphAsymmErrors(i+1, centralValue, analysisIndex, statErrorNeg, statErrorPos, ZeroArray, ZeroArray); grStat->SetTitle("Results (stat. errors)"); //..and with stat+syst uncertainties for (Int_t j = 0; j < MAXRESULTS; j++) { statSystErrorNeg[j] = sqrt(statErrorNeg[j]**2 + systErrorNeg[j]**2); statSystErrorPos[j] = sqrt(statErrorPos[j]**2 + systErrorPos[j]**2); lumiErrorPos[j] = fabs( (centralValue[j]/0.942) - centralValue[j]); lumiErrorNeg[j] = fabs( (centralValue[j]/1.058) - centralValue[j]); systErrorNeg[j] = sqrt(systErrorNeg[j]*systErrorNeg[j] - lumiErrorNeg[j]*lumiErrorNeg[j]); systErrorPos[j] = sqrt(systErrorPos[j]*systErrorPos[j] - lumiErrorPos[j]*lumiErrorPos[j]); } grStatSyst = new TGraphAsymmErrors(i+1, centralValue, analysisIndex, statSystErrorNeg, statSystErrorPos, ZeroArray, ZeroArray); grStatSyst->SetTitle(""); //Now draw everything gROOT->SetStyle("Plain"); gStyle->SetOptStat(0); TCanvas *myCanvas = new TCanvas("myCanvas","Summary of CDF Top Cross Sections", 500, 700); myCanvas->SetTickx(); myCanvas->SetBottomMargin(0.1); myCanvas->SetLeftMargin(0.05); myCanvas->SetRightMargin(0.05); myCanvas->SetTopMargin(0.025); //Little trick to control size of x and y axes float ncurrent = i; ncurrent+=2.0; TH2F *nullTH2F = new TH2F("nullTH2F", "", 20, 0., 14., 20, 0., ncurrent); nullTH2F->GetXaxis()->SetTitle("#sigma(p#bar{p} #rightarrow t#bar{t}) (pb)"); nullTH2F->GetYaxis()->SetLabelColor(0); nullTH2F->GetYaxis()->SetNdivisions(1); nullTH2F->GetXaxis()->CenterTitle(); nullTH2F->Draw(); //MLM Theory band Float_t theoryCentralValue = 6.7; // 6.7; Float_t theoryErrorNeg = 0.9; //0.9; Float_t theoryErrorPos = 0.7; //0.7; TPave *theoryPave = new TPave(theoryCentralValue-theoryErrorNeg, analysisIndex[0]-0.7, theoryCentralValue+theoryErrorPos, analysisIndex[i]+0.2, 0, "br"); theoryPave->SetFillColor(7); theoryPave->Draw(); //Kidonakis theory band Float_t ktheoryCentralValue = 6.8; Float_t ktheoryErrorNeg = 0.6; Float_t ktheoryErrorPos = 0.6; TPave *ktheoryPave = new TPave(ktheoryCentralValue-ktheoryErrorNeg, analysisIndex[0]-0.7, ktheoryCentralValue+ktheoryErrorPos, analysisIndex[i]+0.2, 0, "br"); ktheoryPave->SetFillColor(1); ktheoryPave->SetFillStyle(3004); ktheoryPave->Draw(); //Draw results grStatSyst->SetLineColor(4); grStatSyst->SetLineWidth(3); grStatSyst->SetMarkerColor(2); grStatSyst->SetMarkerStyle(20); grStatSyst->SetMarkerSize(2.0); grStatSyst->Draw("P"); grStat->SetLineColor(2); grStat->SetLineWidth(3); grStat->SetMarkerColor(2); grStat->SetMarkerStyle(20); grStat->SetMarkerSize(2.0); grStat->Draw("P"); //theory legend TPave *legendPave = new TPave(0.25, ncurrent-0.4, 0.75, ncurrent-0.2); legendPave->SetBorderSize(1); legendPave->SetFillColor(7); legendPave->Draw(); TLatex *legendLabel = new TLatex(); legendLabel->SetTextSize(0.025); legendLabel->DrawLatex(0.90, ncurrent-0.42, "Cacciari et al. JHEP 0404:068 (2004)"); TPave *klegendPave = new TPave(0.25, ncurrent-0.7, 0.75, ncurrent-0.5); klegendPave->SetBorderSize(1); klegendPave->SetFillColor(1); klegendPave->SetFillStyle(3004); klegendPave->Draw(); TLatex *klegendLabel = new TLatex(); klegendLabel->SetTextSize(0.025); klegendLabel->DrawLatex(0.90, ncurrent-0.72, "Kidonakis,Vogt PRD 68 114014 (2003)"); TLatex *mtopLabel = new TLatex(); mtopLabel->SetTextSize(0.030); mtopLabel->SetTextColor(1); mtopLabel->DrawLatex(8.50, ncurrent-.42, "Assume m_{t}=175 GeV/c^{2}"); TLatex *cdfText = new TLatex(); cdfText->SetTextSize(0.035); cdfText->SetTextColor(2); cdfText->DrawLatex(8.50, ncurrent-0.75,"CDF Run 2 Preliminary"); TPaveText *titleText = new TPaveText(0.24, 0.91, 0.8, 0.96, "ndc"); titleText->SetBorderSize(0); titleText->SetFillColor(0); titleText->SetTextSize(0.05); titleText->InsertText("Top Pair Production Cross Section"); //titleText->Draw(); //Print numerical values to a string first TLatex *analysisLabel = new TLatex(); for (Int_t j = 0; j <= i; j++) { char cv[20]; TString analysisResult = ""; sprintf(cv,"%4.1f",centralValue[j]); analysisResult += cv; if(j==0){ analysisResult += "#pm"; sprintf(cv,"%3.1f",statErrorPos[j]); analysisResult += cv; analysisResult += "#pm"; sprintf(cv,"%3.1f",systErrorPos[j]); analysisResult += cv; }else{ analysisResult += " #pm^{"; sprintf(cv,"%4.1f",statErrorPos[j]); analysisResult += cv; analysisResult += "}_{"; sprintf(cv,"%4.1f",statErrorNeg[j]); analysisResult += cv; analysisResult += "} #pm^{"; sprintf(cv,"%4.1f",systErrorPos[j]); analysisResult += cv; analysisResult += "}_{"; sprintf(cv,"%4.1f",systErrorNeg[j]); analysisResult += cv; analysisResult += "} "; } analysisResult += "#pm^{"; sprintf(cv,"%4.1f",lumiErrorPos[j]); analysisResult += cv; analysisResult += "}_{"; sprintf(cv,"%4.1f",lumiErrorNeg[j]); analysisResult += cv; analysisResult += "}"; std::cout << analysisResult << std::endl; TString analysisLumi = "(L="; sprintf(cv,"%4.0f",analysisLuminosityPb[j]); analysisLumi += cv; analysisLumi += "pb^{-1})"; //Add description, results and lumi to plot analysisLabel->SetTextSize(0.035); analysisLabel->SetTextFont(62); analysisLabel->SetTextColor(1); if(j != 4 && j!=7 ) analysisLabel->SetTextColor(2); if(j ==6 ) analysisLabel->SetTextColor(6); analysisLabel->DrawLatex(0.35, analysisIndex[j]-0.35, analysisDescription[j]); analysisLabel->SetTextSize(0.055); analysisLabel->DrawLatex(8.0, analysisIndex[j]-0.5, analysisResult); analysisLabel->SetTextSize(0.035); analysisLabel->SetTextFont(52); analysisLabel->DrawLatex(0.5, analysisIndex[j]-0.6, analysisLumi); if(j==0){ TString analysisErrors = "(stat.)#pm(syst.)#pm(lumi.)"; analysisLabel->DrawLatex(9.4, analysisIndex[j]-0.8, analysisErrors); } } }