{ 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]; 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] = "All Hadronic: Vertex Tag"; analysisLuminosityPb[i] = 165.; centralValue[i] = 7.8; statErrorPos[i] = 2.5; statErrorNeg[i] = 2.5; systErrorPos[i] = 4.7; systErrorNeg[i] = 2.3; 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: Jet Prob Tag"; analysisLuminosityPb[i] = 162.; centralValue[i] = 5.8; statErrorPos[i] = 1.3; statErrorNeg[i] = 1.2; systErrorPos[i] = 1.3; systErrorNeg[i] = 1.3; i++; analysisDescription[i] = "Lepton+Jets: Vertex Tag+Kinematic"; analysisLuminosityPb[i] = 162.; centralValue[i] = 6.0; statErrorPos[i] = 1.6; statErrorNeg[i] = 1.6; systErrorPos[i] = 1.2; systErrorNeg[i] = 1.2; /* i++; analysisDescription[i] = "Lepton+Jets: Double Vertex Tag II"; analysisLuminosityPb[i] = 162.; centralValue[i] = 8.2; statErrorPos[i] = 2.4; statErrorNeg[i] = 2.1; systErrorPos[i] = 1.8; systErrorNeg[i] = 1.0; */ i++; analysisDescription[i] = "Lepton+Jets: Double Vertex Tag"; analysisLuminosityPb[i] = 162.; centralValue[i] = 5.0; statErrorPos[i] = 2.4; statErrorNeg[i] = 1.9; systErrorPos[i] = 1.1; systErrorNeg[i] = 0.8; i++; analysisDescription[i] = "Lepton+Jets: Vertex Tag"; analysisLuminosityPb[i] = 162.; centralValue[i] = 5.6; statErrorPos[i] = 1.2; statErrorNeg[i] = 1.1; systErrorPos[i] = 0.9; systErrorNeg[i] = 0.6; /* i++; analysisDescription[i] = "Lepton+Jets: Double Vertex Tag"; analysisLuminosityPb[i] = 318.; centralValue[i] = 9.0; statErrorPos[i] = 1.7; statErrorNeg[i] = 1.7; systErrorPos[i] = 1.5; systErrorNeg[i] = 1.5; i++; analysisDescription[i] = "Lepton+Jets: Vertex Tag"; analysisLuminosityPb[i] = 318.; centralValue[i] = 8.1; statErrorPos[i] = 0.9; statErrorNeg[i] = 0.9; systErrorPos[i] = 0.9; systErrorNeg[i] = 0.9; i++; analysisDescription[i] = "Lepton+Jets: Kinematic NN"; 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+Jets: Kinematic ANN"; analysisLuminosityPb[i] = 193.; centralValue[i] = 6.6; statErrorPos[i] = 1.1; statErrorNeg[i] = 1.1; systErrorPos[i] = 1.5; systErrorNeg[i] = 1.5; i++; analysisDescription[i] = "Lepton+Jets: Kinematic"; analysisLuminosityPb[i] = 193.; centralValue[i] = 4.8; statErrorPos[i] = 1.6; statErrorNeg[i] = 1.6; systErrorPos[i] = 1.8; systErrorNeg[i] = 1.8; i++; analysisDescription[i] = "Dilepton: MET, # jets"; analysisLuminosityPb[i] = 193.; centralValue[i] = 8.6; statErrorPos[i] = 2.5; statErrorNeg[i] = 2.4; systErrorPos[i] = 1.1; systErrorNeg[i] = 1.1; 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); } 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(); //Theory band Float_t theoryCentralValue = 6.7; Float_t theoryErrorNeg = 0.9; Float_t theoryErrorPos = 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(); //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)"); 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(0.2, 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; 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 += "}"; 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<=6) analysisLabel->SetTextColor(2); analysisLabel->DrawLatex(0.35, analysisIndex[j]-0.35, analysisDescription[j]); analysisLabel->SetTextSize(0.055); analysisLabel->DrawLatex(9.0, analysisIndex[j]-0.5, analysisResult); analysisLabel->SetTextSize(0.025); analysisLabel->SetTextFont(52); analysisLabel->DrawLatex(0.5, analysisIndex[j]-0.6, analysisLumi); } }