]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/Correlations/DPhi/FourierDecomposition/lrc/RunFourierPlus.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / FourierDecomposition / lrc / RunFourierPlus.C
CommitLineData
14624fd9 1// --- Global Switches and settings ---
2bool saveOutput = 1;
3bool resave = 1; // Sometimes pdf gets corrupted...retry then quit.
4const char* tag = "-v3.4"; // identifier appended to filenames
5const char* outputDir = "../test";
6const char* inputHistFile = "$MYDATA/gsi07_etamin08-withmeanpt.root";
7TString grFile = Form("%s/root-objects/graphs%s.root",
8 outputDir, tag);
9TString canvFile = Form("%s/root-objects/canvases%s.root",
10 outputDir, tag);
11TString pdfFile = Form("%s/plots/all-figs%s",
12 outputDir, tag);
13int NCENT = 8;
14TLatex ltx;
15TObjArray* cList = new TObjArray();
16bool isBatch = gROOT->IsBatch();
17
18void PlotCollection(int k, int i, int j, TString opt);
19
20int Setup()
21{
22 ltx.SetNDC();
23 gROOT->LoadMacro("~/Dropbox/ALICE/common/Utils.C+");
24 gROOT->LoadMacro("~/Dropbox/ALICE/common/IOUtilFns.C");
25 gROOT->LoadMacro("FourierPlus.C+g");
26 initialize(inputHistFile);
27 return 0;
28}
29
30void RunFourierPlus()
31{
32 Setup();
33
34 if (resave) {
35 SaveCanvasesFromFile(canvFile.Data(), Form("%s/plots", outputDir), tag, "pdf");
36 return;
37 }
38
39 int t1[] = {PtBin(2., 2.5)};
40 int t2[] = {PtBin(8,15)};
41 int t3[] = {PtBin(6,8)};
42 int t4[] = {PtBin(4,5)};
43 int a1[] = {PtBin(1.5, 2.)};
44 int a2[] = {PtBin(6, 8)};
45 int a3[] = {PtBin(1., 1.5)};
46 int a4[] = {PtBin(3, 4)};
47 int a5[] = {PtBin(0.5., 0.75)};
48 int c2[] = {CentBin(40,50),CentBin(0,20)};
49 int c3[] = {CentBin(0,2)};
50 int c4[] = {CentBin(0,10)};
51 int c5[] = {CentBin(0,5)};
52
53 int ncb_set = 5;
54 int centbins_set[] = { CentBin(0,2),
55 CentBin(2,10),
56 CentBin(10,20),
57 CentBin(20,30),
58 CentBin(40,50) };
59 int ncb_1 = 6;
60 int centbins_1[] = { CentBin(0,2),
61 CentBin(2,10),
62 CentBin(10,20),
63 CentBin(20,30),
64 CentBin(30,40),
65 CentBin(40,50) };
66 int ncb_2 = 2;
67 int centbins_2[] = { CentBin(0,20),
68 CentBin(40,50) };
69 int ncb_3 = 2;
70 int centbins_3[] = { CentBin(0,10),
71 CentBin(40,50) };
72 int ncb_4 = 5;
73 int centbins_4[] = { CentBin(40,50),
74 CentBin(20,30),
75 CentBin(10,20),
76 CentBin(2,10),
77 CentBin(0,2) };
78
79 // For CERN courier article
80 cList->Add(SingleDrawPlain(CentBin(0,2), PtBin(2, 2.5), PtBin(1.5, 2),
81 "harmonics_sum") );
82
83 // Correlation functions
84 PlotCollection(CentBin(0,1), PtBin(2., 2.5), PtBin(1.5,2.), "");
85 PlotCollection(CentBin(0,2), PtBin(2., 2.5), PtBin(1.5,2.), "");
86 PlotCollection(CentBin(0,10), PtBin(2, 2.5), PtBin(1.5, 2), "2D");
87 PlotCollection(CentBin(0,10), PtBin(3.0, 4.), PtBin(2.,2.5), "2D");
88 PlotCollection(CentBin(0,20), PtBin(8., 15.), PtBin(6.,8), "2D");
89 PlotCollection(CentBin(30,40),PtBin(6., 8.), PtBin(1,1.5), "");
90 cList->Add(SingleDraw2D(CentBin(0,20),PtBin(8, 15), PtBin(6, 8), "zoom"));
91 ltx.DrawLatex(0.4, 0.7, "#splitline{zoomed to }{0 < C(#Delta#phi) < 5}");
92
93 if (1) { // v_n{GF} for v1 to v5
94 cList->Add(Drawv1to5(ncb_1, centbins_1, 0, PtBin(2.0, 2.5), "fitbelow2.5") );
95 cList->Add(Drawv1to5(ncb_1, centbins_1, 0, 999, "") );
96 cList->Add(Drawv2to5(ncb_1, centbins_1, 0, 999, "") );
97 cout << "Drawv1to5() ok" << endl;
98 }
99 // cList->Add(Drawv2to5(ncb_set, centbins_set, 0, 999, "") );
100
101 if (1) { // v_n{GF} for v1 to v5 - superimposed with two fit ranges
102 cList->Add(Drawv1to5(ncb_2, centbins_2, PtBin(5., 6.), 999));
103 cList->Add(Drawv1to5(ncb_2, centbins_2, 0, PtBin(3., 4.), "split") );
104 cList->Add(Drawv1to5(ncb_2, centbins_2, 0, PtBin(4., 5.), "split") );
105 cout << "Drawv1to5() ok" << endl;
106 }
107
108 if (1) { // Global fit plots
109 DrawQ(CentBin(0,10), 6); // bug somewhere...w/o this, the next canvas is messed up
110 for (int n=1; n<=5; n++) {
111 cList->Add( DrawQ(CentBin(0,10), n) );
112 }
113 for (int cb=0; cb<ncb_set; cb++) {
114 for (int n=1; n<=5; n++) {
115 int k = centbins_1[cb];
116 cout << Form("DrawQ() %s, n = %d / 5", centLabel(k), n) << endl;
117 cList->Add( DrawQ(k, n) );
118 }
119 }
120 }
121 if (1) { // Global fit plots at high pt only
122 for (int n=1; n<=5; n++) {
123 cout << Form("DrawQ() %s, n = %d / 5", "highptfit", n) << endl;
124 cList->Add( DrawQ(CentBin(0,10), n, "highptfit") ); // pta > 5
125 cList->Add( DrawQ(CentBin(0,20), n, "highptfit") ); // pta > 5
126 }
127 cout << "DrawQ() ok" << endl;
128 }
129
130 cList->Add( DrawQ(CentBin(0,20), 1,
131 Form("ptabin%dto%d_%s",PtBin(0.25,0.5),PtBin(0.75,1.0), "RIDGE")));
132 cList->Add( DrawQ(CentBin(0,20), 1,
133 Form("ptabin%dto%d_%s",PtBin(2.,2.5),PtBin(3,4), "RIDGE")));
134
135 // individual v_n{GF} canvases
136 cList->Add(DrawVnFromGlobalFit(1,0,999,ncb_3,centbins_3,"multi"));
137 cList->Add(DrawVnFromGlobalFit(2,0,999,ncb_3,centbins_3,"multi"));
138
139 // VnDelta vs n...
140 cList->Add(DrawVnDeltaVsN(1,t1, 1, a1, ncb_4, centbins_4, "nobars"));
141 cList->Add(DrawVnDeltaVsN(1,t1, 1, a1, 1, c3, "cent02_nobars"));
142 cList->Add(DrawVnDeltaVsN(1,t2, 1, a2, 2, c2, "ext_nobars"));
143 cout << "DrawVnDeltaVsN() ok" << endl;
144
145 // // vn{GF} vs n...
146 // cList->Add(DrawGlobalvnVsN(1, t1, ncb_4, centbins_4, ""));
147 // cList->Add(DrawGlobalvnVsN(1, a1, ncb_4, centbins_4, ""));
148
149 if (1) { // VnDelta vs. trigger pt -- 1 canvas/centrality bin
150 int cbins[] = { CentBin(0,10) , CentBin(10,20), CentBin(20,30),
151 CentBin(30,40), CentBin(40,50) };
152 int ptabins02[] = {PtBin(0.25, 0.5), PtBin(1.0, 1.5)};
153 int ptabins10[] = {PtBin(0.25, 0.5), PtBin(1.0, 1.5), PtBin(2.0, 2.5)};
154
155 cList->Add(DrawVnVsPtTrig(CentBin(0,2), 2, ptabins02, ""));
156
157 for (int i=0; i<5; i++) {
158 cList->Add(DrawVnVsPtTrig(cbins[i], 3, ptabins10, ""));
159 }
160 cout << Form("DrawVnVsPtTrig() ok") << endl;
161 }
162
163 if (saveOutput) {
164 SaveGraphs(grFile.Data());
165 cout << Form("SaveGraphs() ok") << endl;
166 SaveCanvases(cList, canvFile.Data());
167 cout << Form("SaveCanvases() ok") << endl;
168
169 if (1) // individual pdfs + multipage pdf
170 SaveCanvasesFromFile(canvFile.Data(), Form("%s/plots", outputDir), tag, "pdf");
171 if (0) // individual plot macros
172 SaveCanvasesFromFile(canvFile.Data(), Form("%s/plots", outputDir), tag, "C");
173 }
174
175 return;
176}
177
178
179void PlotCollection(int k, int i, int j, TString opt)
180{
181 cList->Add(SingleDrawPlain(k, i, j, "harmonics"));
182 cList->Add(SingleDraw(k, i, j, "color"));
183 cList->Add(SingleDraw(k, i, j, "global"));
184 if (opt.Contains("2D")) {
185 cList->Add(SingleDraw2D(k, i, j, "pl"));
186 }
187 return;
188}