]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FLOW/papers/PRL105_252302/figure3.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / FLOW / papers / PRL105_252302 / figure3.C
1 // Objects holding results are following TGraphErrors:
2 //  1.) Cumulant2ndTPCrefMultTPConlyAll = v2{2}, TPC ref mult, TPConly tracks, all charges
3 //  2.) Cumulant2ndTPCrefMultTPConlySame = v2{2}, TPC ref mult, TPConly tracks, same charges
4 //  3.) Cumulant4thTPCrefMultTPConlyAll = v2{4}, TPC ref mult, TPConly tracks, all charges
5 //  4.) Cumulant4thTPCrefMultTPConlySame = v2{4}, TPC ref mult, TPConly tracks, same charges
6 //  5.) FQDTPCrefMultTPConlyAll = v2{FQD}, TPC ref mult, TPConly tracks, all charges
7 //  6.) LYZSTPCrefMultTPConlyAll = v2{LYZ} (Lee-Yang zero, sum generating function), TPC ref mult, TPConly tracks, all charges
8 //  7.) EventPlaneSTAR - published STAR results for event plane method
9 //  8.) Cumulant4thSTAR - published STAR results for v2{4} (generating function formalism)
10 //  9.) LYZPSTAR - published STAR results for v2{LYZ} (Lee-Yang zero, product generating function)
11
12 void figure3()
13 {
14  // Set style:
15  SetFlowStyle();
16  
17  //=================================================================================================================================================
18  // v2{2}, TPC ref mult, TPConly tracks, all charges
19  Double_t xCumulant2ndTPCrefMultTPConlyAll[] = {2.5,7.5,15.,25.,35.,45.,55.,65.,75.};
20  Double_t yCumulant2ndTPCrefMultTPConlyAll[] = {0.028811,0.044020,0.064765,0.084340,0.096771,0.104257,0.105902,0.104897,0.104811};
21  Double_t xErrCumulant2ndTPCrefMultTPConlyAll[9] = {0.};
22  Double_t yErrCumulant2ndTPCrefMultTPConlyAll[] = {0.000470,0.000510,0.000433,0.000528,0.000621,0.000772,0.000955,0.001254,0.002317};
23  Int_t nPointsCumulant2ndTPCrefMultTPConlyAll = sizeof(xCumulant2ndTPCrefMultTPConlyAll)/sizeof(Double_t);         
24  TGraphErrors *Cumulant2ndTPCrefMultTPConlyAll = new TGraphErrors(nPointsCumulant2ndTPCrefMultTPConlyAll,xCumulant2ndTPCrefMultTPConlyAll,
25                                                               yCumulant2ndTPCrefMultTPConlyAll,xErrCumulant2ndTPCrefMultTPConlyAll,
26                                                               yErrCumulant2ndTPCrefMultTPConlyAll );
27  Cumulant2ndTPCrefMultTPConlyAll->SetMarkerStyle(kFullCircle);
28  Cumulant2ndTPCrefMultTPConlyAll->SetMarkerColor(kBlue);
29  ShiftAlongXaxis(Cumulant2ndTPCrefMultTPConlyAll,0.0);
30  
31  // v2{2}, TPC ref mult, TPC only tracks, same charges
32  Double_t xCumulant2ndTPCrefMultTPConlySame[] = {2.5,7.5,15.,25.,35.,45.,55.,65.,75.};
33  Double_t yCumulant2ndTPCrefMultTPConlySame[] = {0.027453,0.042691,0.063489,0.083387,0.095468,0.102824,0.104025,0.101708,0.100819};
34  Double_t xErrCumulant2ndTPCrefMultTPConlySame[9] = {0.};
35  Double_t yErrCumulant2ndTPCrefMultTPConlySame[] = {0.000463,0.000454,0.000369,0.000447,0.000541,0.000689,0.000916,0.001331,0.003072};
36  Int_t nPointsCumulant2ndTPCrefMultTPConlySame = sizeof(xCumulant2ndTPCrefMultTPConlySame)/sizeof(Double_t);         
37  TGraphErrors *Cumulant2ndTPCrefMultTPConlySame = new TGraphErrors(nPointsCumulant2ndTPCrefMultTPConlySame,xCumulant2ndTPCrefMultTPConlySame,
38                                                               yCumulant2ndTPCrefMultTPConlySame,xErrCumulant2ndTPCrefMultTPConlySame,
39                                                               yErrCumulant2ndTPCrefMultTPConlySame );
40  Cumulant2ndTPCrefMultTPConlySame->SetMarkerStyle(kOpenCircle);
41  Cumulant2ndTPCrefMultTPConlySame->SetMarkerColor(kBlue);
42  ShiftAlongXaxis(Cumulant2ndTPCrefMultTPConlySame,-1.44);
43  //=================================================================================================================================================
44
45  //=================================================================================================================================================
46  // v2{4}, TPC ref mult, TPConly tracks, all charges
47  Double_t xCumulant4thTPCrefMultTPConlyAll[] = {2.5,7.5,15.,25.,35.,45.,55.,65.,75.};
48  Double_t yCumulant4thTPCrefMultTPConlyAll[] = {0.017855,0.032440,0.055818,0.073137,0.083898,0.086690,0.082040,0.077777,0.000000};
49  Double_t xErrCumulant4thTPCrefMultTPConlyAll[9] = {0.};
50  Double_t yErrCumulant4thTPCrefMultTPConlyAll[] = {0.004327,0.001690,0.001049,0.001150,0.001177,0.001785,0.002793,0.005153,0.000000};
51  Int_t nPointsCumulant4thTPCrefMultTPConlyAll = sizeof(xCumulant4thTPCrefMultTPConlyAll)/sizeof(Double_t);         
52  TGraphErrors *Cumulant4thTPCrefMultTPConlyAll = new TGraphErrors(nPointsCumulant4thTPCrefMultTPConlyAll,xCumulant4thTPCrefMultTPConlyAll,
53                                                               yCumulant4thTPCrefMultTPConlyAll,xErrCumulant4thTPCrefMultTPConlyAll,
54                                                               yErrCumulant4thTPCrefMultTPConlyAll );
55  Cumulant4thTPCrefMultTPConlyAll->SetMarkerStyle(kFullSquare);
56  Cumulant4thTPCrefMultTPConlyAll->SetMarkerColor(kRed);
57  ShiftAlongXaxis(Cumulant4thTPCrefMultTPConlyAll,0.1);
58  
59  // v2{4}, TPC ref mult, TPC only tracks, same charges
60  Double_t xCumulant4thTPCrefMultTPConlySame[] = {2.5,7.5,15.,25.,35.,45.,55.,65.,75.};
61  Double_t yCumulant4thTPCrefMultTPConlySame[] = {0.015724,0.031731,0.055660,0.072992,0.083332,0.087978,0.080705,0.077744,0.000000};
62  Double_t xErrCumulant4thTPCrefMultTPConlySame[9] = {0.};
63  Double_t yErrCumulant4thTPCrefMultTPConlySame[] = {0.006343,0.001764,0.000895,0.001011,0.001108,0.001685,0.003890,0.007947,0.000000};
64  Int_t nPointsCumulant4thTPCrefMultTPConlySame = sizeof(xCumulant4thTPCrefMultTPConlySame)/sizeof(Double_t);         
65  TGraphErrors *Cumulant4thTPCrefMultTPConlySame = new TGraphErrors(nPointsCumulant4thTPCrefMultTPConlySame,xCumulant4thTPCrefMultTPConlySame,
66                                                               yCumulant4thTPCrefMultTPConlySame,xErrCumulant4thTPCrefMultTPConlySame,
67                                                               yErrCumulant4thTPCrefMultTPConlySame );
68  Cumulant4thTPCrefMultTPConlySame->SetMarkerStyle(kOpenSquare);
69  Cumulant4thTPCrefMultTPConlySame->SetMarkerColor(kRed);
70  ShiftAlongXaxis(Cumulant4thTPCrefMultTPConlySame,-1.44);
71  //=================================================================================================================================================
72  
73  //=================================================================================================================================================
74  // v2{FQD}, TPC ref mult, TPConly tracks, all charges
75  Double_t xFQDTPCrefMultTPConlyAll[] = {2.5,7.5,15.,25.,35.,45.,55.,65.,75.};
76  Double_t yFQDTPCrefMultTPConlyAll[] = {0.018442,0.031239,0.054123,0.072266,0.081993,0.084699,0.080743,0.079986,0.069490};
77  Double_t xErrFQDTPCrefMultTPConlyAll[9] = {0.};
78  Double_t yErrFQDTPCrefMultTPConlyAll[] = {0.002872,0.001597,0.000636,0.000679,0.000887,0.001285,0.002367,0.003960,0.014574};
79  Int_t nPointsFQDTPCrefMultTPConlyAll = sizeof(xFQDTPCrefMultTPConlyAll)/sizeof(Double_t);         
80  TGraphErrors *FQDTPCrefMultTPConlyAll = new TGraphErrors(nPointsFQDTPCrefMultTPConlyAll,xFQDTPCrefMultTPConlyAll,
81                                                               yFQDTPCrefMultTPConlyAll,xErrFQDTPCrefMultTPConlyAll,
82                                                               yErrFQDTPCrefMultTPConlyAll );
83  FQDTPCrefMultTPConlyAll->SetMarkerStyle(kOpenCross);
84  FQDTPCrefMultTPConlyAll->SetMarkerColor(kBlack);
85  ShiftAlongXaxis(FQDTPCrefMultTPConlyAll,1.25);
86  //=================================================================================================================================================  
87
88  //=================================================================================================================================================
89  // v2{LYZ} (Lee-Yang zero, sum generating function), TPC ref mult, TPConly tracks, all charges
90  Double_t xLYZSTPCrefMultTPConlyAll[] = {2.5,7.5,15.,25.,35.,45.,55.,65.,75.};
91  Double_t yLYZSTPCrefMultTPConlyAll[] = {0.000000,0.027581,0.053395,0.072002,0.082107,0.085281,0.081629,0.069773,0.086976};
92  Double_t xErrLYZSTPCrefMultTPConlyAll[9] = {0.};
93  Double_t yErrLYZSTPCrefMultTPConlyAll[] = {0.000000,0.004444,0.000708,0.000735,0.000898,0.001296,0.002460,0.019011,0.016716};
94  Int_t nPointsLYZSTPCrefMultTPConlyAll = sizeof(xLYZSTPCrefMultTPConlyAll)/sizeof(Double_t);         
95  TGraphErrors *LYZSTPCrefMultTPConlyAll = new TGraphErrors(nPointsLYZSTPCrefMultTPConlyAll,xLYZSTPCrefMultTPConlyAll,
96                                                            yLYZSTPCrefMultTPConlyAll,xErrLYZSTPCrefMultTPConlyAll,
97                                                            yErrLYZSTPCrefMultTPConlyAll );
98  LYZSTPCrefMultTPConlyAll->SetMarkerStyle(kFullTriangleUp);
99  LYZSTPCrefMultTPConlyAll->SetMarkerColor(kGreen+2);
100  ShiftAlongXaxis(LYZSTPCrefMultTPConlyAll,2.25);
101  //=================================================================================================================================================  
102  
103  //=================================================================================================================================================
104  // Event Plane STAR - published in Phys. Rev. C 77 (2008) 54901, Figure 5a:
105  Double_t xEventPlaneSTAR[] = {2.5,7.5,15.,25.,35.,45.,55.,65.,75.};
106  Double_t yEventPlaneSTAR[] = {0.0232,0.0339,0.0476,0.0618,0.0703,0.074,0.0744,0.0723,0.0696}; 
107  Double_t xErrEventPlaneSTAR[] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
108  Double_t yErrEventPlaneSTAR[] = {0.00017,0.00014,0.0001,0.00011,0.00014,0.00019,0.00028,0.00049,0.00089};
109  
110  Int_t nPointsEventPlaneSTAR = sizeof(xEventPlaneSTAR)/sizeof(Double_t);                                     
111  TGraphErrors *EventPlaneSTAR = new TGraphErrors(nPointsEventPlaneSTAR,xEventPlaneSTAR,
112                                                  yEventPlaneSTAR,xErrEventPlaneSTAR,yErrEventPlaneSTAR);
113  //EventPlaneSTAR->SetFillStyle(3001);
114  //EventPlaneSTAR->SetFillColor(kBlack);
115  EventPlaneSTAR->SetFillStyle(1001);
116  EventPlaneSTAR->SetLineColor(kBlue);
117  EventPlaneSTAR->SetFillColor(kBlue-10);
118  //=================================================================================================================================================
119
120  //=================================================================================================================================================
121  // 4th order cumulant STAR - published pt-integrated v2{4} in Phys. Rev. C 77 (2008) 54901, Figure 5):
122  Double_t xCumulant4thSTAR[] = {7.5,15.,25.,35.,45.,55.,65.};
123  Double_t yCumulant4thSTAR[] = {0.0269707,0.0425772,0.0563609,0.0630763,0.0655523,0.0617547,0.0581859};
124  Double_t xErrCumulant4thSTAR[] = {0.,0.,0.,0.,0.,0.,0.};
125  Double_t yErrCumulant4thSTAR[] = {0.000241449,0.0000805643,0.0000674778,0.0000873136,0.000144613,0.000318834,0.000947424};
126  Int_t nPointsCumulant4thSTAR = sizeof(xCumulant4thSTAR)/sizeof(Double_t);                                     
127  TGraphErrors *Cumulant4thSTAR = new TGraphErrors(nPointsCumulant4thSTAR,xCumulant4thSTAR,
128                                                           yCumulant4thSTAR,xErrCumulant4thSTAR,yErrCumulant4thSTAR);
129  Cumulant4thSTAR->SetFillStyle(1001);
130  Cumulant4thSTAR->SetFillColor(kRed-10);
131  //=================================================================================================================================================
132  
133  //=================================================================================================================================================
134  // LYZ product STAR - published pt-integrated LYZ product result in Phys. Rev. C 77 (2008) 54901, Figure 5a:
135  Double_t xLYZPSTAR[] = {7.5,15.,25.,35.,45.,55.};
136  Double_t yLYZPSTAR[] = {0.0292,0.0404,0.0541,0.0612,0.0627,0.063};
137  Double_t xErrLYZPSTAR[] = {0.,0.,0.,0.,0.};
138  Double_t yErrLYZPSTAR[] = {0.0023,0.00032,0.00024,0.0003,0.0017,0.0037};
139  Int_t nPointsLYZPSTAR = sizeof(xLYZPSTAR)/sizeof(Double_t);                                     
140  TGraphErrors *LYZPSTAR = new TGraphErrors(nPointsLYZPSTAR,xLYZPSTAR,
141                                                    yLYZPSTAR,xErrLYZPSTAR,yErrLYZPSTAR);
142  LYZPSTAR->SetMarkerStyle(kFullTriangleUp);
143  LYZPSTAR->SetMarkerColor(kBlue); 
144  //LYZPSTAR->SetFillStyle(3003);
145  //LYZPSTAR->SetFillColor(kBlack);
146  LYZPSTAR->SetFillStyle(1001);
147  LYZPSTAR->SetLineColor(kRed);
148  LYZPSTAR->SetFillColor(kRed-10);
149  ShiftAlongXaxis(LYZPSTAR,2.0);
150  //=================================================================================================================================================
151
152  
153  // Canvas:
154  TCanvas *c1 = new TCanvas("c1","v_{2} reference flow"); 
155  c1->cd(0);
156  // Legend:
157  TLegend *l1 = new TLegend(0.45,0.18,0.75,0.50);
158  l1->SetFillStyle(0); // white legend background
159  l1->AddEntry(Cumulant2ndTPCrefMultTPConlyAll,"v_{2}{2}","p"); 
160  l1->AddEntry(Cumulant2ndTPCrefMultTPConlySame,"v_{2}{2} (same charge)","p"); 
161  l1->AddEntry(Cumulant4thTPCrefMultTPConlyAll,"v_{2}{4}","p"); 
162  l1->AddEntry(Cumulant4thTPCrefMultTPConlySame,"v_{2}{4} (same charge)","p"); 
163  l1->AddEntry(FQDTPCrefMultTPConlyAll,"v_{2}{q-dist}","p"); 
164  l1->AddEntry(LYZSTPCrefMultTPConlyAll,"v_{2}{LYZ}","p");  
165  l1->AddEntry(EventPlaneSTAR,"v_{2}{EP} STAR","l"); 
166  l1->AddEntry(LYZPSTAR,"v_{2}{LYZ} STAR","l"); 
167  //l1->AddEntry(hydro,"hydro #eta/s=0.08","l"); 
168  l1->SetTextSize(0.038);
169  l1->SetTextFont(22); // 22 = Times New Roman (bold)
170   
171  // Final drawing (order is important!):
172  StyleHistogram()->Draw(); 
173  EventPlaneSTAR->Draw("same3"); // mash
174  EventPlaneSTAR->Draw("lsameX"); // line
175  LYZPSTAR->Draw("same3"); // mash
176  LYZPSTAR->Draw("lsameX"); // line
177  //Cumulant4thSTAR->Draw("same3");  
178  Cumulant2ndTPCrefMultTPConlyAll->Draw("psame");
179  Cumulant2ndTPCrefMultTPConlySame->Draw("psame");
180  Cumulant4thTPCrefMultTPConlyAll->Draw("psame");
181  Cumulant4thTPCrefMultTPConlySame->Draw("psame");
182  LYZSTPCrefMultTPConlyAll->Draw("psame"); 
183  FQDTPCrefMultTPConlyAll->Draw("psame"); 
184  //hydro->Draw("lsame");
185  l1->Draw("same"); 
186  
187 //================================================================================================================================================= 
188  
189 } // end of void figure3()
190
191 //=================================================================================================================================================
192
193 void ShiftAlongXaxis(TGraphErrors *ge, Double_t shift)
194 {
195  // Shift original TGraphErrors along x-axis by Double_t shift.
196  
197  if(!ge){cout<<"!ge"<<endl;exit(0);}
198  
199  Int_t nPoints = ge->GetN();
200  Double_t x = 0.;
201  Double_t y = 0.;
202  for(Int_t p=0;p<nPoints;p++)
203  { 
204   ge->GetPoint(p,x,y);
205   x+=shift;
206   ge->SetPoint(p,x,y);
207  } // end of for(Int_t p=0;p<nPoints;p++)
208 } // end of void ShiftAlongXaxis(TGraphErrors *ge, Double_t shift)
209
210 //=================================================================================================================================================
211
212 TH1D* StyleHistogram()
213 {
214  // Style histogram:
215  
216  const Int_t nBins = 80; // to be improved - hardwired 10
217  Double_t min = 0.; // in [GeV/c] // to be improved - hardwired 0
218  Double_t max = 80.; // in [GeV/c] // to be improved - hardwired 5.75
219  //TString xTitle  = "hadronic cross section #sigma/#sigma_{geo}";
220  TString xTitle  = "centrality percentile";
221  //TString xTitle  = "% most central"; 
222  //TString binLabelsX[nBins] = {"0-5%","5-10%","10-20%","20-30%","30-40%","40-50%","50-60%","60-70%","70-80%","80-90%"};
223  //TString binLabelsX[nBins] = {"0-5%","5-10%","10-20%","20-30%","30-40%","40-50%","50-60%","60-70%","70-80%","80-90%"};
224  TString yTitle  = "v_{2}";
225    
226  TH1D* hist = new TH1D("","",nBins,min,max);
227  hist->SetXTitle(xTitle.Data());
228  //for(Int_t b=0;b<nBins;b++)
229  //{
230  // hist->GetXaxis()->SetBinLabel(b+1,binLabelsX[b].Data());
231  //} 
232  hist->SetYTitle(yTitle.Data());
233  hist->SetMinimum(0.000001); // minimum y-value - to be improved
234  hist->SetMaximum(0.12); // maximum y-value - to be improved
235  
236  return hist;
237  
238 } // end of TH1D* StyleHistogramVsPt()
239   
240 // =====================================================================================
241
242 void SetFlowStyle()
243 {
244  // Set style which will affect all plots.
245  
246  gStyle->Reset();
247  // gStyle->SetOptitle(0);
248  // gStyle->SetOptStat(0);
249  //gStyle->SetOptDate(1);
250  // gStyle->SetPalette(8,0);  // (1,0)
251  gStyle->SetPalette(1);  // (1,0)
252  gStyle->SetDrawBorder(0);
253  // gStyle->SetFillColor(0);  // kills palete ???
254  gStyle->SetCanvasColor(0);
255  gStyle->SetPadColor(0);
256  // gStyle->SetFillColor(0); // otherwize it affects Fill colors later
257  gStyle->SetFrameFillColor(0);
258  gStyle->SetCanvasBorderMode(0);
259  gStyle->SetFrameLineWidth(2);
260  // gStyle->SetFrameFillStyle(4000);
261  gStyle->SetPadBorderMode(0);
262  gStyle->SetPadTickX(1);
263  gStyle->SetPadTickY(1);
264  gStyle->SetPadBottomMargin(0.15);
265  gStyle->SetPadLeftMargin(0.15);
266  gStyle->SetHistLineWidth(2);
267  gStyle->SetFuncWidth(2);
268  gStyle->SetLineWidth(2);
269  gStyle->SetLabelSize(0.05,"xyz");
270  gStyle->SetLabelOffset(0.01,"y");
271  gStyle->SetLabelColor(kBlack,"xyz");
272  gStyle->SetTitleSize(0.06,"xyz");
273  gStyle->SetTitleOffset(1.3,"y");
274  gStyle->SetTitleFillColor(0);
275  gStyle->SetLineWidth(2);  
276  gStyle->SetHistLineColor(1);
277  gStyle->SetTextColor(1);
278  gStyle->SetTitleTextColor(1);
279  TGaxis::SetMaxDigits(4);
280  gStyle->SetOptStat(0); // removes stat. box from all histos
281  gROOT->ForceStyle();
282
283 } // end of void SetFlowStyle()
284