]>
Commit | Line | Data |
---|---|---|
dafb4557 | 1 | // $Id$ |
2 | /* | |
3 | * Plotting macro for comparing offline- and HLT- ESD trees from | |
4 | * HLT-OFFLINE-GLOBAL-comparison.root produced using pwg1-task: | |
5 | * compare-HLT-offline-local.C'("./AliESDs.root","pwg1")' | |
6 | * | |
7 | * It allows you to choose from a detailed list of cuts or a combination of cuts. | |
8 | * | |
9 | * Apply requested cuts in L300 | |
10 | * Int_t nCutsMin = 2; | |
11 | * Int_t nCutsMax = 5; | |
12 | * Int_t nCuts=nCutsMax+1; | |
13 | * | |
14 | * The example set above will set the cuts from 2 to 5, defined in function SetCuts(). | |
15 | * | |
16 | * The current version of this macro needs modifications in order | |
17 | * to set options here: (L312) | |
18 | * Int_t nCanMin = 0; | |
19 | * Int_t nCanMax = 0 ; | |
20 | * Int_t nCans=nCanMax+1; | |
21 | * | |
22 | * | |
23 | * Usage: | |
24 | * Running requires that you have the .root-files produced from the pwg1-task | |
25 | * in your local folder. | |
26 | * | |
27 | * Run options: | |
28 | * 1) Run with script ./draw.sh This will create folders and organize the output files for you. | |
29 | * 2) Run as aliroot -q drawPerformanceTPCQAofflineHLT.C'("./")' | |
30 | * When using the script you will also have to apply changes in the drax-script when applying cuts: | |
31 | * Here example 2 to 5: | |
32 | * "for ii in {2..5} ; do" | |
33 | * NB! This line occurs 2 places | |
34 | * | |
35 | * | |
36 | * @ingroup alihlt_qa | |
37 | * @author jochen@thaeder.de, Camilla.Stokkevag@cern.ch, Kalliopi.Kanaki@ift.uib.no | |
38 | */ | |
39 | ||
40 | ||
41 | // ---------------------------------------------------------- | |
42 | // ---------------------------------------------------------- | |
43 | ||
44 | void setCuts(THnSparse *htrack, Int_t cuts ) { | |
45 | ||
46 | if (cuts == 0) { // no_cuts -------------------------------------------- | |
47 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
48 | htrack->GetAxis(3)->SetRangeUser(-150,149.99); // DCAr | |
49 | htrack->GetAxis(4)->SetRangeUser(-150,149.99); // DCAz | |
50 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
51 | } | |
52 | ||
05658a4f | 53 | else if (cuts == 1) { // nClust_[50,160]_+_p_t_[0.3,9999]_+_DCA_[-7,6.99]_+_Eta_[-1.0,1.0] ----- |
54 | htrack->GetAxis(0)->SetRangeUser(50,160); // nClust | |
55 | htrack->GetAxis(3)->SetRangeUser(-7,6.99); // DCAr | |
56 | htrack->GetAxis(4)->SetRangeUser(-7,6.99); // DCAz | |
57 | htrack->GetAxis(7)->SetRangeUser(0.3,9999); // Pt | |
58 | htrack->GetAxis(5)->SetRangeUser(-1, 1); // Eta | |
59 | ||
60 | } | |
61 | ||
dafb4557 | 62 | // =========================================================================== |
63 | // == Single Cuts | |
64 | // =========================================================================== | |
65 | ||
05658a4f | 66 | else if (cuts == 2) { // nClust_[70,160] ------------------------------------- |
dafb4557 | 67 | htrack->GetAxis(0)->SetRangeUser(70,160); // nClust |
68 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
69 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
70 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
71 | } | |
05658a4f | 72 | else if (cuts == 3) { // nClust_[60,160] ------------------------------------- |
dafb4557 | 73 | htrack->GetAxis(0)->SetRangeUser(60,160); // nClust |
74 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
75 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
76 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
77 | } | |
05658a4f | 78 | else if (cuts == 4) { // nClust_[50,160] ------------------------------------- |
dafb4557 | 79 | htrack->GetAxis(0)->SetRangeUser(50,160); // nClust |
80 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
81 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
82 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
83 | } | |
05658a4f | 84 | else if (cuts == 5) { // p_t_[0.4,10] ---------------------------------------- |
dafb4557 | 85 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
86 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
87 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
88 | htrack->GetAxis(7)->SetRangeUser(0.4,10); // Pt | |
89 | } | |
05658a4f | 90 | else if (cuts == 6) { // p_t_[0.3,10] ---------------------------------------- |
dafb4557 | 91 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
92 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
93 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
94 | htrack->GetAxis(7)->SetRangeUser(0.3,10); // Pt | |
95 | } | |
05658a4f | 96 | else if (cuts == 7) { // p_t_[0.2,10] ---------------------------------------- |
dafb4557 | 97 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
98 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
99 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
100 | htrack->GetAxis(7)->SetRangeUser(0.2,10); // Pt | |
101 | } | |
05658a4f | 102 | else if (cuts == 8) { // DCA_[-3,2.99] --------------------------------------- |
dafb4557 | 103 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
104 | htrack->GetAxis(3)->SetRangeUser(-3,2.99); // DCAr | |
105 | htrack->GetAxis(4)->SetRangeUser(-3,2.99); // DCAz | |
106 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
107 | } | |
05658a4f | 108 | else if (cuts == 9) { // DCA_[-5,4.99] --------------------------------------- |
dafb4557 | 109 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
110 | htrack->GetAxis(3)->SetRangeUser(-5,4.99); // DCAr | |
111 | htrack->GetAxis(4)->SetRangeUser(-5,4.99); // DCAz | |
112 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
113 | } | |
05658a4f | 114 | else if (cuts == 10) { // DCA_[-7,6.99] --------------------------------------- |
dafb4557 | 115 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
116 | htrack->GetAxis(3)->SetRangeUser(-7,6.99); // DCAr | |
117 | htrack->GetAxis(4)->SetRangeUser(-7,6.99); // DCAz | |
118 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
119 | } | |
120 | ||
dafb4557 | 121 | |
dafb4557 | 122 | |
123 | // =========================================================================== | |
124 | // == Combined Cuts | |
125 | // =========================================================================== | |
126 | ||
05658a4f | 127 | else if (cuts == 11) { // nClust_[70,160]_+_p_t_[0.4,10] --------------------- |
dafb4557 | 128 | htrack->GetAxis(0)->SetRangeUser(70,160); // nClust |
129 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
130 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
131 | htrack->GetAxis(7)->SetRangeUser(0.4,10); // Pt | |
132 | } | |
05658a4f | 133 | else if (cuts == 12) { // nClust_[70,160]_+_DCA_[-3,2.99] -------------------- |
dafb4557 | 134 | htrack->GetAxis(0)->SetRangeUser(70,160); // nClust |
135 | htrack->GetAxis(3)->SetRangeUser(-3,2.99); // DCAr | |
136 | htrack->GetAxis(4)->SetRangeUser(-3,2.99); // DCAz | |
137 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
138 | } | |
05658a4f | 139 | else if (cuts == 13) { // DCA_[-3,2.99]_+_p_t_[0.4,10] ----------------------- |
dafb4557 | 140 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
141 | htrack->GetAxis(3)->SetRangeUser(-3,2.99); // DCAr | |
142 | htrack->GetAxis(4)->SetRangeUser(-3,2.99); // DCAz | |
143 | htrack->GetAxis(7)->SetRangeUser(0.4,10); // Pt | |
144 | } | |
05658a4f | 145 | else if (cuts == 14) { // nClust_[60,160]_+_p_t_[0.3,10] --------------------- |
dafb4557 | 146 | htrack->GetAxis(0)->SetRangeUser(60,160); // nClust |
147 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
148 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
149 | htrack->GetAxis(7)->SetRangeUser(0.3,10); // Pt | |
150 | } | |
05658a4f | 151 | else if (cuts == 15) { // nClust_[60,160]_+_DCA_[-5,4.99] -------------------- |
dafb4557 | 152 | htrack->GetAxis(0)->SetRangeUser(60,160); // nClust |
153 | htrack->GetAxis(3)->SetRangeUser(-5,4.99); // DCAr | |
154 | htrack->GetAxis(4)->SetRangeUser(-5,4.99); // DCAz | |
155 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
156 | } | |
05658a4f | 157 | else if (cuts == 16) { // DCA_[-5,4.99]_+_p_t_[0.3,10] ----------------------- |
dafb4557 | 158 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
159 | htrack->GetAxis(3)->SetRangeUser(-5,4.99); // DCAr | |
160 | htrack->GetAxis(4)->SetRangeUser(-5,4.99); // DCAz | |
161 | htrack->GetAxis(7)->SetRangeUser(0.3,10); // Pt | |
162 | } | |
163 | ||
05658a4f | 164 | else if (cuts == 17) { // nClust_[50,160]_+_p_t_[0.2,10] --------------------- |
dafb4557 | 165 | htrack->GetAxis(0)->SetRangeUser(50,160); // nClust |
166 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
167 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
168 | htrack->GetAxis(7)->SetRangeUser(0.2,10); // Pt | |
169 | } | |
05658a4f | 170 | else if (cuts == 18) { // nClust_[50,160]_+_DCA_[-7,6.99] -------------------- |
dafb4557 | 171 | htrack->GetAxis(0)->SetRangeUser(50,160); // nClust |
172 | htrack->GetAxis(3)->SetRangeUser(-7,6.99); // DCAr | |
173 | htrack->GetAxis(4)->SetRangeUser(-7,6.99); // DCAz | |
174 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
175 | } | |
05658a4f | 176 | else if (cuts == 19) { // DCA_[-7,6.99]_+_p_t_[0.2,10] ----------------------- |
dafb4557 | 177 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
178 | htrack->GetAxis(3)->SetRangeUser(-7,6.99); // DCAr | |
179 | htrack->GetAxis(4)->SetRangeUser(-7,6.99); // DCAz | |
180 | htrack->GetAxis(7)->SetRangeUser(0.2,10); // Pt | |
181 | } | |
182 | ||
183 | // =========================================================================== | |
184 | ||
05658a4f | 185 | else if (cuts == 20) { // nClust_[70,160]_+_p_t_[0.4,10]_+_DCA_[-3,2.99] ----- |
dafb4557 | 186 | htrack->GetAxis(0)->SetRangeUser(70,160); // nClust |
187 | htrack->GetAxis(3)->SetRangeUser(-3,2.99); // DCAr | |
188 | htrack->GetAxis(4)->SetRangeUser(-3,2.99); // DCAz | |
189 | htrack->GetAxis(7)->SetRangeUser(0.4,10); // Pt | |
190 | } | |
05658a4f | 191 | else if (cuts == 21) { // nClust_[60,160]_+_p_t_[0.3,10]_+_DCA_[-6,4.99] ----- |
dafb4557 | 192 | htrack->GetAxis(0)->SetRangeUser(60,160); // nClust |
193 | htrack->GetAxis(3)->SetRangeUser(-5,4.99); // DCAr | |
194 | htrack->GetAxis(4)->SetRangeUser(-5,4.99); // DCAz | |
195 | htrack->GetAxis(7)->SetRangeUser(0.3,10); // Pt | |
196 | } | |
05658a4f | 197 | |
dafb4557 | 198 | |
199 | // =========================================================================== | |
05658a4f | 200 | else if (cuts == 22) { // p_t_[1.0,10] --------------------------------------- |
dafb4557 | 201 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
202 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
203 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
204 | htrack->GetAxis(7)->SetRangeUser(1.0,10); // Pt | |
205 | } | |
05658a4f | 206 | else if (cuts == 23) { // ControlCut_p_t_[0,1.0] ----------------------------- |
dafb4557 | 207 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust |
208 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
209 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
210 | htrack->GetAxis(7)->SetRangeUser(0,1.0); // Pt | |
211 | } | |
05658a4f | 212 | // =========================================================================== |
213 | // == Control Cuts | |
dafb4557 | 214 | // =========================================================================== |
215 | ||
05658a4f | 216 | else if (cuts == 24) { // ControlCut_nClust_[0,70] --------------------------- |
217 | htrack->GetAxis(0)->SetRangeUser(0,70); // nClust | |
218 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
219 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
220 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
221 | } | |
222 | else if (cuts == 25) { // ControlCut_nClust_[0,60] --------------------------- | |
223 | htrack->GetAxis(0)->SetRangeUser(0,60); // nClust | |
224 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
225 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
226 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
227 | } | |
228 | else if (cuts == 26) { // ControlCut_nClust_[0,50] --------------------------- | |
229 | htrack->GetAxis(0)->SetRangeUser(0,50); // nClust | |
230 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
231 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
232 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
233 | } | |
234 | else if (cuts == 27) { // ControlCut_p_t_[0,0.4] ----------------------------- | |
235 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
236 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
237 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
238 | htrack->GetAxis(7)->SetRangeUser(0,0.4); // Pt | |
239 | } | |
240 | else if (cuts == 28) { // ControlCut_p_t_[0,0.3] ----------------------------- | |
241 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
242 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
243 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
244 | htrack->GetAxis(7)->SetRangeUser(0,0.3); // Pt | |
245 | } | |
246 | else if (cuts == 29) { // ControlCut_p_t_[0,0.2] ----------------------------- | |
247 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
248 | htrack->GetAxis(3)->SetRangeUser(-50,49.99); // DCAr | |
249 | htrack->GetAxis(4)->SetRangeUser(-50,49.99); // DCAz | |
250 | htrack->GetAxis(7)->SetRangeUser(0,0.2); // Pt | |
251 | } | |
252 | else if (cuts == 30) { // ControlCut_DCA_[2.99,49.99] ------------------------ | |
253 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
254 | htrack->GetAxis(3)->SetRangeUser(2.99,49.99); // DCAr | |
255 | htrack->GetAxis(4)->SetRangeUser(2.99,49.99); // DCAz | |
256 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
257 | } | |
258 | else if (cuts == 31) { // ControlCut_DCA_[-50,-3] ---------------------------- | |
259 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
260 | htrack->GetAxis(3)->SetRangeUser(-50,-3); // DCAr | |
261 | htrack->GetAxis(4)->SetRangeUser(-50,-3); // DCAz | |
262 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
263 | } | |
264 | else if (cuts == 32) { // ControlCut_DCA_[4.99,49.99] ------------------------ | |
265 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
266 | htrack->GetAxis(3)->SetRangeUser(4.99,49.99); // DCAr | |
267 | htrack->GetAxis(4)->SetRangeUser(4.99,49.99); // DCAz | |
268 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
269 | } | |
270 | else if (cuts == 33) { // ControlCut_DCA_[-50,-5] ---------------------------- | |
271 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
272 | htrack->GetAxis(3)->SetRangeUser(-50,-5); // DCAr | |
273 | htrack->GetAxis(4)->SetRangeUser(-50,-5); // DCAz | |
274 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
275 | } | |
276 | else if (cuts == 34) { // ControlCut_DCA_[6.99,49.99] ------------------------ | |
277 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
278 | htrack->GetAxis(3)->SetRangeUser(6.99,49.99); // DCAr | |
279 | htrack->GetAxis(4)->SetRangeUser(6.99,49.99); // DCAz | |
280 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
281 | } | |
282 | else if (cuts == 35) { // ControlCut_DCA_[-50,-7] ---------------------------- | |
283 | htrack->GetAxis(0)->SetRangeUser(0,160); // nClust | |
284 | htrack->GetAxis(3)->SetRangeUser(-50,-7); // DCAr | |
285 | htrack->GetAxis(4)->SetRangeUser(-50,-7); // DCAz | |
286 | htrack->GetAxis(7)->SetRangeUser(0,9999); // Pt | |
287 | } | |
288 | ||
289 | // =========================================================================== | |
290 | if(cuts==0) | |
291 | htrack->GetAxis(5)->SetRangeUser(-1.5, 1.5); // eta -1.0 - 1.0 | |
292 | else | |
293 | htrack->GetAxis(5)->SetRangeUser(-1, 1); // eta -1.0 - 1.0 | |
dafb4557 | 294 | htrack->GetAxis(8)->SetRangeUser(-1, 1); // Charge |
295 | ||
296 | // =========================================================================== | |
297 | } | |
298 | ||
299 | // ---------------------------------------------------------- | |
300 | // ---------------------------------------------------------- | |
301 | ||
302 | ||
303 | drawPerformanceTPCQAofflineHLT(const Char_t* folder = "../..") { | |
304 | ||
305 | ||
306 | ||
307 | // ---------------------------------------------------- | |
308 | // ------ APPLY YOUR CUTS ----------------------------- | |
309 | // ---------------------------------------------------- | |
310 | ||
05658a4f | 311 | Int_t nCutsMin = 0; |
312 | Int_t nCutsMax = 5; | |
dafb4557 | 313 | Int_t nCuts=nCutsMax+1; |
314 | ||
315 | //---------------------------------------------------- | |
316 | ||
317 | ||
318 | //---------------------------------------------------- | |
319 | //----CURRENT VERSION OF MACRO DOES NOT WORK --------- | |
320 | //-------IF CUTS ARE APPLIED IN LINES UNDER---------- | |
321 | //---------------------------------------------------- | |
322 | ||
323 | Int_t nCanMin = 0; | |
05658a4f | 324 | Int_t nCanMax = 2; |
dafb4557 | 325 | Int_t nCans=nCanMax+1; |
326 | ||
327 | // ---------------------------------------------------- | |
328 | // ---------------------------------------------------- | |
329 | ||
330 | gSystem->Load("libANALYSIS"); | |
331 | gSystem->Load("libANALYSISalice"); | |
332 | gSystem->Load("libTENDER"); | |
333 | gSystem->Load("libCORRFW"); | |
334 | gSystem->Load("libPWG1"); | |
335 | ||
336 | gROOT->Reset(); | |
337 | gROOT->SetStyle("Plain"); | |
338 | gStyle->SetPalette(1); | |
339 | gStyle->SetOptStat(10); | |
340 | TH1::AddDirectory(kFALSE); | |
341 | ||
342 | // ---------------------------------------------------- | |
343 | ||
344 | TString inFile(folder); | |
345 | inFile += "/TPC.Performance.root"; | |
346 | TFile *file = TFile::Open(inFile.Data()); | |
347 | if (!file) { | |
348 | printf("Error : No File\n"); | |
349 | return; | |
350 | } | |
351 | ||
352 | TList* list = static_cast<TList*>(file->Get("TPC")); | |
353 | if (!list) { | |
354 | printf("Error : No List\n"); | |
355 | return; | |
356 | } | |
357 | ||
358 | TString inFileH(folder); | |
359 | inFileH += "/HLTTPC.Performance.root"; | |
360 | TFile *fileH = TFile::Open(inFileH.Data()); | |
361 | if (!fileH) { | |
362 | printf("Error : No HLT File\n"); | |
363 | return; | |
364 | } | |
365 | ||
366 | TList* listH = static_cast<TList*>(fileH->Get("HLTQA")); | |
367 | if (!listH) { | |
368 | printf("Error : No HLT List\n"); | |
369 | return; | |
370 | } | |
371 | ||
372 | // ---------------------------------------------------- | |
373 | ||
374 | AliPerformanceTPC* obj = static_cast<AliPerformanceTPC*>(list->FindObject("AliPerformanceTPC")); | |
375 | if(obj==NULL) return; | |
376 | ||
377 | AliPerformanceTPC* objH = static_cast<AliPerformanceTPC*>(listH->FindObject("AliPerformanceTPC")); | |
378 | if(objH==NULL) return; | |
379 | ||
380 | TObjArray *aCan = new TObjArray(); | |
381 | ||
382 | // ---------------------------------------------------- | |
383 | ||
384 | /* Xv:Yv:Zv:mult:multP:multN:vertStatus | |
385 | ------------------------------------ | |
386 | 0 Xv | |
387 | 1 Yv | |
388 | 2 Zv | |
389 | 3 mult | |
390 | 4 multP | |
391 | 5 multN | |
392 | 6 VertStatus | |
393 | */ | |
394 | ||
395 | THnSparse *hevent = obj->GetTPCEventHisto(); | |
396 | THnSparse *heventH = objH->GetTPCEventHisto(); | |
397 | ||
dafb4557 | 398 | |
399 | // return; | |
400 | ||
401 | /* nClust:chi2PerClust:nClust/nFindableClust:DCAr:DCAz:eta:phi:pt:charge | |
402 | --------------------------------------------------------------------- | |
403 | 0 nClust: | |
404 | 1 chi2PerClust: | |
405 | 2 nClust/nFindableClust: | |
406 | 3 DCAr: | |
407 | 4 DCAz: | |
408 | 5 eta: | |
409 | 6 phi: | |
410 | 7 pt: | |
411 | 8 charge : | |
412 | */ | |
413 | ||
414 | THnSparse *htrack = obj->GetTPCTrackHisto(); | |
415 | THnSparse *htrackH = objH->GetTPCTrackHisto(); | |
416 | ||
417 | // ---------------------------------------------------- | |
418 | ||
419 | TCanvas *can0 = new TCanvas("can0","TPC offline-HLT event information",550,750); | |
420 | can0->Divide(2,3); | |
421 | trackInfo0(can0,hevent,heventH); | |
422 | can0->SaveAs("perfImg/qa/event/TPC_offline-HLT_event_info.png"); | |
423 | can0->SaveAs("perfRoot/TPC_offline_HLT_event_info.root"); | |
424 | ||
dafb4557 | 425 | |
426 | // ---------------------------------------------------- | |
427 | ||
428 | ||
429 | for (Int_t idxCut = nCutsMin; idxCut <= nCutsMax; ++idxCut){ | |
430 | for ( Int_t idxCan = 2*nCanMin; idxCan < 2*(nCans); ++idxCan) { | |
431 | ||
432 | Int_t idx = idxCan/2; | |
433 | ||
05658a4f | 434 | cout << "idx: " << idx << " idxCut: " << idxCut <<endl; |
435 | ||
436 | if(idx==0){ | |
437 | aCan->Add(new TCanvas(Form("can%d_%d", idxCan, idxCut), | |
438 | Form("TPC HLT tracks1 %d - cuts %d", idx, idxCut), 1600, 1200) ); //1200, 750) ); | |
439 | (dynamic_cast<TCanvas*>(aCan->Last()))->Divide(3,3); | |
440 | ||
441 | fillCanvas(dynamic_cast<TCanvas*>(aCan->Last()), htrack, htrackH, idxCut, idx, 1.0); | |
442 | ||
443 | (dynamic_cast<TCanvas*>(aCan->Last()))->SaveAs(Form("perfImg/qa/%d/TPC_offline_HLT_tracks_%d-%d.png", idxCut, idxCut, idx)); | |
444 | (dynamic_cast<TCanvas*>(aCan->Last()))->SaveAs(Form("perfRoot/TPC_HLT_tracks_%d-%d.root", idxCut, idx)); | |
445 | } | |
446 | else{ | |
447 | // -- -- -- -- -- -- -- -- | |
dafb4557 | 448 | |
05658a4f | 449 | //if(idx==0) continue; |
dafb4557 | 450 | |
05658a4f | 451 | aCan->Add(new TCanvas(Form("canS%d_%d", idxCan, idxCut), |
452 | Form("TPC tracks %d - cuts %d", idx, idxCut), 1200, 750) ); | |
453 | (dynamic_cast<TCanvas*>(aCan->Last()))->Divide(4,3); | |
dafb4557 | 454 | |
05658a4f | 455 | fillCanvas(dynamic_cast<TCanvas*>(aCan->Last()), htrack, idxCut, idx, 1.0); |
dafb4557 | 456 | |
05658a4f | 457 | (dynamic_cast<TCanvas*>(aCan->Last()))->SaveAs(Form("perfImg/qa/%d/TPC_tracks_%d-%d.png", idxCut, idxCut, idx)); |
458 | (dynamic_cast<TCanvas*>(aCan->Last()))->SaveAs(Form("perfRoot/TPC_tracks_%d-%d.root", idxCut, idx)); | |
dafb4557 | 459 | |
05658a4f | 460 | // -- -- -- -- -- -- -- -- |
461 | ++idxCan; | |
462 | // -- -- -- -- -- -- -- -- | |
dafb4557 | 463 | |
05658a4f | 464 | aCan->Add(new TCanvas(Form("can%d_%d", idxCan, idxCut), |
465 | Form("HLTTPC tracks %d - cuts %d", idx, idxCut), 1200, 750) ); | |
466 | (dynamic_cast<TCanvas*>(aCan->Last()))->Divide(4,3); | |
dafb4557 | 467 | |
468 | ||
05658a4f | 469 | fillCanvas(dynamic_cast<TCanvas*>(aCan->Last()), htrackH, idxCut, idx, 1.0); |
dafb4557 | 470 | |
471 | ||
05658a4f | 472 | (dynamic_cast<TCanvas*>(aCan->Last()))->SaveAs(Form("perfImg/qa/%d/HLTTPC_tracks_%d-%d.png", idxCut, idxCut, idx)); |
473 | (dynamic_cast<TCanvas*>(aCan->Last()))->SaveAs(Form("perfRoot/HLTTPC_tracks_%d-%d.root", idxCut, idx)); | |
474 | } | |
dafb4557 | 475 | } |
476 | } | |
477 | ||
478 | return; | |
479 | } | |
480 | ||
481 | //void fillCanvas(TCanvas* can, THnSparse *htrack, Int_t cuts, Int_t idx, Double_t scale ) { | |
482 | void fillCanvas(TCanvas* can, THnSparse *htrack, THnSparse *htrackH, Int_t cuts, Int_t idx, Double_t scale ) { | |
483 | ||
484 | if ( idx == 0 ) | |
485 | trackInfo1(can, htrack, htrackH, cuts ,scale); | |
05658a4f | 486 | |
487 | return; | |
488 | } | |
489 | ||
490 | void fillCanvas(TCanvas* can, THnSparse *htrack, Int_t cuts, Int_t idx, Double_t scale ) { | |
491 | ||
492 | ||
493 | if ( idx == 1 ) | |
dafb4557 | 494 | trackInfo2(can, htrack, cuts, scale); |
495 | else if ( idx == 2 ) | |
496 | trackInfo3(can, htrack, cuts, scale); | |
497 | ||
498 | return; | |
499 | } | |
500 | ||
501 | ||
502 | //-------------------------------------------------------------------------------------------- | |
503 | //----------- OFFLINE HLT EVENT INFO --------------------------------------------------------- | |
504 | //-------------------------------------------------------------------------------------------- | |
505 | ||
506 | ||
507 | void trackInfo0(TCanvas* can, THnSparse *hevent, THnSparse *heventH) { | |
508 | ||
509 | TH1D* histe = NULL; | |
510 | TH1D* histeH = NULL; | |
511 | ||
512 | TLegend *leg1 = new TLegend(0.6,0.6,0.8,0.8); | |
513 | leg1->SetFillColor(10); | |
514 | leg1->SetLineColor(10); | |
515 | ||
05658a4f | 516 | |
dafb4557 | 517 | //====================== |
518 | ||
519 | histeH = heventH->Projection(6); | |
520 | histe = hevent->Projection(6); // vertexStatus | |
521 | histeH->SetTitle("VertexStatus"); | |
522 | heventH->GetAxis(6)->SetRange(2,2); | |
523 | histe->SetLineColor(2); | |
524 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
525 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
526 | ||
527 | leg1->AddEntry(histeH,"HLT", "l"); | |
528 | leg1->AddEntry(histe,"OFF", "l"); | |
529 | ||
530 | can->cd(1); | |
531 | histeH->Draw("histeH"); | |
532 | histe->Draw("sames"); | |
533 | leg1->Draw("sames"); | |
534 | ||
535 | gPad->Update(); | |
536 | TPaveStats *st1 = (TPaveStats*)histeH->FindObject("stats"); | |
537 | st1->SetLineColor(0); | |
538 | ||
539 | gPad->Update(); | |
540 | TPaveStats *st2 = (TPaveStats*)histe->FindObject("stats"); | |
541 | st2->SetY1NDC(st1->GetY1NDC()-0.05); | |
542 | st2->SetY2NDC(st1->GetY2NDC()-0.05); | |
543 | st2->SetLineColor(0); | |
544 | st2->SetTextColor(histe->GetLineColor()); | |
545 | st2->SetFillStyle(0); | |
546 | st2->Draw(); | |
547 | ||
548 | //====================== | |
549 | ||
550 | histeH = heventH->Projection(0); | |
551 | histe = hevent->Projection(0); // Xv | |
552 | histeH->SetTitle("Vertex X"); | |
553 | histe->SetLineColor(2); | |
554 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
555 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
556 | ||
557 | can->cd(2); | |
558 | gPad->SetLogy(); | |
559 | histeH->Draw("histeH"); | |
560 | histe->Draw("sames"); | |
561 | leg1->Draw("sames"); | |
562 | ||
563 | gPad->Update(); | |
564 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
565 | st3->SetLineColor(0); | |
566 | ||
567 | gPad->Update(); | |
568 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
569 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
570 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
571 | st4->SetLineColor(0); | |
572 | st4->SetTextColor(histe->GetLineColor()); | |
573 | st4->SetFillStyle(0); | |
574 | st4->Draw(); | |
575 | ||
576 | //====================== | |
577 | ||
578 | histeH = heventH->Projection(1); | |
579 | histe = hevent->Projection(1); // Yv | |
580 | histeH->SetTitle("Vertex Y"); | |
581 | histe->SetLineColor(2); | |
582 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
583 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
584 | ||
585 | can->cd(3); | |
586 | gPad->SetLogy(); | |
587 | histeH->Draw("histeH"); | |
588 | histe->Draw("sames"); | |
589 | leg1->Draw("sames"); | |
590 | ||
591 | gPad->Update(); | |
592 | TPaveStats *st5 = (TPaveStats*)histeH->FindObject("stats"); | |
593 | st5->SetLineColor(0); | |
594 | ||
595 | gPad->Update(); | |
596 | TPaveStats *st6 = (TPaveStats*)histe->FindObject("stats"); | |
597 | st6->SetY1NDC(st5->GetY1NDC()-0.05); | |
598 | st6->SetY2NDC(st5->GetY2NDC()-0.05); | |
599 | st6->SetLineColor(0); | |
600 | st6->SetTextColor(histe->GetLineColor()); | |
601 | st6->SetFillStyle(0); | |
602 | st6->Draw(); | |
603 | ||
604 | //====================== | |
605 | ||
606 | ||
607 | histeH = heventH->Projection(2); | |
608 | histe = hevent->Projection(2); // Zv | |
609 | histeH->SetTitle("Vertex Z"); | |
610 | histe->SetLineColor(2); | |
611 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
612 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
613 | ||
614 | can->cd(4); | |
615 | gPad->SetLogy(); | |
616 | histeH->Draw("histeH"); | |
617 | histe->Draw("sames"); | |
618 | leg1->Draw("sames"); | |
619 | ||
620 | gPad->Update(); | |
621 | TPaveStats *st7 = (TPaveStats*)histeH->FindObject("stats"); | |
622 | st7->SetLineColor(0); | |
623 | ||
624 | gPad->Update(); | |
625 | TPaveStats *st8 = (TPaveStats*)histe->FindObject("stats"); | |
626 | st8->SetY1NDC(st7->GetY1NDC()-0.05); | |
627 | st8->SetY2NDC(st7->GetY2NDC()-0.05); | |
628 | st8->SetLineColor(0); | |
629 | st8->SetTextColor(histe->GetLineColor()); | |
630 | st8->SetFillStyle(0); | |
631 | st8->Draw(); | |
632 | ||
633 | //====================== | |
634 | ||
635 | histeH = heventH->Projection(3); | |
636 | histe = hevent->Projection(3); // mult | |
637 | histeH->SetTitle("mult"); | |
638 | histe->SetLineColor(2); | |
639 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
640 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
641 | ||
642 | can->cd(5); | |
643 | gPad->SetLogy(); | |
644 | histeH->Draw("histeH"); | |
645 | histe->Draw("sames"); | |
646 | leg1->Draw("sames"); | |
647 | ||
648 | gPad->Update(); | |
649 | TPaveStats *st9 = (TPaveStats*)histeH->FindObject("stats"); | |
650 | st9->SetLineColor(0); | |
651 | ||
652 | gPad->Update(); | |
653 | TPaveStats *st10 = (TPaveStats*)histe->FindObject("stats"); | |
654 | st10->SetY1NDC(st9->GetY1NDC()-0.05); | |
655 | st10->SetY2NDC(st9->GetY2NDC()-0.05); | |
656 | st10->SetLineColor(0); | |
657 | st10->SetTextColor(histe->GetLineColor()); | |
658 | st10->SetFillStyle(0); | |
659 | st10->Draw(); | |
660 | ||
661 | return; | |
662 | ||
663 | } | |
664 | ||
665 | //-------------------------------------------------------------------------------------------- | |
666 | //----------- OFFLINE HLT TRACK INFO --------------------------------------------------------- | |
667 | //-------------------------------------------------------------------------------------------- | |
668 | ||
669 | void trackInfo1(TCanvas* can, THnSparse *htrack, THnSparse *htrackH, Int_t cuts, Double_t scale) { | |
670 | ||
671 | setCuts(htrack, cuts); | |
672 | setCuts(htrackH, cuts); | |
673 | ||
674 | TH1D* histe = NULL; | |
675 | TH1D* histeH = NULL; //HLT | |
676 | ||
677 | TH2D* hist = NULL; | |
678 | TPad* pad = NULL; | |
679 | ||
680 | TLegend *leg1 = new TLegend(0.6,0.6,0.8,0.8); | |
681 | leg1->SetFillColor(10); | |
682 | leg1->SetLineColor(10); | |
683 | ||
05658a4f | 684 | TLegend *leg2 = new TLegend(0.6,0.2,0.8,0.4); |
685 | leg2->SetFillColor(10); | |
686 | leg2->SetLineColor(10); | |
687 | ||
dafb4557 | 688 | //====================== |
689 | ||
690 | can->cd(1); | |
691 | histeH = htrackH->Projection(5); | |
692 | histe = htrack->Projection(5); // Eta | |
693 | histeH->SetTitle("Eta"); | |
694 | histeH->Scale(1./scale); | |
695 | histe->SetLineColor(2); | |
696 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
697 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
05658a4f | 698 | |
dafb4557 | 699 | leg1->AddEntry(histeH,"HLT", "l"); |
700 | leg1->AddEntry(histe,"Offline", "l"); | |
05658a4f | 701 | leg2->AddEntry(histeH,"HLT", "l"); |
702 | leg2->AddEntry(histe,"Offline", "l"); | |
dafb4557 | 703 | |
704 | histeH->Draw("histeH"); | |
705 | histe->Draw("sames"); | |
706 | leg1->Draw("same"); | |
707 | ||
708 | gPad->Update(); | |
709 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
710 | st3->SetLineColor(0); | |
711 | ||
712 | gPad->Update(); | |
713 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
714 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
715 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
716 | st4->SetLineColor(0); | |
717 | st4->SetTextColor(histe->GetLineColor()); | |
718 | st4->SetFillStyle(0); | |
719 | st4->Draw(); | |
720 | ||
721 | //====================== | |
722 | ||
723 | histeH = htrackH->Projection(6); | |
724 | histe = htrack->Projection(6); // Phi | |
725 | histeH->SetTitle("Phi"); | |
726 | histeH->Scale(1./scale); | |
727 | histe->SetLineColor(2); | |
728 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
729 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
730 | ||
731 | can->cd(2); | |
732 | histeH->Draw("histeH"); | |
733 | histe->Draw("sames"); | |
734 | leg1->Draw("same"); | |
735 | ||
736 | gPad->Update(); | |
737 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
738 | st3->SetLineColor(0); | |
739 | ||
740 | gPad->Update(); | |
741 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
742 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
743 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
744 | st4->SetLineColor(0); | |
745 | st4->SetTextColor(histe->GetLineColor()); | |
746 | st4->SetFillStyle(0); | |
747 | st4->Draw(); | |
748 | ||
749 | ||
750 | //====================== | |
751 | ||
752 | histeH = htrackH->Projection(0); | |
753 | histe = htrack->Projection(0); // nClust | |
754 | histeH->SetTitle("nCluster"); | |
755 | histeH->Scale(1./scale); | |
756 | histe->SetLineColor(2); | |
757 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
758 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
759 | ||
760 | can->cd(3); | |
05658a4f | 761 | // gPad->SetLogy(); |
dafb4557 | 762 | histeH->Draw("histeH"); |
763 | histe->Draw("sames"); | |
05658a4f | 764 | leg2->Draw("sames"); |
dafb4557 | 765 | |
766 | gPad->Update(); | |
767 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
768 | st3->SetLineColor(0); | |
769 | ||
770 | gPad->Update(); | |
771 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
772 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
773 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
774 | st4->SetLineColor(0); | |
775 | st4->SetTextColor(histe->GetLineColor()); | |
776 | st4->SetFillStyle(0); | |
777 | st4->Draw(); | |
778 | ||
779 | ||
780 | //====================== | |
781 | ||
782 | histeH = htrackH->Projection(8); | |
783 | histe = htrack->Projection(8); // Charge | |
784 | histeH->SetTitle("Charge"); | |
785 | histeH->Scale(1./scale); | |
786 | histe->SetLineColor(2); | |
787 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
788 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
789 | ||
790 | can->cd(4); | |
791 | histeH->Draw("histeH"); | |
792 | histe->Draw("sames"); | |
793 | leg1->Draw("sames"); | |
794 | ||
795 | gPad->Update(); | |
796 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
797 | st3->SetLineColor(0); | |
798 | ||
799 | gPad->Update(); | |
800 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
801 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
802 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
803 | st4->SetLineColor(0); | |
804 | st4->SetTextColor(histe->GetLineColor()); | |
805 | st4->SetFillStyle(0); | |
806 | st4->Draw(); | |
807 | ||
808 | ||
809 | //====================== | |
810 | ||
811 | //pad = can->cd(5); | |
812 | histeH = htrackH->Projection(7); | |
813 | histe = htrack->Projection(7); // Pt | |
814 | histeH->SetTitle("Pt"); | |
815 | histeH->Scale(1./scale); | |
816 | histe->SetLineColor(2); | |
817 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
818 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
819 | ||
820 | can->cd(5)->SetLogy(); | |
821 | histeH->Draw("histeH"); | |
822 | histe->Draw("sames"); | |
823 | leg1->Draw("same"); | |
824 | ||
825 | gPad->Update(); | |
826 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
827 | st3->SetLineColor(0); | |
828 | ||
829 | gPad->Update(); | |
830 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
831 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
832 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
833 | st4->SetLineColor(0); | |
834 | st4->SetTextColor(histe->GetLineColor()); | |
835 | st4->SetFillStyle(0); | |
836 | st4->Draw(); | |
837 | ||
838 | //====================== | |
839 | ||
840 | histeH = htrackH->Projection(3); | |
841 | histe = htrack->Projection(3); // DCAr | |
842 | histeH->SetTitle("DCAr"); | |
843 | histeH->Scale(1./scale); | |
844 | histe->SetLineColor(2); | |
845 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
846 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
847 | ||
848 | can->cd(6)->SetLogy(); | |
849 | histeH->Draw("histeH"); | |
850 | histe->Draw("sames"); | |
851 | leg1->Draw("same"); | |
852 | ||
853 | gPad->Update(); | |
854 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
855 | st3->SetLineColor(0); | |
856 | ||
857 | gPad->Update(); | |
858 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
859 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
860 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
861 | st4->SetLineColor(0); | |
862 | st4->SetTextColor(histe->GetLineColor()); | |
863 | st4->SetFillStyle(0); | |
864 | st4->Draw(); | |
865 | ||
866 | //====================== | |
867 | ||
868 | histeH = htrackH->Projection(4); | |
869 | histe = htrack->Projection(4); // DCAz | |
870 | histeH->SetTitle("DCAz"); | |
871 | histeH->Scale(1./scale); | |
872 | histe->SetLineColor(2); | |
873 | if(histeH->GetMaximum() > histe->GetMaximum()) histe->SetMaximum(1.1*histeH->GetMaximum()); | |
874 | else histeH->SetMaximum(1.1*histe->GetMaximum()); | |
875 | ||
876 | can->cd(7)->SetLogy(); | |
877 | histeH->Draw("histeH"); | |
878 | histe->Draw("sames"); | |
879 | leg1->Draw("same"); | |
880 | ||
881 | gPad->Update(); | |
882 | TPaveStats *st3 = (TPaveStats*)histeH->FindObject("stats"); | |
883 | st3->SetLineColor(0); | |
884 | ||
885 | gPad->Update(); | |
886 | TPaveStats *st4 = (TPaveStats*)histe->FindObject("stats"); | |
887 | st4->SetY1NDC(st3->GetY1NDC()-0.05); | |
888 | st4->SetY2NDC(st3->GetY2NDC()-0.05); | |
889 | st4->SetLineColor(0); | |
890 | st4->SetTextColor(histe->GetLineColor()); | |
891 | st4->SetFillStyle(0); | |
892 | st4->Draw(); | |
893 | } | |
894 | ||
895 | //=================================================================== | |
896 | ||
897 | void trackInfo2(TCanvas* can, THnSparse *htrack, Int_t cuts, Double_t scale) { | |
898 | ||
899 | TH1D* histe = NULL; | |
900 | TH2D* hist = NULL; | |
901 | TPad* pad = NULL; | |
902 | ||
903 | setCuts(htrack, cuts); // reset Cuts | |
904 | ||
905 | pad = can->cd(5); | |
906 | pad->SetLogz(); | |
907 | hist = htrack->Projection(5,6); // eta/phi | |
908 | hist->SetTitle("Eta-Phi"); | |
909 | hist->Scale(1./scale); | |
910 | hist->Draw("colz"); | |
911 | ||
912 | // -- -- -- -- -- -- -- -- -- -- -- -- -- | |
913 | ||
914 | can->cd(6); | |
915 | histe = htrack->Projection(0); // nClust | |
916 | histe->SetTitle("nCluster"); | |
917 | histe->Scale(1./scale); | |
918 | histe->Draw("histe"); | |
919 | ||
920 | can->cd(7); | |
921 | histe = htrack->Projection(8); // Charge | |
922 | histe->SetTitle("Charge"); | |
923 | histe->Scale(1./scale); | |
924 | histe->Draw("histe"); | |
925 | ||
926 | pad = can->cd(8); | |
927 | pad->SetLogy(); | |
928 | histe = htrack->Projection(7); // Pt | |
929 | histe->SetTitle("Pt"); | |
930 | histe->Scale(1./scale); | |
931 | histe->Draw("histe"); | |
932 | ||
933 | can->cd(9); | |
934 | histe = htrack->Projection(3); // DCAr | |
935 | histe->SetTitle("DCAr"); | |
936 | histe->Scale(1./scale); | |
937 | histe->Draw("histe"); | |
938 | ||
939 | can->cd(10); | |
940 | histe = htrack->Projection(4); // DCAz | |
941 | histe->SetTitle("DCAz"); | |
942 | histe->Scale(1./scale); | |
943 | histe->Draw("histe"); | |
944 | ||
945 | pad = can->cd(11); | |
946 | pad->SetLogz(); | |
947 | hist = htrack->Projection(3,4); // DCAz/DCAr | |
948 | hist->SetTitle("DCAr-DCAz"); | |
949 | hist->Scale(1./scale); | |
950 | hist->Draw("colz"); | |
951 | ||
952 | } | |
953 | ||
954 | ||
955 | void trackInfo2(TCanvas* can, THnSparse *htrack, Int_t cuts, Double_t scale) { | |
956 | ||
957 | TH1D* histe = NULL; | |
958 | TH2D* hist = NULL; | |
959 | TPad* pad = NULL; | |
960 | ||
961 | setCuts(htrack, cuts); | |
962 | ||
963 | ||
964 | pad = can->cd(1); | |
965 | pad->SetLogz(); | |
966 | hist = htrack->Projection(3,5); // DCAr/Eta | |
967 | hist->SetTitle("DCAr-Eta"); | |
968 | hist->Scale(1./scale); | |
969 | hist->Draw("colz"); | |
970 | ||
971 | pad = can->cd(1); | |
972 | pad->SetLogz(); | |
973 | hist = htrack->Projection(3,5); // DCAr/Eta | |
974 | hist->SetTitle("DCAr-Eta"); | |
975 | hist->Scale(1./scale); | |
976 | hist->Draw("colz"); | |
977 | ||
978 | can->cd(2); | |
979 | hist = htrack->Projection(4,5); // DCAz/Eta | |
980 | hist->SetTitle("DCAz-Eta"); | |
981 | hist->Scale(1./scale); | |
982 | hist->Draw("colz"); | |
983 | ||
984 | can->cd(3); | |
985 | hist = htrack->Projection(3,6); // DCAr/Phi | |
986 | hist->SetTitle("DCAr-Phi"); | |
987 | hist->Scale(1./scale); | |
988 | hist->Draw("colz"); | |
989 | ||
990 | can->cd(4); | |
991 | hist = htrack->Projection(4,6); // DCAz/Phi | |
992 | hist->SetTitle("DCAz-Phi"); | |
993 | hist->Scale(1./scale); | |
994 | hist->Draw("colz"); | |
995 | ||
996 | // -- -- -- -- -- -- -- -- -- -- -- -- -- | |
997 | ||
998 | pad = can->cd(5); | |
999 | pad->SetLogx(); | |
1000 | hist = htrack->Projection(5,7); // Eta/pt | |
1001 | hist->SetTitle("Eta-Pt"); | |
1002 | hist->Scale(1./scale); | |
1003 | hist->Draw("colz"); | |
1004 | ||
1005 | pad = can->cd(6); | |
1006 | pad->SetLogx(); | |
1007 | hist = htrack->Projection(6,7); // Phi/pt | |
1008 | hist->SetTitle("Phi-Pt"); | |
1009 | hist->Scale(1./scale); | |
1010 | hist->Draw("colz"); | |
1011 | ||
1012 | pad = can->cd(7); | |
1013 | pad->SetLogx(); | |
1014 | hist = htrack->Projection(3,7); // DCAr/pt | |
1015 | hist->SetTitle("DCAr-Pt"); | |
1016 | hist->Scale(1./scale); | |
1017 | hist->Draw("colz"); | |
1018 | ||
1019 | pad = can->cd(8); | |
1020 | pad->SetLogx(); | |
1021 | hist = htrack->Projection(4,7); // DCAz/pt | |
1022 | hist->SetTitle("DCAz-Pt"); | |
1023 | hist->Scale(1./scale); | |
1024 | hist->Draw("colz"); | |
1025 | ||
1026 | pad = can->cd(9); | |
1027 | pad->SetLogx(); | |
1028 | hist = htrack->Projection(0,7); // nClust/pt | |
1029 | hist->SetTitle("NClust-Pt"); | |
1030 | hist->Scale(1./scale); | |
1031 | hist->Draw("colz"); | |
1032 | ||
1033 | // -- -- -- -- -- -- -- -- -- -- -- -- -- | |
1034 | ||
1035 | pad = can->cd(10); | |
1036 | pad->SetLogy(); | |
1037 | htrack->GetAxis(5)->SetRangeUser(0.,0.799); // Eta > 0 | A side | |
1038 | histe = htrack->Projection(7); // Pt | |
1039 | histe->SetTitle("Pt A vs C side"); | |
1040 | histe->Draw("histe"); | |
1041 | htrack->GetAxis(5)->SetRangeUser(-0.8,-0.0001); // Eta < 0 | C side | |
1042 | TH1* h1 = (TH1*)htrack->Projection(7); | |
1043 | h1->SetLineColor(kRed); | |
1044 | histe->Scale(1./scale); | |
1045 | h1->Scale(1./scale); | |
1046 | h1->Draw("histesame"); | |
1047 | ||
1048 | setCuts(htrack, cuts); | |
1049 | ||
1050 | pad = can->cd(11); | |
1051 | pad->SetLogy(); | |
1052 | htrack->GetAxis(8)->SetRangeUser(0.,1); // charge > 0 | |
1053 | histe = htrack->Projection(7); // Pt | |
1054 | histe->SetTitle("Pt Charge > 0 vs Charge < 0"); | |
1055 | histe->Draw("histe"); | |
1056 | htrack->GetAxis(8)->SetRangeUser(-1.,0.); // charge < 0 | |
1057 | TH1* h2 = (TH1*)htrack->Projection(7); | |
1058 | h2->SetLineColor(kGreen+2); | |
1059 | histe->Scale(1./scale); | |
1060 | h2->Scale(1./scale); | |
1061 | h2->Draw("histesame"); | |
1062 | } | |
1063 | ||
1064 | ||
1065 | void trackInfo3(TCanvas* can, THnSparse *htrack, Int_t cuts, Double_t scale) { | |
1066 | ||
1067 | setCuts(htrack, cuts); | |
1068 | ||
1069 | TH1D* histe = NULL; | |
1070 | TH2D* hist = NULL; | |
1071 | ||
1072 | can->cd(1); | |
1073 | hist = htrack->Projection(0,5); // nClust/eta | |
1074 | hist->SetTitle("NClust-Eta"); | |
1075 | hist->Scale(1./scale); | |
1076 | hist->Draw("colz"); | |
1077 | ||
1078 | can->cd(2); | |
1079 | hist = htrack->Projection(0,6); // nClust/phi | |
1080 | hist->SetTitle("NClust-Phi"); | |
1081 | hist->Scale(1./scale); | |
1082 | hist->Draw("colz"); | |
1083 | ||
1084 | can->cd(3); | |
1085 | htrack->GetAxis(5)->SetRangeUser(0.,0.799); // Eta > 0 | A side | |
1086 | hist = htrack->Projection(0,6); // nClust/phi | |
1087 | hist->SetTitle("NClust-Phi A Side"); | |
1088 | hist->Scale(1./scale); | |
1089 | hist->Draw("colz"); | |
1090 | ||
1091 | can->cd(4); | |
1092 | htrack->GetAxis(5)->SetRangeUser(-0.8,-0.0001); // Eta < 0 | C side | |
1093 | hist = htrack->Projection(0,6); // nClust/phi | |
1094 | hist->SetTitle("NClust-Phi - C side"); | |
1095 | hist->Scale(1./scale); | |
1096 | hist->Draw("colz"); | |
1097 | ||
1098 | setCuts(htrack, cuts); | |
1099 | ||
1100 | can->cd(5); | |
1101 | hist = htrack->Projection(0,3); // nClust/DCAr | |
1102 | hist->SetTitle("NClust-DCAr"); | |
1103 | hist->Scale(1./scale); | |
1104 | hist->Draw("colz"); | |
1105 | ||
1106 | can->cd(6); | |
1107 | hist = htrack->Projection(0,4); // nClust/DCAz | |
1108 | hist->SetTitle("NClust-DCAz"); | |
1109 | hist->Scale(1./scale); | |
1110 | hist->Draw("colz"); | |
1111 | ||
1112 | // -- -- -- -- -- -- -- -- -- -- -- -- -- | |
1113 | ||
1114 | can->cd(7); | |
1115 | hist = htrack->Projection(0,8); // NClust/Charge | |
1116 | hist->SetTitle("NClust-Charge"); | |
1117 | hist->Scale(1./scale); | |
1118 | hist->Draw("colz"); | |
1119 | ||
1120 | can->cd(8); | |
1121 | hist = htrack->Projection(7,8); // Pt/Charge | |
1122 | hist->SetTitle("Pt-Charge"); | |
1123 | hist->Scale(1./scale); | |
1124 | hist->Draw("colz"); | |
1125 | ||
1126 | can->cd(9); | |
1127 | hist = htrack->Projection(5,8); // Eta/Charge | |
1128 | hist->SetTitle("Eta-Charge"); | |
1129 | hist->Scale(1./scale); | |
1130 | hist->Draw("colz"); | |
1131 | ||
1132 | can->cd(10); | |
1133 | hist = htrack->Projection(6,8); // Phi/Charge | |
1134 | hist->SetTitle("Phi-Charge"); | |
1135 | hist->Scale(1./scale); | |
1136 | hist->Draw("colz"); | |
1137 | ||
1138 | can->cd(11); | |
1139 | hist = htrack->Projection(3,8); // DCAr/Charge | |
1140 | hist->SetTitle("DCAr-Charge"); | |
1141 | hist->Scale(1./scale); | |
1142 | hist->Draw("colz"); | |
1143 | ||
1144 | can->cd(12); | |
1145 | hist = htrack->Projection(4,8); // DCAz/Charge | |
1146 | hist->SetTitle("DCAz-Charge"); | |
1147 | hist->Scale(1./scale); | |
1148 | hist->Draw("colz"); | |
1149 | ||
1150 | return; | |
1151 | ||
1152 | ||
1153 | } |