9 #include "TParticlePDG.h"
12 #include "AliAnalysisTask.h"
13 #include "AliAnalysisManager.h"
15 #include "AliESDEvent.h"
17 #include "AliESDVertex.h"
18 #include "AliESDInputHandler.h"
19 #include "AliESDtrackCuts.h"
20 #include "AliMultiplicity.h"
22 #include "AliAnalysisTaskQASym.h"
23 #include "AliExternalTrackParam.h"
24 #include "AliTrackReference.h"
25 #include "AliHeader.h"
26 #include "AliGenEventHeader.h"
27 #include "AliGenDPMjetEventHeader.h"
29 // Analysis Task for basic QA on the ESD
31 // Authors: Jan Fiete Grosse-Oetringhaus, Christian Klein-Boesing,
32 // Andreas Morsch, Eva Sicking
34 ClassImp(AliAnalysisTaskQASym)
36 //________________________________________________________________________
37 AliAnalysisTaskQASym::AliAnalysisTaskQASym(const char *name)
38 : AliAnalysisTaskSE(name)
139 ,fRecDcaPosPhiEtaPos(0)
140 ,fRecDcaNegPhiEtaPos(0)
141 ,fRecDcaPosPhiEtaNeg(0)
142 ,fRecDcaNegPhiEtaNeg(0)
144 ,fRecDcaPosPtEtaPos(0)
145 ,fRecDcaNegPtEtaPos(0)
146 ,fRecDcaPosPtEtaNeg(0)
147 ,fRecDcaNegPtEtaNeg(0)
149 ,fRecPtPosPhiEtaPos(0)
150 ,fRecPtNegPhiEtaPos(0)
151 ,fRecPtPosPhiEtaNeg(0)
152 ,fRecPtNegPhiEtaNeg(0)
155 // ,fRecDcaPhiPtPosEtaPos(0)
156 // ,fRecDcaPhiPtNegEtaPos(0)
157 // ,fRecDcaPhiPtPosEtaNeg(0)
158 // ,fRecDcaPhiPtNegEtaNeg(0)
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;
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;
190 fSignDcaNegInv[i] = 0;
198 for(Int_t i = 0;i< 3;i++){
199 for(Int_t j = 0;j< 2;j++){
203 fEtaPhiBinPt[i][j]=0;
207 DefineOutput(1, TList::Class());
214 //________________________________________________________________________
215 void AliAnalysisTaskQASym::UserCreateOutputObjects()
220 Bool_t oldStatus = TH1::AddDirectoryStatus();
221 TH1::AddDirectory(kFALSE);
223 Double_t range = 0.3;
226 fHists = new TList();
228 fHistRECpt = new TH1F("fHistRECpt",
231 fEta = new TH1F("fEta",
234 fEtaWidth = new TH1F("fEtaWidth",
237 fPhiWidth = new TH1F("fPhiWidth",
239 200, 0., 2*TMath::Pi());
240 fDcaWidth = new TH1F("fDcaWidth",
242 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
243 fPtWidth = new TH1F("fPtWidth",
246 fEtavPt = new TH2F("fEtavPt",
250 fPhivPt = new TH2F("fPhivPt",
252 200, 0, 2*TMath::Pi(),
254 fCompareTPCparam = new TH2F("fCompareTPCparam",
256 100, -1., 1.,100,-5, 5);
258 fITSlayer = new TH1F("fITSlayer",
261 fITSlayerEta = new TH2F("fITSlayerEta",
263 8, -1.5, 6.5, 200, -2.,2.);
264 fITSlayerPhi = new TH2F("fITSlayerPhi",
266 8, -1.5, 6.5, 200, 0,2*TMath::Pi());
267 fEtaPhi = new TH2F("fEtaPhi",
269 200, -2., 2., 128, 0., 2. * TMath::Pi());
270 fThetaRec = new TH1F("fThetaRec",
272 180, 0., TMath::Pi());
273 fPhiRec = new TH1F("fPhiRec",
275 180, 0., 2*TMath::Pi());
276 fNumber = new TH1F("fNumber",
277 "number of tracks per event",
279 fNumberAfterCut = new TH1F("fNumberAfterCut",
280 "number of tracks per event after cuts",
282 fVx = new TH1F("fVx",
283 "X of first track point",
285 fVy = new TH1F("fVy",
286 "Y of first track point",
288 fVz = new TH1F("fVz",
289 "Z of first track point",
291 fVertexX = new TH1F("fVertexX",
294 fVertexY = new TH1F("fVertexY",
297 fVertexZ = new TH1F("fVertexZ",
300 fNVertexSPD = new TH1F("fNVertexSPD",
301 "Number of SPD vertices",
303 fNVertexTracks = new TH1F("fNVertexTracks",
304 "Number of track vertices",
307 fEtaPt = new TH1F("fEtaPt",
311 fQPt = new TH1F("fQPt",
315 fDca = new TH1F("fDca",
317 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
320 fqRec = new TH1F("fqRec",
321 " charge all reconstructed particle",
324 fSigmaPtHist = new TH1F("fSigmaPtHist",
325 "Log_{10}(#sigma_{p_{T}})",
332 for(Int_t ITSlayer_case=0;ITSlayer_case<7;ITSlayer_case++){
334 fSignDcaPos[ITSlayer_case] = new TH1F(Form("fSignDcaPos%d", ITSlayer_case),
336 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
337 fSignDcaPos[ITSlayer_case]->GetXaxis()->SetTitle("dca");
338 fSignDcaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
341 fSignDcaNeg[ITSlayer_case] = new TH1F(Form("fSignDcaNeg%d", ITSlayer_case),
343 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
344 fSignDcaNeg[ITSlayer_case]->GetXaxis()->SetTitle("dca");
345 fSignDcaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
347 fSignDcaNegInv[ITSlayer_case] = new TH1F(Form("fSignDcaNegInv%d", ITSlayer_case),
348 " inverse Signed dca ",
349 200, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
350 fSignDcaNegInv[ITSlayer_case]->GetXaxis()->SetTitle("-dca");
351 fSignDcaNegInv[ITSlayer_case]->GetYaxis()->SetTitle("");
356 fPtSigmaPos[ITSlayer_case] = new TH1F(Form("fPtSigmaPos%d", ITSlayer_case),
359 fPtSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
360 fPtSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("");
363 fPtSigmaNeg[ITSlayer_case] = new TH1F(Form("fPtSigmaNeg%d",ITSlayer_case),
366 fPtSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("Log_{10}(#sigma_{pT})");
367 fPtSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("");
373 fqPtRec[ITSlayer_case] = new TH1F(Form("fqPtRec%d",ITSlayer_case),
376 fqPtRec[ITSlayer_case]->GetXaxis()->SetTitle("q_{tr}/p_{T, tr} (GeV/c)");
377 fqPtRec[ITSlayer_case]->GetYaxis()->SetTitle("");
383 fDcaSigmaPos[ITSlayer_case] = new TH2F(Form("fDcaSigmaPos%d", ITSlayer_case),
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. );
386 fDcaSigmaPos[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA)");
387 fDcaSigmaPos[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
390 fDcaSigmaNeg[ITSlayer_case] = new TH2F(Form("fDcaSigmaNeg%d", ITSlayer_case),
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. );
393 fDcaSigmaNeg[ITSlayer_case]->GetXaxis()->SetTitle("signed DCA");
394 fDcaSigmaNeg[ITSlayer_case]->GetYaxis()->SetTitle("log_{10}(#sigma_{pT})");
401 // YIELDs---------- positive and negative particles
403 fRecPtPos = new TH1F("fRecPtPos",
406 fRecPtPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
407 fRecPtNeg = new TH1F("fRecPtNeg",
410 fRecPtNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
413 fRecPhiPos = new TH1F("fRecPhiPos",
416 fRecPhiPos->GetXaxis()->SetTitle("#phi (deg)");
418 fRecPhiNeg = new TH1F("fRecPhiNeg",
421 fRecPhiNeg->GetXaxis()->SetTitle("#phi (deg)");
423 fRecEtaPos = new TH1F("fRecEtaPos",
426 fRecEtaPos->GetXaxis()->SetTitle("#eta");
428 fRecEtaNeg = new TH1F("fRecEtaNeg",
431 fRecEtaNeg->GetXaxis()->SetTitle("#eta");
433 fRecEtaPtPos = new TH1F("fRecEtaPtPos",
436 fRecEtaPtPos->GetXaxis()->SetTitle("#eta/p_{T}");
438 fRecEtaPtNeg = new TH1F("fRecEtaPtNeg",
441 fRecEtaPtNeg->GetXaxis()->SetTitle("#eta/p_{T}");
443 fRecDcaPos = new TH1F("fRecDcaPos",
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",
449 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
450 fRecDcaNeg->GetXaxis()->SetTitle("dca (cm)");
452 fRecDcaNegInv = new TH1F("fRecDcaNegInv",
454 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
455 fRecDcaNegInv->GetXaxis()->SetTitle("dca (cm)");
458 fRecDPos = new TH1F("fRecDPos",
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",
464 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
465 fRecDNeg->GetXaxis()->SetTitle("d (cm)");
468 // YIELDs ---------------- positive and negative eta
471 fRecQPtPosEta = new TH1F("fRecQPtPosEta",
474 fRecQPtPosEta->GetXaxis()->SetTitle("q/p_{T} ");
476 fRecQPtNegEta = new TH1F("fRecQPtNegEta",
479 fRecQPtNegEta->GetXaxis()->SetTitle("q/p_{T}");
481 fRecPtPosEta = new TH1F("fRecPtPosEta",
484 fRecPtPosEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
486 fRecPtNegEta = new TH1F("fRecPtNegEta",
489 fRecPtNegEta->GetXaxis()->SetTitle("p_{T} (GeV/c)");
491 fRecPhiPosEta = new TH1F("fRecPhiPosEta",
494 fRecPhiPosEta->GetXaxis()->SetTitle("#phi (deg)");
496 fRecPhiNegEta = new TH1F("fRecPhiNegEta",
499 fRecPhiNegEta->GetXaxis()->SetTitle("#phi (deg)");
501 fRecDcaPosEta = new TH1F("fRecDcaPosEta",
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",
507 100, -range*(1+Int_t(fTrackType/2)*9), range*(1+Int_t(fTrackType/2)*9));
508 fRecDcaNegEta->GetXaxis()->SetTitle("dca (cm)");
510 fRecDPosEta = new TH1F("fRecDPosEta",
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",
517 fRecDNegEta->GetXaxis()->SetTitle("d (cm)");
519 fRecDcaPosPhi = new TH2F("fRecDcaPosPhi",
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",
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.)");
530 fRecPtPosPhi = new TH2F("fRecPtPosPhi",
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",
537 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
538 fRecPtNegPhi->GetXaxis()->SetTitle("log_{10}(p_{T})");
539 fRecPtNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
541 fRecEtaPosPhi = new TH2F("fRecEtaPosPhi",
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",
548 100, -1.5, 1.5, 180, 0, TMath::Pi()*2);
549 fRecEtaNegPhi->GetXaxis()->SetTitle("#eta");
550 fRecEtaNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
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.)");
558 fRecEtaPtPosPhi = new TH2F("fRecEtaPtPosPhi",
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",
565 100,-5 , 5., 180, 0, TMath::Pi()*2);
566 fRecEtaPtNegPhi->GetXaxis()->SetTitle("#eta/p_{T}");
567 fRecEtaPtNegPhi->GetYaxis()->SetTitle("#phi (rad.)");
573 fRecDcaPosPhiEtaPos = new TH2F("fRecDcaPosPhiEtaPos",
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",
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.)");
584 fRecPtPosPhiEtaPos = new TH2F("fRecPtPosPhiEtaPos",
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",
591 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
592 fRecPtNegPhiEtaPos->GetXaxis()->SetTitle("log_{10}(p_{T})");
593 fRecPtNegPhiEtaPos->GetYaxis()->SetTitle("#phi (rad.)");
596 fRecDcaPosPhiEtaNeg = new TH2F("fRecDcaPosPhiEtaNeg",
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",
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.)");
607 fRecPtPosPhiEtaNeg = new TH2F("fRecPtPosPhiEtaNeg",
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",
614 100,-2.5 , 2., 180, 0, TMath::Pi()*2);
615 fRecPtNegPhiEtaNeg->GetXaxis()->SetTitle("log_{10}(p_{T})");
616 fRecPtNegPhiEtaNeg->GetYaxis()->SetTitle("#phi (rad.)");
619 fRecDcaPosPtEtaPos = new TH2F("fRecDcaPosPtEtaPos",
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})");
625 fRecDcaPosPtEtaNeg = new TH2F("fRecDcaPosPtEtaNeg",
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})");
631 fRecDcaNegPtEtaPos = new TH2F("fRecDcaNegPtEtaPos",
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})");
637 fRecDcaNegPtEtaNeg = new TH2F("fRecDcaNegPtEtaNeg",
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})");
645 // YIELDs ---------------- for TPC sectors
646 for(Int_t sector=0; sector<18;sector++){
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)");
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)");
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");
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)");
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)");
677 for(Int_t i=0;i<7;i++){
678 fRecPtPosLadder[i] = new TH1F(Form("fRecPtPosLadder%d", i),
679 " p_{T} distribution",
681 fRecPtPosLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
682 fRecPtNegLadder[i] = new TH1F(Form("fRecPtNegLadder%d",i),
683 " p_{T} distribution ",
685 fRecPtNegLadder[i]->GetXaxis()->SetTitle("p_{T} (GeV/c)");
688 fRecPhiPosLadder[i] = new TH1F(Form("fRecPhiPosLadder%d",i),
689 "#phi distribution: all pos eta",
691 fRecPhiPosLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
693 fRecPhiNegLadder[i] = new TH1F(Form("fRecPhiNegLadder%d", i),
694 "#phi distribution: all neg eta",
696 fRecPhiNegLadder[i]->GetXaxis()->SetTitle("#phi (deg)");
700 fRecEtaPosLadder[i] = new TH1F(Form("fRecEtaPosLadder%d",i),
703 fRecEtaPosLadder[i]->GetXaxis()->SetTitle("#eta)");
705 fRecEtaNegLadder[i] = new TH1F(Form("fRecEtaNegLadder%d", i),
708 fRecEtaNegLadder[i]->GetXaxis()->SetTitle("#eta");
711 Double_t vzmax = 15.;
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})");
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})");
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",
729 "#eta distribution vs Vz()",
730 100, -2., 2.,200,-vzmax,vzmax);
731 fRecEtaNegVz->GetXaxis()->SetTitle("#eta");
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",
739 361, 0., 360.,200,-vzmax,vzmax);
740 fRecPhiNegVz->GetXaxis()->SetTitle("#phi (deg)");
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",
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)");
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}");
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}");
771 fDeltaPhiAll = new TH1F("fDeltaPhiAll",
772 " #Delta #phi",200,-360,360);
773 fDeltaPhiAll->GetXaxis()->SetTitle("#Delta #phi");
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.)");
781 fDiffDcaD = new TH1F("fDiffDcaD",
786 fRecPtPosEtaPos = new TH1F("fRecPtPosEtaPos",
787 "p_{T} distribution",100,0,pt);
788 fRecPtPosEtaPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
790 fRecPtNegEtaPos = new TH1F("fRecPtNegEtaPos",
791 "p_{T} distribution",100,0,pt);
792 fRecPtNegEtaPos->GetXaxis()->SetTitle("p_{T} (GeV/c)");
794 fRecPtPosEtaNeg = new TH1F("fRecPtPosEtaNeg",
795 "p_{T} distribution",100,0,pt);
796 fRecPtPosEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
798 fRecPtNegEtaNeg = new TH1F("fRecPtNegEtaNeg",
799 "p_{T} distribution",100,0,pt);
800 fRecPtNegEtaNeg->GetXaxis()->SetTitle("p_{T} (GeV/c)");
804 fRec1PtPosEtaPos = new TH1F("fRec1PtPosEtaPos",
805 "1/p_{T} distribution",100,0,0.5);
806 fRec1PtPosEtaPos->GetXaxis()->SetTitle("p_{T} (c/GeV)");
808 fRec1PtNegEtaPos = new TH1F("fRec1PtNegEtaPos",
809 "1/p_{T} distribution",100,0,0.5);
810 fRec1PtNegEtaPos->GetXaxis()->SetTitle("p_{T} (c/GeV)");
812 fRec1PtPosEtaNeg = new TH1F("fRec1PtPosEtaNeg",
813 "1/p_{T} distribution",100,0,0.5);
814 fRec1PtPosEtaNeg->GetXaxis()->SetTitle("p_{T} (c/GeV)");
816 fRec1PtNegEtaNeg = new TH1F("fRec1PtNegEtaNeg",
817 "1/p_{T} distribution",100,0,0.5);
818 fRec1PtNegEtaNeg->GetXaxis()->SetTitle("1/p_{T} (c/GeV)");
822 fRecPhiPosEtaPos = new TH1F("fRecPhiPosEtaPos",
823 "#phi",180,0,2*TMath::Pi());
824 fRecPhiPosEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
826 fRecPhiNegEtaPos = new TH1F("fRecPhiNegEtaPos",
827 "#phi",180,0,2*TMath::Pi());
828 fRecPhiNegEtaPos->GetXaxis()->SetTitle("#phi (rad.)");
830 fRecPhiPosEtaNeg = new TH1F("fRecPhiPosEtaNeg",
831 "#phi",180,0,2*TMath::Pi());
832 fRecPhiPosEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
834 fRecPhiNegEtaNeg = new TH1F("fRecPhiNegEtaNeg",
835 "#phi",180,0,2*TMath::Pi());
836 fRecPhiNegEtaNeg->GetXaxis()->SetTitle("#phi (rad.)");
840 // fRecDcaPhiPtPosEtaPos = new TH3F("fRecDcaPhiPtPosEtaPos",
841 // "#phi- p_{T} - DCA",
842 // 180,0,2*TMath::Pi(),
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)");
849 // fRecDcaPhiPtPosEtaNeg = new TH3F("fRecDcaPhiPtPosEtaNeg",
850 // "#phi- p_{T} - DCA",
851 // 180,0,2*TMath::Pi(),
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)");
858 // fRecDcaPhiPtNegEtaPos = new TH3F("fRecDcaPhiPtNegEtaPos",
859 // "#phi- p_{T} - DCA",
860 // 180,0,2*TMath::Pi(),
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)");
867 // fRecDcaPhiPtNegEtaNeg = new TH3F("fRecDcaPhiPtNegEtaNeg",
868 // "#phi- p_{T} - DCA",
869 // 180,0,2*TMath::Pi(),
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)");
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()),
885 fPhiBinPt[i][j] = new TH1F(Form("fPhiBinPt%d%s", i,charge[j].Data() ),
887 181, 0, 2*TMath::Pi());
888 fDcaBinPt[i][j] = new TH1F(Form("fDcaBinPt%d%s", i, charge[j].Data()),
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()),
894 200, -2., 2., 200, 0.,2*TMath::Pi());
901 fHists->Add(fHistRECpt);
903 fHists->Add(fEtaWidth);
904 fHists->Add(fPhiWidth);
905 fHists->Add(fDcaWidth);
906 fHists->Add(fPtWidth);
907 fHists->Add(fEtavPt);
908 fHists->Add(fPhivPt);
909 fHists->Add(fCompareTPCparam);
910 fHists->Add(fITSlayer);
911 fHists->Add(fITSlayerEta);
912 fHists->Add(fITSlayerPhi);
913 fHists->Add(fEtaPhi);
914 fHists->Add(fThetaRec);
915 fHists->Add(fPhiRec);
916 fHists->Add(fNumber);
917 fHists->Add(fNumberAfterCut);
921 fHists->Add(fVertexX);
922 fHists->Add(fVertexY);
923 fHists->Add(fVertexZ);
924 fHists->Add(fNVertexSPD);
925 fHists->Add(fNVertexTracks);
931 fHists->Add(fDeltaPhiAll);
932 fHists->Add(fDeltaPhiLeading);
933 fHists->Add(fDiffDcaD);
936 fHists->Add(fSigmaPtHist);
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);
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);
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]);
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]);
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);
996 for(Int_t i=0;i<7;i++){
997 fHists->Add(fSignDcaPos[i]);
998 fHists->Add(fSignDcaNeg[i]);
999 fHists->Add(fSignDcaNegInv[i]);
1001 fHists->Add(fPtSigmaPos[i]);
1002 fHists->Add(fPtSigmaNeg[i]);
1003 fHists->Add(fqPtRec[i]);
1005 fHists->Add(fDcaSigmaPos[i]);
1006 fHists->Add(fDcaSigmaNeg[i]);
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);
1021 fHists->Add(fRecPtPosEtaPos);
1022 fHists->Add(fRecPtNegEtaPos);
1023 fHists->Add(fRecPtPosEtaNeg);
1024 fHists->Add(fRecPtNegEtaNeg);
1026 fHists->Add(fRec1PtPosEtaPos);
1027 fHists->Add(fRec1PtNegEtaPos);
1028 fHists->Add(fRec1PtPosEtaNeg);
1029 fHists->Add(fRec1PtNegEtaNeg);
1032 fHists->Add(fRecPhiPosEtaPos);
1033 fHists->Add(fRecPhiNegEtaPos);
1034 fHists->Add(fRecPhiPosEtaNeg);
1035 fHists->Add(fRecPhiNegEtaNeg);
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);
1046 fHists->Add(fRecDcaPosPtEtaPos);
1047 fHists->Add(fRecDcaNegPtEtaPos);
1048 fHists->Add(fRecDcaPosPtEtaNeg);
1049 fHists->Add(fRecDcaNegPtEtaNeg);
1051 // fHists->Add(fRecDcaPhiPtPosEtaPos);
1052 // fHists->Add(fRecDcaPhiPtPosEtaNeg);
1053 // fHists->Add(fRecDcaPhiPtNegEtaPos);
1054 // fHists->Add(fRecDcaPhiPtNegEtaNeg);
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]);
1066 // for (Int_t i=0; i<fHists->GetEntries(); ++i) {
1067 // TH1 *h1 = dynamic_cast<TH1*>(fHists->At(i));
1069 // // Printf("%s ",h1->GetName());
1074 TH1::AddDirectory(oldStatus);
1075 PostData(1, fHists);
1079 //__________________________________________________________
1081 void AliAnalysisTaskQASym::UserExec(Option_t *)
1083 // QA of global, TPC, ITS and ITS stand alone tracks
1084 // exploiting basic symmetries
1086 AliVEvent *event = InputEvent();
1088 Printf("ERROR: Could not retrieve event");
1094 AliESDEvent* esd = dynamic_cast<AliESDEvent*>(event);
1096 Printf("We are reading from ESD");
1103 if(fDebug>1)Printf("There are %d tracks in this event", event->GetNumberOfTracks());
1106 Int_t leadingTrack = 0;
1107 Float_t leadingEnergy = -20.;
1108 Float_t leadingPhi = 0;//TMath::Pi();
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);
1119 //check primary vertex
1120 const AliVVertex* vertex = event->GetPrimaryVertex();
1121 if(vertex->GetNContributors()==0) return;
1122 Float_t vx = vertex->GetX();
1123 Float_t vy = vertex->GetY();
1124 Float_t vz = vertex->GetZ();
1130 if (TMath::Abs(vz) > 10.) return;
1132 fNumber->Fill(event->GetNumberOfTracks());
1134 AliESDtrack *tpcP = 0x0;
1135 Int_t fNTracksAccepted=0;
1136 const Int_t arrSize = event->GetNumberOfTracks();
1137 Float_t * phiArray = new Float_t[arrSize];
1138 Float_t * etaArray = new Float_t[arrSize];
1139 Float_t * ptArray = new Float_t[arrSize];
1140 Float_t * dcaArray = new Float_t[arrSize];
1141 Int_t * chargeArray = new Int_t [arrSize];
1142 Bool_t * acceptedArray = new Bool_t [arrSize];
1144 for (Int_t i = 0; i < event->GetNumberOfTracks(); i++) {
1150 acceptedArray[i]= kFALSE;
1156 for (Int_t iTrack = 0; iTrack < event->GetNumberOfTracks(); iTrack++) {
1158 //prevent mem leak for TPConly track
1159 if(fTrackType==2&&tpcP){
1164 AliVParticle *track = event->GetTrack(iTrack);
1165 AliESDtrack *esdtrack = dynamic_cast<AliESDtrack*>(track);
1166 esdtrack->PropagateToDCA(event->GetPrimaryVertex(),
1167 event->GetMagneticField(), 10000.);
1170 Printf("ERROR: Could not receive track %d", iTrack);
1174 // run Task for global tracks or ITS tracks or TPC tracks
1175 const AliExternalTrackParam *tpcPin = 0x0;
1179 //Fill all histograms with global tracks
1181 phiIn = tpcP->Phi();
1182 if (!tpcP) continue;
1183 if (!fCuts->AcceptTrack(tpcP)) continue;
1185 else if(fTrackType==1){
1186 //Fill all histograms with ITS tracks
1188 phiIn = tpcP->Phi();
1189 if (!tpcP) continue;
1190 if (!fCuts->AcceptTrack(tpcP)) continue;
1191 if(fStandAlone==kTRUE) {
1192 if(!(tpcP->GetStatus()&AliESDtrack::kITSpureSA))continue;
1194 else if(fStandAlone==kFALSE){
1195 if(tpcP->GetStatus()&AliESDtrack::kITSpureSA)continue;
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();
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
1211 Printf("ERROR: wrong track type \n");
1219 phiArray[iTrack] = phiIn;
1220 etaArray[iTrack] = tpcP->Eta();
1221 ptArray[iTrack] = tpcP->Pt();
1222 chargeArray[iTrack] = tpcP->Charge();
1223 acceptedArray[iTrack]= kTRUE;
1226 if(tpcP->E()>leadingEnergy){
1227 leadingTrack=iTrack;
1228 leadingEnergy=tpcP->E();
1233 fqRec->Fill(tpcP->Charge());
1236 Double_t fSigmaPt = tpcP->GetSigma1Pt2();
1237 fSigmaPt= sqrt(fSigmaPt);
1238 fSigmaPt= fSigmaPt *(tpcP->Pt()*tpcP->Pt());
1240 if(TMath::Abs(fSigmaPt) < 1.e-10) continue;
1242 fSigmaPtHist->Fill(TMath::Log10(fSigmaPt));
1245 // hits in ITS layer
1247 if(tpcP->HasPointOnITSLayer(0))
1249 else if(!tpcP->HasPointOnITSLayer(0)
1250 && tpcP->HasPointOnITSLayer(1))
1252 else if(!tpcP->HasPointOnITSLayer(0)
1253 && !tpcP->HasPointOnITSLayer(1)
1254 && tpcP->HasPointOnITSLayer(2))
1256 else if(!tpcP->HasPointOnITSLayer(0)
1257 && !tpcP->HasPointOnITSLayer(1)
1258 && !tpcP->HasPointOnITSLayer(2)
1259 && tpcP->HasPointOnITSLayer(3))
1261 else if(!tpcP->HasPointOnITSLayer(0)
1262 && !tpcP->HasPointOnITSLayer(1)
1263 && !tpcP->HasPointOnITSLayer(2)
1264 && !tpcP->HasPointOnITSLayer(3)
1265 && tpcP->HasPointOnITSLayer(4))
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))
1279 //-------------------
1280 Float_t fXVertexCor = 0.;
1281 Float_t fYVertexCor = 0.;
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();
1288 fqPtRec[cas]->Fill(tpcP->Charge()/tpcP->Pt());
1292 fHistRECpt->Fill(tpcP->Pt());
1293 fEta->Fill(tpcP->Eta());
1294 fEtavPt->Fill(tpcP->Eta(), TMath::Log(tpcP->Pt()));
1295 fPhivPt->Fill(phiIn, TMath::Log(tpcP->Pt()));
1296 fEtaPhi->Fill(tpcP->Eta(), phiIn);
1297 fThetaRec->Fill(tpcP->Theta());
1298 fPhiRec->Fill(phiIn);
1299 fVx->Fill(tpcP->Xv());
1300 fVy->Fill(tpcP->Yv());
1301 fVz->Fill(tpcP->Zv());
1304 fEtaPt->Fill(tpcP->Eta()/tpcP->Pt());
1305 fQPt->Fill(tpcP->Charge()/tpcP->Pt());
1306 fDca->Fill(fSignedDca);
1307 dcaArray[iTrack]=fSignedDca;
1308 fRecQPtPhi->Fill(tpcP->Charge()/tpcP->Pt(), phiIn);
1313 tpcP->GetImpactParameters(fXY,fZ);
1314 fDiffDcaD->Fill(fSignedDca+fXY);
1316 if(fTrackType==2) fCompareTPCparam->Fill(fZ,tpcPin->GetTgl());
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);
1322 fITSlayerEta->Fill(itsLayer, tpcP->Eta());
1323 fITSlayerPhi->Fill(itsLayer, tpcP->Phi());
1328 //for positive particles
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());
1334 fRecPhiPos->Fill(TMath::RadToDeg()*phiIn);
1337 fRecPhiPosLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1338 fRecPhiPosVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
1339 fSignedDcaPosVz->Fill(fSignedDca,tpcP->Zv());
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());
1347 fRecDcaPos->Fill(fSignedDca);
1348 fRecDcaPosPhi->Fill(fSignedDca, phiIn);
1349 fRecPtPosPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1350 fRecEtaPtPosPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
1351 fRecEtaPosPhi->Fill(tpcP->Eta(), phiIn);
1352 fRecDPos->Fill(fXY);
1353 fSignDcaPos[cas]->Fill(fSignedDca);
1356 fDcaSigmaPos[cas]->Fill(fSignedDca, TMath::Log10(fSigmaPt));
1358 fPtSigmaPos[cas]->Fill(TMath::Log10(fSigmaPt));
1361 fRecPtPosEtaPos->Fill(tpcP->Pt());
1362 fRec1PtPosEtaPos->Fill(1/tpcP->Pt());
1363 fRecPhiPosEtaPos->Fill(phiIn);
1364 fRecDcaPosPhiEtaPos->Fill(fSignedDca, phiIn);
1365 fRecDcaPosPtEtaPos->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1366 fRecPtPosPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1367 //fRecDcaPhiPtPosEtaPos->Fill(phiIn, tpcP->Pt(), fSignedDca);
1371 fRecPtPosEtaNeg->Fill(tpcP->Pt());
1372 fRec1PtPosEtaNeg->Fill(1/tpcP->Pt());
1373 fRecPhiPosEtaNeg->Fill(phiIn);
1374 fRecDcaPosPhiEtaNeg->Fill(fSignedDca, phiIn);
1375 fRecDcaPosPtEtaNeg->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1376 fRecPtPosPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1377 //fRecDcaPhiPtPosEtaNeg->Fill(phiIn, tpcP->Pt(), fSignedDca);
1381 //and negative particles
1383 fRecPtNeg->Fill(tpcP->Pt());
1384 fRecPtNegLadder[cas]->Fill(tpcP->Pt());
1385 fRecPtNegVz->Fill(TMath::Log10(tpcP->Pt()),tpcP->Zv());
1387 fRecPhiNeg->Fill(TMath::RadToDeg()*phiIn);
1388 fRecPhiNegLadder[cas]->Fill(TMath::RadToDeg()*phiIn);
1389 fRecPhiNegVz->Fill(TMath::RadToDeg()*phiIn,tpcP->Zv());
1390 fSignedDcaNegVz->Fill(fSignedDca,tpcP->Zv());
1391 fRecEtaPtNegVz->Fill(tpcP->Eta()/tpcP->Pt(),tpcP->Zv());
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());
1398 fRecDcaNeg->Fill(fSignedDca);
1399 fRecDcaNegInv->Fill(-fSignedDca);
1400 fRecDcaNegPhi->Fill(fSignedDca, phiIn);
1401 fRecPtNegPhi->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1402 fRecEtaNegPhi->Fill(tpcP->Eta(), phiIn);
1403 fRecEtaPtNegPhi->Fill(tpcP->Eta()/tpcP->Pt(), phiIn);
1404 fRecDNeg->Fill(fXY);
1405 fSignDcaNeg[cas]->Fill(fSignedDca);
1406 fSignDcaNegInv[cas]->Fill(-fSignedDca);
1409 fDcaSigmaNeg[cas]->Fill(fSignedDca,TMath::Log10(fSigmaPt));
1411 fPtSigmaNeg[cas]->Fill(TMath::Log10(fSigmaPt));
1415 fRecPtNegEtaPos->Fill(tpcP->Pt());
1416 fRec1PtNegEtaPos->Fill(1/tpcP->Pt());
1417 fRecPhiNegEtaPos->Fill(phiIn);
1418 fRecDcaNegPhiEtaPos->Fill(fSignedDca, phiIn);
1419 fRecDcaNegPtEtaPos->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1420 fRecPtNegPhiEtaPos->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1421 //fRecDcaPhiPtNegEtaPos->Fill(phiIn, tpcP->Pt(), fSignedDca);
1425 fRecPtNegEtaNeg->Fill(tpcP->Pt());
1426 fRec1PtNegEtaNeg->Fill(1/tpcP->Pt());
1427 fRecPhiNegEtaNeg->Fill(phiIn);
1428 fRecDcaNegPhiEtaNeg->Fill(fSignedDca, phiIn);
1429 fRecDcaNegPtEtaNeg->Fill(fSignedDca, TMath::Log10(tpcP->Pt()));
1430 fRecPtNegPhiEtaNeg->Fill(TMath::Log10(tpcP->Pt()), phiIn);
1431 //fRecDcaPhiPtNegEtaNeg->Fill(phiIn, tpcP->Pt(), fSignedDca);
1438 //all particles with positive eta
1440 fRecQPtPosEta->Fill(tpcP->Charge()/tpcP->Pt());
1441 fRecPtPosEta->Fill(tpcP->Pt());
1442 fRecPhiPosEta->Fill(TMath::RadToDeg()*phiIn);
1443 fRecQPtPosEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
1444 fRecDcaPosEta->Fill(fSignedDca);
1445 fRecDPosEta->Fill(fXY);
1447 //all particles with negative eta (and eta==0)
1449 fRecQPtNegEta->Fill(tpcP->Charge()/tpcP->Pt());
1450 fRecPtNegEta->Fill(tpcP->Pt());
1451 fRecPhiNegEta->Fill(TMath::RadToDeg()*phiIn);
1452 fRecQPtNegEtaVz->Fill(tpcP->Charge()/tpcP->Pt(),tpcP->Zv());
1453 fRecDcaNegEta->Fill(fSignedDca);
1454 fRecDNegEta->Fill(fXY);
1459 fRecPtTpcSector[Int_t(phiIn*
1460 TMath::RadToDeg()/20)]->Fill(tpcP->Pt());
1461 fRecEtaTpcSector[Int_t(phiIn*
1462 TMath::RadToDeg()/20)]->Fill(tpcP->Eta());
1463 fSignedDcaTpcSector[Int_t(phiIn*
1464 TMath::RadToDeg()/20)]->Fill(fSignedDca);
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());
1472 // // another track loop
1473 // for (Int_t iTrack2 = 0; iTrack2 < event->GetNumberOfTracks(); iTrack2++) {
1475 // if(LeadingTrack==iTrack2) continue;
1477 // AliVParticle *track2 = event->GetTrack(iTrack2);
1478 // AliESDtrack* esdtrack2 = dynamic_cast<AliESDtrack*>(track2);
1480 // Printf("ERROR: Could not receive track %d", iTrack);
1483 // if (!fCuts->AcceptTrack(esdtrack2)) continue;
1484 // //propagate to dca
1485 // esdtrack2->PropagateToDCA(event->GetPrimaryVertex(),
1486 // event->GetMagneticField(), 10000.);
1488 // fDeltaPhiLeading->Fill((LeadingPhi-esdtrack2->Phi())*TMath::RadToDeg(),
1489 // LeadingPhi*TMath::RadToDeg() );
1493 // }//second track loop
1495 // if(fTrackType==2) delete tpcP; // delete in case of TPCOnlyTrack
1499 fNumberAfterCut->Fill(fNTracksAccepted);
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]);
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]);
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]);
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]);
1534 //prevent mem leak for TPConly track
1535 if(fTrackType==2&&tpcP){
1561 delete[] chargeArray;
1566 delete[] acceptedArray;
1570 // Post output data.
1571 // PostData(1, fHistPt);
1572 PostData(1, fHists);
1579 //________________________________________________________________________
1580 void AliAnalysisTaskQASym::Terminate(Option_t *)