17 #include "TParticle.h"
19 #include "TDatabasePDG.h"
24 #include "AliAODPWG4Particle.h"
27 #include "AliVTrack.h"
28 #include "AliAODMCParticle.h"
29 #include "AliAODTrack.h"
30 #include "AliAODEvent.h"
31 #include "AliESDEvent.h"
42 fFillTrackBCHistograms(0), fFillVertexBC0Histograms(0),
43 fFillEtaPhiRegionHistograms(0),
46 fhNtracks(0), fhPt(0), fhPtNoCut(0),
47 fhPtCutDCA(0), fhPtCutDCABCOK(0),
48 fhPtNotPrimary(), fhPtNotSharedClusterCut(0),
49 fhPhiNeg(0), fhEtaNeg(0),
50 fhPhiPos(0), fhEtaPos(0),
51 fhEtaPhiPos(0), fhEtaPhiNeg(0),
53 fhPtVtxOutBC0(0), fhEtaPhiVtxOutBC0(0),
54 fhPtVtxInBC0(0), fhEtaPhiVtxInBC0(0),
55 fhPtSPDRefit(0), fhPtNoSPDRefit(0), fhPtNoSPDNoRefit(0),
56 fhEtaPhiSPDRefitPt02(0), fhEtaPhiNoSPDRefitPt02(0), fhEtaPhiNoSPDNoRefitPt02(0),
57 fhEtaPhiSPDRefitPt3(0), fhEtaPhiNoSPDRefitPt3(0), fhEtaPhiNoSPDNoRefitPt3(0),
59 fhTOFSignal(0), fhTOFSignalPtCut(0), fhTOFSignalBCOK(0),
60 fhPtTOFSignal(0), fhPtTOFSignalDCACut(0),
61 fhPtTOFSignalVtxOutBC0(0), fhPtTOFSignalVtxInBC0(0),
62 fhPtTOFStatus0(0), fhEtaPhiTOFStatus0(0),
63 fhEtaPhiTOFBC0(0), fhEtaPhiTOFBCPlus(0), fhEtaPhiTOFBCMinus(0),
64 fhEtaPhiTOFBC0PileUpSPD(0),
65 fhEtaPhiTOFBCPlusPileUpSPD(0),
66 fhEtaPhiTOFBCMinusPileUpSPD(0),
67 fhProductionVertexBC(0),
68 fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
69 fhPtNPileUpSPDVtxBC0(0), fhPtNPileUpTrkVtxBC0(0)
71 for(
Int_t i = 0; i < 7; i++)
80 for(
Int_t i = 0; i < 3; i++)
105 for(
Int_t i = 0; i < 18; i++)
107 for(
Int_t j = 0; j < 2; j++)
115 for(
Int_t imcPart = 0; imcPart < 6; imcPart++)
137 TParticle * primStack = 0;
138 AliAODMCParticle * primAOD = 0;
141 AliStack * stack = 0;
146 nprim = stack->GetNtrack();
150 TClonesArray * mcparticles = 0;
154 if( !mcparticles )
return;
155 nprim = mcparticles->GetEntriesFast();
158 for(
Int_t i=0 ; i < nprim; i++)
160 if ( !
GetReader()->AcceptParticleMCLabel( i ) ) continue ;
164 primStack = stack->Particle(i) ;
167 AliWarning(
"ESD primaries pointer not available!!");
171 if( primStack->GetStatusCode() != 1 )
continue;
173 Int_t charge = (
Int_t )TDatabasePDG::Instance()->GetParticle(primStack->GetPdgCode())->Charge();
174 if( TMath::Abs(charge) == 0 )
continue;
176 pdg = TMath::Abs(primStack->GetPdgCode());
179 if ( primStack->Energy() == TMath::Abs(primStack->Pz()) ||
180 (primStack->Energy() - primStack->Pz()) < 1e-3 ||
181 (primStack->Energy() + primStack->Pz()) < 0 ) continue ;
191 primAOD = (AliAODMCParticle *) mcparticles->At(i);
194 AliWarning(
"AOD primaries pointer not available!!");
198 if( primAOD->GetStatus() != 1 )
continue;
200 if(TMath::Abs(primAOD->Charge()) == 0 )
continue;
202 pdg = TMath::Abs(primAOD->GetPdgCode());
205 if ( primAOD->E() == TMath::Abs(primAOD->Pz()) ||
206 (primAOD->E() - primAOD->Pz()) < 1e-3 ||
207 (primAOD->E() + primAOD->Pz()) < 0 ) continue ;
210 fMomentum.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
214 if (pdg==211 ) mcType =
kmcPion;
216 else if(pdg==321 ) mcType =
kmcKaon;
218 else if(pdg==13 ) mcType =
kmcMuon;
225 if(phiPrim < 0) phiPrim+=TMath::TwoPi();
244 outputContainer->SetName(
"ChargedParticleHistos") ;
250 fhNtracks =
new TH1F (
"hNtracks",
"# of tracks", 1000,0,1000);
254 fhPt =
new TH1F (
"hPt",
"#it{p}_{T} distribution", nptbins,ptmin,ptmax);
255 fhPt->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
256 outputContainer->Add(
fhPt);
260 for(
Int_t i = 0; i < 18; i++)
262 for(
Int_t j = 0; j < 2; j++)
265 (Form(
"hPt_Sector%d_Side%d",i,j),
266 Form(
"#it{p}_{T} distribution per region (%d,%d)",i,j),
267 nptbins,ptmin,ptmax);
272 (Form(
"hSumPt_Sector%d_Side%d",i,j),
273 Form(
"#Sigma #it{p}_{T} distribution per region (%d,%d)",i,j),
274 nptbins,ptmin,ptmax);
281 fhPtNoCut =
new TH1F (
"hPtNoCut",
"#it{p}_{T} distribution, raw tracks", nptbins,ptmin,ptmax);
282 fhPtNoCut->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
287 fhPtCutDCA =
new TH1F (
"hPtCutDCA",
"#it{p}_{T} distribution, cut DCA", nptbins,ptmin,ptmax);
288 fhPtCutDCA->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
294 fhPtCutDCABCOK =
new TH1F (
"hPtCutDCABCOK",
"#it{p}_{T} distribution, DCA cut, track BC=0 or -100", nptbins,ptmin,ptmax);
301 fhPtNotPrimary =
new TH1F (
"hPtNotPrimary",
"#it{p}_{T} distribution, not primary", nptbins,ptmin,ptmax);
305 fhPtNotSharedClusterCut =
new TH1F (
"hPtNotSharedClusterCut",
"#it{p}_{T} distribution, shared clusters cut out", nptbins,ptmin,ptmax);
310 fhPhiNeg =
new TH2F (
"hPhiNegative",
"#phi of negative charges distribution",
311 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
313 fhPhiNeg->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
316 fhEtaNeg =
new TH2F (
"hEtaNegative",
"#eta of negative charges distribution",
317 nptbins,ptmin,ptmax, netabins,etamin,etamax);
319 fhEtaNeg->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
322 fhPhiPos =
new TH2F (
"hPhiPositive",
"#phi of positive charges distribution",
323 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
325 fhPhiPos->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
328 fhEtaPos =
new TH2F (
"hEtaPositive",
"#eta of positive charges distribution",
329 nptbins,ptmin,ptmax, netabins,etamin,etamax);
331 fhEtaPos->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
334 fhEtaPhiPos =
new TH2F (
"hEtaPhiPositive",
"pt/eta/phi of positive charge",netabins,etamin,etamax, nphibins,phimin,phimax);
339 fhEtaPhiNeg =
new TH2F (
"hEtaPhiNegative",
"#eta vs #phi of negative charge",netabins,etamin,etamax, nphibins,phimin,phimax);
346 fhTrackResolution =
new TH2F (
"hTrackResolution",
"Track resolution: #sigma_{#it{p}_{T}} vs #it{p}_{T}, ESDs",
347 nptbins,ptmin,ptmax,600,0,0.3);
355 fhPtVtxOutBC0 =
new TH1F (
"hPtVtxOutBC0",
"#it{p}_{T} distribution, vertex in BC=0", nptbins,ptmin,ptmax);
359 fhEtaPhiVtxOutBC0 =
new TH2F (
"hEtaPhiVtxOutBC0",
"#eta vs #phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
364 fhPtVtxInBC0 =
new TH1F (
"hPtVtxInBC0",
"#it{p}_{T} distribution, vertex in BC=0", nptbins,ptmin,ptmax);
368 fhEtaPhiVtxInBC0 =
new TH2F (
"hEtaPhiVtxInBC0",
"#eta vs #phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
374 fhPtSPDRefit =
new TH1F (
"hPtSPDRefit",
"#it{p}_{T} distribution of tracks with SPD and ITS refit", nptbins,ptmin,ptmax);
378 fhEtaPhiSPDRefitPt02 =
new TH2F (
"hEtaPhiSPDRefitPt02",
"#eta vs #phi of tracks with SPD and ITS refit, #it{p}_{T}< 2 GeV/#it{c}",
379 netabins,etamin,etamax, nphibins,phimin,phimax);
384 fhEtaPhiSPDRefitPt3 =
new TH2F (
"hEtaPhiSPDRefitPt3",
"#eta vs #phi of tracks with SPD and ITS refit, #it{p}_{T}> 3 GeV/#it{c}",
385 netabins,etamin,etamax, nphibins,phimin,phimax);
390 fhPtNoSPDRefit =
new TH1F (
"hPtNoSPDRefit",
"#it{p}_{T} distribution of constrained tracks no SPD and with ITSRefit",
391 nptbins,ptmin,ptmax);
395 fhEtaPhiNoSPDRefitPt02 =
new TH2F (
"hEtaPhiNoSPDRefitPt02",
"#eta vs #phi of constrained tracks no SPD and with ITSRefit, #it{p}_{T}< 2 GeV/#it{c}",
396 netabins,etamin,etamax, nphibins,phimin,phimax);
401 fhEtaPhiNoSPDRefitPt3 =
new TH2F (
"hEtaPhiNoSPDRefitPt3",
"#eta vs #phi of of constrained tracks no SPD and with ITSRefit, #it{p}_{T}> 3 GeV/#it{c}",
402 netabins,etamin,etamax, nphibins,phimin,phimax);
407 fhPtNoSPDNoRefit =
new TH1F (
"hPtNoSPDNoRefit",
"#it{p}_{T} distribution of constrained tracks with no SPD requierement and without ITSRefit",
408 nptbins,ptmin,ptmax);
413 "#eta vs #phi of constrained tracks with no SPD requierement and without ITSRefit, #it{p}_{T}< 2 GeV/#it{c}",
414 netabins,etamin,etamax, nphibins,phimin,phimax);
420 "#eta vs #phi of constrained tracks with no SPD requierement and without ITSRefit, #it{p}_{T}> 3 GeV/#it{c}",
421 netabins,etamin,etamax, nphibins,phimin,phimax);
428 fhProductionVertexBC =
new TH1F(
"hProductionVertexBC",
"tracks production vertex bunch crossing ", 41 , -20 , 20 ) ;
434 Int_t ntofbins = 1000;
438 fhTOFSignal =
new TH1F (
"hTOFSignal",
"TOF signal", ntofbins,mintof,maxtof);
444 fhTOFSignalBCOK =
new TH1F (
"hTOFSignalBCOK",
"TOF signal", ntofbins,mintof,maxtof);
449 fhTOFSignalPtCut =
new TH1F (
"hTOFSignalPtCut",
"TOF signal", ntofbins,mintof,maxtof);
453 fhPtTOFSignal =
new TH2F (
"hPtTOFSignal",
"TOF signal", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
460 fhPtTOFSignalDCACut =
new TH2F (
"hPtTOFSignalDCACut",
"TOF signal after DCA cut", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
468 fhPtTOFSignalVtxOutBC0 =
new TH2F (
"hPtTOFSignalVtxOutBC0",
"TOF signal, vtx BC!=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
473 fhPtTOFSignalVtxInBC0 =
new TH2F (
"hPtTOFSignalVtxInBC0",
"TOF signal, vtx BC=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
481 TString pileUpName[] = {
"SPD",
"EMCAL",
"SPDOrEMCAL",
"SPDAndEMCAL",
"SPDAndNotEMCAL",
"EMCALAndNotSPD",
"NotSPDAndNotEMCAL"} ;
483 for(
Int_t i = 0 ; i < 7 ; i++)
485 fhPtPileUp[i] =
new TH1F(Form(
"hPtPileUp%s",pileUpName[i].
Data()),
486 Form(
"Track #it{p}_{T}distribution, %s Pile-Up event",pileUpName[i].
Data()),
487 nptbins,ptmin,ptmax);
488 fhPtPileUp[i]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
492 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event",pileUpName[i].
Data()),
493 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
501 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event, vtx BC!=0",pileUpName[i].
Data()),
502 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
508 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event, vtx BC=0",pileUpName[i].
Data()),
509 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
518 Form(
"tracks production vertex bunch crossing, %s Pile-Up event",pileUpName[i].
Data()),
528 fhEtaPhiTOFBC0 =
new TH2F (
"hEtaPhiTOFBC0",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
533 fhEtaPhiTOFBCPlus =
new TH2F (
"hEtaPhiTOFBCPlus",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC>0",netabins,etamin,etamax, nphibins,phimin,phimax);
538 fhEtaPhiTOFBCMinus =
new TH2F (
"hEtaPhiTOFBCMinus",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC<0",netabins,etamin,etamax, nphibins,phimin,phimax);
545 fhEtaPhiTOFBC0PileUpSPD =
new TH2F (
"hEtaPhiTOFBC0PileUpSPD",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC=0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax);
550 fhEtaPhiTOFBCPlusPileUpSPD =
new TH2F (
"hEtaPhiTOFBCPlusPileUpSPD",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC>0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax);
555 fhEtaPhiTOFBCMinusPileUpSPD =
new TH2F (
"hEtaPhiTOFBCMinusPileUpSPD",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC<0, SPD pile-up",netabins,etamin,etamax, nphibins,phimin,phimax);
563 fhPtTOFStatus0 =
new TH1F (
"hPtTOFStatus0",
"#it{p}_{T} distribution of tracks not hitting TOF", nptbins,ptmin,ptmax);
568 fhEtaPhiTOFStatus0 =
new TH2F (
"hEtaPhiTOFStatus0",
"eta-phi for tracks without hit on TOF",netabins,etamin,etamax, nphibins,phimin,phimax);
573 TString dcaName[] = {
"xy",
"z",
"Cons"} ;
574 Int_t ndcabins = 800;
578 for(
Int_t i = 0 ; i < 3 ; i++)
581 Form(
"Track DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
582 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
583 fhPtDCA[i]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
584 fhPtDCA[i]->SetYTitle(Form(
"DCA_{%s}",dcaName[i].
Data()));
585 outputContainer->Add(
fhPtDCA[i]);
588 Form(
"Track DCA%s vs #it{p}_{T}distribution of tracks with SPD and ITS refit",dcaName[i].
Data()),
589 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
595 Form(
"Track DCA%s vs #it{p}_{T}distributionof constrained tracks no SPD and with ITSRefit",dcaName[i].
Data()),
596 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
602 Form(
"Track DCA%s vs #it{p}_{T}distribution, constrained tracks with no SPD requierement and without ITSRefit",dcaName[i].
Data()),
603 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
611 Form(
"Track DCA%s vs #it{p}_{T}distribution, BC=0",dcaName[i].
Data()),
612 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
618 Form(
"Track DCA%s vs #it{p}_{T}distribution, BC!=0",dcaName[i].
Data()),
619 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
626 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
627 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
635 Form(
"Track DCA%s vs #it{p}_{T}distribution, vertex with BC!=0",dcaName[i].
Data()),
636 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
642 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, vertex with BC!=0",dcaName[i].
Data()),
643 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
649 Form(
"Track DCA%s vs #it{p}_{T}distribution, vertex with BC==0",dcaName[i].
Data()),
650 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
656 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, vertex with BC==0",dcaName[i].
Data()),
657 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
666 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up",dcaName[i].
Data()),
667 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
675 Form(
"Track DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
676 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
683 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
684 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
692 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
693 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
699 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
700 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
706 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up,vertex with BC==0",dcaName[i].
Data()),
707 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
713 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC==0",dcaName[i].
Data()),
714 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
726 TString histoName[] = {
"Pion",
"Proton",
"Kaon",
"Muon",
"Electron",
"Unknown"};
727 TString titleName[] = {
"#pi^{#pm}",
"p^{#pm}",
"K^{#pm}",
"#mu^{#pm}",
"e^{#pm}",
"x^{#pm}"};
729 for(
Int_t imcPart = 0; imcPart < 6; imcPart++)
731 fhPtMCPart[imcPart] =
new TH1F (Form(
"hPtMC%s",histoName[imcPart].
Data()),
732 Form(
"reconstructed #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
733 nptbins,ptmin,ptmax);
734 fhPtMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
738 Form(
"reconstructed #phi vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
739 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
741 fhPhiMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
745 Form(
"reconstructed #eta vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
746 nptbins,ptmin,ptmax, netabins,etamin,etamax);
748 fhEtaMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
752 Form(
"generated #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
753 nptbins,ptmin,ptmax);
758 Form(
"generated #phi vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
759 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
765 Form(
"generated #eta vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
766 nptbins,ptmin,ptmax, netabins,etamin,etamax);
774 nptbins,ptmin,ptmax,20,0,20);
780 nptbins,ptmin,ptmax, 20,0,20 );
788 nptbins,ptmin,ptmax,20,0,20);
794 nptbins,ptmin,ptmax, 20,0,20 );
800 return outputContainer;
822 printf(
"**** Print %s %s ****\n", GetName(), GetTitle() ) ;
825 printf(
"Min Pt = %3.2f\n",
GetMinPt());
826 printf(
"Max Pt = %3.2f\n",
GetMaxPt());
835 AliFatal(
"STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!");
849 AliDebug(1,Form(
"In CTS aod entries %d", ntracks));
880 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
881 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
886 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
887 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
893 Double_t bz =
event->GetMagneticField();
900 for(
Int_t i = 0; i < ntracks; i++)
902 AliVTrack * track = (AliVTrack*) (
GetCTSTracks()->At(i));
913 AliAODTrack * aodTrack =
dynamic_cast<AliAODTrack*
>(track);
914 AliESDtrack * esdTrack =
dynamic_cast<AliESDtrack*
>(track);
928 if ( aodTrack->GetType()!= AliAODTrack::kPrimary )
933 ULong_t status = track->GetStatus();
934 Bool_t okTOF = (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ;
935 Double32_t tof = track->GetTOFsignal()*1e-3;
941 dcaCons = aodTrack->DCA();
947 track->PropagateToDCA(
GetReader()->GetInputEvent()->GetPrimaryVertex(),bz,100.,dca,covar);
967 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1013 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1046 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1081 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1123 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1129 Int_t trackBC = 1000;
1133 trackBC = track->GetTOFBunchCrossing(bz);
1158 else if(trackBC!=AliVTrack::kTOFBCNA)
1188 else if (trackBC < 0 )
1194 else if (trackBC > 0)
1204 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1229 fMomentum.SetPxPyPzE(track->Px(),track->Py(),track->Pz(),0);
1232 AliDebug(1,Form(
"Track pt %2.2f, eta %2.2f, phi %2.2f in fiducial cut %d",pt,eta,phi,in));
1247 Bool_t bITSRefit = (status & AliVTrack::kITSrefit) == AliVTrack::kITSrefit;
1248 Bool_t bConstrained = kFALSE;
1249 if (aodTrack) bConstrained = aodTrack->IsGlobalConstrained();
1250 else if(esdTrack) bConstrained = (!esdTrack->HasPointOnITSLayer(0) && !esdTrack->HasPointOnITSLayer(1));
1308 AliAODPWG4Particle tr = AliAODPWG4Particle(track->Px(),track->Py(),track->Pz(),0);
1309 tr.SetDetectorTag(
kCTS);
1310 tr.SetLabel(track->GetLabel());
1311 tr.SetTrackLabel(
GetReader()->GetTrackID(track),-1);
1312 tr.SetChargedBit(track->Charge()>0);
1317 AliDebug(1,Form(
"Final aod branch entries %d",
GetOutputAODBranch()->GetEntriesFast()));
1332 AliDebug(1,Form(
"AOD branch entries %d", naod));
1339 for(
Int_t i = 0; i < 18; i++)
1340 for(
Int_t j = 0; j < 2; j++)
1343 for(
Int_t iaod = 0; iaod < naod ; iaod++)
1362 sum[sector][side]+=pt;
1365 if(track->GetChargedBit())
1393 Int_t label = track->GetLabel();
1399 TParticle * mom =
GetMCStack()->Particle(label);
1400 mompdg =TMath::Abs(mom->GetPdgCode());
1404 AliAODMCParticle * aodmom = 0;
1407 mompdg =TMath::Abs(aodmom->GetPdgCode());
1412 if (mompdg==211 ) mcType =
kmcPion;
1413 else if(mompdg==2212) mcType =
kmcProton;
1414 else if(mompdg==321 ) mcType =
kmcKaon;
1416 else if(mompdg==13 ) mcType =
kmcMuon;
1428 for(
Int_t i = 0; i < 18; i++)
1430 for(
Int_t j = 0; j < 2; j++)
virtual Bool_t IsFiducialCutOn() const
Float_t GetHistoPtMax() const
TH2F * fhPtDCAVtxInBC0PileUpNoTOFHit[3]
! DCA (xy,z,constrained) of all tracks, vertex BC=0, SPD pile-up, no hit in TOF
Float_t GetHistoPtMin() const
virtual TObjArray * GetCTSTracks() const
virtual Float_t GetMaxPt() const
TH2F * fhPtDCANoTOFHit[3]
! DCA (xy,z,constrained) of all tracks, no hit in TOF
TH2F * fhPtDCAPileUpNoTOFHit[3]
! DCA (xy,z,constrained) of all tracks, SPD pile-up, no hit in TOF
TH2F * fhPtDCATOFBCOut[3]
! DCA (xy,z,constrained) of all tracks, hit in TOF and BC!=0
virtual Int_t GetTrackMultiplicity() const
Bool_t fFillTrackBCHistograms
Fill histograms for tracks with TOF BC=0 or not related histograms.
TH2F * fhPtTOFSignalVtxInBC0
! TOF signal vs track pT, good status
Int_t GetTrackSector(Float_t trackPhi) const
TH1F * fhPtNotSharedClusterCut
! pT spectra of tracks not passing the shared clusters cut (AOD)
virtual void AddToHistogramsName(TString add)
Bool_t GetTrackSide(Float_t trackEta) const
TH2F * fhPtTOFSignalVtxInBC0PileUp[7]
! TOF signal vs track pT, good status, pile-up
TH1F * fhTOFSignalPtCut
! TOF signal pt and acceptance cut
TH2F * fhPtDCAVtxOutBC0PileUp[3]
! DCA (xy,z,constrained) of all tracks, vertex BC!=0, SPD pile-up
TH2F * fhPtDCAVtxOutBC0NoTOFHit[3]
! DCA (xy,z,constrained) of all tracks, vertex BC!=0, no hit in TOF
virtual Bool_t IsDataMC() const
TH2F * fhPtTOFSignalPileUp[7]
! TOF signal vs track pT, good status, pile-up
virtual AliStack * GetMCStack() const
Bool_t ReadAODMCParticles() const
virtual void GetVertex(Double_t vertex[3]) const
TH2F * fhPtTOFSignalDCACut
! TOF signal vs track pT, good status
TH2F * fhPtNPileUpSPDVtx
! cluster pt vs number of spd pile-up vertices
Int_t GetVertexBC(const AliVVertex *vtx)
virtual AliVEvent * GetInputEvent() const
TH1F * fhProductionVertexBCPileUp[7]
! Check BC of production vertex, pile-up
TH2F * fhEtaPhiNoSPDRefitPt3
! eta-phi distribution of constrained tracks no SPD and with ITSRefit, pT > 3 GeV ...
TH2F * fhEtaPhiTOFBCMinusPileUpSPD
! eta/phi of tracks passing TOF status selection, tracks in BC<0, pile-up spd
TH2F * fhPhiMCPart[6]
! phi distribution vs pT, 6 hadron ID
virtual Float_t GetZvertexCut() const
Maximal number of events for mixin.
TH2F * fhEtaPhiPos
! eta vs phi distribution of positive charge
void MakeAnalysisFillAOD()
TH2F * fhEtaPhiNoSPDRefitPt02
! eta-phi distribution of constrained tracks no SPD and with ITSRefit, 0 < pT < 2 GeV ...
void FillPrimaryHistograms()
Fill primary generated particles histograms if MC data is available.
TH2F * fhPtTOFSignalVtxOutBC0PileUp[7]
! TOF signal vs track pT, good status, pile-up
virtual Bool_t IsPileUpAnalysisOn() const
virtual void SetOutputAODClassName(TString name)
TH2F * fhEtaMCPrimPart[6]
! Number of generated charged hadrons vs eta coming from MC particle, 6 hadron ID ...
TH2F * fhEtaPhiTOFStatus0
! eta/phi of tracks not passing TOF status selection
Int_t GetHistoPhiBins() const
TH2F * fhEtaPhiNeg
! eta vs phi distribution of negative charge
TH2F * fhPtDCAVtxInBC0NoTOFHit[3]
! DCA (xy,z,constrained) of all tracks, vertex BC=0, no hit in TOF
TH2F * fhPtDCA[3]
! DCA (xy,z,constrained) of all tracks
TH2F * fhPtDCAPileUp[3]
! DCA (xy,z,constrained) of all tracks, SPD pile-up
TH1F * fhPt
! pT distribution
virtual TClonesArray * GetOutputAODBranch() const
TH1F * fhNtracks
! Track multiplicity distribution
TH2F * fhEtaPhiTOFBC0PileUpSPD
! eta/phi of tracks passing TOF status selection, tracks in BC=0, pile-up spd
TH1F * fhPtPileUp[7]
! pT distribution, pile-up defined events
TH2F * fhPtTOFSignalVtxOutBC0
! TOF signal vs track pT, good status
Float_t GetHistoPhiMin() const
TH2F * fhPhiNeg
! phi distribution vs pT, negative
void MakeAnalysisFillHistograms()
Fill histograms for the selected tracks.
virtual void SetOutputAODName(TString name)
TH1F * fhPtNoSPDRefit
! pT distribution of constrained tracks no SPD and with ITSRefit
TH2F * fhEtaPhiTOFBCPlusPileUpSPD
! eta/phi of tracks passing TOF status selection, tracks in BC>0, pile-up spd
Base class for CaloTrackCorr analysis algorithms.
void Init()
Init. Check that tracks are read, if not abort.
virtual AliFiducialCut * GetFiducialCut()
TH1F * fhPtNotPrimary
! pT spectra of tracks not declared as primary (AOD)
TH1F * fhPtVtxInBC0
! pT distribution of tracks from a vertex with BC=0
TH2F * fhPtNPileUpTrkVtx
! cluster pt vs number of track pile-up vertices
virtual TClonesArray * GetAODMCParticles() const
virtual AliHistogramRanges * GetHistogramRanges()
TH2F * fhEtaNeg
! eta distribution vs pT, negative
TH2F * fhPtDCAVtxOutBC0PileUpNoTOFHit[3]
! DCA (xy,z,constrained) of all tracks, vertex BC!=0, SPD pile-up, no hit in TOF
TH2F * fhEtaPhiSPDRefitPt3
! eta-phi distribution of tracks with SPD and ITS refit, pT > 3 GeV
TH1F * fhPtTOFStatus0
! pT of tracks not passing TOF status selection
Bool_t IsInFiducialCut(Float_t eta, Float_t phi, Int_t det) const
TH2F * fhEtaPhiNoSPDNoRefitPt3
! eta-phi distribution of constrained tracks with no SPD requierement and without ITSRefit...
TH1F * fhSumPtPerRegion[18][2]
! pT distribution in TPC regions
void Print(const Option_t *opt) const
Print some relevant parameters set for the analysis.
TH2F * fhEtaPhiTOFBC0
! eta/phi of tracks passing TOF status selection, tracks in BC=0
TH2F * fhPhiMCPrimPart[6]
! Number of generated charged hadrons vs phi coming from MC particle, 6 hadron ID ...
TH1F * fhPtVtxOutBC0
! pT distribution of tracks from a vertex with BC!=0
TH2F * fhPtNPileUpSPDVtxBC0
! cluster pt vs number of spd pile-up vertices, track in BC=0
virtual Float_t GetTPCSharedClusterFraction() const
Bool_t fFillEtaPhiRegionHistograms
Fill track pT spectrum histograms in different eta-phi windows.
virtual Double_t GetEventWeight() const
TH2F * fhPtTOFSignal
! TOF signal vs track pT, good status
TH1F * fhProductionVertexBC
! Check BC of production vertex
TH2F * fhPtDCAPileUpTOFBC0[3]
! DCA (xy,z,constrained) of all tracks, hit in TOF and BC=0
Float_t GetHistoEtaMin() const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TH1F * fhTOFSignal
! TOF signal
TH1F * fhPtCutDCA
! pT distribution, Apply DCA cut
TH2F * fhPtDCATOFBC0[3]
! DCA (xy,z,constrained) of all tracks, hit in TOF and BC=0
TH2F * fhEtaMCPart[6]
! eta distribution vs pT, 6 hadron ID
TH1F * fhPtNoSPDNoRefit
! pT distribution of constrained tracks with no SPD requierement and without ITSRefit ...
void InitParameters()
Initialize the parameters of the analysis.
Float_t GetHistoEtaMax() const
virtual void AddAODParticle(AliAODPWG4Particle part)
Int_t GetHistoPtBins() const
TH1F * fhPtMCPart[6]
! pT distribution, 6 hadron ID
Track selection for correlation analysis.
Bool_t fFillVertexBC0Histograms
Fill histograms for tracks with vertex BC=0 or not related histograms.
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
TH2F * fhEtaPhiVtxInBC0
! eta/phi distribution of tracks from a vertex with BC=0
TH2F * fhPhiPos
! phi distribution vs pT, positive
TH1F * fhPtMCPrimPart[6]
! Number of generated charged hadrons vs pT coming from MC particle, 6 hadron ID
TH2F * fhEtaPos
! eta distribution vs pT, positive
TH2F * fhPtDCANoSPDRefit[3]
! DCA (xy,z,constrained) of constrained tracks no SPD and with ITSRefit
TH1F * fhPtCutDCABCOK
! pT distribution, Apply DCA cut, BC=0 or -100
TH2F * fhPtDCAVtxInBC0[3]
! DCA (xy,z,constrained) of all tracks, vertex BC==0
virtual Float_t GetMinPt() const
TH2F * fhEtaPhiNoSPDNoRefitPt02
! eta-phi distribution of constrained tracks with no SPD requierement and without ITSRefit...
virtual void Print(const Option_t *) const
Print some relevant parameters set for the analysis.
TH1F * fhTOFSignalBCOK
! TOF signal pt and acceptance cut
TH2F * fhEtaPhiSPDRefitPt02
! eta-phi distribution of tracks with SPD and ITS refit, 0 < pT < 2 GeV
TH2F * fhPtDCAVtxInBC0PileUp[3]
! DCA (xy,z,constrained) of all tracks, vertex BC==0, SPD pile-up
TH2F * fhPtNPileUpTrkVtxBC0
! cluster pt vs number of track pile-up vertices, track in BC=0
Float_t GetHistoPhiMax() const
AliAnaChargedParticles()
Default constructor. Initialize parameters with default values.
virtual AliCaloTrackReader * GetReader() const
Int_t GetHistoEtaBins() const
TH2F * fhEtaPhiTOFBCMinus
! eta/phi of tracks passing TOF status selection, tracks in BC<0
TH1F * fhPtSPDRefit
! pT distribution of tracks with SPD and ITS refit
TH2F * fhPtDCASPDRefit[3]
! DCA (xy,z,constrained) of tracks with SPD and ITS refit
TH2F * fhEtaPhiTOFBCPlus
! eta/phi of tracks passing TOF status selection, tracks in BC>0
TH2F * fhEtaPhiVtxOutBC0
! eta/phi distribution of tracks from a vertex with BC!=0
TH2F * fhPtDCAVtxOutBC0[3]
! DCA (xy,z,constrained) of all tracks, vertex BC!=0
TLorentzVector fMomentum
! Temporary momentum container
TH1F * fhPtPerRegion[18][2]
! pT distribution in TPC regions
TH2F * fhPtDCANoSPDNoRefit[3]
! DCA (xy,z,constrained) of constrained tracks with no SPD requierement and without ITSRefit ...
TH1F * fhPtNoCut
! pT distribution, no cut
virtual AliMixedEvent * GetMixedEvent() const
TH2F * fhTrackResolution
! track resolution sigma pT vs pT, ESDs
TList * GetCreateOutputObjects()