Cut on track-mip distance increased up to 6 cm in high flux events
[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);
23c669aa 1075 PostData(1, fHists);
1076
9f9631f3 1077}
1078
1079//__________________________________________________________
1080
1081void AliAnalysisTaskQASym::UserExec(Option_t *)
1082{
ddc7ef22 1083 // QA of global, TPC, ITS and ITS stand alone tracks
1084 // exploiting basic symmetries
1085
9f9631f3 1086 AliVEvent *event = InputEvent();
1087 if (!event) {
1d55ca60 1088 Printf("ERROR: Could not retrieve event");
1089 return;
9f9631f3 1090 }
1091
1092
1093 if(Entry()==0){
1094 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
1095 if(esd){
1096 Printf("We are reading from ESD");
1097 }
1098
1099 }
1100
1d55ca60 1101
1102
1103 if(fDebug>1)Printf("There are %d tracks in this event", event->GetNumberOfTracks());
1104
9f9631f3 1105
50dbca26 1106 Int_t leadingTrack = 0;
1107 Float_t leadingEnergy = -20.;
1108 Float_t leadingPhi = 0;//TMath::Pi();
9f9631f3 1109
1110
ddc7ef22 1111 //check vertices
1112 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
1113 Int_t nPileSPDVertices=1+esd->GetNumberOfPileupVerticesSPD(); // also SPD main vertex
1114 Int_t nPileTrkVertices=esd->GetNumberOfPileupVerticesTracks();
1115 fNVertexSPD->Fill(nPileSPDVertices);
1116 fNVertexTracks->Fill(nPileTrkVertices);
9f9631f3 1117
ddc7ef22 1118
1119 //check primary vertex
e4ab7356 1120 const AliVVertex* vertex = event->GetPrimaryVertex();
8ae6f5d0 1121 if(vertex->GetNContributors()==0) return;
cbac53a7 1122 Float_t vx = vertex->GetX();
1123 Float_t vy = vertex->GetY();
e4ab7356 1124 Float_t vz = vertex->GetZ();
cbac53a7 1125
1126 fVertexX->Fill(vx);
1127 fVertexY->Fill(vy);
1128 fVertexZ->Fill(vz);
1129
e4ab7356 1130 if (TMath::Abs(vz) > 10.) return;
1131
ddc7ef22 1132 fNumber->Fill(event->GetNumberOfTracks());
1133
1fcb92ef 1134 AliESDtrack *tpcP = 0x0;
ddc7ef22 1135 Int_t fNTracksAccepted=0;
180ce926 1136 const Int_t arrSize = event->GetNumberOfTracks();
1137 Float_t phiArray [arrSize];
1138 Float_t etaArray [arrSize];
1139 Float_t ptArray [arrSize];
1140 Float_t dcaArray [arrSize];
1141 Int_t chargeArray[arrSize];
1142 Bool_t acceptedArray[arrSize];
1c91c6a4 1143
1144 for (Int_t i = 0; i < event->GetNumberOfTracks(); i++) {
1145 phiArray[i] = 0.;
1146 etaArray[i] = 0.;
1147 ptArray[i] = 0.;
1148 dcaArray[i] = 0.;
1149 chargeArray[i] = 0;
1150 acceptedArray[i]= kFALSE;
1151
1152 }
1153
1154
1fcb92ef 1155
9f9631f3 1156 for (Int_t iTrack = 0; iTrack < event->GetNumberOfTracks(); iTrack++) {
1157
1fcb92ef 1158 //prevent mem leak for TPConly track
1159 if(fTrackType==2&&tpcP){
1160 delete tpcP;
1161 tpcP = 0;
1162 }
9f9631f3 1163
1164 AliVParticle *track = event->GetTrack(iTrack);
1165 AliESDtrack *esdtrack = dynamic_cast<AliESDtrack*>(track);
1d55ca60 1166 esdtrack->PropagateToDCA(event->GetPrimaryVertex(),
1167 event->GetMagneticField(), 10000.);
1168
9f9631f3 1169 if (!track) {
1170 Printf("ERROR: Could not receive track %d", iTrack);
1171 continue;
1172 }
1d55ca60 1173 //__________
1174 // run Task for global tracks or ITS tracks or TPC tracks
1d55ca60 1175 const AliExternalTrackParam *tpcPin = 0x0;
1c91c6a4 1176 Double_t phiIn=0.;
cbac53a7 1177
1d55ca60 1178 if(fTrackType==0){
1179 //Fill all histograms with global tracks
1180 tpcP = esdtrack;
1181 phiIn = tpcP->Phi();
1182 if (!tpcP) continue;
1183 if (!fCuts->AcceptTrack(tpcP)) continue;
1184 }
1185 else if(fTrackType==1){
1186 //Fill all histograms with ITS tracks
1187 tpcP = esdtrack;
1188 phiIn = tpcP->Phi();
1189 if (!tpcP) continue;
1190 if (!fCuts->AcceptTrack(tpcP)) continue;
b676e981 1191 if(fStandAlone==kTRUE) {
1192 if(!(tpcP->GetStatus()&AliESDtrack::kITSpureSA))continue;
1193 }
c6f320d3 1194 else if(fStandAlone==kFALSE){
1195 if(tpcP->GetStatus()&AliESDtrack::kITSpureSA)continue;
1196 }
1d55ca60 1197 }
1198 else if(fTrackType==2){
1199 //Fill all histograms with TPC track information
1200 tpcPin = esdtrack->GetInnerParam();
1201 if (!tpcPin) continue;
1202 phiIn=tpcPin->Phi();
1203
1204 tpcP = AliESDtrackCuts::GetTPCOnlyTrack(dynamic_cast<AliESDEvent*>(event),esdtrack->GetID());
1205 if (!tpcP) continue;
1206 if (!fCuts->AcceptTrack(tpcP)) continue;
1207 if(tpcP->GetNcls(1)>160)continue;//jacek's track cut
1208 if(tpcP->GetConstrainedChi2TPC()<0)continue; // jacek's track cut
1209 }
1210 else{
1211 Printf("ERROR: wrong track type \n");
1212 continue;
1213 }
1214 //___________
1215 //
1216
ddc7ef22 1217
1218 fNTracksAccepted++;
1b0c8c69 1219 phiArray[iTrack] = phiIn;
1c91c6a4 1220 etaArray[iTrack] = tpcP->Eta();
1221 ptArray[iTrack] = tpcP->Pt();
1222 chargeArray[iTrack] = tpcP->Charge();
1223 acceptedArray[iTrack]= kTRUE;
1224
1d55ca60 1225
50dbca26 1226 if(tpcP->E()>leadingEnergy){
1227 leadingTrack=iTrack;
1228 leadingEnergy=tpcP->E();
1d55ca60 1229 leadingPhi=phiIn;
9f9631f3 1230 }
1231
98a5f582 1232
9f9631f3 1233 fqRec->Fill(tpcP->Charge());
1234
1235
ddc7ef22 1236 Double_t fSigmaPt = tpcP->GetSigma1Pt2();
1237 fSigmaPt= sqrt(fSigmaPt);
1238 fSigmaPt= fSigmaPt *(tpcP->Pt()*tpcP->Pt());
9f9631f3 1239
ddc7ef22 1240 if(TMath::Abs(fSigmaPt) < 1.e-10) continue;
8d49bc89 1241
ddc7ef22 1242 fSigmaPtHist->Fill(TMath::Log10(fSigmaPt));
1d55ca60 1243
9f9631f3 1244
9f9631f3 1245 // hits in ITS layer
1246 Int_t cas=-1;
1d55ca60 1247 if(tpcP->HasPointOnITSLayer(0))
9f9631f3 1248 cas=0;
1d55ca60 1249 else if(!tpcP->HasPointOnITSLayer(0)
1250 && tpcP->HasPointOnITSLayer(1))
9f9631f3 1251 cas=1;
1d55ca60 1252 else if(!tpcP->HasPointOnITSLayer(0)
1253 && !tpcP->HasPointOnITSLayer(1)
1254 && tpcP->HasPointOnITSLayer(2))
9f9631f3 1255 cas=2;
1d55ca60 1256 else if(!tpcP->HasPointOnITSLayer(0)
1257 && !tpcP->HasPointOnITSLayer(1)
1258 && !tpcP->HasPointOnITSLayer(2)
1259 && tpcP->HasPointOnITSLayer(3))
9f9631f3 1260 cas=3;
1d55ca60 1261 else if(!tpcP->HasPointOnITSLayer(0)
1262 && !tpcP->HasPointOnITSLayer(1)
1263 && !tpcP->HasPointOnITSLayer(2)
1264 && !tpcP->HasPointOnITSLayer(3)
1265 && tpcP->HasPointOnITSLayer(4))
9f9631f3 1266 cas=4;
1d55ca60 1267 else if( !tpcP->HasPointOnITSLayer(0)
1268 && !tpcP->HasPointOnITSLayer(1)
1269 && !tpcP->HasPointOnITSLayer(2)
1270 && !tpcP->HasPointOnITSLayer(3)
1271 && !tpcP->HasPointOnITSLayer(4)
1272 && tpcP->HasPointOnITSLayer(5))
9f9631f3 1273 cas=5;
1274 else
1275 cas=6;
1276
1277
1278
1279 //-------------------
ddc7ef22 1280 Float_t fXVertexCor = 0.;
1281 Float_t fYVertexCor = 0.;
9f9631f3 1282
ddc7ef22 1283 fXVertexCor = tpcP->Xv() - vertex->GetX(); // coordinate corrected for vertex position
1284 fYVertexCor = tpcP->Yv() - vertex->GetY(); // "
1285 Double_t fSignedDca = (tpcP->Py()*fXVertexCor - tpcP->Px()*fYVertexCor)/tpcP->Pt();
9f9631f3 1286
1287
1288 fqPtRec[cas]->Fill(tpcP->Charge()/tpcP->Pt());
1289
1d55ca60 1290
1291
9f9631f3 1292 fHistRECpt->Fill(tpcP->Pt());
1293 fEta->Fill(tpcP->Eta());
ddc7ef22 1294 fEtavPt->Fill(tpcP->Eta(), TMath::Log(tpcP->Pt()));
1b0c8c69 1295 fPhivPt->Fill(phiIn, TMath::Log(tpcP->Pt()));
1d55ca60 1296 fEtaPhi->Fill(tpcP->Eta(), phiIn);
9f9631f3 1297 fThetaRec->Fill(tpcP->Theta());
1d55ca60 1298 fPhiRec->Fill(phiIn);
9f9631f3 1299 fVx->Fill(tpcP->Xv());
1300 fVy->Fill(tpcP->Yv());
1301 fVz->Fill(tpcP->Zv());
1302
1303
1304 fEtaPt->Fill(tpcP->Eta()/tpcP->Pt());
1305 fQPt->Fill(tpcP->Charge()/tpcP->Pt());
ddc7ef22 1306 fDca->Fill(fSignedDca);
1c91c6a4 1307 dcaArray[iTrack]=fSignedDca;
1d55ca60 1308 fRecQPtPhi->Fill(tpcP->Charge()/tpcP->Pt(), phiIn);
9f9631f3 1309
ddc7ef22 1310 Float_t fXY = 0.;
1311 Float_t fZ = 0.;
9f9631f3 1312
ddc7ef22 1313 tpcP->GetImpactParameters(fXY,fZ);
1314 fDiffDcaD->Fill(fSignedDca+fXY);
9f9631f3 1315
ddc7ef22 1316 if(fTrackType==2) fCompareTPCparam->Fill(fZ,tpcPin->GetTgl());
e4ab7356 1317
c07e266e 1318 if(fTrackType!=2){//for global and ITS tracks
1319 for(Int_t itsLayer=0;itsLayer<6;itsLayer++){
1320 if(tpcP->HasPointOnITSLayer(itsLayer)){
1321 fITSlayer->Fill(itsLayer);
ddc7ef22 1322 fITSlayerEta->Fill(itsLayer, tpcP->Eta());
1323 fITSlayerPhi->Fill(itsLayer, tpcP->Phi());
c07e266e 1324 }
1325 }
1326 }
1327
1328 //for positive particles
1329
9f9631f3 1330 if(tpcP->Charge()>0){
1331 fRecPtPos->Fill(tpcP->Pt());
1332 fRecPtPosLadder[cas]->Fill(tpcP->Pt());
1333 fRecPtPosVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
1d55ca60 1334 fRecPhiPos->Fill(TMath::RadToDeg()*phiIn);
c07e266e 1335
1336
1d55ca60 1337 fRecPhiPosLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1338 fRecPhiPosVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
ddc7ef22 1339 fSignedDcaPosVz->Fill(fSignedDca,tpcP->Zv());
9f9631f3 1340
1341 fRecEtaPos->Fill(tpcP->Eta());
1342 fRecEtaPosLadder[cas]->Fill(tpcP->Eta());
1343 fRecEtaPtPos->Fill(tpcP->Eta()/tpcP->Pt());
1344 fRecEtaPosVz->Fill(tpcP->Eta(),tpcP->Zv());
1345 fRecEtaPtPosVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
1346
ddc7ef22 1347 fRecDcaPos->Fill(fSignedDca);
1348 fRecDcaPosPhi->Fill(fSignedDca, phiIn);
1d55ca60 1349 fRecPtPosPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1350 fRecEtaPtPosPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
1351 fRecEtaPosPhi->Fill(tpcP->Eta(), phiIn);
ddc7ef22 1352 fRecDPos->Fill(fXY);
1353 fSignDcaPos[cas]->Fill(fSignedDca);
9f9631f3 1354
1355
ddc7ef22 1356 fDcaSigmaPos[cas]->Fill(fSignedDca, TMath::Log10(fSigmaPt));
9f9631f3 1357
ddc7ef22 1358 fPtSigmaPos[cas]->Fill(TMath::Log10(fSigmaPt));
1d55ca60 1359 //pos eta
1360 if(tpcP->Eta()>0){
1361 fRecPtPosEtaPos->Fill(tpcP->Pt());
1362 fRec1PtPosEtaPos->Fill(1/tpcP->Pt());
1363 fRecPhiPosEtaPos->Fill(phiIn);
ddc7ef22 1364 fRecDcaPosPhiEtaPos->Fill(fSignedDca, phiIn);
1365 fRecDcaPosPtEtaPos->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1d55ca60 1366 fRecPtPosPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
ddc7ef22 1367 //fRecDcaPhiPtPosEtaPos->Fill(phiIn, tpcP->Pt(), fSignedDca);
1d55ca60 1368 }
1369 //neg eta
1370 else{
1371 fRecPtPosEtaNeg->Fill(tpcP->Pt());
1372 fRec1PtPosEtaNeg->Fill(1/tpcP->Pt());
1373 fRecPhiPosEtaNeg->Fill(phiIn);
ddc7ef22 1374 fRecDcaPosPhiEtaNeg->Fill(fSignedDca, phiIn);
1375 fRecDcaPosPtEtaNeg->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1d55ca60 1376 fRecPtPosPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
ddc7ef22 1377 //fRecDcaPhiPtPosEtaNeg->Fill(phiIn, tpcP->Pt(), fSignedDca);
1d55ca60 1378 }
1379
9f9631f3 1380 }
1381 //and negative particles
1382 else {
1383 fRecPtNeg->Fill(tpcP->Pt());
1384 fRecPtNegLadder[cas]->Fill(tpcP->Pt());
1385 fRecPtNegVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
1386
1d55ca60 1387 fRecPhiNeg->Fill(TMath::RadToDeg()*phiIn);
1388 fRecPhiNegLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1389 fRecPhiNegVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
ddc7ef22 1390 fSignedDcaNegVz->Fill(fSignedDca,tpcP->Zv());
9f9631f3 1391 fRecEtaPtNegVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
1392
1393 fRecEtaNeg->Fill(tpcP->Eta());
1394 fRecEtaNegLadder[cas]->Fill(tpcP->Eta());
1395 fRecEtaPtNeg->Fill(tpcP->Eta()/tpcP->Pt());
1396 fRecEtaNegVz->Fill(tpcP->Eta(),tpcP->Zv());
1397
ddc7ef22 1398 fRecDcaNeg->Fill(fSignedDca);
1399 fRecDcaNegInv->Fill(-fSignedDca);
1400 fRecDcaNegPhi->Fill(fSignedDca, phiIn);
1d55ca60 1401 fRecPtNegPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1402 fRecEtaNegPhi->Fill(tpcP->Eta(), phiIn);
1403 fRecEtaPtNegPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
ddc7ef22 1404 fRecDNeg->Fill(fXY);
1405 fSignDcaNeg[cas]->Fill(fSignedDca);
1406 fSignDcaNegInv[cas]->Fill(-fSignedDca);
9f9631f3 1407
1408
ddc7ef22 1409 fDcaSigmaNeg[cas]->Fill(fSignedDca,TMath::Log10(fSigmaPt));
9f9631f3 1410
ddc7ef22 1411 fPtSigmaNeg[cas]->Fill(TMath::Log10(fSigmaPt));
1d55ca60 1412
1413 //pos eta
1414 if(tpcP->Eta()>0){
1415 fRecPtNegEtaPos->Fill(tpcP->Pt());
1416 fRec1PtNegEtaPos->Fill(1/tpcP->Pt());
1417 fRecPhiNegEtaPos->Fill(phiIn);
ddc7ef22 1418 fRecDcaNegPhiEtaPos->Fill(fSignedDca, phiIn);
1419 fRecDcaNegPtEtaPos->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1d55ca60 1420 fRecPtNegPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
ddc7ef22 1421 //fRecDcaPhiPtNegEtaPos->Fill(phiIn, tpcP->Pt(), fSignedDca);
1d55ca60 1422 }
1423 //neg eta
1424 else{
1425 fRecPtNegEtaNeg->Fill(tpcP->Pt());
1426 fRec1PtNegEtaNeg->Fill(1/tpcP->Pt());
1427 fRecPhiNegEtaNeg->Fill(phiIn);
ddc7ef22 1428 fRecDcaNegPhiEtaNeg->Fill(fSignedDca, phiIn);
1429 fRecDcaNegPtEtaNeg->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1d55ca60 1430 fRecPtNegPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
ddc7ef22 1431 //fRecDcaPhiPtNegEtaNeg->Fill(phiIn, tpcP->Pt(), fSignedDca);
1d55ca60 1432 }
1433
9f9631f3 1434 }
1435
1436
1437
1438 //all particles with positive eta
1439 if(tpcP->Eta()>0){
1440 fRecQPtPosEta->Fill(tpcP->Charge()/tpcP->Pt());
1441 fRecPtPosEta->Fill(tpcP->Pt());
1d55ca60 1442 fRecPhiPosEta->Fill(TMath::RadToDeg()*phiIn);
9f9631f3 1443 fRecQPtPosEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
ddc7ef22 1444 fRecDcaPosEta->Fill(fSignedDca);
1445 fRecDPosEta->Fill(fXY);
9f9631f3 1446 }
1447 //all particles with negative eta (and eta==0)
1448 else{
1449 fRecQPtNegEta->Fill(tpcP->Charge()/tpcP->Pt());
1450 fRecPtNegEta->Fill(tpcP->Pt());
1d55ca60 1451 fRecPhiNegEta->Fill(TMath::RadToDeg()*phiIn);
9f9631f3 1452 fRecQPtNegEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
ddc7ef22 1453 fRecDcaNegEta->Fill(fSignedDca);
1454 fRecDNegEta->Fill(fXY);
9f9631f3 1455
1456 }
9f9631f3 1457
1d55ca60 1458
1459 fRecPtTpcSector[Int_t(phiIn*
9f9631f3 1460 TMath::RadToDeg()/20)]->Fill(tpcP->Pt());
1d55ca60 1461 fRecEtaTpcSector[Int_t(phiIn*
1462 TMath::RadToDeg()/20)]->Fill(tpcP->Eta());
1463 fSignedDcaTpcSector[Int_t(phiIn*
ddc7ef22 1464 TMath::RadToDeg()/20)]->Fill(fSignedDca);
1d55ca60 1465 fRecQPtTpcSector[Int_t(phiIn*
1466 TMath::RadToDeg()/20)]->Fill(tpcP->Charge()/tpcP->Pt());
1467 fRecEtaPtTpcSector[Int_t(phiIn*
1468 TMath::RadToDeg()/20)]->Fill(tpcP->Eta()/tpcP->Pt());
9f9631f3 1469
1470
1471
1d55ca60 1472// // another track loop
1473// for (Int_t iTrack2 = 0; iTrack2 < event->GetNumberOfTracks(); iTrack2++) {
9f9631f3 1474
1d55ca60 1475// if(LeadingTrack==iTrack2) continue;
1476
1477// AliVParticle *track2 = event->GetTrack(iTrack2);
1478// AliESDtrack* esdtrack2 = dynamic_cast<AliESDtrack*>(track2);
1479// if (!track2) {
1480// Printf("ERROR: Could not receive track %d", iTrack);
1481// continue;
1482// }
1483// if (!fCuts->AcceptTrack(esdtrack2)) continue;
1484// //propagate to dca
1485// esdtrack2->PropagateToDCA(event->GetPrimaryVertex(),
1486// event->GetMagneticField(), 10000.);
9f9631f3 1487
1d55ca60 1488// fDeltaPhiLeading->Fill((LeadingPhi-esdtrack2->Phi())*TMath::RadToDeg(),
1489// LeadingPhi*TMath::RadToDeg() );
9f9631f3 1490
1491
1492
1d55ca60 1493// }//second track loop
98a5f582 1494
1fcb92ef 1495 // if(fTrackType==2) delete tpcP; // delete in case of TPCOnlyTrack
98a5f582 1496
9f9631f3 1497 }//first track loop
1498
ddc7ef22 1499 fNumberAfterCut->Fill(fNTracksAccepted);
1c91c6a4 1500
1501 //second track loop
1502
1503 for (Int_t iT = 0; iT < event->GetNumberOfTracks(); iT++) {
1504 if(acceptedArray[iT]){
1505 if(ptArray[iT]>0.2 && ptArray[iT]<1. ){
1506 fEtaBinPt[0][Bool_t(chargeArray[iT]>0)]->Fill(etaArray[iT]);
1507 fDcaBinPt[0][Bool_t(chargeArray[iT]>0)]->Fill(dcaArray[iT]);
1508 fPhiBinPt[0][Bool_t(chargeArray[iT]>0)]->Fill(phiArray[iT]);
1509 fEtaPhiBinPt[0][Bool_t(chargeArray[iT]>0)]->Fill(etaArray[iT], phiArray[iT]);
1510 }
1511 else if(ptArray[iT]>1. && ptArray[iT]<5.){
1512 fEtaBinPt[1][Bool_t(chargeArray[iT]>0)]->Fill(etaArray[iT]);
1513 fDcaBinPt[1][Bool_t(chargeArray[iT]>0)]->Fill(dcaArray[iT]);
1514 fPhiBinPt[1][Bool_t(chargeArray[iT]>0)]->Fill(phiArray[iT]);
1515 fEtaPhiBinPt[1][Bool_t(chargeArray[iT]>0)]->Fill(etaArray[iT], phiArray[iT]);
1516 }
1517 else if (ptArray[iT]>5.){
1518 fEtaBinPt[2][Bool_t(chargeArray[iT]>0)]->Fill(etaArray[iT]);
1519 fDcaBinPt[2][Bool_t(chargeArray[iT]>0)]->Fill(dcaArray[iT]);
1520 fPhiBinPt[2][Bool_t(chargeArray[iT]>0)]->Fill(phiArray[iT]);
1521 fEtaPhiBinPt[2][Bool_t(chargeArray[iT]>0)]->Fill(etaArray[iT], phiArray[iT]);
1522 }
1523
1524 if(fNTracksAccepted>=fLow&&fNTracksAccepted<=fHigh){
1525 fEtaWidth->Fill(etaArray[iT]);
1526 fPhiWidth->Fill(phiArray[iT]);
1527 fDcaWidth->Fill(dcaArray[iT]);
1528 fPtWidth->Fill(ptArray[iT]);
1529 }
1530 }
1531 }
1532
ddc7ef22 1533
1fcb92ef 1534 //prevent mem leak for TPConly track
1535 if(fTrackType==2&&tpcP){
1536 delete tpcP;
1537 tpcP = 0;
1538 }
9f9631f3 1539
9f9631f3 1540
1541 // Post output data.
1542 // PostData(1, fHistPt);
1543 PostData(1, fHists);
1544}
1545
1546
1547
1548
1549
1550//________________________________________________________________________
1551void AliAnalysisTaskQASym::Terminate(Option_t *)
1552{
1d55ca60 1553
9f9631f3 1554
1555}
1556
1557
1558
1559
1560