]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/OtherData.C
Renamed script to add Central AOD task from
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / OtherData.C
CommitLineData
ffca499d 1//____________________________________________________________________
2/**
3 * @defgroup pwg2_forward_otherdata External data
4 *
5 * @ingroup pwg2_forward_scripts
6 */
7c1a1f1d 7/**
8 * @file
9 *
ffca499d 10 * @ingroup pwg2_forward_script_otherdata
7c1a1f1d 11 */
7e4038b5 12#include <TGraphAsymmErrors.h>
13#include <TMultiGraph.h>
14#include <TStyle.h>
15#include <TMath.h>
16#include <TCanvas.h>
17#include <TLegend.h>
18
7e4038b5 19//____________________________________________________________________
20/**
21 * Values used
22 *
7c1a1f1d 23 * @ingroup pwg2_forward_otherdata
7e4038b5 24 */
25enum {
ffca499d 26 UA5,
27 CMS,
28 ALICE,
29 INEL,
30 INELGt0,
31 NSD
32};
33enum {
34 /** Style used for UA5 data */
35 UA5Style = 21,
36 /** Style used for CMS data */
37 CMSStyle = 29,
38 /** Style used for ALICE published data */
39 ALICEStyle = 27,
7e4038b5 40 /** Color used for UA5 data */
41 UA5Color = kBlue+1,
42 /** Color used for CMS data */
43 CMSColor = kGreen+1,
44 /** Color used for ALICE data */
45 ALICEColor = kMagenta+1,
ffca499d 46};
47enum {
7e4038b5 48 /** Marker style INEL data */
ffca499d 49 INELStyle = 22,
7e4038b5 50 /** Marker style INEL>0 data */
ffca499d 51 INELGt0Style= 29,
7e4038b5 52 /** Marker style NSD data */
ffca499d 53 NSDStyle = 23,
54 /** Color used for UA5 data */
55 INELColor = kBlue+1,
56 /** Color used for CMS data */
57 INELGt0Color = kGreen+1,
58 /** Color used for ALICE data */
59 NSDColor = kMagenta+1
60};
61enum {
62 /** Style offset for mirror data */
7e4038b5 63 MirrorOff = 4
64};
65
66//____________________________________________________________________
67/**
ffca499d 68 * Set graph attributes based on trigger type and experiment.
7e4038b5 69 *
70 * @param g Graph
ffca499d 71 * @param trig Trigger (INEL, INEL>0, NSD)
72 * @param exp Experiment
73 * @param mirror True if mirrored data
7e4038b5 74 * @param name Name of graph
75 * @param title Title of graph
76 *
7c1a1f1d 77 * @ingroup pwg2_forward_otherdata
7e4038b5 78 */
79void
ffca499d 80SetGraphAttributes(TGraph* g, Int_t trig, Int_t exp, bool mirror,
7e4038b5 81 const Char_t* name, const Char_t* title)
82{
ffca499d 83 Int_t color = 0;
84 switch (exp) {
85 case UA5: color = UA5Color; break;
86 case CMS: color = CMSColor; break;
87 case ALICE: color = ALICEColor; break;
88 }
89 Int_t style = 0;
90 switch (exp) {
91 case UA5: style = UA5Style; break;
92 case CMS: style = CMSStyle; break;
93 case ALICE: style = ALICEStyle; break;
94 }
95 Float_t size = g->GetMarkerSize();
96 switch (style) {
97 case 21:
98 case 25: size *= 0.8; break;
99 case 27: size *= 1.4; break;
100 }
101
102 if (mirror) style += MirrorOff;
103
7e4038b5 104 g->SetName(name);
105 g->SetTitle(title);
ffca499d 106 g->SetMarkerStyle(style);
107 g->SetMarkerSize(size);
7e4038b5 108 g->SetMarkerColor(color);
109 g->SetLineColor(color);
110 g->SetFillColor(0);
111 g->SetFillStyle(0);
112 g->GetHistogram()->SetStats(kFALSE);
113 g->GetHistogram()->SetXTitle("#eta");
114 g->GetHistogram()->SetYTitle("#frac{1}{N} #frac{dN_{ch}}{#eta}");
115}
116
117//____________________________________________________________________
118/**
119 * Get the UA5 NSD data for pp at @f$ \sqrt{s} = 900GeV@f$
120 * p7886_d1x1y4 - Z.Phys.C33:1-6,1986.
121 *
122 * @param mirrored Wether to produce the mirrored plot
123 *
124 * @return graph of data
125 *
7c1a1f1d 126 * @ingroup pwg2_forward_otherdata
7e4038b5 127 */
128TGraphAsymmErrors* UA5Nsd(Bool_t mirrored=false)
129{
130 //UA5 data NSD - p7886_d1x1y4 - Z.Phys.C33:1-6,1986.
131 double x[] = { 0.125, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875, 2.125,
132 2.375, 2.625, 2.875, 3.125, 3.375, 3.625, 3.875, 4.125, 4.375,
133 4.625 };
134 double exm[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
135 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
136 double exp[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
137 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
138 double y[] = { 3.48, 3.38, 3.52, 3.68, 3.71, 3.86, 3.76, 3.66, 3.72,
139 3.69, 3.56, 3.41, 3.15, 3.09, 2.74, 2.73, 2.32, 1.99, 1.69 };
140 double eym[] = { 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
141 0.07, 0.07, 0.07, 0.07, 0.08, 0.08, 0.09, 0.09, 0.1, 0.13 };
142 double eyp[] = { 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
143 0.07, 0.07, 0.07, 0.07, 0.08, 0.08, 0.09, 0.09, 0.1, 0.13 };
860e603e 144 const int np = 19;
7e4038b5 145 double xm[np];
b2e7f2d6 146 double exmm[np];
147 double expm[np];
148 double ym[np];
149 double eymm[np];
150 double eypm[np];
151 for (int i = 0; i < np; i++) {
152 int j = np-1-i;
153 xm[i] = -x[j];
154 exmm[i] = exm[j];
155 expm[i] = exp[j];
156 ym[i] = y[j];
157 eymm[i] = eym[j];
158 eypm[i] = eyp[j];
159 }
7e4038b5 160
b2e7f2d6 161 TGraphAsymmErrors* g = new TGraphAsymmErrors(19,x, y, exm, exp, eym, eyp);
162 TGraphAsymmErrors* gm = new TGraphAsymmErrors(19,xm,ym,exmm,expm,eymm,eypm);
ffca499d 163 SetGraphAttributes(g, NSD, UA5, false,"ua5_nsd", "UA5 NSD");
164 SetGraphAttributes(gm, NSD, UA5, true,"ua5_nsd_mirrored",
7e4038b5 165 "UA5 NSD (mirrored)");
166
167 return (mirrored ? gm : g);
168}
169
170//____________________________________________________________________
171/**
172 * Get the UA5 INEL data for pp at @f$ \sqrt{s} = 900GeV@f$
173 * p7886_d2x1y2 - Z.Phys.C33:1-6,1986.
174 *
175 * @param mirrored Wether to produce the mirrored plot
176 *
177 * @return graph of data
178 *
7c1a1f1d 179 * @ingroup pwg2_forward_otherdata
7e4038b5 180 */
181TGraphAsymmErrors* UA5Inel(Bool_t mirrored=false)
182{
183 //UA5 data INEL - p7886_d2x1y2 - Z.Phys.C33:1-6,1986.
184 double x[] = { 0.125, 0.375, 0.625, 0.875, 1.125, 1.375, 1.625, 1.875, 2.125,
185 2.375, 2.625, 2.875, 3.125, 3.375, 3.625, 3.875, 4.125, 4.375,
186 4.625 };
187 double exm[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
188 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
189 double exp[] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
190 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
191 double y[] = { 3.14, 3.04, 3.17, 3.33, 3.33, 3.53, 3.46, 3.41, 3.45,
192 3.39, 3.07, 3.07, 2.93, 2.93, 2.55, 2.48, 2.18, 1.91, 1.52 };
193 double eym[] = { 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
194 0.07, 0.07, 0.07, 0.07, 0.08, 0.08, 0.09, 0.09, 0.1, 0.13 };
195 double eyp[] = { 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07, 0.07,
196 0.07, 0.07, 0.07, 0.07, 0.08, 0.08, 0.09, 0.09, 0.1, 0.13 };
197 const int np = 19;
198 double xm[np];
b2e7f2d6 199 double exmm[np];
200 double expm[np];
201 double ym[np];
202 double eymm[np];
203 double eypm[np];
204 for (int i = 0; i < np; i++) {
205 int j = np-1-i;
206 xm[i] = -x[j];
207 exmm[i] = exm[j];
208 expm[i] = exp[j];
209 ym[i] = y[j];
210 eymm[i] = eym[j];
211 eypm[i] = eyp[j];
212 }
213 TGraphAsymmErrors* g = new TGraphAsymmErrors(np,x, y, exm, exp, eym, eyp);
214 TGraphAsymmErrors* gm = new TGraphAsymmErrors(np,xm,ym,exmm,expm,eymm,eypm);
7e4038b5 215
ffca499d 216 SetGraphAttributes(g, INEL, UA5, false, "ua5_inel", "UA5 INEL");
217 SetGraphAttributes(gm, INEL, UA5, true, "ua5_inel_mirrored",
7e4038b5 218 "UA5 INEL (mirrored)");
219
220 return (mirrored ? gm : g);
221}
222
223//____________________________________________________________________
224/**
225 * Get the ALICE INEL data in @f$ |\eta|<1.3@f$ for pp at @f$ \sqrt{s}
226 * = 900GeV@f$
227 * p7742_d1x1y1 - Eur.Phys.J.C68:89-108,2010.
228 *
229 * @return graph of data
230 *
7c1a1f1d 231 * @ingroup pwg2_forward_otherdata
7e4038b5 232 */
233TGraphAsymmErrors* AliceCentralInel900()
234{
235 // INEL - p7742_d1x1y1 - Eur.Phys.J.C68:89-108,2010.
236 TGraphAsymmErrors* g = 0;
237 double x[] = { -1.3, -1.1, -0.9, -0.7, -0.5, -0.3,
238 -0.1, 0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3 };
239 double exm[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
240 0.1, 0.1, 0.1, 0.1, 0.1 };
241 double exp[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
242 0.1, 0.1, 0.1, 0.1, 0.1 };
243 double y[] = { 3.28, 3.28, 3.22, 3.12, 3.06, 3.02, 2.98, 3.02, 3.02,
244 3.05, 3.15, 3.21, 3.26, 3.33 };
245 double eym[] = { 0.06324555320336758, 0.06324555320336758,
246 0.06324555320336758, 0.06324555320336758,
247 0.06324555320336758, 0.05385164807134505,
248 0.05385164807134505, 0.05385164807134505,
249 0.05385164807134505, 0.06324555320336758,
250 0.06324555320336758, 0.06324555320336758,
251 0.06324555320336758, 0.06324555320336758 };
252 double eyp[] = { 0.08246211251235322, 0.08246211251235322,
253 0.08246211251235322, 0.08246211251235322,
254 0.08246211251235322, 0.08246211251235322,
255 0.07280109889280519, 0.08246211251235322,
256 0.08246211251235322, 0.08246211251235322,
257 0.08246211251235322, 0.08246211251235322,
258 0.08246211251235322, 0.08246211251235322 };
259 const int np = 14;
260 for (int i = 0; i < np; i++) {
261 eym[i] += 0.02;
262 eyp[i] += 0.02;
263 }
264 g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 265 SetGraphAttributes(g, INEL, ALICE, false, "alice_inel",
7e4038b5 266 "ALICE INEL (publ.)");
267
268 return g;
269}
270
271//____________________________________________________________________
272/**
273 * Get the ALICE INEL>0 data in @f$ |\eta|<1.3@f$ for pp at @f$
274 * \sqrt{s} = 900GeV@f$
275 *
276 * p7741_d4x1y1 - Eur.Phys.J.C68:345-354,2010.
277 *
278 * @return graph of data
279 *
7c1a1f1d 280 * @ingroup pwg2_forward_otherdata
7e4038b5 281 */
282TGraphAsymmErrors* AliceCentralInelGt900()
283{
284 // INEL>0 - p7741_d4x1y1 - Eur.Phys.J.C68:345-354,2010.
285 double x[] = { -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.7,
286 0.9 };
287 double exm[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
288 0.1 };
289 double exp[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
290 0.1 };
291 double y[] = { 4.0, 3.87, 3.8, 3.7, 3.67, 3.73, 3.72, 3.77, 3.92,
292 4.01 };
293 double eym[] = { 0.07615773105863909, 0.07615773105863909,
294 0.07615773105863909, 0.06324555320336758,
295 0.06324555320336758, 0.06324555320336758,
296 0.0670820393249937, 0.07615773105863909,
297 0.07615773105863909, 0.07615773105863909 };
298 double eyp[] = { 0.08544003745317531, 0.07615773105863909,
299 0.07615773105863909, 0.07280109889280519,
300 0.07280109889280519, 0.07280109889280519,
301 0.07615773105863909, 0.07615773105863909,
302 0.08544003745317531, 0.08544003745317531 };
303 const int np = 10;
304 for (int i = 0; i < np; i++) {
305 double stat = (i >= 3 && i<=5) ? 0.02 : 0.03;
306 eym[i] += stat;
307 eyp[i] += stat;
308 }
309
310 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 311 SetGraphAttributes(g, INELGt0, ALICE, false, "alice_inelgt900",
7e4038b5 312 "ALICE INEL>0 (publ.)");
313 return g;
314
315}
316
317//____________________________________________________________________
318/**
319 * Get the ALICE INEL>0 data in @f$ |\eta|<0.9@f$ for pp at @f$
320 * \sqrt{s} = 2.36TeV@f$
321 *
322 * p7741_d5x1y1 - Eur.Phys.J.C68:345-354,2010.
323 *
324 * @return graph of data
325 *
7c1a1f1d 326 * @ingroup pwg2_forward_otherdata
7e4038b5 327 */
328TGraphAsymmErrors* AliceCentralInelGt2360()
329{
330 // INEL>0 - p7741_d5x1y1 - Eur.Phys.J.C68:345-354,2010.
331 double x[] = { -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.7, 0.9 };
332 double exm[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 };
333 double exp[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 };
334 double y[] = { 4.91, 4.76, 4.63, 4.64, 4.55, 4.55, 4.64, 4.66, 4.82, 4.88 };
335 double eym[] = { 0.08544003745317531, 0.08544003745317531,
336 0.08544003745317531, 0.08544003745317531,
337 0.08544003745317531, 0.08544003745317531,
338 0.08544003745317531, 0.08544003745317531,
339 0.08544003745317531, 0.08544003745317531 };
340 double eyp[] = { 0.11401754250991379, 0.11401754250991379,
341 0.1044030650891055, 0.1044030650891055,
342 0.1044030650891055, 0.1044030650891055,
343 0.1044030650891055, 0.1044030650891055,
344 0.11401754250991379, 0.11401754250991379 };
345 const int np = 10;
346 for (int i = 0; i < np; i++) {
347 double stat = 0.3;
348 eym[i] += stat;
349 eyp[i] += stat;
350 }
351
352 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 353 SetGraphAttributes(g, INELGt0, ALICE, false, "alice_inelgt2360",
7e4038b5 354 "ALICE INEL>0 (publ.)");
355 return g;
356}
357
358//____________________________________________________________________
359/**
360 * Get the ALICE INEL>0 data in @f$ |\eta|<0.9@f$ for pp at @f$
361 * \sqrt{s} = 7TeV@f$
362 *
363 * p7741_d6x1y1 - Eur.Phys.J.C68:345-354,2010.
364 *
365 * @return graph of data
366 *
7c1a1f1d 367 * @ingroup pwg2_forward_otherdata
7e4038b5 368 */
369TGraphAsymmErrors* AliceCentralInelGt7000()
370{
371 // INEL>0 - p7741_d6x1y1 - Eur.Phys.J.C68:345-354,2010.
372// Plot: p7741_d6x1y1
373 double x[] = { -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.7, 0.9 };
374 double exm[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 };
375 double exp[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 };
376 double y[] = { 6.22, 6.07, 6.01, 5.84, 5.85, 5.85, 5.91, 6.01, 6.17, 6.26 };
377 double eym[] = { 0.1216552506059644, 0.1216552506059644,
378 0.1216552506059644, 0.11180339887498948,
379 0.11180339887498948, 0.11180339887498948,
380 0.11180339887498948, 0.1216552506059644,
381 0.1216552506059644, 0.1216552506059644 };
382 double eyp[] = { 0.21095023109728983, 0.21095023109728983,
383 0.2009975124224178, 0.2009975124224178,
384 0.2009975124224178, 0.2009975124224178,
385 0.2009975124224178, 0.2009975124224178,
386 0.21095023109728983, 0.21095023109728983 };
387 const int np = 10;
388 for (int i = 0; i < np; i++) {
389 double stat = 0.2;
390 eym[i] += stat;
391 eyp[i] += stat;
392 }
393
394 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 395 SetGraphAttributes(g, INELGt0, ALICE, false, "alice_inelgt7000",
7e4038b5 396 "ALICE INEL>0 (publ.)");
397 return g;
398}
399
400//____________________________________________________________________
401/**
402 * Get the ALICE NSD data in @f$ |\eta|<1.3@f$ for pp at @f$
403 * \sqrt{s} = 900GeV@f$
404 *
405 * p7742_d2x1y1 - Eur.Phys.J.C68:89-108,2010.
406 *
407 * @return graph of data
408 *
7c1a1f1d 409 * @ingroup pwg2_forward_otherdata
7e4038b5 410 */
411TGraphAsymmErrors* AliceCentralNsd900()
412{
413 //NSD - p7742_d2x1y1 - Eur.Phys.J.C68:89-108,2010.
414 double x[] = { -1.3, -1.1, -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3,
415 0.5, 0.7, 0.9, 1.1, 1.3 };
416 double exm[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
417 0.1, 0.1, 0.1, 0.1, 0.1 };
418 double exp[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
419 0.1, 0.1, 0.1, 0.1, 0.1 };
420 double y[] = { 3.9, 3.89, 3.81, 3.7, 3.64, 3.59, 3.53, 3.58, 3.59,
421 3.61, 3.74, 3.8, 3.87, 3.95 };
422 double eym[] = { 0.13341664064126335, 0.13152946437965907,
423 0.13152946437965907, 0.1216552506059644,
424 0.1216552506059644, 0.1216552506059644,
425 0.1216552506059644, 0.1216552506059644,
426 0.1216552506059644, 0.1216552506059644,
427 0.1216552506059644, 0.13152946437965907,
428 0.13152946437965907, 0.13341664064126335 };
429 double eyp[] = { 0.13341664064126335, 0.13152946437965907,
430 0.13152946437965907, 0.1216552506059644,
431 0.1216552506059644, 0.1216552506059644,
432 0.1216552506059644, 0.1216552506059644,
433 0.1216552506059644, 0.1216552506059644,
434 0.1216552506059644, 0.13152946437965907,
435 0.13152946437965907, 0.13341664064126335 };
436 const int np = 14;
437 for (int i = 0; i < np; i++) {
438 double stat = (i == 0 || i == np-1) ? 0.03 : 0.02;
439 eym[i] += stat;
440 eyp[i] += stat;
441 }
442
443 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 444 SetGraphAttributes(g, NSD, ALICE, false, "alice_nsd", "ALICE NSD (publ.)");
7e4038b5 445
446 return g;
447}
448
449//____________________________________________________________________
450/**
451 * Get the ALICE INEL data in @f$ |\eta|<1.3@f$ for pp at @f$
452 * \sqrt{s} = 2.36TeV@f$
453 *
454 * p7742_d3x1y1 - Eur.Phys.J.C68:89-108,2010.
455 *
456 * @return graph of data
457 *
7c1a1f1d 458 * @ingroup pwg2_forward_otherdata
7e4038b5 459 */
460TGraphAsymmErrors* AliceCentralInel2360()
461{
462 // INEL - p7742_d3x1y1 - Eur.Phys.J.C68:89-108,2010.
463 double x[] = { -1.3, -1.1, -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3,
464 0.5, 0.7, 0.9, 1.1, 1.3 };
465 double exm[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
466 0.1, 0.1, 0.1, 0.1, 0.1 };
467 double exp[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
468 0.1, 0.1, 0.1, 0.1, 0.1 };
469 double y[] = { 4.08, 4.01, 4.0, 3.88, 3.77, 3.8, 3.73, 3.71, 3.79,
470 3.82, 3.94, 4.02, 4.05, 4.16 };
471 double eym[] = { 0.13341664064126335, 0.12369316876852982,
472 0.12369316876852982, 0.1216552506059644,
473 0.1216552506059644, 0.1216552506059644,
474 0.1216552506059644, 0.11180339887498948,
475 0.1216552506059644, 0.1216552506059644,
476 0.12369316876852982, 0.12369316876852982,
477 0.13341664064126335, 0.13341664064126335 };
478 double eyp[] = { 0.2716615541441225, 0.2716615541441225,
479 0.2716615541441225, 0.260768096208106,
480 0.25079872407968906, 0.25079872407968906,
481 0.25079872407968906, 0.25079872407968906,
482 0.25079872407968906, 0.260768096208106,
483 0.261725046566048, 0.2716615541441225,
484 0.2716615541441225, 0.2816025568065745 };
485 const int np = 14;
486 for (int i = 0; i < np; i++) {
487 double stat = (i < 3 || i > np-1-4) ? 0.03 : 0.02;
488 eym[i] += stat;
489 eyp[i] += stat;
490 }
491
492 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 493 SetGraphAttributes(g, NSD, ALICE, false, "alice_inel2360",
7e4038b5 494 "ALICE INEL (publ.)");
495 return g;
496}
497
498//____________________________________________________________________
499/**
500 * Get the ALICE NSD data in @f$ |\eta|<1.3@f$ for pp at @f$
501 * \sqrt{s} = 2.36TeV@f$
502 *
503 * p7742_d4x1y1 - Eur.Phys.J.C68:89-108,2010.
504 *
505 * @return graph of data
506 *
7c1a1f1d 507 * @ingroup pwg2_forward_otherdata
7e4038b5 508 */
509TGraphAsymmErrors* AliceCentralNsd2360()
510{
511 // NSD - p7742_d4x1y1 - Eur.Phys.J.C68:89-108,2010.
512 double x[] = { -1.3, -1.1, -0.9, -0.7, -0.5, -0.3, -0.1, 0.1, 0.3,
513 0.5, 0.7, 0.9, 1.1, 1.3 };
514 double exm[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
515 0.1, 0.1, 0.1, 0.1, 0.1 };
516 double exp[] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1,
517 0.1, 0.1, 0.1, 0.1, 0.1 };
518 double y[] = { 4.79, 4.72, 4.7, 4.56, 4.44, 4.47, 4.39, 4.37, 4.47,
519 4.5, 4.64, 4.73, 4.76, 4.9 };
520 double eym[] = { 0.13601470508735444, 0.13341664064126335,
521 0.13341664064126335, 0.12369316876852982,
522 0.12369316876852982, 0.12369316876852982,
523 0.12369316876852982, 0.12369316876852982,
524 0.12369316876852982, 0.12369316876852982,
525 0.12369316876852982, 0.13341664064126335,
526 0.13341664064126335, 0.13341664064126335 };
527 double eyp[] = { 0.18439088914585774, 0.18248287590894657,
528 0.18248287590894657, 0.1726267650163207,
529 0.1726267650163207, 0.1726267650163207,
530 0.16278820596099708, 0.16278820596099708,
531 0.1726267650163207, 0.1726267650163207,
532 0.1726267650163207, 0.18248287590894657,
533 0.18248287590894657, 0.18248287590894657 };
534 const int np = 14;
535
536 for (int i = 0; i < np; i++) {
537 double stat = (i < 1) ? 0.03 : 0.02;
538 eym[i] += stat;
539 eyp[i] += stat;
540 }
541
542 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 543 SetGraphAttributes(g, NSD, ALICE, false, "alice_nsd2360",
7e4038b5 544 "ALICE NSD (publ.)");
545 return g;
546}
547
548
549//____________________________________________________________________
550/**
551 * Get the CMS NSD data in @f$ |\eta|<2.25@f$ for pp at @f$
552 * \sqrt{s} = 900GeV@f$
553 *
554 * p7743_d8x1y1
555 *
556 * @return graph of data
557 *
7c1a1f1d 558 * @ingroup pwg2_forward_otherdata
7e4038b5 559 */
560TGraphAsymmErrors* CMSNsd900()
561{
562 // CMS published NSD data - p7743_d8x1y1
563 double x[] = { -2.25, -1.75, -1.25, -0.75, -0.25, 0.25, 0.75, 1.25, 1.75,
564 2.25 };
565 double exm[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
566 double exp[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
567 double y[] = { 3.6, 3.73, 3.62, 3.54, 3.48, 3.48, 3.54, 3.62, 3.73, 3.6 };
568 double eym[] = { 0.13, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14,0.13 };
569 double eyp[] = { 0.13, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.14, 0.13 };
570 const int np = 10;
571 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 572 SetGraphAttributes(g, NSD, CMS, false, "cms_nsd900", "CMS NSD");
7e4038b5 573
574 return g;
575}
576
577
578//____________________________________________________________________
579/**
580 * Get the CMS NSD data in @f$ |\eta|<2.25@f$ for pp at @f$
581 * \sqrt{s} = 2.36GeV@f$
582 *
583 * p7743_d8x1y2
584 *
585 * @return graph of data
586 *
7c1a1f1d 587 * @ingroup pwg2_forward_otherdata
7e4038b5 588 */
589TGraphAsymmErrors* CMSNsd2360()
590{
591 // CMS NSD 2360 - p7743_d8x1y2
592 double x[] = { -2.25, -1.75, -1.25, -0.75, -0.25, 0.25, 0.75,1.25,1.75,2.25 };
593 double exm[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
594 double exp[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
595 double y[] = { 4.78, 4.81, 4.66, 4.61, 4.47, 4.47, 4.61, 4.66, 4.81, 4.78 };
596 double eym[] = { 0.17, 0.18, 0.17, 0.17, 0.16, 0.16, 0.17, 0.17, 0.18, 0.17 };
597 double eyp[] = { 0.17, 0.18, 0.17, 0.17, 0.16, 0.16, 0.17, 0.17, 0.18, 0.17 };
598 const int np = 10;
599 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 600 SetGraphAttributes(g, NSD, CMS, false, "cms_nsd2360", "CMS NSD");
7e4038b5 601 return g;
602}
603
604
605//____________________________________________________________________
606/**
607 * Get the CMS NSD data in @f$ |\eta|<2.25@f$ for pp at @f$
608 * \sqrt{s} = 7TeV@f$
609 *
610 * p7838_d5x1y1
611 *
612 * @return graph of data
613 *
7c1a1f1d 614 * @ingroup pwg2_forward_otherdata
7e4038b5 615 */
616TGraphAsymmErrors* CMSNsd7000()
617{
618 // CMS NSD 7000 - Plot: p7838_d5x1y1
619 double x[] = { -2.25, -1.75, -1.25, -0.75, -0.25, 0.25, 0.75,1.25,1.75,2.25 };
620 double exm[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
621 double exp[] = { 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25 };
622 double y[] = { 6.18, 6.26, 6.14, 6.01, 5.78, 5.78, 6.01, 6.14, 6.26, 6.18 };
623 double eym[] = { 0.25, 0.25, 0.24, 0.24, 0.23, 0.23, 0.24, 0.24, 0.25, 0.25 };
624 double eyp[] = { 0.25, 0.25, 0.24, 0.24, 0.23, 0.23, 0.24, 0.24, 0.25, 0.25 };
625 const int np = 10;
626 TGraphAsymmErrors* g = new TGraphAsymmErrors(np, x, y, exm, exp, eym, eyp);
ffca499d 627 SetGraphAttributes(g, NSD, CMS, false, "cms_nsd7000", "CMS NSD");
7e4038b5 628 return g;
629}
630
631//____________________________________________________________________
632/**
633 * Get a multi graph of data for a given energy and trigger type
634 *
e308a636 635 * @param sys Collision system (1: pp, 2: PbPb)
7e4038b5 636 * @param energy Energy in GeV (900, 2360, 7000)
637 * @param type Bit pattern of trigger type
638 * - 0x1 INEL
639 * - 0x2 INEL>0
640 * - 0x4 NSD
ffca499d 641 * @param centLow Low centrality cut (only for PbPB)
642 * @param centHigh High centrality cut (only for PbPB)
643 * @param aliceOnly Only return other ALICE data
7e4038b5 644 *
645 * @return A multi graph with the selected data.
646 *
7c1a1f1d 647 * @ingroup pwg2_forward_otherdata
7e4038b5 648 */
649TMultiGraph*
e308a636 650GetData(UShort_t sys,
651 UShort_t energy,
652 UShort_t type=0x1,
653 UShort_t centLow=0,
654 UShort_t centHigh=0,
655 bool aliceOnly=false)
7e4038b5 656{
e308a636 657 TMultiGraph* mp = new TMultiGraph(Form("dndeta_%dGeV_%d_%03d_%03d",
658 energy, type, centLow, centHigh),"");
7e4038b5 659 TString tn;
660 TString en;
e308a636 661 TString sn;
662 TString cn;
663 if (sys == 1) {
664 sn = ", pp(p#bar{p})";
665 if (energy < 1000)
666 en = Form(", #sqrt{s}=%dGeV", energy);
667 else
668 en = Form(", #sqrt{s}=%f4.2TeV", float(energy)/1000);
669 if (!(type & 0x7))
670 Warning("GetData", "Unknown trigger mask 0x%x", type);
671
672 if (TMath::Abs(energy-900) < 10) {
673 if (type & 0x1) {
674 tn.Append(" INEL");
675 if (!aliceOnly) mp->Add(UA5Inel(false));
676 if (!aliceOnly) mp->Add(UA5Inel(true));
677 mp->Add(AliceCentralInel900());
678 }
679 if (type & 0x4) {
680 tn.Append(" NSD");
681 if (!aliceOnly) mp->Add(UA5Nsd(false));
682 if (!aliceOnly) mp->Add(UA5Nsd(true));
683 mp->Add(AliceCentralNsd900());
684 if (!aliceOnly) mp->Add(CMSNsd900());
685 }
686 if (type & 0x2) {
687 tn.Append(" INEL>0");
688 mp->Add(AliceCentralInelGt900());
689 }
7e4038b5 690 }
e308a636 691 else if (TMath::Abs(energy-2360) < 10) {
692 if (type & 0x1) {
693 tn.Append(" INEL");
694 mp->Add(AliceCentralInel2360());
695 }
696 if (type & 0x4) {
697 tn.Append(" NSD");
698 mp->Add(AliceCentralNsd2360());
699 if (!aliceOnly) mp->Add(CMSNsd2360());
700 }
701 if (type & 0x2) {
702 tn.Append(" INEL>0");
703 mp->Add(AliceCentralInelGt2360());
704 }
7e4038b5 705 }
e308a636 706 else if (TMath::Abs(energy-7000) < 10) {
707 if (type & 0x1) {
708 tn.Append(" INEL");
709 }
710 if (type & 0x4) {
711 tn.Append(" NSD");
712 if (!aliceOnly) mp->Add(CMSNsd7000());
713 }
714 if (type & 0x2) {
715 tn.Append(" INEL>0");
716 mp->Add(AliceCentralInelGt7000());
717 }
7e4038b5 718 }
e308a636 719 else
720 Warning("GetData", "No other results for sys=%d, energy=%d",
721 sys, energy);
7e4038b5 722 }
e308a636 723 else if (sys == 2) {
724 // Nothing for PbPb so far
725 cn = Form(", %d%%-%d%% central", centLow, centHigh);
726 sn = ", PbPb";
727 if (energy < 1000)
728 en = Form(", #sqrt{s_{NN}}=%dGeV", energy);
729 else
730 en = Form(", #sqrt{s_{NN}}=%f4.2TeV", float(energy)/1000);
731 Warning("GetData", "No other data for PbP b yet");
7e4038b5 732 }
e308a636 733 else
734 Warning("GetData", "Unknown system %d", sys);
735 TString tit(Form("1/N dN_{ch}/d#eta%s%s%s%s",
736 sn.Data(), en.Data(), tn.Data(), cn.Data()));
737 mp->SetTitle(tit.Data());
82fc512a 738 if (!mp->GetListOfGraphs() || mp->GetListOfGraphs()->GetEntries() <= 0) {
739 delete mp;
740 mp = 0;
741 }
7e4038b5 742 return mp;
743}
744
745//____________________________________________________________________
746/**
747 * Plot external data for a given selection of energy and trigger type
748 * (see GetData)
749 *
ffca499d 750 * @param sys Collision system (1: pp, 2: PbPb)
751 * @param energy Energy in GeV (900, 2360, 7000)
752 * @param type Bit pattern of trigger type
753 * - 0x1 INEL
754 * - 0x2 INEL>0
755 * - 0x4 NSD
756 * @param centLow Low centrality cut (only for PbPB)
757 * @param centHigh High centrality cut (only for PbPB)
758 * @param aliceOnly Only return other ALICE data
7e4038b5 759 *
7c1a1f1d 760 * @ingroup pwg2_forward_otherdata
7e4038b5 761 */
762void
e308a636 763OtherData(UShort_t sys=1,
764 UShort_t energy=900,
765 UShort_t type=0x1,
766 UShort_t centLow=0,
767 UShort_t centHigh=5,
768 bool aliceOnly=false)
7e4038b5 769{
e308a636 770 TMultiGraph* mp = GetData(sys, energy, type, centLow, centHigh, aliceOnly);
82fc512a 771 if (!mp) return;
772
7e4038b5 773 gStyle->SetTitleX(0.1);
774 gStyle->SetTitleY(1.0);
775 gStyle->SetTitleW(0.85);
776 gStyle->SetTitleH(0.05);
777 gStyle->SetTitleBorderSize(0);
778 gStyle->SetTitleTextColor(kWhite);
779 gStyle->SetTitleFillColor(kBlack);
780 gStyle->SetTitleFontSize(0.02);
781
782 gStyle->SetOptTitle(1);
783 gStyle->SetOptStat(0);
784
785 TCanvas* c = new TCanvas("c", "dN/deta", 800, 600);
786 c->SetFillColor(0);
787 c->SetBorderSize(0);
788 c->SetBorderMode(0);
789 c->SetRightMargin(0.05);
790 c->SetTopMargin(0.05);
791
82fc512a 792
7e4038b5 793 mp->SetMinimum(0);
794 mp->Draw("ap");
795 if (mp->GetXaxis())
796 mp->GetXaxis()->SetTitle("#eta");
797 if (mp->GetYaxis())
798 mp->GetYaxis()->SetTitle("#frac{1}{N} #frac{dN_{ch}}{#eta}");
799
800 TLegend* l = c->BuildLegend(0.3, 0.15, 0.7, 0.5);
801 l->SetFillColor(0);
802 l->SetBorderSize(0);
803
804 c->cd();
805}
806
807//____________________________________________________________________
808//
809// EOF
810//