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