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* gCentralX=(TGraphAsymmErrors*)rCentral->Get(name);
35 TGraphAsymmErrors* gMinbiasX=(TGraphAsymmErrors*)rMinbias->Get(name);
36 TGraphAsymmErrors* gPeripheralX=(TGraphAsymmErrors*)rPeripheral->Get(name);
42 cout <<
">>>>WARNING DOING KLUDGE" << endl;
43 cout <<
">>>>WARNING DOING KLUDGE" << endl;
44 cout <<
">>>>WARNING DOING KLUDGE" << endl;
46 kludgeBackground(gCentralX,0.08);
47 kludgeBackground(gMinbiasX,0.08);
48 kludgeBackground(gPeripheralX,0.05);
50 kludgeSystematics(gCentralX);
51 kludgeSystematics(gMinbiasX);
52 kludgeSystematics(gPeripheralX);
58 TGraphAsymmErrors* gCentralLowPt=makeHMinus(2);
59 TGraphAsymmErrors* gMinbiasLowPt=makeHMinus(0);
60 TGraphAsymmErrors* gPeripheralLowPt=makeHMinus(1);
63 float sigmaUA1_200=42;
64 float ua1Scale200 = 2.*3.14159/sigmaUA1_200;
66 float sigmaUA1_130=40.5;
67 float ua1Scale130= 2.*3.14159/sigmaUA1_130;
69 TGraphErrors* gUA1Data200=ua1Data200();
70 scale(gUA1Data200,ua1Scale200);
72 TF1* fUA1Fit130 = ua1Fit130(ua1Scale130);
77 gCentralLowPt=removeXErrors(gCentralLowPt);
78 gMinbiasLowPt=removeXErrors(gMinbiasLowPt);
79 gPeripheralLowPt=removeXErrors(gPeripheralLowPt);
83 gStyle->SetOptStat(0); gStyle->SetOptTitle(0);
84 gStyle->SetPadTickX(1);
85 gStyle->SetPadTickY(1);
89 gStyle->SetTextFont(font); gStyle->SetTitleFont(font);
90 gStyle->SetLabelFont(font,
"x"); gStyle->SetLabelFont(font,
"y");
93 TLatex* ltx=
new TLatex;
95 TCanvas* c1=
new TCanvas(
"c1",
"c1",400,500);
99 double yMin=1e-7,yMax=10000;
100 double textSize=0.03;
101 double titleSize=0.04;
103 double labelSize=0.03;
104 double yTitleOffset=1.2;
105 double xTitleOffset=0.8;
106 double tickSize=9990;
110 c1->cd(); gPad->SetLogy();
112 int centralMarker=29;
114 int peripheralMarker=22;
121 gCentral=removeXErrors(gCentralX);
123 gCentral->SetMinimum(yMin); gCentral->SetMaximum(yMax);
124 gCentral->SetMarkerStyle(centralMarker);
125 gCentral->SetMarkerSize(markerSize+.2);
126 gCentral->Draw(
"ap");
129 strcpy(txt,
"1/p_{T} d^{2}N^{(h^{-}+h^{+})/2}/dp_{T}d#eta #cbar_{|#eta|<0.5}(GeV/c)^{-2}");
132 axis=gCentral->GetYaxis();
134 axis->SetTitleSize(titleSize);
135 axis->SetTitleOffset(yTitleOffset);
136 axis->SetLabelSize(labelSize);
139 axis=gCentral->GetXaxis();
140 axis->SetTitle(
"p_{T} (GeV/c)");
141 axis->SetTitleSize(titleSize);
142 axis->SetTitleOffset(xTitleOffset);
143 axis->SetLabelOffset(0.003);
144 axis->SetLabelSize(labelSize);
145 axis->SetLimits(xMin,xMax);
149 gCentralLowPt->SetMarkerStyle(centralMarker);
150 gCentralLowPt->SetMarkerSize(markerSize);
151 gCentralLowPt->Draw(
"p");
163 gMinbias=removeXErrors(gMinbiasX);
165 gMinbias->SetMarkerStyle(minbiasMarker);
166 gMinbias->SetMarkerSize(markerSize);
169 gMinbiasLowPt->SetMarkerStyle(minbiasMarker);
170 gMinbiasLowPt->SetMarkerSize(markerSize);
171 gMinbiasLowPt->Draw(
"p");
176 gPeripheral=removeXErrors(gPeripheralX);
178 gPeripheral->SetMarkerStyle(peripheralMarker);
179 gPeripheral->SetMarkerSize(markerSize);
180 gPeripheral->Draw(
"p");
182 gPeripheralLowPt->SetMarkerStyle(peripheralMarker);
183 gPeripheralLowPt->SetMarkerSize(markerSize);
184 gPeripheralLowPt->Draw(
"p");
190 gUA1Data200->SetMarkerStyle(ua1Marker);
191 gUA1Data200->SetMarkerSize(markerSize);
195 gUA1Data200->Draw(
"p");
196 fUA1Fit130->SetRange(.1,6);
197 fUA1Fit130->Draw(
"same");
203 TLegend* l=
new TLegend(0.5,0.7,0.8,0.8);
204 l->SetTextSize(textSize);
205 l->SetBorderSize(0); l->SetFillColor(4000);
206 l->AddEntry(gCentral,
"central 0-5%",
"p");
207 l->AddEntry(gPeripheral,
"periperhal 60-80%",
"p");
208 l->AddEntry(gMinbias,
"minimum bias",
"p");
209 l->AddEntry(gUA1Data200,
"ua1 200 GeV data",
"p");
210 l->AddEntry(fUA1Fit130,
"ua1 130 GeV fit",
"l");
213 Print(c1,psDir,
"spectra");
217 void drawLine(TAxis* a)
219 TLine* line =
new TLine;
220 line->SetLineStyle(2);
222 line->DrawLine(a->GetXmin(),1,a->GetXmax(),1);