1 const int mxTheo=6, mxQ=2;
2 const int mxD=3, mxEr=4;
3 float theoA[mxQ][mxTheo]={{83.3,80.5,75.4}{19.3,18.8,17.7}};
4 float theoErr[2*mxQ][mxTheo]={{0.,0.,4.3}{0.,0.,1.}{0.,0.,3.9}{0.,0.,0.9}};
5 float errA[mxQ][mxEr]={{3.,10.,-13.,14.}{2.,3.,-4.,4.}};
6 float crossA[mxQ]={61,17};
7 TString theoN[mxTheo]={
"#splitline{ RHICBOS}{CTEQ5M Resum.}",
"#splitline{ RHICBOS}{MRST02 Resum.}",
"#splitline{deFlorian, et al.}{ MRST02 NLO}"};
9 TGraphAsymmErrors *grT[mxQ][mxTheo];
10 TGraphAsymmErrors *grD[mxQ][mxD];
15 gStyle->SetOptStat(0);
16 gStyle->SetOptDate(0);
21 leg=
new TLegend(0.47,0.48,0.88,0.35);
24 leg->SetEntrySeparation(0.01);
27 leg->SetTextSize(0.023);
28 leg->AddEntry(grD[0][0],
" STAR Data",
"pl");
29 leg->AddEntry(grT[0][2],theoN[2],
"p");
30 leg->AddEntry(grD[0][2],
" Lumi. Uncert.",
"f");
31 leg->AddEntry(grT[0][1],theoN[1],
"p");
32 leg->AddEntry(grT[0][2],
"#splitline{ Theoretical}{ Scale Uncert.}",
"f");
33 leg->AddEntry(grT[0][0],theoN[0],
"p");
35 c=
new TCanvas(
"aa",
"bb",550,700);
36 c->SetTopMargin(0.025); c->SetBottomMargin(0.05);
37 gPad->SetGridy(
false); gPad->SetGridx(
false);
39 hBase->GetXaxis()->SetTickLength(0);
40 hBase->GetXaxis()->SetLabelColor(0);
41 hBase->GetYaxis()->SetTitleOffset(1.2);
42 hBase->SetMinimum(0); hBase->SetMaximum(99.9);
44 for(
int iq=0; iq<mxQ;iq++) {
53 TLatex *lat0 =
new TLatex(0.13,0.945,
"Run 9 STAR Preliminary #font[52]{p+p} #sqrt{#font[72]{s}}_{ }=_{ }500 GeV");
54 lat0->SetNDC(); lat0->SetTextSize(0.04); lat0->Draw(
"same");
55 TLatex *lat1 =
new TLatex(0.18,0.915,
"Kinematic acceptance: |#eta_{#font[52]{e}}| < 1 and #font[52]{E_{T}^{e}} > 25 GeV");
56 lat1->SetNDC(); lat1->SetTextSize(0.03); lat1->Draw(
"same");
57 TLatex *lat2 =
new TLatex(0.6,0.86,
"#sigma(#font[52]{W^{#scale[1.2]{#pm}} #rightarrow e^{#scale[1.2]{#pm}} + #nu_{e}})");
58 lat2->SetNDC(); lat2->SetTextSize(0.042); lat2->Draw(
"same");
59 TLatex *lat3 =
new TLatex(0.7,0.59,
"#font[52]{W^{+}}");
60 lat3->SetNDC(); lat3->SetTextSize(0.09); lat3->Draw(
"same");
61 TLatex *lat4 =
new TLatex(0.7,0.18,
"#font[52]{W^{#scale[1.2]{-}}}");
62 lat4->SetNDC(); lat4->SetTextSize(0.09); lat4->Draw(
"same");
70 hBase=
new TH1F(txt0,
"; ; #sigma (pb)", 100, 0,0.8);
76 int color[3]={kBlack,kGreen+3,kBlue+1};
77 int marker[3]={26,28,4};
79 for(
int iq=0; iq<mxQ;iq++)
80 for(
int t=0;t<mxTheo; t++) {
83 TGraphAsymmErrors *gr=
new TGraphAsymmErrors;
84 gr->SetMarkerColor(color[tb]);
87 gr->SetMarkerSize(1.0);
88 if(t>2) gr->SetMarkerSize(0.8);
89 gr->SetMarkerStyle(marker[tb]);
90 gr->SetPoint(0,(tb+3)*0.1,theoA[iq][tb]);
94 gr->SetPointError(0,0.01,0.01,theoErr[iq+2][tb],theoErr[iq][tb]);
95 gr->SetFillColor(kRed+2);
96 gr->SetFillStyle(3001);
107 for(
int iq=0; iq<mxQ;iq++)
108 for(
int id=0;
id<mxD;
id++) {
110 TGraphAsymmErrors *gr=
new TGraphAsymmErrors;
111 if(
id==0)gr->SetMarkerStyle(21);
112 else gr->SetMarkerStyle(1);
113 gr->SetMarkerColor(kRed+
id);
114 gr->SetMarkerSize(1.5);
116 gr->SetLineColor(kBlack);
118 if(
id<2) gr->SetPoint(0,0.15,crossA[iq]);
119 else gr->SetPoint(0,0.1,crossA[iq]);
122 gr->SetPointError(0,0,0,errA[iq][
id],errA[iq][
id]);
128 float yu=sqrt(a*a+b*b);
129 float yd=sqrt(a*a+c*c);
130 gr->SetPointError(0,0,0,yd,yu);
133 gr->SetPointError(0,0.015,0.015,errA[iq][3],errA[iq][3]);
134 gr->SetFillColor(13);
146 void drawTheo(
int iq) {
148 for(
int t=mxTheo-1;t>=0; t--) {
150 grT[iq][t]->Draw(
"2 same");
151 grT[iq][t]->Draw(
"p X");
153 else grT[iq][t]->Draw(
"p");
154 if(t<3) grT[iq][t]->Print();
162 void drawData(
int iq) {
164 for(
int id=mxD-1;
id>=0;
id--) {
165 if(
id==0) grD[iq][id]->Draw(
"p e same");
166 else if(
id==1) grD[iq][id]->Draw(
"p e same");
167 else if(
id==2) grD[iq][id]->Draw(
"2 same");
168 grD[iq][id]->Print();