3 const int mxD=4, mxEr=4;
4 float errA[mxD][mxQ][mxEr]={{{5.95,5.93,-5.97.,15.09}{3.46,2.97,-3.07,4.09}},{{21.2,3.4,10.3,21.6}{12.1,10.1,8.2,4.8}},{{260,480,480,690}{220,330,330,470}},{{60,170,170,640}{50,140,140,450}}};
5 float crossA[mxD][mxQ]={{116.05,42.36},{144.1,31.7},{6270,4230},{5860,4090}};
10 float theory[mxColl][mxQ][mxPt];
12 TGraphAsymmErrors *grD[mxQ][mxD];
13 TGraph *grT[mxQ][mxColl];
17 const int mxDZ=3, mxErZ=4;
18 float errZ[mxDZ][mxErZ]={{2.14,0.50,-0.50,1.01},{60,50,50,90},{40,60,60,110}};
19 float crossZ[mxDZ]={7.73,820,930};
20 float theoryZ[mxColl][mxPt];
22 TGraphAsymmErrors *grDZ[mxD];
27 void prd2009xsec(
bool x=
false,
float canvasScale=1.0){
34 TCanvas *c=
new TCanvas(
"aa",
"bb",500*canvasScale,500*canvasScale);
36 TPad *cT =
new TPad(
"padT",
"padT",0,0.5,1.,1.); cT->Draw();
37 TPad *cB =
new TPad(
"padB",
"padB",0,0,1.,0.5); cB->Draw();
44 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/xsecBRcolor.png");
45 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/color/xsecBRcolor.eps");
48 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/xsecBRbw.png");
49 c->Print(
"/star/u/stevens4/wAnalysis/xSecPaper/plots/bw/xsecBRbw.eps");
56 gStyle->SetOptStat(0);
57 gStyle->SetOptDate(0);
62 gPad->SetTopMargin(0.05); gPad->SetBottomMargin(0.0);
63 gPad->SetLeftMargin(0.1); gPad->SetRightMargin(0.03);
64 gPad->SetGridy(
false); gPad->SetGridx(
false);
65 gPad->SetLogy(); gPad->SetLogx();
67 hBase->GetYaxis()->SetTitleOffset(0.6);
68 hBase->GetYaxis()->CenterTitle();
69 hBase->GetYaxis()->SetTitleSize(0.07);
70 hBase->GetYaxis()->SetLabelSize(0.06);
71 hBase->SetMinimum(8.0); hBase->SetMaximum(2e4);
74 for(
int iq=0; iq<mxQ;iq++) {
81 leg=
new TLegend(0.7,0.2,0.95,0.5);
84 leg->SetEntrySeparation(0.01);
86 leg->SetFillColor(kWhite);
87 leg->SetLineColor(kWhite);
88 leg->SetTextSize(0.05);
89 leg->AddEntry(grD[0][0],
" UA1",
"pl");
90 leg->AddEntry(grD[0][0],
" STAR",
"pl");
91 leg->AddEntry(grD[0][0],
" UA2",
"pl");
92 leg->AddEntry(grD[0][1],
" Phenix",
"pl");
93 leg->AddEntry(grD[0][0],
" CDF",
"pl");
94 leg->AddEntry(grD[0][2],
" Atlas",
"pl");
95 leg->AddEntry(grD[0][0],
" D0",
"pl");
96 leg->AddEntry(grD[0][3],
" CMS",
"pl");
106 hBase=
new TH1F(txt0,
"; #sqrt{s} (GeV); #sigma_{W} #upoint BR(W #rightarrow l #nu) (pb) ", 100, 350,12000);
112 float offset[mxD]={-10,10,-250,250};
113 float style[mxD][mxQ]={{29,30},{22,26},{20,24},{21,25}};
114 float color[mxD]={kRed,kBlue,kGreen,kOrange};
115 float size[mxD]={1.2,1.0,1.0,1.0};
116 float roots[mxD]={500,500,7000,7000};
117 for(
int iq=0; iq<mxQ;iq++)
118 for(
int id=0;
id<mxD;
id++) {
119 TGraphAsymmErrors *gr=
new TGraphAsymmErrors;
120 gr->SetMarkerStyle(style[
id][iq]);
121 if(colorPlot) gr->SetMarkerColor(color[
id]);
122 gr->SetMarkerSize(size[
id]);
124 gr->SetPoint(0,roots[
id]+offset[
id],crossA[
id][iq]);
125 float a=errA[id][iq][0];
126 float b=errA[id][iq][1];
127 float c=errA[id][iq][2];
128 float d=errA[id][iq][3];
129 float yu=sqrt(a*a+b*b+d*d);
130 float yd=sqrt(a*a+c*c+d*d);
131 gr->SetPointError(0,0,0,yd,yu);
138 void drawData(
int iq) {
139 for(
int id=mxD-1;
id>=0;
id--) {
140 grD[iq][id]->Draw(
"e p z same");
148 for(
int j=0; j<mxPt; j++)
151 int style[mxColl][mxQ]={{1,7},{3,3}};
152 for(
int icoll=0; icoll<mxColl; icoll++){
153 for(
int iq=0; iq<mxQ;iq++) {
154 TGraph *gr=
new TGraph;
157 gr->SetLineStyle(style[icoll][iq]);
158 gr->SetMarkerSize(0);
159 for(
int i=0; i<mxPt; i++){
160 if(icoll==0) gr->SetPoint(i,xPt[i],theory[icoll][iq][i]);
161 else gr->SetPoint(i,xPt[i],2.*theory[icoll][iq][i]);
169 void drawTheo(
int iq) {
170 for(
int id=0;
id<mxColl;
id++) {
171 if(
id==1 && iq==1)
continue;
172 grT[iq][id]->Draw(
"p c same");
180 void prd2009Zxsec() {
186 gPad->SetTopMargin(0.0); gPad->SetBottomMargin(0.15);
187 gPad->SetLeftMargin(0.1); gPad->SetRightMargin(0.03);
188 gPad->SetGridy(
false); gPad->SetGridx(
false);
189 gPad->SetLogy(); gPad->SetLogx();
191 hBaseZ->GetXaxis()->SetTitleOffset(0.9);
192 hBaseZ->GetXaxis()->CenterTitle();
193 hBaseZ->GetXaxis()->SetTitleSize(0.07);
194 hBaseZ->GetXaxis()->SetLabelSize(0.06);
195 hBaseZ->GetYaxis()->SetTitleOffset(0.6);
196 hBaseZ->GetYaxis()->CenterTitle();
197 hBaseZ->GetYaxis()->SetTitleSize(0.07);
198 hBaseZ->GetYaxis()->SetLabelSize(0.06);
200 hBaseZ->SetMinimum(1.0); hBaseZ->SetMaximum(2500);
208 leg=
new TLegend(0.6,0.3,0.95,0.6);
210 leg->SetEntrySeparation(0.01);
212 leg->SetFillColor(kWhite);
213 leg->SetLineColor(kWhite);
214 leg->SetTextSize(0.05);
215 leg->SetHeader(
" FEWZ and MSTW08 NLO PDFs");
216 leg->AddEntry(grT[0][0],
" p+p #rightarrow W^{+}",
"l");
217 leg->AddEntry(grTZ[0],
" p+p #rightarrow Z/#gamma*",
"l");
218 leg->AddEntry(grT[1][0],
" p+p #rightarrow W^{-}",
"l");
219 leg->AddEntry(grTZ[1],
" p+#bar{p} #rightarrow Z/#gamma*",
"l");
220 leg->AddEntry(grT[0][1],
" p+#bar{p} #rightarrow W^{+/-}",
"l");
229 hBaseZ=
new TH1F(txt0,
"; #sqrt{s} (GeV); #sigma_{Z/#gamma*} #upoint BR(Z/#gamma* #rightarrow ll) (pb) ", 100, 350,12000);
235 float offset[mxDZ]={0,-250,250};
236 float style[mxDZ]={29,20,21};
237 float color[mxDZ]={kRed,kGreen,kOrange};
238 float roots[mxDZ]={500,7000,7000};
239 for(
int id=0;
id<mxDZ;
id++) {
240 TGraphAsymmErrors *gr=
new TGraphAsymmErrors;
241 gr->SetMarkerStyle(style[
id]);
242 if(colorPlot) gr->SetMarkerColor(color[
id]);
243 gr->SetMarkerSize(1.0);
245 gr->SetPoint(0,roots[
id]+offset[
id],crossZ[
id]);
250 float yu=sqrt(a*a+b*b+d*d);
251 float yd=sqrt(a*a+c*c+d*d);
252 gr->SetPointError(0,0,0,yd,yu);
260 for(
int id=mxDZ-1;
id>=0;
id--) {
261 grDZ[id]->Draw(
"p e z same");
270 for(
int j=0; j<mxPt; j++)
273 int style[mxColl]={1,3};
274 for(
int icoll=0; icoll<mxColl; icoll++){
275 TGraph *gr=
new TGraph;
278 gr->SetLineStyle(style[icoll]);
279 gr->SetMarkerSize(0);
280 for(
int i=0; i<mxPt; i++){
281 if(icoll==0) gr->SetPoint(i,xPt[i],theoryZ[icoll][i]);
282 else gr->SetPoint(i,xPt[i],2.*theoryZ[icoll][i]);
290 for(
int id=0;
id<mxColl;
id++) {
291 grTZ[id]->Draw(
"p c same");
298 void theoryPoints() {
300 string path=
"/star/u/stevens4/wAnalysis/xSecPaper/plots/xSecBR/";
301 string names[6]={
"ppWplusRoots.csv",
"ppWminusRoots.csv",
"ppbarWplusRoots.csv",
"ppbarWminusRoots.csv",
"ppZroots.csv",
"ppbarZroots.csv"};
302 int coll[6]={0,0,1,1,0,1};
303 int q[6]={0,1,0,1,2,2};
304 for(
int ifile=0; ifile<6; ifile++){
305 ifstream file(Form(
"%s%s",path.data(),names[ifile].data()));
314 if(q[ifile]<2) theory[coll[ifile]][q[ifile]][i]=atof(line.data());
315 else theoryZ[coll[ifile]][i]=atof(line.data());