]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/scripts/dndeta_final.C
Fix some documentation issues
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / scripts / dndeta_final.C
1 /** 
2  * Draw final plot for QM2011
3  * 
4  * @param max 
5  * 
6  * @ingroup pwglf_forward_scripts
7  */
8 void
9 dndeta_final(Double_t max=6)
10 {
11   gStyle->SetOptTitle(0);
12   gStyle->SetOptFit(0);
13   gStyle->SetTitleFont(132, "xyz");
14   gStyle->SetTitleSize(0.1, "xyz");
15   gStyle->SetTitleOffset(0.4, "y");
16   gStyle->SetTitleOffset(0.8, "x");
17   gStyle->SetLabelFont(132, "xyz");
18   gStyle->SetLabelSize(0.08, "xyz");
19   gStyle->SetNdivisions(212, "x");
20   gStyle->SetNdivisions(208, "y");
21   gStyle->SetTextFont(132);
22   gStyle->SetPadColor(0);
23   gStyle->SetPadBorderMode(0);
24   // gStyle->SetFillColor(0);
25   // gStyle->SetFillStyle(0);
26   
27   TCanvas* c = new TCanvas("c", "c", 900, 900);
28   c->SetFillColor(0);
29   c->SetFillStyle(0);
30   c->SetBorderSize(0);
31   c->SetBorderMode(0);
32   c->SetRightMargin(0.02);
33   c->SetTopMargin(0.02);
34   c->SetBottomMargin(0.15);
35   c->Divide(1,3,0,0);
36   
37   // --- INEL --------------------------------------------------------
38   TVirtualPad* p = c->cd(1);
39   p->SetGridx();
40   p->SetRightMargin(.01);
41   THStack* inel     = new THStack("inel", "INEL");
42   TLatex*  inelT    = new TLatex(1-p->GetRightMargin()-.01, 
43                                  1-p->GetTopMargin()-.01, 
44                                  "INEL");
45   inelT->SetNDC();
46   inelT->SetTextAlign(33);
47   inelT->SetTextSize(0.12);
48   TLegend* inelL    = new TLegend(.3, .02, .8, .4);
49   inelL->SetBorderSize(0);
50   inelL->SetNColumns(2);
51   inelL->SetFillColor(0);
52   inelL->SetFillStyle(0);
53   TLegendEntry* e = inelL->AddEntry("d1", "Forward", "lp");
54   e->SetMarkerColor(kRed+2);
55   e->SetMarkerStyle(29);
56   e = inelL->AddEntry("d2", "Central", "lp");
57   e->SetMarkerColor(kMagenta+2);    
58   e->SetMarkerStyle(29);
59   e = inelL->AddEntry("d3", "Data", "lp");
60   e->SetMarkerStyle(29);
61   e = inelL->AddEntry("d4", "Mirrored data", "lp");
62   e->SetMarkerStyle(30);
63   e = inelL->AddEntry("d5", "Systematic error", "f");
64   e->SetFillColor(kGray); 
65   e->SetLineColor(kGray);
66   e->SetLineWidth(0);
67   e->SetFillStyle(3001);
68   
69   gROOT->LoadMacro("export_pp_0900GeV_INEL_m10p10cm_000100000ev.C");
70   export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 20);
71   export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 21);
72   export_pp_0900GeV_INEL_m10p10cm_000100000ev(inel, inelL, 22);
73   inel->Draw("nostack e1");
74   inel->GetHistogram()->SetYTitle("#frac{1}{N}#frac{dN_{ch}}{d#eta}");
75   inel->GetHistogram()->SetXTitle("#eta");
76   inel->GetHistogram()->GetYaxis()->SetDecimals();
77   inelL->Draw();
78   inelT->Draw();
79
80   // --- INEL>0 ------------------------------------------------------
81   p = c->cd(2);
82   p->SetGridx();
83   p->SetRightMargin(.01);
84   THStack* inelgt0     = new THStack("inelgt0", "INEL>0");
85   TLatex*  inelgt0T    = new TLatex(1-p->GetRightMargin()-.01, 
86                                     1-p->GetTopMargin()-.01, 
87                                     "INEL>0");
88   inelgt0T->SetNDC();
89   inelgt0T->SetTextAlign(33);
90   inelgt0T->SetTextSize(0.12);
91   gROOT->LoadMacro("export_pp_0900GeV_INEL_m10p10cm_000100000ev.C");
92   export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 20);
93   export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 21);
94   export_pp_0900GeV_INEL_m10p10cm_000100000ev(inelgt0, 0, 22);
95   inelgt0->Draw("nostack e1");
96   inelgt0->GetHistogram()->SetXTitle("#eta");
97   inelgt0->GetHistogram()->GetYaxis()->SetDecimals();
98   inelgt0T->Draw();
99
100   // --- NSD ---------------------------------------------------------
101   p = c->cd(3);
102   p->SetGridx();
103   p->SetRightMargin(.01);
104   THStack* nsd     = new THStack("nsd", "NSD");
105   TLatex*  nsdT    = new TLatex(1-p->GetRightMargin()-.01, 
106                                 1-p->GetTopMargin()-.01, 
107                                 "NSD");
108   nsdT->SetNDC();
109   nsdT->SetTextAlign(33);
110   nsdT->SetTextSize(0.12);
111   gROOT->LoadMacro("export_pp_0900GeV_NSD_m10p10cm_000100000ev.C");
112   export_pp_0900GeV_NSD_m10p10cm_000100000ev(nsd, 0, 20);
113   export_pp_0900GeV_NSD_m10p10cm_000100000ev(nsd, 0, 21);
114   export_pp_0900GeV_NSD_m10p10cm_000100000ev(nsd, 0, 22);
115   nsd->Draw("nostack e1");
116   nsd->GetHistogram()->SetXTitle("#eta");
117   nsd->GetHistogram()->GetYaxis()->SetDecimals();
118   nsdT->Draw();
119
120   c->cd();
121   c->SaveAs("dndeta_final.png");
122 }
123
124   
125 //
126 // EOF
127 //