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