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