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