3 float errA[mxB][mxErr]={{0.7,0.3,-0.3},{0.5,0.2,-0.2}};
4 float ratioA[mxB]={4.3,2.9};
7 float theory[mxTh][mxB]={{4.790,2.949},{5.044,3.071}};
8 float theoryErr[mxTh][mxB]={{0.430,0.236},{0.404,0.227}};
11 TGraphAsymmErrors *grD;
12 TGraphAsymmErrors *grT[mxTh];
17 void prd2009WxSecRatio(
bool x=
false,
float canvasScale=1.0) {
21 gStyle->SetOptStat(0);
22 gStyle->SetOptDate(0);
24 mg =
new TMultiGraph();
28 c=
new TCanvas(
"aa",
"bb",500*canvasScale,300*canvasScale);
29 c->SetTopMargin(0.05); c->SetBottomMargin(0.13);
30 c->SetLeftMargin(0.085); c->SetRightMargin(0.02);
31 gPad->SetGridy(
false); gPad->SetGridx(
false);
32 if(!colorPlot) c->SetGrayscale();
34 hBase->GetXaxis()->SetRangeUser(0.,1.);
35 hBase->GetYaxis()->SetLabelColor(0);
36 hBase->GetYaxis()->SetTitleOffset(0.6);
37 hBase->GetYaxis()->SetTitleSize(0.06);
38 hBase->GetYaxis()->CenterTitle();
39 hBase->GetXaxis()->SetLabelColor(0);
40 hBase->GetXaxis()->SetTitleOffset(0.88);
41 hBase->GetXaxis()->SetTitleSize(0.06);
42 hBase->GetXaxis()->CenterTitle();
46 mg->SetMinimum(0.001); mg->SetMaximum(5.8);
48 mg->GetXaxis()->SetLimits(0.,1.);
49 mg->GetXaxis()->SetNdivisions(5);
50 mg->GetXaxis()->SetLabelSize(0.05);
51 mg->GetXaxis()->SetRangeUser(0.0,1.0);
52 mg->GetYaxis()->SetTitleOffset(2.0);
53 mg->GetYaxis()->SetLabelSize(0.05);
59 leg=
new TLegend(0.15,0.25,0.5,0.5);
61 leg->SetFillColor(kWhite);
62 leg->SetLineColor(kWhite);
63 leg->SetTextSize(0.04);
64 leg->AddEntry(grD,
" STAR 2009 Data",
"pl");
65 leg->AddEntry(grT[0],
" FEWZ NLO MSTW 2008",
"f");
66 leg->AddEntry(grT[1],
" FEWZ NLO CTEQ 6.6 ",
"f");
74 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/xSecRatioColor.png");
75 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/xSecRatioColor.eps");
78 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/xSecRatioBW.png");
79 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/xSecRatioBW.eps");
87 hBase=
new TH1F(txt0,
";|#eta_{e}|; R_{W} ",2,0.,1.);
93 float binCenter[mxB]={0.25,0.75};
94 TGraphAsymmErrors *gr=
new TGraphAsymmErrors;
96 for(
int id=0;
id<mxB;
id++) {
97 gr->SetMarkerStyle(20);
98 gr->SetMarkerColor(1);
102 gr->SetPoint(
id,binCenter[
id],ratioA[
id]);
106 float yu=sqrt(a*a+b*b);
107 float yd=sqrt(a*a+c*c);
108 gr->SetPointError(
id,0.25,0.25,yd,yu);
116 cout<<
"drawing data"<<endl;
117 grD->Draw(
"p e z same");
124 int color[mxTh]={kBlue,kGreen};
125 for(
int itheo=0; itheo<mxTh; itheo++){
126 float binCenter[mxB]={0.25,0.75};
127 TGraphAsymmErrors *gr=
new TGraphAsymmErrors;
128 for(
int id=0;
id<mxB;
id++) {
129 gr->SetFillColor(color[itheo]);
130 if(itheo==0) gr->SetFillStyle(3545);
131 else if(itheo==1) gr->SetFillStyle(3554);
132 gr->SetPoint(
id,binCenter[
id],theory[itheo][
id]);
133 gr->SetPointError(
id,0.25,0.25,theoryErr[itheo][
id],theoryErr[itheo][
id]);
141 for(
int itheo=0;itheo<mxTh;itheo++) {