fixed memory leak
[u/mrichter/AliRoot.git] / PWG1 / AliAnalysisTaskQASym.cxx
CommitLineData
9f9631f3 1#include "TChain.h"
2#include "TTree.h"
3#include "TH1F.h"
4#include "TH2F.h"
1d55ca60 5#include "TH3F.h"
9f9631f3 6#include "TCanvas.h"
7#include "TList.h"
8#include "TParticle.h"
9#include "TParticlePDG.h"
10#include "TProfile.h"
11#include "TNtuple.h"
12#include "TFile.h"
13
14#include "AliAnalysisTask.h"
15#include "AliAnalysisManager.h"
16
17#include "AliESDEvent.h"
e4ab7356 18#include "AliLog.h"
9f9631f3 19#include "AliESDVertex.h"
20#include "AliESDInputHandler.h"
21#include "AliESDtrackCuts.h"
22#include "AliMultiplicity.h"
23
9f9631f3 24#include "AliAnalysisTaskQASym.h"
25#include "AliExternalTrackParam.h"
26#include "AliTrackReference.h"
9f9631f3 27#include "AliHeader.h"
28#include "AliGenEventHeader.h"
29#include "AliGenDPMjetEventHeader.h"
30
1d55ca60 31// Analysis Task for basic QA on the ESD
32
33// Authors: Jan Fiete Grosse-Oetringhaus, Christian Klein-Boesing,
34// Andreas Morsch, Eva Sicking
35
9f9631f3 36ClassImp(AliAnalysisTaskQASym)
37
1d55ca60 38 //________________________________________________________________________
39 AliAnalysisTaskQASym::AliAnalysisTaskQASym(const char *name)
40 : AliAnalysisTaskSE(name)
41 ,fTrackType(0)
b676e981 42 ,fStandAlone(0)
2efff183 43 ,fFieldOn(kTRUE)
44 ,fHists(0)
45 ,fHistRECpt(0)
46 ,fEta(0)
47 ,fEtaPhi(0)
48 ,fEtaPt(0)
49 ,fQPt(0)
50 ,fDca(0)
51 ,fqRec(0)
52 ,fsigmaPt(0)
cbac53a7 53
2efff183 54 ,fRecPtPos(0)
55 ,fRecPtNeg(0)
56 ,fRecPhiPos(0)
57 ,fRecPhiNeg(0)
58 ,fRecEtaPos(0)
59 ,fRecEtaNeg(0)
60 ,fRecEtaPtPos(0)
61 ,fRecEtaPtNeg(0)
62 ,fRecDcaPos(0)
63 ,fRecDcaNeg(0)
64 ,fRecDcaNegInv(0)
65 ,fRecDPos(0)
66 ,fRecDNeg(0)
cbac53a7 67
68
2efff183 69 ,fRecQPtPosEta(0)
70 ,fRecQPtNegEta(0)
71 ,fRecPtPosEta(0)
72 ,fRecPtNegEta(0)
73 ,fRecPhiPosEta(0)
74 ,fRecPhiNegEta(0)
75 ,fRecDcaPosEta(0)
76 ,fRecDcaNegEta(0)
77 ,fRecDPosEta(0)
78 ,fRecDNegEta(0)
cbac53a7 79
2efff183 80 ,fRecPtPosVz(0)
81 ,fRecPtNegVz(0)
82 ,fRecEtaPosVz(0)
83 ,fRecEtaNegVz(0)
84 ,fRecPhiPosVz(0)
85 ,fRecPhiNegVz(0)
86 ,fSignedDcaPosVz(0)
87 ,fSignedDcaNegVz(0)
88 ,fRecQPtPosEtaVz(0)
89 ,fRecQPtNegEtaVz(0)
90 ,fRecEtaPtPosVz(0)
91 ,fRecEtaPtNegVz(0)
cbac53a7 92
93
2efff183 94 ,fDeltaPhiAll(0)
95 ,fDeltaPhiLeading(0)
96 ,fDiffDcaD(0)
cbac53a7 97
2efff183 98 ,fPhiRec(0)
99 ,fThetaRec(0)
100 ,fNumber(0)
101 ,fVx(0)
102 ,fVy(0)
103 ,fVz(0)
cbac53a7 104 ,fVertexX(0)
105 ,fVertexY(0)
106 ,fVertexZ(0)
1d55ca60 107 ,fRecDcaPosPhi(0)
108 ,fRecDcaNegPhi(0)
109 ,fRecPtPosPhi(0)
110 ,fRecPtNegPhi(0)
111 ,fRecEtaPosPhi(0)
112 ,fRecEtaNegPhi(0)
113 ,fRecQPtPhi(0)
114 ,fRecEtaPtPosPhi(0)
115 ,fRecEtaPtNegPhi(0)
116
117 ,fRecPtPosEtaPos(0)
118 ,fRecPtNegEtaPos(0)
119 ,fRecPtPosEtaNeg(0)
120 ,fRecPtNegEtaNeg(0)
121
122 ,fRec1PtPosEtaPos(0)
123 ,fRec1PtNegEtaPos(0)
124 ,fRec1PtPosEtaNeg(0)
125 ,fRec1PtNegEtaNeg(0)
126
127 ,fRecPhiPosEtaPos(0)
128 ,fRecPhiNegEtaPos(0)
129 ,fRecPhiPosEtaNeg(0)
130 ,fRecPhiNegEtaNeg(0)
131
132 ,fRecDcaPosPhiEtaPos(0)
133 ,fRecDcaNegPhiEtaPos(0)
134 ,fRecDcaPosPhiEtaNeg(0)
135 ,fRecDcaNegPhiEtaNeg(0)
98a5f582 136
137 ,fRecDcaPosPtEtaPos(0)
138 ,fRecDcaNegPtEtaPos(0)
139 ,fRecDcaPosPtEtaNeg(0)
140 ,fRecDcaNegPtEtaNeg(0)
141
1d55ca60 142 ,fRecPtPosPhiEtaPos(0)
143 ,fRecPtNegPhiEtaPos(0)
144 ,fRecPtPosPhiEtaNeg(0)
145 ,fRecPtNegPhiEtaNeg(0)
146
147
8ae6f5d0 148// ,fRecDcaPhiPtPosEtaPos(0)
149// ,fRecDcaPhiPtNegEtaPos(0)
150// ,fRecDcaPhiPtPosEtaNeg(0)
151// ,fRecDcaPhiPtNegEtaNeg(0)
152
1d55ca60 153 ,fEtavPt(0)
98a5f582 154 ,fCompareTPCparam(0)
c07e266e 155 ,fITSlayer(0)
9f9631f3 156 ,fCuts(0)
1d55ca60 157
9f9631f3 158{
1d55ca60 159 // Constructor
9f9631f3 160 for(Int_t i = 0;i<18;++i){
161 fRecPtTpcSector[i] = 0;
162 fRecEtaTpcSector[i] = 0;
163 fSignedDcaTpcSector[i] = 0;
164 fRecQPtTpcSector[i] = 0;
165 fRecEtaPtTpcSector[i] = 0;
166 }
167
168 for(Int_t i = 0;i< 7;++i){
169 fRecPtPosLadder[i] = 0;
170 fRecPtNegLadder[i] = 0;
171 fRecPhiPosLadder[i] = 0;
172 fRecPhiNegLadder[i] = 0;
173 fRecEtaPosLadder[i] = 0;
174 fRecEtaNegLadder[i] = 0;
175 fSignDcaPos[i] = 0;
176 fSignDcaNeg[i] = 0;
177 fSignDcaNegInv[i] = 0;
178 fPtSigmaPos[i] =0;
179 fPtSigmaNeg[i] =0;
180 fqPtRec[i] =0;
181 fDcaSigmaPos[i] =0;
182 fDcaSigmaNeg[i] =0;
183 }
184
185 DefineOutput(1, TList::Class());
186
187
188
189}
190
191
192//________________________________________________________________________
193void AliAnalysisTaskQASym::UserCreateOutputObjects()
194{
195 // Create histograms
196 // Called once
197
1d55ca60 198 Bool_t oldStatus = TH1::AddDirectoryStatus();
199 TH1::AddDirectory(kFALSE);
200
8ae6f5d0 201 Double_t range = 0.3;
9f9631f3 202 Double_t pt = 20.;
203
204 fHists = new TList();
8d49bc89 205
9f9631f3 206 fHistRECpt = new TH1F("fHistRECpt",
207 " p_{T}",
cbac53a7 208 200, 0., pt);
9f9631f3 209 fEta = new TH1F("fEta",
1d55ca60 210 " #eta",
211 200, -2., 2.);
98a5f582 212 fEtavPt = new TH2F("fEtavPt",
213 " #eta -p_{T}",
214 200, -2., 2.,
215 100, 0, 1.5);
216 fCompareTPCparam = new TH2F("fCompareTPCparam",
217 "fCompareTPCparam",
218 100, -1., 1.,100,-5, 5);
c07e266e 219
220 fITSlayer = new TH1F("fITslayer",
221 "fITslayer",
222 8, -1.5, 6.5);
98a5f582 223
e4ab7356 224 fEtaPhi = new TH2F("fEtaPhi",
1d55ca60 225 " #eta - #phi",
226 200, -2., 2., 128, 0., 2. * TMath::Pi());
e4ab7356 227
9f9631f3 228 fThetaRec = new TH1F("fThetaRec",
1d55ca60 229 " #theta",
230 180, 0., TMath::Pi());
9f9631f3 231 fPhiRec = new TH1F("fPhiRec",
1d55ca60 232 " #phi",
233 180, 0., 2*TMath::Pi());
9f9631f3 234 fNumber = new TH1F("fNumber",
235 "number of tracks per event",
cbac53a7 236 200, -0.5, 199.5);
9f9631f3 237 fVx = new TH1F("fVx",
cbac53a7 238 "X of first track point",
1d55ca60 239 100, -1., 1.);
9f9631f3 240 fVy = new TH1F("fVy",
cbac53a7 241 "Y of first track point",
1d55ca60 242 100, -1., 1.);
9f9631f3 243 fVz = new TH1F("fVz",
cbac53a7 244 "Z of first track point",
1d55ca60 245 200, -50., 50.);
c07e266e 246 fVertexX = new TH1F("fVertexX",
cbac53a7 247 "X of vertex",
248 100, -1., 1.);
249 fVertexY = new TH1F("fVertexY",
250 "Y of vertex",
251 100, -1., 1.);
252 fVertexZ = new TH1F("fVertexZ",
253 "Z of vertex",
254 200, -50., 50.);
255
9f9631f3 256 fEtaPt = new TH1F("fEtaPt",
1d55ca60 257 " #eta/p_{T} ",
258 100, -1., 1.);
9f9631f3 259
260 fQPt = new TH1F("fQPt",
1d55ca60 261 " charge/p_{T} ",
262 100, -1., 1.);
9f9631f3 263
264 fDca = new TH1F("fDca",
1d55ca60 265 " dca ",
266 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 267
268
269 fqRec = new TH1F("fqRec",
1d55ca60 270 " charge all reconstructed particle",
271 21, -9.5, 10.5);
9f9631f3 272
273 fsigmaPt = new TH1F("fsigmaPt",
1d55ca60 274 "Log_{10}(#sigma_{p_{T}})",
275 200, -4., 8.);
9f9631f3 276
277
278
279
280 //------------
281 for(Int_t ITSlayer_case=0;ITSlayer_case<7;ITSlayer_case++){
282
283 fSignDcaPos[ITSlayer_case] = new TH1F(Form("fSignDcaPos%d", ITSlayer_case),
1d55ca60 284 " Signed dca",
285 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 286 fSignDcaPos[ITSlayer_case]->GetXaxis()->SetTitle("dca");
287 fSignDcaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
288
289
290 fSignDcaNeg[ITSlayer_case] = new TH1F(Form("fSignDcaNeg%d", ITSlayer_case),
1d55ca60 291 " Signed dcas",
292 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 293 fSignDcaNeg[ITSlayer_case]->GetXaxis()->SetTitle("dca");
294 fSignDcaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
295
296 fSignDcaNegInv[ITSlayer_case] = new TH1F(Form("fSignDcaNegInv%d", ITSlayer_case),
1d55ca60 297 " inverse Signed dca ",
298 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
9f9631f3 299 fSignDcaNegInv[ITSlayer_case]->GetXaxis()->SetTitle("-dca");
300 fSignDcaNegInv[ITSlayer_case]->GetYaxis()->SetTitle("");
301
302
303
304
305 fPtSigmaPos[ITSlayer_case] = new TH1F(Form("fPtSigmaPos%d", ITSlayer_case),
1d55ca60 306 " #sigma_{pT} ",
307 208, -4., 8.);
9f9631f3 308 fPtSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
309 fPtSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
310
311
312 fPtSigmaNeg[ITSlayer_case] = new TH1F(Form("fPtSigmaNeg%d",ITSlayer_case),
1d55ca60 313 " #sigma_{pT}",
314 208, -4., 8.);
9f9631f3 315 fPtSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
316 fPtSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
317
318
319
320
321
322 fqPtRec[ITSlayer_case] = new TH1F(Form("fqPtRec%d",ITSlayer_case),
1d55ca60 323 "q/ p_{T}",
324 200, -100., 100.);
9f9631f3 325 fqPtRec[ITSlayer_case]->GetXaxis()->SetTitle("q_{tr}/p_{T, tr} (GeV/c)");
326 fqPtRec[ITSlayer_case]->GetYaxis()->SetTitle("");
327
328
329
330
331
332 fDcaSigmaPos[ITSlayer_case] = new TH2F(Form("fDcaSigmaPos%d", ITSlayer_case),
1d55ca60 333 " p_{T} shift vs #sigma_{pT} ",
334 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9),200, -4., 4. );
9f9631f3 335 fDcaSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA)");
336 fDcaSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
337
338
339 fDcaSigmaNeg[ITSlayer_case] = new TH2F(Form("fDcaSigmaNeg%d", ITSlayer_case),
1d55ca60 340 " p_{T} shift vs #sigma_{pT} ",
341 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9),200, -4., 4. );
9f9631f3 342 fDcaSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA");
343 fDcaSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
1d55ca60 344
345
2efff183 346 }
9f9631f3 347
348
349
1d55ca60 350 // YIELDs---------- positive and negative particles
9f9631f3 351
1d55ca60 352 fRecPtPos = new TH1F("fRecPtPos",
353 " p_{T}",
354 100, 0.,pt);
355 fRecPtPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
356 fRecPtNeg = new TH1F("fRecPtNeg",
357 " p_{T} ",
358 100, 0., pt);
359 fRecPtNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
9f9631f3 360
361
1d55ca60 362 fRecPhiPos = new TH1F("fRecPhiPos",
363 "#phi",
364 361, 0., 360.);
365 fRecPhiPos->GetXaxis()->SetTitle("#phi (deg)");
9f9631f3 366
1d55ca60 367 fRecPhiNeg = new TH1F("fRecPhiNeg",
368 "#phi ",
369 361, 0., 360.);
370 fRecPhiNeg->GetXaxis()->SetTitle("#phi (deg)");
9f9631f3 371
1d55ca60 372 fRecEtaPos = new TH1F("fRecEtaPos",
373 "#eta",
374 200, -2., 2.);
375 fRecEtaPos->GetXaxis()->SetTitle("#eta");
9f9631f3 376
1d55ca60 377 fRecEtaNeg = new TH1F("fRecEtaNeg",
378 "#eta",
379 200, -2., 2.);
380 fRecEtaNeg->GetXaxis()->SetTitle("#eta");
381
382 fRecEtaPtPos = new TH1F("fRecEtaPtPos",
383 "#eta/p_{T}",
384 200, -0.1, .1);
385 fRecEtaPtPos->GetXaxis()->SetTitle("#eta/p_{T}");
386
387 fRecEtaPtNeg = new TH1F("fRecEtaPtNeg",
388 "#eta/p_{T}",
389 200, -.1, .1);
390 fRecEtaPtNeg->GetXaxis()->SetTitle("#eta/p_{T}");
391
392 fRecDcaPos = new TH1F("fRecDcaPos",
393 " dca",
394 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
395 fRecDcaPos->GetXaxis()->SetTitle("dca (cm)");
396 fRecDcaNeg = new TH1F("fRecDcaNeg",
397 " dca",
398 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
399 fRecDcaNeg->GetXaxis()->SetTitle("dca (cm)");
400
401 fRecDcaNegInv = new TH1F("fRecDcaNegInv",
402 " dca",
403 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
404 fRecDcaNegInv->GetXaxis()->SetTitle("dca (cm)");
405
406
407 fRecDPos = new TH1F("fRecDPos",
408 " d",
409 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
410 fRecDPos->GetXaxis()->SetTitle("d (cm)");
411 fRecDNeg = new TH1F("fRecDNeg",
412 "d",
413 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
414 fRecDNeg->GetXaxis()->SetTitle("d (cm)");
415
416
417 // YIELDs ---------------- positive and negative eta
9f9631f3 418
419
1d55ca60 420 fRecQPtPosEta = new TH1F("fRecQPtPosEta",
421 "q/p_{T}",
422 200, -0.5, 0.5);
423 fRecQPtPosEta->GetXaxis()->SetTitle("q/p_{T} ");
424
425 fRecQPtNegEta = new TH1F("fRecQPtNegEta",
426 "q/p_{T}",
427 200, -0.5, 0.5);
428 fRecQPtNegEta->GetXaxis()->SetTitle("q/p_{T}");
9f9631f3 429
1d55ca60 430 fRecPtPosEta = new TH1F("fRecPtPosEta",
431 " p_{T} ",
432 100, 0., pt);
433 fRecPtPosEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
434
435 fRecPtNegEta = new TH1F("fRecPtNegEta",
436 " p_{T}",
437 100, 0., pt);
438 fRecPtNegEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
9f9631f3 439
1d55ca60 440 fRecPhiPosEta = new TH1F("fRecPhiPosEta",
441 "#phi",
442 361, 0., 360);
443 fRecPhiPosEta->GetXaxis()->SetTitle("#phi (deg)");
444
445 fRecPhiNegEta = new TH1F("fRecPhiNegEta",
446 "#phi ",
447 361, 0, 360);
448 fRecPhiNegEta->GetXaxis()->SetTitle("#phi (deg)");
449
450 fRecDcaPosEta = new TH1F("fRecDcaPosEta",
451 " dca ",
452 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
453 fRecDcaPosEta->GetXaxis()->SetTitle("dca (cm)");
454 fRecDcaNegEta = new TH1F("fRecDcaNegEta",
455 " dca",
456 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
457 fRecDcaNegEta->GetXaxis()->SetTitle("dca (cm)");
458
459 fRecDPosEta = new TH1F("fRecDPosEta",
460 " d",
461 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
462 fRecDPosEta->GetXaxis()->SetTitle("d (cm)");
463 fRecDNegEta = new TH1F("fRecDNegEta",
9f9631f3 464 "d",
465 100, -5., 5.);
1d55ca60 466 fRecDNegEta->GetXaxis()->SetTitle("d (cm)");
467
468 fRecDcaPosPhi = new TH2F("fRecDcaPosPhi",
469 " dca vs. phi",
470 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
471 fRecDcaPosPhi->GetXaxis()->SetTitle("dca (cm)");
472 fRecDcaPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
473 fRecDcaNegPhi = new TH2F("fRecDcaNegPhi",
474 " dca vs. phi",
475 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
476 fRecDcaNegPhi->GetXaxis()->SetTitle("dca (cm)");
477 fRecDcaNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
478
479 fRecPtPosPhi = new TH2F("fRecPtPosPhi",
480 " log(p_T) vs. phi",
481 100, -2.5, 2., 180, 0, TMath::Pi()*2);
482 fRecPtPosPhi->GetXaxis()->SetTitle("log_{10}(p_{T})");
483 fRecPtPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
484 fRecPtNegPhi = new TH2F("fRecPtNegPhi",
485 " log(p_T) vs. phi",
486 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
487 fRecPtNegPhi->GetXaxis()->SetTitle("log_{10}(p_{T})");
488 fRecPtNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
489
490 fRecEtaPosPhi = new TH2F("fRecEtaPosPhi",
491 " eta vs. phi",
492 100, -1.5, 1.5, 180, 0, TMath::Pi()*2);
493 fRecEtaPosPhi->GetXaxis()->SetTitle("#eta");
494 fRecEtaPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
495 fRecEtaNegPhi = new TH2F("fRecEtaNegPhi",
496 " eta vs. phi",
497 100, -1.5, 1.5, 180, 0, TMath::Pi()*2);
498 fRecEtaNegPhi->GetXaxis()->SetTitle("#eta");
499 fRecEtaNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
500
501 fRecQPtPhi = new TH2F("fRecQPtPhi",
502 " charge/p_T vs. phi",
503 100,-1. , 1., 180, 0, TMath::Pi()*2);
504 fRecQPtPhi->GetXaxis()->SetTitle("charge/p_{T}");
505 fRecQPtPhi->GetYaxis()->SetTitle("#phi (rad.)");
506
507 fRecEtaPtPosPhi = new TH2F("fRecEtaPtPosPhi",
508 " eta/p_T vs. phi",
509 100, -5, 5., 180, 0, TMath::Pi()*2);
510 fRecEtaPtPosPhi->GetXaxis()->SetTitle("#eta/p_{T}");
511 fRecEtaPtPosPhi->GetYaxis()->SetTitle("#phi (rad.)");
512 fRecEtaPtNegPhi = new TH2F("fRecEtaPtNegPhi",
513 " eta/p_T vs. phi",
514 100,-5 , 5., 180, 0, TMath::Pi()*2);
515 fRecEtaPtNegPhi->GetXaxis()->SetTitle("#eta/p_{T}");
516 fRecEtaPtNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
517
518
519
520
521
522 fRecDcaPosPhiEtaPos = new TH2F("fRecDcaPosPhiEtaPos",
523 " dca vs. phi",
524 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
525 fRecDcaPosPhiEtaPos->GetXaxis()->SetTitle("dca (cm)");
526 fRecDcaPosPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
527 fRecDcaNegPhiEtaPos = new TH2F("fRecDcaNegPhiEtaPos",
528 " dca vs. phi",
529 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
530 fRecDcaNegPhiEtaPos->GetXaxis()->SetTitle("dca (cm)");
531 fRecDcaNegPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
532
533 fRecPtPosPhiEtaPos = new TH2F("fRecPtPosPhiEtaPos",
534 " log(p_T) vs. phi",
535 100, -2.5, 2., 180, 0, TMath::Pi()*2);
536 fRecPtPosPhiEtaPos->GetXaxis()->SetTitle("log_{10}(p_{T})");
537 fRecPtPosPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
538 fRecPtNegPhiEtaPos = new TH2F("fRecPtNegPhiEtaPos",
539 " log(p_T) vs. phi",
540 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
541 fRecPtNegPhiEtaPos->GetXaxis()->SetTitle("log_{10}(p_{T})");
542 fRecPtNegPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
543
544
545 fRecDcaPosPhiEtaNeg = new TH2F("fRecDcaPosPhiEtaNeg",
546 " dca vs. phi",
547 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
548 fRecDcaPosPhiEtaNeg->GetXaxis()->SetTitle("dca (cm)");
549 fRecDcaPosPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
550 fRecDcaNegPhiEtaNeg = new TH2F("fRecDcaNegPhiEtaNeg",
551 " dca vs. phi",
552 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 180, 0, TMath::Pi()*2);
553 fRecDcaNegPhiEtaNeg->GetXaxis()->SetTitle("dca (cm)");
554 fRecDcaNegPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
555
556 fRecPtPosPhiEtaNeg = new TH2F("fRecPtPosPhiEtaNeg",
557 " log(p_T) vs. phi",
558 100, -2.5, 2., 180, 0, TMath::Pi()*2);
559 fRecPtPosPhiEtaNeg->GetXaxis()->SetTitle("log_{10}(p_{T})");
560 fRecPtPosPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
561 fRecPtNegPhiEtaNeg = new TH2F("fRecPtNegPhiEtaNeg",
562 " log(p_T) vs. phi",
563 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
564 fRecPtNegPhiEtaNeg->GetXaxis()->SetTitle("log_{10}(p_{T})");
565 fRecPtNegPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
98a5f582 566
567 //new
568 fRecDcaPosPtEtaPos = new TH2F("fRecDcaPosPtEtaPos",
569 " dca vs. pt",
570 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
571 fRecDcaPosPtEtaPos->GetXaxis()->SetTitle("dca (cm)");
572 fRecDcaPosPtEtaPos->GetYaxis()->SetTitle("log_{10}(p_{T})");
573
574 fRecDcaPosPtEtaNeg = new TH2F("fRecDcaPosPtEtaNeg",
575 " dca vs. pt",
576 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
577 fRecDcaPosPtEtaNeg->GetXaxis()->SetTitle("dca (cm)");
578 fRecDcaPosPtEtaNeg->GetYaxis()->SetTitle("log_{10}(p_{T})");
579
580 fRecDcaNegPtEtaPos = new TH2F("fRecDcaNegPtEtaPos",
581 " dca vs. pt",
582 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
583 fRecDcaNegPtEtaPos->GetXaxis()->SetTitle("dca (cm)");
584 fRecDcaNegPtEtaPos->GetYaxis()->SetTitle("log_{10}(p_{T})");
585
586 fRecDcaNegPtEtaNeg = new TH2F("fRecDcaNegPtEtaNeg",
587 " dca vs. pt",
588 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200, -2, 2);
589 fRecDcaNegPtEtaNeg->GetXaxis()->SetTitle("dca (cm)");
590 fRecDcaNegPtEtaNeg->GetYaxis()->SetTitle("log_{10}(p_{T})");
591
1d55ca60 592
9f9631f3 593
1d55ca60 594 // YIELDs ---------------- for TPC sectors
595 for(Int_t sector=0; sector<18;sector++){
9f9631f3 596
597
1d55ca60 598 fRecPtTpcSector[sector] = new TH1F(Form("fRecPtTpcSector%02d",sector),
599 Form("p_{T} distribution: TPC sector %d",
600 sector),100, 0., pt);
601 fRecPtTpcSector[sector]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
602
603 fRecEtaTpcSector[sector] = new TH1F(Form("fRecEtaTpcSector%02d",sector),
604 Form("#eta distribution: TPC sector %d",
605 sector),200, -2., 2.);
606 fRecEtaTpcSector[sector]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
607
608
609 fSignedDcaTpcSector[sector] = new TH1F(Form("fSignedDcaTpcSector%02d",sector),
610 Form("dca distribution: TPC sector %d",
611 sector),200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9) );
612 fSignedDcaTpcSector[sector]->GetXaxis()->SetTitle("dca");
613
614 fRecQPtTpcSector[sector] = new TH1F(Form("fRecQPtTpcSector%02d",sector),
615 Form("Q/ p_{T} distribution: TPC sector %d",
616 sector),100, -1., 1.);
617 fRecQPtTpcSector[sector]->GetXaxis()->SetTitle("Q/p_{T} (GeV/c)");
618
619 fRecEtaPtTpcSector[sector] = new TH1F(Form("fRecEtaPtTpcSector%02d",sector),
620 Form("#eta/ p_{T} distribution: TPC sector %d",
621 sector),100, -1., 1.);
622 fRecEtaPtTpcSector[sector]->GetXaxis()->SetTitle("#eta/p_{T} (GeV/c)");
623
624 }
625 // YIELDS ITS ladder
626 for(Int_t i=0;i<7;i++){
627 fRecPtPosLadder[i] = new TH1F(Form("fRecPtPosLadder%d", i),
628 " p_{T} distribution",
629 100, 0., pt);
630 fRecPtPosLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
631 fRecPtNegLadder[i] = new TH1F(Form("fRecPtNegLadder%d",i),
632 " p_{T} distribution ",
633 100, 0., pt);
634 fRecPtNegLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
635
636
637 fRecPhiPosLadder[i] = new TH1F(Form("fRecPhiPosLadder%d",i),
638 "#phi distribution: all pos eta",
639 361, 0., 360);
640 fRecPhiPosLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
641
642 fRecPhiNegLadder[i] = new TH1F(Form("fRecPhiNegLadder%d", i),
643 "#phi distribution: all neg eta",
644 361, 0, 360);
645 fRecPhiNegLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
646
647
648
649 fRecEtaPosLadder[i] = new TH1F(Form("fRecEtaPosLadder%d",i),
650 "#eta distribution",
651 200, -2., 2.);
652 fRecEtaPosLadder[i]->GetXaxis()->SetTitle("#eta)");
653
654 fRecEtaNegLadder[i] = new TH1F(Form("fRecEtaNegLadder%d", i),
655 "#eta distribution",
656 200, -2., 2.);
657 fRecEtaNegLadder[i]->GetXaxis()->SetTitle("#eta");
658 }
659
660 Double_t vzmax = 15;
661
662 fRecPtPosVz = new TH2F("fRecPtPosVz",
663 "p_{T} distribution vs Vz()",
664 100, -1., 2., 200,-vzmax,vzmax);
665 fRecPtPosVz->GetXaxis()->SetTitle("log_{10}(p_{T})");
9f9631f3 666
1d55ca60 667 fRecPtNegVz = new TH2F("fRecPtNegVz",
668 "p_{T} distribution vs Vz()",
669 100, -1., 2.,200,-vzmax,vzmax);
670 fRecPtNegVz->GetXaxis()->SetTitle("Log_{10}(p_{T})");
9f9631f3 671
672
1d55ca60 673 fRecEtaPosVz= new TH2F("fRecEtaPosVz",
674 "#eta distribution vs Vz()",
675 100, -2., 2., 200,-vzmax,vzmax);
676 fRecEtaPosVz->GetXaxis()->SetTitle("#eta");
677 fRecEtaNegVz = new TH2F("fRecEtaNegVz",
9f9631f3 678 "#eta distribution vs Vz()",
1d55ca60 679 100, -2., 2.,200,-vzmax,vzmax);
680 fRecEtaNegVz->GetXaxis()->SetTitle("#eta");
681
682 fRecPhiPosVz= new TH2F("fRecPhiPosVz",
683 "#eta distribution vs Vz()",
684 361, 0., 360., 200,-vzmax,vzmax);
685 fRecPhiPosVz->GetXaxis()->SetTitle("#phi (deg)");
686 fRecPhiNegVz = new TH2F("fRecPhiNegVz",
687 "dca vs Vz()",
688 361, 0., 360.,200,-vzmax,vzmax);
689 fRecPhiNegVz->GetXaxis()->SetTitle("#phi (deg)");
690
691 fSignedDcaPosVz= new TH2F("fSignedDcaPosVz",
692 "#eta distribution vs Vz()",
693 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9), 200,-vzmax,vzmax);
694 fSignedDcaPosVz->GetXaxis()->SetTitle("dca (cm)");
695 fSignedDcaNegVz = new TH2F("fSignedDcaNegVz",
696 "dca vs Vz()",
697 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9),200,-vzmax,vzmax);
698 fSignedDcaNegVz->GetXaxis()->SetTitle("dca (cm)");
699
700 fRecQPtPosEtaVz= new TH2F("fRecQPtPosEtaVz",
701 " Q/p_{T} distribution vs Vz()",
702 100, -1., 1., 200,-vzmax,vzmax);
703 fRecQPtPosEtaVz->GetXaxis()->SetTitle("Q/p_{T}");
704 fRecQPtNegEtaVz = new TH2F("fRecQPtNegEtaVz",
705 " Q/p_{T} distribution vs Vz()",
706 100, -1., 1.,200,-vzmax,vzmax);
707 fRecQPtNegEtaVz->GetXaxis()->SetTitle("Q/p_{T}");
9f9631f3 708
709
1d55ca60 710 fRecEtaPtPosVz= new TH2F("fRecEtaPtPosVz",
711 " #eta/p_{T} distribution vs Vz()",
712 100, -1., 1., 200,-vzmax,vzmax);
713 fRecEtaPtPosVz->GetXaxis()->SetTitle("#eta/p_{T");
714 fRecEtaPtNegVz = new TH2F("fRecEtaPtNegVz",
715 " #eta/p_{T} distribution vs Vz()",
716 100, -1., 1.,200,-vzmax,vzmax);
717 fRecEtaPtNegVz->GetXaxis()->SetTitle("#eta/p_{T}");
718
719 //new
720 fDeltaPhiAll = new TH1F("fDeltaPhiAll",
721 " #Delta #phi",200,-360,360);
722 fDeltaPhiAll->GetXaxis()->SetTitle("#Delta #phi");
723
724
725 fDeltaPhiLeading = new TH2F("fDeltaPhiLeading",
726 " #Delta #phi",361,-360,360, 361,0, 360);
727 fDeltaPhiLeading->GetXaxis()->SetTitle("#Delta #phi (deg.)");
728 fDeltaPhiLeading->GetYaxis()->SetTitle("#phi_{leading particle} (deg.)");
729
730 fDiffDcaD = new TH1F("fDiffDcaD",
731 "dca-d",
732 200, -1., 1.);
733
734
735 fRecPtPosEtaPos = new TH1F("fRecPtPosEtaPos",
736 "p_{T} distribution",100,0,pt);
737 fRecPtPosEtaPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
738
739 fRecPtNegEtaPos = new TH1F("fRecPtNegEtaPos",
740 "p_{T} distribution",100,0,pt);
741 fRecPtNegEtaPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
742
743 fRecPtPosEtaNeg = new TH1F("fRecPtPosEtaNeg",
744 "p_{T} distribution",100,0,pt);
745 fRecPtPosEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
746
747 fRecPtNegEtaNeg = new TH1F("fRecPtNegEtaNeg",
748 "p_{T} distribution",100,0,pt);
749 fRecPtNegEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
750
751
752
753 fRec1PtPosEtaPos = new TH1F("fRec1PtPosEtaPos",
754 "1/p_{T} distribution",100,0,0.5);
755 fRec1PtPosEtaPos->GetXaxis()->SetTitle("p_{T} (c/GeV)");
756
757 fRec1PtNegEtaPos = new TH1F("fRec1PtNegEtaPos",
758 "1/p_{T} distribution",100,0,0.5);
759 fRec1PtNegEtaPos->GetXaxis()->SetTitle("p_{T} (c/GeV)");
760
761 fRec1PtPosEtaNeg = new TH1F("fRec1PtPosEtaNeg",
762 "1/p_{T} distribution",100,0,0.5);
763 fRec1PtPosEtaNeg->GetXaxis()->SetTitle("p_{T} (c/GeV)");
764
765 fRec1PtNegEtaNeg = new TH1F("fRec1PtNegEtaNeg",
766 "1/p_{T} distribution",100,0,0.5);
767 fRec1PtNegEtaNeg->GetXaxis()->SetTitle("1/p_{T} (c/GeV)");
768
769
770
771 fRecPhiPosEtaPos = new TH1F("fRecPhiPosEtaPos",
772 "#phi",180,0,2*TMath::Pi());
773 fRecPhiPosEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
774
775 fRecPhiNegEtaPos = new TH1F("fRecPhiNegEtaPos",
776 "#phi",180,0,2*TMath::Pi());
777 fRecPhiNegEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
778
779 fRecPhiPosEtaNeg = new TH1F("fRecPhiPosEtaNeg",
780 "#phi",180,0,2*TMath::Pi());
781 fRecPhiPosEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
782
783 fRecPhiNegEtaNeg = new TH1F("fRecPhiNegEtaNeg",
784 "#phi",180,0,2*TMath::Pi());
785 fRecPhiNegEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
786
787
788
8ae6f5d0 789// fRecDcaPhiPtPosEtaPos = new TH3F("fRecDcaPhiPtPosEtaPos",
790// "#phi- p_{T} - DCA",
791// 180,0,2*TMath::Pi(),
792// 100,0,pt,
793// 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
794// fRecDcaPhiPtPosEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
795// fRecDcaPhiPtPosEtaPos->GetYaxis()->SetTitle("p_{T} (GeV/c)");
796// fRecDcaPhiPtPosEtaPos->GetZaxis()->SetTitle("dca (cm)");
1d55ca60 797
8ae6f5d0 798// fRecDcaPhiPtPosEtaNeg = new TH3F("fRecDcaPhiPtPosEtaNeg",
799// "#phi- p_{T} - DCA",
800// 180,0,2*TMath::Pi(),
801// 100,0,pt,
802// 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
803// fRecDcaPhiPtPosEtaNeg->GetZaxis()->SetTitle("dca (cm)");
804// fRecDcaPhiPtPosEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
805// fRecDcaPhiPtPosEtaNeg->GetYaxis()->SetTitle("p_{T} (GeV/c)");
1d55ca60 806
8ae6f5d0 807// fRecDcaPhiPtNegEtaPos = new TH3F("fRecDcaPhiPtNegEtaPos",
808// "#phi- p_{T} - DCA",
809// 180,0,2*TMath::Pi(),
810// 100,0,pt,
811// 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
812// fRecDcaPhiPtNegEtaPos->GetZaxis()->SetTitle("dca (cm)");
813// fRecDcaPhiPtNegEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
814// fRecDcaPhiPtNegEtaPos->GetYaxis()->SetTitle("p_{T} (GeV/c)");
1d55ca60 815
8ae6f5d0 816// fRecDcaPhiPtNegEtaNeg = new TH3F("fRecDcaPhiPtNegEtaNeg",
817// "#phi- p_{T} - DCA",
818// 180,0,2*TMath::Pi(),
819// 100,0,pt,
820// 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
821// fRecDcaPhiPtNegEtaNeg->GetZaxis()->SetTitle("dca (cm)");
822// fRecDcaPhiPtNegEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
823// fRecDcaPhiPtNegEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
1d55ca60 824
825
826
9f9631f3 827
828 fHists->SetOwner();
829
9f9631f3 830 fHists->Add(fHistRECpt);
831 fHists->Add(fEta);
1d55ca60 832 fHists->Add(fEtavPt);
98a5f582 833 fHists->Add(fCompareTPCparam);
c07e266e 834 fHists->Add(fITSlayer);
e4ab7356 835 fHists->Add(fEtaPhi);
9f9631f3 836 fHists->Add(fThetaRec);
837 fHists->Add(fPhiRec);
838 fHists->Add(fNumber);
839 fHists->Add(fVx);
840 fHists->Add(fVy);
841 fHists->Add(fVz);
cbac53a7 842 fHists->Add(fVertexX);
843 fHists->Add(fVertexY);
844 fHists->Add(fVertexZ);
9f9631f3 845
846 fHists->Add(fEtaPt);
847 fHists->Add(fQPt);
848 fHists->Add(fDca);
849
850 fHists->Add(fDeltaPhiAll);
851 fHists->Add(fDeltaPhiLeading);
852 fHists->Add(fDiffDcaD);
853
854 fHists->Add(fqRec);
855 fHists->Add(fsigmaPt);
856
857 fHists->Add(fRecPtPos);
858 fHists->Add(fRecPtNeg);
859 fHists->Add(fRecPhiPos);
860 fHists->Add(fRecPhiNeg);
861 fHists->Add(fRecEtaPos);
862 fHists->Add(fRecEtaNeg);
863 fHists->Add(fRecEtaPtPos);
864 fHists->Add(fRecEtaPtNeg);
865 fHists->Add(fRecDcaPos);
866 fHists->Add(fRecDcaNeg);
867 fHists->Add(fRecDcaNegInv);
868 fHists->Add(fRecDPos);
869 fHists->Add(fRecDNeg);
870
871
872 fHists->Add(fRecQPtPosEta);
873 fHists->Add(fRecQPtNegEta);
874 fHists->Add(fRecPtPosEta);
875 fHists->Add(fRecPtNegEta);
876 fHists->Add(fRecPhiPosEta);
877 fHists->Add(fRecPhiNegEta);
878 fHists->Add(fRecDcaPosEta);
879 fHists->Add(fRecDcaNegEta);
880 fHists->Add(fRecDPosEta);
881 fHists->Add(fRecDNegEta);
882
883
884 for(Int_t i=0;i<18;i++){
885 fHists->Add(fRecPtTpcSector[i]);
886 fHists->Add(fRecEtaTpcSector[i]);
887 fHists->Add(fSignedDcaTpcSector[i]);
888 fHists->Add(fRecQPtTpcSector[i]);
889 fHists->Add(fRecEtaPtTpcSector[i]);
890 }
891
892 for(Int_t i=0;i<7;i++){
893 fHists->Add(fRecPtPosLadder[i]);
894 fHists->Add(fRecPtNegLadder[i]);
895 fHists->Add(fRecPhiPosLadder[i]);
896 fHists->Add(fRecPhiNegLadder[i]);
897 fHists->Add(fRecEtaPosLadder[i]);
898 fHists->Add(fRecEtaNegLadder[i]);
899 }
900
901 fHists->Add(fRecPtPosVz);
902 fHists->Add(fRecPtNegVz);
903 fHists->Add(fRecEtaPosVz);
904 fHists->Add(fRecEtaNegVz);
905 fHists->Add(fRecPhiPosVz);
906 fHists->Add(fRecPhiNegVz);
907 fHists->Add(fSignedDcaPosVz);
908 fHists->Add(fSignedDcaNegVz);
909 fHists->Add(fRecQPtPosEtaVz);
910 fHists->Add(fRecQPtNegEtaVz);
911 fHists->Add(fRecEtaPtPosVz);
912 fHists->Add(fRecEtaPtNegVz);
913
914
915 for(Int_t i=0;i<7;i++){
916 fHists->Add(fSignDcaPos[i]);
917 fHists->Add(fSignDcaNeg[i]);
918 fHists->Add(fSignDcaNegInv[i]);
919
920 fHists->Add(fPtSigmaPos[i]);
921 fHists->Add(fPtSigmaNeg[i]);
922 fHists->Add(fqPtRec[i]);
923
924 fHists->Add(fDcaSigmaPos[i]);
925 fHists->Add(fDcaSigmaNeg[i]);
926
927
928 }
929
1d55ca60 930 fHists->Add(fRecDcaPosPhi);
931 fHists->Add(fRecDcaNegPhi);
932 fHists->Add(fRecPtPosPhi);
933 fHists->Add(fRecPtNegPhi);
934 fHists->Add(fRecEtaPosPhi);
935 fHists->Add(fRecEtaNegPhi);
936 fHists->Add(fRecQPtPhi);
937 fHists->Add(fRecEtaPtPosPhi);
938 fHists->Add(fRecEtaPtNegPhi);
939
940 fHists->Add(fRecPtPosEtaPos);
941 fHists->Add(fRecPtNegEtaPos);
942 fHists->Add(fRecPtPosEtaNeg);
943 fHists->Add(fRecPtNegEtaNeg);
944
945 fHists->Add(fRec1PtPosEtaPos);
946 fHists->Add(fRec1PtNegEtaPos);
947 fHists->Add(fRec1PtPosEtaNeg);
948 fHists->Add(fRec1PtNegEtaNeg);
949
950
951 fHists->Add(fRecPhiPosEtaPos);
952 fHists->Add(fRecPhiNegEtaPos);
953 fHists->Add(fRecPhiPosEtaNeg);
954 fHists->Add(fRecPhiNegEtaNeg);
955
956 fHists->Add(fRecDcaPosPhiEtaPos);
957 fHists->Add(fRecDcaNegPhiEtaPos);
958 fHists->Add(fRecPtPosPhiEtaPos);
959 fHists->Add(fRecPtNegPhiEtaPos);
960 fHists->Add(fRecDcaPosPhiEtaNeg);
961 fHists->Add(fRecDcaNegPhiEtaNeg);
962 fHists->Add(fRecPtPosPhiEtaNeg);
963 fHists->Add(fRecPtNegPhiEtaNeg);
964
98a5f582 965 fHists->Add(fRecDcaPosPtEtaPos);
966 fHists->Add(fRecDcaNegPtEtaPos);
967 fHists->Add(fRecDcaPosPtEtaNeg);
968 fHists->Add(fRecDcaNegPtEtaNeg);
969
8ae6f5d0 970 // fHists->Add(fRecDcaPhiPtPosEtaPos);
971 // fHists->Add(fRecDcaPhiPtPosEtaNeg);
972 // fHists->Add(fRecDcaPhiPtNegEtaPos);
973 // fHists->Add(fRecDcaPhiPtNegEtaNeg);
9f9631f3 974
975
1d55ca60 976
977
978
979// for (Int_t i=0; i<fHists->GetEntries(); ++i) {
980// TH1 *h1 = dynamic_cast<TH1*>(fHists->At(i));
981// if (h1){
982// // Printf("%s ",h1->GetName());
983// h1->Sumw2();
984// }
985// }
986 // BKC
987
988 TH1::AddDirectory(oldStatus);
9f9631f3 989}
990
991//__________________________________________________________
992
993void AliAnalysisTaskQASym::UserExec(Option_t *)
994{
995 AliVEvent *event = InputEvent();
996 if (!event) {
1d55ca60 997 Printf("ERROR: Could not retrieve event");
998 return;
9f9631f3 999 }
1000
1001
1002 if(Entry()==0){
1003 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
1004 if(esd){
1005 Printf("We are reading from ESD");
1006 }
1007
1008 }
1009
1d55ca60 1010
1011
1012 if(fDebug>1)Printf("There are %d tracks in this event", event->GetNumberOfTracks());
1013
9f9631f3 1014
50dbca26 1015 Int_t leadingTrack = 0;
1016 Float_t leadingEnergy = -20.;
1017 Float_t leadingPhi = 0;//TMath::Pi();
9f9631f3 1018
1019
1020 if(event->GetNumberOfTracks()!=0) fNumber->Fill(event->GetNumberOfTracks());
1021
e4ab7356 1022 const AliVVertex* vertex = event->GetPrimaryVertex();
8ae6f5d0 1023 if(vertex->GetNContributors()==0) return;
cbac53a7 1024 Float_t vx = vertex->GetX();
1025 Float_t vy = vertex->GetY();
e4ab7356 1026 Float_t vz = vertex->GetZ();
cbac53a7 1027
1028 fVertexX->Fill(vx);
1029 fVertexY->Fill(vy);
1030 fVertexZ->Fill(vz);
1031
e4ab7356 1032 if (TMath::Abs(vz) > 10.) return;
1033
1fcb92ef 1034 AliESDtrack *tpcP = 0x0;
1035
9f9631f3 1036 for (Int_t iTrack = 0; iTrack < event->GetNumberOfTracks(); iTrack++) {
1037
1fcb92ef 1038 //prevent mem leak for TPConly track
1039 if(fTrackType==2&&tpcP){
1040 delete tpcP;
1041 tpcP = 0;
1042 }
9f9631f3 1043
1044 AliVParticle *track = event->GetTrack(iTrack);
1045 AliESDtrack *esdtrack = dynamic_cast<AliESDtrack*>(track);
1d55ca60 1046 esdtrack->PropagateToDCA(event->GetPrimaryVertex(),
1047 event->GetMagneticField(), 10000.);
1048
9f9631f3 1049 if (!track) {
1050 Printf("ERROR: Could not receive track %d", iTrack);
1051 continue;
1052 }
1d55ca60 1053 //__________
1054 // run Task for global tracks or ITS tracks or TPC tracks
1d55ca60 1055 const AliExternalTrackParam *tpcPin = 0x0;
1056 Double_t phiIn=0;
cbac53a7 1057
1d55ca60 1058 if(fTrackType==0){
1059 //Fill all histograms with global tracks
1060 tpcP = esdtrack;
1061 phiIn = tpcP->Phi();
1062 if (!tpcP) continue;
1063 if (!fCuts->AcceptTrack(tpcP)) continue;
1064 }
1065 else if(fTrackType==1){
1066 //Fill all histograms with ITS tracks
1067 tpcP = esdtrack;
1068 phiIn = tpcP->Phi();
1069 if (!tpcP) continue;
1070 if (!fCuts->AcceptTrack(tpcP)) continue;
b676e981 1071 if(fStandAlone==kTRUE) {
1072 if(!(tpcP->GetStatus()&AliESDtrack::kITSpureSA))continue;
1073 }
1d55ca60 1074 }
1075 else if(fTrackType==2){
1076 //Fill all histograms with TPC track information
1077 tpcPin = esdtrack->GetInnerParam();
1078 if (!tpcPin) continue;
1079 phiIn=tpcPin->Phi();
1080
1081 tpcP = AliESDtrackCuts::GetTPCOnlyTrack(dynamic_cast<AliESDEvent*>(event),esdtrack->GetID());
1082 if (!tpcP) continue;
1083 if (!fCuts->AcceptTrack(tpcP)) continue;
1084 if(tpcP->GetNcls(1)>160)continue;//jacek's track cut
1085 if(tpcP->GetConstrainedChi2TPC()<0)continue; // jacek's track cut
1086 }
1087 else{
1088 Printf("ERROR: wrong track type \n");
1089 continue;
1090 }
1091 //___________
1092 //
1093
1094
50dbca26 1095 if(tpcP->E()>leadingEnergy){
1096 leadingTrack=iTrack;
1097 leadingEnergy=tpcP->E();
1d55ca60 1098 leadingPhi=phiIn;
9f9631f3 1099 }
1100
98a5f582 1101
9f9631f3 1102 fqRec->Fill(tpcP->Charge());
1103
1104
1105 Double_t sigmapt = tpcP->GetSigma1Pt2();
1106 sigmapt= sqrt(sigmapt);
1107 sigmapt= sigmapt *(tpcP->Pt()*tpcP->Pt());
1108
8d49bc89 1109 if(TMath::Abs(sigmapt) < 1.e-10) continue;
1110
9f9631f3 1111 fsigmaPt->Fill(TMath::Log10(sigmapt));
1d55ca60 1112
9f9631f3 1113
9f9631f3 1114 // hits in ITS layer
1115 Int_t cas=-1;
1d55ca60 1116 if(tpcP->HasPointOnITSLayer(0))
9f9631f3 1117 cas=0;
1d55ca60 1118 else if(!tpcP->HasPointOnITSLayer(0)
1119 && tpcP->HasPointOnITSLayer(1))
9f9631f3 1120 cas=1;
1d55ca60 1121 else if(!tpcP->HasPointOnITSLayer(0)
1122 && !tpcP->HasPointOnITSLayer(1)
1123 && tpcP->HasPointOnITSLayer(2))
9f9631f3 1124 cas=2;
1d55ca60 1125 else if(!tpcP->HasPointOnITSLayer(0)
1126 && !tpcP->HasPointOnITSLayer(1)
1127 && !tpcP->HasPointOnITSLayer(2)
1128 && tpcP->HasPointOnITSLayer(3))
9f9631f3 1129 cas=3;
1d55ca60 1130 else if(!tpcP->HasPointOnITSLayer(0)
1131 && !tpcP->HasPointOnITSLayer(1)
1132 && !tpcP->HasPointOnITSLayer(2)
1133 && !tpcP->HasPointOnITSLayer(3)
1134 && tpcP->HasPointOnITSLayer(4))
9f9631f3 1135 cas=4;
1d55ca60 1136 else if( !tpcP->HasPointOnITSLayer(0)
1137 && !tpcP->HasPointOnITSLayer(1)
1138 && !tpcP->HasPointOnITSLayer(2)
1139 && !tpcP->HasPointOnITSLayer(3)
1140 && !tpcP->HasPointOnITSLayer(4)
1141 && tpcP->HasPointOnITSLayer(5))
9f9631f3 1142 cas=5;
1143 else
1144 cas=6;
1145
1146
1147
1148 //-------------------
8d49bc89 1149 Float_t xvertexcor = 0.;
1150 Float_t yvertexcor = 0.;
9f9631f3 1151
1d55ca60 1152 xvertexcor = tpcP->Xv() - vertex->GetX(); // coordinate corrected for vertex position
1153 yvertexcor = tpcP->Yv() - vertex->GetY(); // "
8d49bc89 1154 Double_t sdca = (tpcP->Py()*xvertexcor - tpcP->Px()*yvertexcor)/tpcP->Pt();
9f9631f3 1155
1156
1157 fqPtRec[cas]->Fill(tpcP->Charge()/tpcP->Pt());
1158
1d55ca60 1159
1160
9f9631f3 1161 fHistRECpt->Fill(tpcP->Pt());
1162 fEta->Fill(tpcP->Eta());
1d55ca60 1163 fEtavPt->Fill(tpcP->Eta(), tpcP->Pt());
1164 fEtaPhi->Fill(tpcP->Eta(), phiIn);
9f9631f3 1165 fThetaRec->Fill(tpcP->Theta());
1d55ca60 1166 fPhiRec->Fill(phiIn);
9f9631f3 1167 fVx->Fill(tpcP->Xv());
1168 fVy->Fill(tpcP->Yv());
1169 fVz->Fill(tpcP->Zv());
1170
1171
1172 fEtaPt->Fill(tpcP->Eta()/tpcP->Pt());
1173 fQPt->Fill(tpcP->Charge()/tpcP->Pt());
1d55ca60 1174 fDca->Fill(sdca);
1175 fRecQPtPhi->Fill(tpcP->Charge()/tpcP->Pt(), phiIn);
9f9631f3 1176
8d49bc89 1177 Float_t xy = 0.;
1178 Float_t z = 0.;
9f9631f3 1179
1d55ca60 1180 tpcP->GetImpactParameters(xy,z);
1181 fDiffDcaD->Fill(sdca+xy);
9f9631f3 1182
98a5f582 1183 if(fTrackType==2) fCompareTPCparam->Fill(z,tpcPin->GetTgl());
e4ab7356 1184
c07e266e 1185 if(fTrackType!=2){//for global and ITS tracks
1186 for(Int_t itsLayer=0;itsLayer<6;itsLayer++){
1187 if(tpcP->HasPointOnITSLayer(itsLayer)){
1188 fITSlayer->Fill(itsLayer);
1189 }
1190 }
1191 }
1192
1193 //for positive particles
1194
9f9631f3 1195 if(tpcP->Charge()>0){
1196 fRecPtPos->Fill(tpcP->Pt());
1197 fRecPtPosLadder[cas]->Fill(tpcP->Pt());
1198 fRecPtPosVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
1d55ca60 1199 fRecPhiPos->Fill(TMath::RadToDeg()*phiIn);
c07e266e 1200
1201
1d55ca60 1202 fRecPhiPosLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1203 fRecPhiPosVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
1204 fSignedDcaPosVz->Fill(sdca,tpcP->Zv());
9f9631f3 1205
1206 fRecEtaPos->Fill(tpcP->Eta());
1207 fRecEtaPosLadder[cas]->Fill(tpcP->Eta());
1208 fRecEtaPtPos->Fill(tpcP->Eta()/tpcP->Pt());
1209 fRecEtaPosVz->Fill(tpcP->Eta(),tpcP->Zv());
1210 fRecEtaPtPosVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
1211
1d55ca60 1212 fRecDcaPos->Fill(sdca);
1213 fRecDcaPosPhi->Fill(sdca, phiIn);
1214 fRecPtPosPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1215 fRecEtaPtPosPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
1216 fRecEtaPosPhi->Fill(tpcP->Eta(), phiIn);
9f9631f3 1217 fRecDPos->Fill(xy);
1d55ca60 1218 fSignDcaPos[cas]->Fill(sdca);
9f9631f3 1219
1220
1d55ca60 1221 fDcaSigmaPos[cas]->Fill(sdca, TMath::Log10(sigmapt));
9f9631f3 1222
1223 fPtSigmaPos[cas]->Fill(TMath::Log10(sigmapt));
1d55ca60 1224 //pos eta
1225 if(tpcP->Eta()>0){
1226 fRecPtPosEtaPos->Fill(tpcP->Pt());
1227 fRec1PtPosEtaPos->Fill(1/tpcP->Pt());
1228 fRecPhiPosEtaPos->Fill(phiIn);
1229 fRecDcaPosPhiEtaPos->Fill(sdca, phiIn);
98a5f582 1230 fRecDcaPosPtEtaPos->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1231 fRecPtPosPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
8ae6f5d0 1232 //fRecDcaPhiPtPosEtaPos->Fill(phiIn, tpcP->Pt(), sdca);
1d55ca60 1233 }
1234 //neg eta
1235 else{
1236 fRecPtPosEtaNeg->Fill(tpcP->Pt());
1237 fRec1PtPosEtaNeg->Fill(1/tpcP->Pt());
1238 fRecPhiPosEtaNeg->Fill(phiIn);
1239 fRecDcaPosPhiEtaNeg->Fill(sdca, phiIn);
98a5f582 1240 fRecDcaPosPtEtaNeg->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1241 fRecPtPosPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
8ae6f5d0 1242 //fRecDcaPhiPtPosEtaNeg->Fill(phiIn, tpcP->Pt(), sdca);
1d55ca60 1243 }
1244
9f9631f3 1245 }
1246 //and negative particles
1247 else {
1248 fRecPtNeg->Fill(tpcP->Pt());
1249 fRecPtNegLadder[cas]->Fill(tpcP->Pt());
1250 fRecPtNegVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
1251
1d55ca60 1252 fRecPhiNeg->Fill(TMath::RadToDeg()*phiIn);
1253 fRecPhiNegLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1254 fRecPhiNegVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
1255 fSignedDcaNegVz->Fill(sdca,tpcP->Zv());
9f9631f3 1256 fRecEtaPtNegVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
1257
1258 fRecEtaNeg->Fill(tpcP->Eta());
1259 fRecEtaNegLadder[cas]->Fill(tpcP->Eta());
1260 fRecEtaPtNeg->Fill(tpcP->Eta()/tpcP->Pt());
1261 fRecEtaNegVz->Fill(tpcP->Eta(),tpcP->Zv());
1262
1d55ca60 1263 fRecDcaNeg->Fill(sdca);
1264 fRecDcaNegInv->Fill(-sdca);
1265 fRecDcaNegPhi->Fill(sdca, phiIn);
1266 fRecPtNegPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1267 fRecEtaNegPhi->Fill(tpcP->Eta(), phiIn);
1268 fRecEtaPtNegPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
9f9631f3 1269 fRecDNeg->Fill(xy);
1d55ca60 1270 fSignDcaNeg[cas]->Fill(sdca);
1271 fSignDcaNegInv[cas]->Fill(-sdca);
9f9631f3 1272
1273
1d55ca60 1274 fDcaSigmaNeg[cas]->Fill(sdca,TMath::Log10(sigmapt));
9f9631f3 1275
1276 fPtSigmaNeg[cas]->Fill(TMath::Log10(sigmapt));
1d55ca60 1277
1278 //pos eta
1279 if(tpcP->Eta()>0){
1280 fRecPtNegEtaPos->Fill(tpcP->Pt());
1281 fRec1PtNegEtaPos->Fill(1/tpcP->Pt());
1282 fRecPhiNegEtaPos->Fill(phiIn);
1283 fRecDcaNegPhiEtaPos->Fill(sdca, phiIn);
98a5f582 1284 fRecDcaNegPtEtaPos->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1285 fRecPtNegPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
8ae6f5d0 1286 //fRecDcaPhiPtNegEtaPos->Fill(phiIn, tpcP->Pt(), sdca);
1d55ca60 1287 }
1288 //neg eta
1289 else{
1290 fRecPtNegEtaNeg->Fill(tpcP->Pt());
1291 fRec1PtNegEtaNeg->Fill(1/tpcP->Pt());
1292 fRecPhiNegEtaNeg->Fill(phiIn);
1293 fRecDcaNegPhiEtaNeg->Fill(sdca, phiIn);
98a5f582 1294 fRecDcaNegPtEtaNeg->Fill(sdca, TMath::Log10(tpcP->Pt()));
1d55ca60 1295 fRecPtNegPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
8ae6f5d0 1296 //fRecDcaPhiPtNegEtaNeg->Fill(phiIn, tpcP->Pt(), sdca);
1d55ca60 1297 }
1298
9f9631f3 1299 }
1300
1301
1302
1303 //all particles with positive eta
1304 if(tpcP->Eta()>0){
1305 fRecQPtPosEta->Fill(tpcP->Charge()/tpcP->Pt());
1306 fRecPtPosEta->Fill(tpcP->Pt());
1d55ca60 1307 fRecPhiPosEta->Fill(TMath::RadToDeg()*phiIn);
9f9631f3 1308 fRecQPtPosEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
1d55ca60 1309 fRecDcaPosEta->Fill(sdca);
9f9631f3 1310 fRecDPosEta->Fill(xy);
1311 }
1312 //all particles with negative eta (and eta==0)
1313 else{
1314 fRecQPtNegEta->Fill(tpcP->Charge()/tpcP->Pt());
1315 fRecPtNegEta->Fill(tpcP->Pt());
1d55ca60 1316 fRecPhiNegEta->Fill(TMath::RadToDeg()*phiIn);
9f9631f3 1317 fRecQPtNegEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
1d55ca60 1318 fRecDcaNegEta->Fill(sdca);
9f9631f3 1319 fRecDNegEta->Fill(xy);
1320
1321 }
9f9631f3 1322
1d55ca60 1323
1324 fRecPtTpcSector[Int_t(phiIn*
9f9631f3 1325 TMath::RadToDeg()/20)]->Fill(tpcP->Pt());
1d55ca60 1326 fRecEtaTpcSector[Int_t(phiIn*
1327 TMath::RadToDeg()/20)]->Fill(tpcP->Eta());
1328 fSignedDcaTpcSector[Int_t(phiIn*
1329 TMath::RadToDeg()/20)]->Fill(sdca);
1330 fRecQPtTpcSector[Int_t(phiIn*
1331 TMath::RadToDeg()/20)]->Fill(tpcP->Charge()/tpcP->Pt());
1332 fRecEtaPtTpcSector[Int_t(phiIn*
1333 TMath::RadToDeg()/20)]->Fill(tpcP->Eta()/tpcP->Pt());
9f9631f3 1334
1335
1336
1d55ca60 1337// // another track loop
1338// for (Int_t iTrack2 = 0; iTrack2 < event->GetNumberOfTracks(); iTrack2++) {
9f9631f3 1339
1d55ca60 1340// if(LeadingTrack==iTrack2) continue;
1341
1342// AliVParticle *track2 = event->GetTrack(iTrack2);
1343// AliESDtrack* esdtrack2 = dynamic_cast<AliESDtrack*>(track2);
1344// if (!track2) {
1345// Printf("ERROR: Could not receive track %d", iTrack);
1346// continue;
1347// }
1348// if (!fCuts->AcceptTrack(esdtrack2)) continue;
1349// //propagate to dca
1350// esdtrack2->PropagateToDCA(event->GetPrimaryVertex(),
1351// event->GetMagneticField(), 10000.);
9f9631f3 1352
1d55ca60 1353// fDeltaPhiLeading->Fill((LeadingPhi-esdtrack2->Phi())*TMath::RadToDeg(),
1354// LeadingPhi*TMath::RadToDeg() );
9f9631f3 1355
1356
1357
1d55ca60 1358// }//second track loop
98a5f582 1359
1fcb92ef 1360 // if(fTrackType==2) delete tpcP; // delete in case of TPCOnlyTrack
98a5f582 1361
9f9631f3 1362 }//first track loop
1363
1fcb92ef 1364 //prevent mem leak for TPConly track
1365 if(fTrackType==2&&tpcP){
1366 delete tpcP;
1367 tpcP = 0;
1368 }
9f9631f3 1369
9f9631f3 1370
1371 // Post output data.
1372 // PostData(1, fHistPt);
1373 PostData(1, fHists);
1374}
1375
1376
1377
1378
1379
1380//________________________________________________________________________
1381void AliAnalysisTaskQASym::Terminate(Option_t *)
1382{
1d55ca60 1383
9f9631f3 1384
1385}
1386
1387
1388
1389
1390