1 #include "commonmacro/common.h"
2 #include "common/Name.cc"
3 #include "commonmacro/histutil.h"
4 #include "commonmacro/ua1.h"
8 "links/P01hi.central.2000.hist/finish_cut88778999_iter3.hist.root",
10 "links/P01hi.minbias.2000.hist/finish_cut97778999_iter3.hist.root",
11 const char* inPeripheral=
12 "links/P01hi.minbias.2000.hist/finish_cut57778999_iter3.hist.root",
13 const char* psDir=
"psFinal"
18 TFile* rCentral=
new TFile(inCentral);
19 TFile* rMinbias=
new TFile(inMinbias);
20 TFile* rPeripheral=
new TFile(inPeripheral);
28 char name[200],title[200],txt[500];
32 setName(name,
"gSpecCorrected",bin,sign);
34 TGraphAsymmErrors* gCentral=(TGraphAsymmErrors*)rCentral->Get(name);
35 TGraphAsymmErrors* gMinbias=(TGraphAsymmErrors*)rMinbias->Get(name);
36 TGraphAsymmErrors* gPeripheral=(TGraphAsymmErrors*)rPeripheral->Get(name);
42 cout <<
">>>>WARNING DOING KLUDGE" << endl;
43 cout <<
">>>>WARNING DOING KLUDGE" << endl;
44 cout <<
">>>>WARNING DOING KLUDGE" << endl;
46 kludgeBackground(gCentral,0.08);
47 kludgeBackground(gMinbias,0.08);
48 kludgeBackground(gPeripheral,0.05);
50 kludgeSystematics(gCentral);
51 kludgeSystematics(gMinbias);
52 kludgeSystematics(gPeripheral);
58 gStyle->SetOptStat(0); gStyle->SetOptTitle(0);
60 gStyle->SetPadTickY(1);
64 gStyle->SetTextFont(font); gStyle->SetTitleFont(font);
65 gStyle->SetLabelFont(font,
"x"); gStyle->SetLabelFont(font,
"y");
71 TCanvas* c1=
new TCanvas(
"c1",
"c1",400,600);
73 TPad* p1=
new TPad(
"p1",
"p1",0.01,0.67,1,1,0,0,0);
74 p1->SetBottomMargin(0); p1->Draw();
76 TPad* p2=
new TPad(
"p2",
"p2",0.01,0.33,1,.67,0,0,0);
77 p2->SetTopMargin(0); p2->SetBottomMargin(0); p2->Draw();
79 TPad* p3=
new TPad(
"p3",
"p3",0.01,0.01,1,.33,0,0,0);
80 p3->SetTopMargin(0); p3->Draw();
83 TLatex* ltx=
new TLatex;
84 double xText=2.2,textSize=0.05,titleSize=0.05,iTextSize=0.03;
86 double yMin=0,yMax=1.6;
87 double xMin=0,xMax=6.2;
89 double markerSize = 0.8;
91 int lowPtMarkerStyle=4;
93 TCanvas* c2=
new TCanvas(
"c2",
"c2",400,400);
100 double geomScale=geom/Asq;
102 TGraphAsymmErrors* minbiasUA1X=makeUA1Ratio(gMinbias,0,geomScale);
104 TGraphAsymmErrors* minbiasUA1=removeXErrors(minbiasUA1X);
106 TGraphAsymmErrors* minbiasUA1Err=
107 makeUA1ScaleError(gMinbias,geomScale,geomScale,geomScale);
109 TGraphAsymmErrors* hMinbias=makeHMinus(0);
110 TGraphAsymmErrors* hMinbiasUA1=makeUA1Ratio(hMinbias,0,geomScale);
111 TGraphAsymmErrors* hMinbiasUA1Err=
112 makeUA1ScaleError(hMinbias,geomScale,geomScale,geomScale);
113 TGraphAsymmErrors* hMinbiasUA1=removeXErrors(hMinbiasUA1);
116 minbiasUA1->SetMarkerStyle(markerStyle);
117 minbiasUA1->SetMarkerSize(markerSize);
118 minbiasUA1->SetMinimum(yMin); minbiasUA1->SetMaximum(yMax);
119 minbiasUA1->Draw(
"ap");
120 minbiasUA1Err->Draw(
"[]");
122 hMinbiasUA1->SetMarkerStyle(lowPtMarkerStyle);
123 hMinbiasUA1->SetMarkerSize(markerSize);
124 hMinbiasUA1->Draw(
"p");
125 hMinbiasUA1Err->Draw(
"[]");
128 TAxis* axis=minbiasUA1->GetXaxis();
129 axis->SetLimits(xMin,xMax);
132 drawAxisBins(minbiasUA1X,tickSize,minbiasUA1->GetYaxis()->GetXmax());
137 ltx->SetTextSize(textSize);
138 strcpy(txt,
"#frac{ 1/p_{T} d^{2} N/dp_{T}d#eta(STAR minbias) #sigma_{geom}}{ 2#pi Ed^{3}#sigma/dp^{3} (UA1) A^{2}}");
139 ltx->DrawLatex(xText,.3,txt);
145 minbiasUA1->SetMinimum(yMin); minbiasUA1->SetMaximum(yMax);
146 minbiasUA1->SetMarkerSize(1);
147 minbiasUA1->Draw(
"ap");
148 minbiasUA1Err->Draw(
"[]");
150 hMinbiasUA1->SetMarkerStyle(lowPtMarkerStyle);
151 hMinbiasUA1->SetMarkerSize(1);
152 hMinbiasUA1->Draw(
"p");
153 hMinbiasUA1Err->Draw(
"[]");
155 minbiasUA1->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
157 drawLine(minbiasUA1->GetXaxis());
159 ltx->SetTextSize(iTextSize);
160 strcpy(txt,
"#frac{ 1/p_{T} d^{2} N/dp_{T}d#eta(STAR minbias) #sigma_{geom}}{ 2#pi Ed^{3}#sigma/dp^{3} (UA1) A^{2}}");
161 ltx->DrawLatex(xText,.20,txt);
163 Print(c2,psDir,
"minbiasOverUA1.ps");
170 double TAAScale=1./TAA;
171 double TAAScaleLow=1./(TAA+1),TAAScaleHigh=1./(TAA-1);
173 TGraphAsymmErrors* centralUA1X=makeUA1Ratio(gCentral,0,TAAScale);
174 TGraphAsymmErrors* centralUA1Err=
175 makeUA1ScaleError(gCentral,TAAScale,TAAScaleLow,TAAScaleHigh);
176 TGraphAsymmErrors* centralUA1=removeXErrors(centralUA1X);
179 TGraphAsymmErrors* hCentral=makeHMinus(2);
180 TGraphAsymmErrors* hCentralUA1=makeUA1Ratio(hCentral,0,TAAScale);
181 TGraphAsymmErrors* hCentralUA1Err=
182 makeUA1ScaleError(hCentral,TAAScale,TAAScaleLow,TAAScaleHigh);
183 TGraphAsymmErrors* hCentralUA1=removeXErrors(hCentralUA1);
186 centralUA1->SetMarkerStyle(markerStyle);
187 centralUA1->SetMinimum(yMin); centralUA1->SetMaximum(yMax-0.01);
188 centralUA1->Draw(
"ap");
190 centralUA1Err->Draw(
"[]");
192 hCentralUA1->SetMarkerStyle(lowPtMarkerStyle);
193 hCentralUA1->SetMarkerSize(markerSize);
194 hCentralUA1->Draw(
"p");
195 hCentralUA1Err->Draw(
"[]");
197 axis=centralUA1->GetXaxis();
198 axis->SetLimits(xMin,xMax);
202 drawAxisBins(centralUA1X,tickSize,minbiasUA1->GetYaxis()->GetXmax());
205 ltx->SetTextSize(textSize);
206 strcpy(txt,
"#frac{ 1/p_{T} d^{2}N/dp_{T}d#eta(STAR central)}{ 2#pi Ed^{3}#sigma/dp^{3} (UA1) T_{AA} }");
207 ltx->DrawLatex(xText,1.2,txt);
209 strcpy(txt,
"STAR h^{-}");
210 ltx->DrawLatex(1.2,.35,txt);
215 centralUA1->SetMinimum(yMin); centralUA1->SetMaximum(yMax);
216 centralUA1->SetMarkerSize(1);
217 centralUA1->Draw(
"ap");
218 centralUA1Err->Draw(
"[]");
219 hCentralUA1->SetMarkerSize(1);
220 hCentralUA1->Draw(
"p");
221 hCentralUA1Err->Draw(
"[]");
222 centralUA1->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
224 drawLine(centralUA1->GetXaxis());
226 ltx->SetTextSize(iTextSize);
227 strcpy(txt,
"#frac{ 1/p_{T} d^{2}N/dp_{T}d#eta(STAR central)}{ 2#pi Ed^{3}#sigma/dp^{3} (UA1) T_{AA} }");
228 ltx->DrawLatex(xText,1.2,txt);
230 Print(c2,psDir,
"centralOverUA1.ps");
235 TGraphAsymmErrors* centralPeriphX=divide(gCentral,gPeripheral);
236 TGraphAsymmErrors* centralPeriph=removeXErrors(centralPeriphX);
238 TGraphAsymmErrors* hPeriph=makeHMinus(1);
239 TGraphAsymmErrors* hCentralPeriph=divide(hCentral,hPeriph);
243 double* y=centralPeriph->GetY();
246 scale(centralPeriph,sc);
252 centralPeriph->SetMarkerStyle(markerStyle);
253 centralPeriph->SetMarkerSize(markerSize);
254 centralPeriph->SetMinimum(0); centralPeriph->SetMaximum(yMax-0.01);
255 centralPeriph->Draw(
"ap");
257 hCentralPeriph->SetMarkerStyle(lowPtMarkerStyle);
258 hCentralPeriph->SetMarkerSize(markerSize);
259 hCentralPeriph->Draw(
"p");
263 axis=centralPeriph->GetXaxis();
264 axis->SetLimits(xMin,xMax);
266 axis->SetTitle(
"p_{T} (GeV/c)");
267 axis->SetTitleSize(titleSize);
268 axis->SetLabelOffset(0.003);
270 drawAxisBins(centralPeriphX,tickSize,minbiasUA1->GetYaxis()->GetXmax());
273 ltx->SetTextSize(textSize);
274 strcpy(txt,
"#frac{ STAR central }{ STAR peripheral } (normalized to 1 @ 2GeV/c)");
275 ltx->DrawLatex(xText,1.3,txt);
277 Print(c1,psDir,
"ratios");
280 c2->Clear(); c2->cd();
282 centralPeriph->SetMarkerStyle(markerStyle);
283 centralPeriph->SetMinimum(0); centralPeriph->SetMaximum(yMax);
284 centralPeriph->SetMarkerSize(1);
285 centralPeriph->Draw(
"ap");
286 centralPeriph->GetXaxis()->SetTitle(
"p_{T} (GeV/c)");
288 hCentralPeriph->SetMarkerStyle(lowPtMarkerStyle);
289 hCentralPeriph->SetMarkerSize(1);
295 ltx->SetTextSize(iTextSize);
296 strcpy(txt,
"#frac{ STAR central }{ STAR peripheral } (normalized to 1 @ 2GeV/c)");
297 ltx->DrawLatex(1,1.3,txt);
299 Print(c2,psDir,
"centralOverPeriph");
305 void drawLine(TAxis* a)
307 TLine* line =
new TLine;
308 line->SetLineStyle(2);
310 line->DrawLine(a->GetXmin(),1,a->GetXmax(),1);