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),
45 fhNtracks(0), fhPt(0), fhPtNoCut(0),
46 fhPtCutDCA(0), fhPtCutDCABCOK(0),
47 fhPtNotPrimary(), fhPtNotSharedClusterCut(0),
48 fhPhiNeg(0), fhEtaNeg(0),
49 fhPhiPos(0), fhEtaPos(0),
50 fhEtaPhiPos(0), fhEtaPhiNeg(0),
52 fhPtVtxOutBC0(0), fhEtaPhiVtxOutBC0(0),
53 fhPtVtxInBC0(0), fhEtaPhiVtxInBC0(0),
54 fhPtSPDRefit(0), fhPtNoSPDRefit(0), fhPtNoSPDNoRefit(0),
55 fhEtaPhiSPDRefitPt02(0), fhEtaPhiNoSPDRefitPt02(0), fhEtaPhiNoSPDNoRefitPt02(0),
56 fhEtaPhiSPDRefitPt3(0), fhEtaPhiNoSPDRefitPt3(0), fhEtaPhiNoSPDNoRefitPt3(0),
58 fhTOFSignal(0), fhTOFSignalPtCut(0), fhTOFSignalBCOK(0),
59 fhPtTOFSignal(0), fhPtTOFSignalDCACut(0),
60 fhPtTOFSignalVtxOutBC0(0), fhPtTOFSignalVtxInBC0(0),
61 fhPtTOFStatus0(0), fhEtaPhiTOFStatus0(0),
62 fhEtaPhiTOFBC0(0), fhEtaPhiTOFBCPlus(0), fhEtaPhiTOFBCMinus(0),
63 fhEtaPhiTOFBC0PileUpSPD(0),
64 fhEtaPhiTOFBCPlusPileUpSPD(0),
65 fhEtaPhiTOFBCMinusPileUpSPD(0),
66 fhProductionVertexBC(0),
67 fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
68 fhPtNPileUpSPDVtxBC0(0), fhPtNPileUpTrkVtxBC0(0)
70 for(
Int_t i = 0; i < 7; i++)
79 for(
Int_t i = 0; i < 3; i++)
105 for(
Int_t imcPart = 0; imcPart < 6; imcPart++)
127 TParticle * primStack = 0;
128 AliAODMCParticle * primAOD = 0;
131 AliStack * stack = 0;
136 nprim = stack->GetNtrack();
140 TClonesArray * mcparticles = 0;
144 if( !mcparticles )
return;
145 nprim = mcparticles->GetEntriesFast();
148 for(
Int_t i=0 ; i < nprim; i++)
150 if ( !
GetReader()->AcceptParticleMCLabel( i ) ) continue ;
154 primStack = stack->Particle(i) ;
157 AliWarning(
"ESD primaries pointer not available!!");
161 if( primStack->GetStatusCode() != 1 )
continue;
163 Int_t charge = (
Int_t )TDatabasePDG::Instance()->GetParticle(primStack->GetPdgCode())->Charge();
164 if( TMath::Abs(charge) == 0 )
continue;
166 pdg = TMath::Abs(primStack->GetPdgCode());
169 if ( primStack->Energy() == TMath::Abs(primStack->Pz()) ||
170 (primStack->Energy() - primStack->Pz()) < 1e-3 ||
171 (primStack->Energy() + primStack->Pz()) < 0 ) continue ;
181 primAOD = (AliAODMCParticle *) mcparticles->At(i);
184 AliWarning(
"AOD primaries pointer not available!!");
188 if( primAOD->GetStatus() != 1 )
continue;
190 if(TMath::Abs(primAOD->Charge()) == 0 )
continue;
192 pdg = TMath::Abs(primAOD->GetPdgCode());
195 if ( primAOD->E() == TMath::Abs(primAOD->Pz()) ||
196 (primAOD->E() - primAOD->Pz()) < 1e-3 ||
197 (primAOD->E() + primAOD->Pz()) < 0 ) continue ;
200 fMomentum.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
204 if (pdg==211 ) mcType =
kmcPion;
206 else if(pdg==321 ) mcType =
kmcKaon;
208 else if(pdg==13 ) mcType =
kmcMuon;
215 if(phiPrim < 0) phiPrim+=TMath::TwoPi();
234 outputContainer->SetName(
"ChargedParticleHistos") ;
240 fhNtracks =
new TH1F (
"hNtracks",
"# of tracks", 1000,0,1000);
244 fhPt =
new TH1F (
"hPt",
"#it{p}_{T} distribution", nptbins,ptmin,ptmax);
245 fhPt->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
246 outputContainer->Add(
fhPt);
248 fhPtNoCut =
new TH1F (
"hPtNoCut",
"#it{p}_{T} distribution, raw tracks", nptbins,ptmin,ptmax);
249 fhPtNoCut->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
254 fhPtCutDCA =
new TH1F (
"hPtCutDCA",
"#it{p}_{T} distribution, cut DCA", nptbins,ptmin,ptmax);
255 fhPtCutDCA->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
261 fhPtCutDCABCOK =
new TH1F (
"hPtCutDCABCOK",
"#it{p}_{T} distribution, DCA cut, track BC=0 or -100", nptbins,ptmin,ptmax);
268 fhPtNotPrimary =
new TH1F (
"hPtNotPrimary",
"#it{p}_{T} distribution, not primary", nptbins,ptmin,ptmax);
272 fhPtNotSharedClusterCut =
new TH1F (
"hPtNotSharedClusterCut",
"#it{p}_{T} distribution, shared clusters cut out", nptbins,ptmin,ptmax);
277 fhPhiNeg =
new TH2F (
"hPhiNegative",
"#phi of negative charges distribution",
278 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
280 fhPhiNeg->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
283 fhEtaNeg =
new TH2F (
"hEtaNegative",
"#eta of negative charges distribution",
284 nptbins,ptmin,ptmax, netabins,etamin,etamax);
286 fhEtaNeg->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
289 fhPhiPos =
new TH2F (
"hPhiPositive",
"#phi of positive charges distribution",
290 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
292 fhPhiPos->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
295 fhEtaPos =
new TH2F (
"hEtaPositive",
"#eta of positive charges distribution",
296 nptbins,ptmin,ptmax, netabins,etamin,etamax);
298 fhEtaPos->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
301 fhEtaPhiPos =
new TH2F (
"hEtaPhiPositive",
"pt/eta/phi of positive charge",netabins,etamin,etamax, nphibins,phimin,phimax);
306 fhEtaPhiNeg =
new TH2F (
"hEtaPhiNegative",
"#eta vs #phi of negative charge",netabins,etamin,etamax, nphibins,phimin,phimax);
313 fhTrackResolution =
new TH2F (
"hTrackResolution",
"Track resolution: #sigma_{#it{p}_{T}} vs #it{p}_{T}, ESDs",
314 nptbins,ptmin,ptmax,600,0,0.3);
322 fhPtVtxOutBC0 =
new TH1F (
"hPtVtxOutBC0",
"#it{p}_{T} distribution, vertex in BC=0", nptbins,ptmin,ptmax);
326 fhEtaPhiVtxOutBC0 =
new TH2F (
"hEtaPhiVtxOutBC0",
"#eta vs #phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
331 fhPtVtxInBC0 =
new TH1F (
"hPtVtxInBC0",
"#it{p}_{T} distribution, vertex in BC=0", nptbins,ptmin,ptmax);
335 fhEtaPhiVtxInBC0 =
new TH2F (
"hEtaPhiVtxInBC0",
"#eta vs #phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
341 fhPtSPDRefit =
new TH1F (
"hPtSPDRefit",
"#it{p}_{T} distribution of tracks with SPD and ITS refit", nptbins,ptmin,ptmax);
345 fhEtaPhiSPDRefitPt02 =
new TH2F (
"hEtaPhiSPDRefitPt02",
"#eta vs #phi of tracks with SPD and ITS refit, #it{p}_{T}< 2 GeV/#it{c}",
346 netabins,etamin,etamax, nphibins,phimin,phimax);
351 fhEtaPhiSPDRefitPt3 =
new TH2F (
"hEtaPhiSPDRefitPt3",
"#eta vs #phi of tracks with SPD and ITS refit, #it{p}_{T}> 3 GeV/#it{c}",
352 netabins,etamin,etamax, nphibins,phimin,phimax);
357 fhPtNoSPDRefit =
new TH1F (
"hPtNoSPDRefit",
"#it{p}_{T} distribution of constrained tracks no SPD and with ITSRefit",
358 nptbins,ptmin,ptmax);
362 fhEtaPhiNoSPDRefitPt02 =
new TH2F (
"hEtaPhiNoSPDRefitPt02",
"#eta vs #phi of constrained tracks no SPD and with ITSRefit, #it{p}_{T}< 2 GeV/#it{c}",
363 netabins,etamin,etamax, nphibins,phimin,phimax);
368 fhEtaPhiNoSPDRefitPt3 =
new TH2F (
"hEtaPhiNoSPDRefitPt3",
"#eta vs #phi of of constrained tracks no SPD and with ITSRefit, #it{p}_{T}> 3 GeV/#it{c}",
369 netabins,etamin,etamax, nphibins,phimin,phimax);
374 fhPtNoSPDNoRefit =
new TH1F (
"hPtNoSPDNoRefit",
"#it{p}_{T} distribution of constrained tracks with no SPD requierement and without ITSRefit",
375 nptbins,ptmin,ptmax);
380 "#eta vs #phi of constrained tracks with no SPD requierement and without ITSRefit, #it{p}_{T}< 2 GeV/#it{c}",
381 netabins,etamin,etamax, nphibins,phimin,phimax);
387 "#eta vs #phi of constrained tracks with no SPD requierement and without ITSRefit, #it{p}_{T}> 3 GeV/#it{c}",
388 netabins,etamin,etamax, nphibins,phimin,phimax);
395 fhProductionVertexBC =
new TH1F(
"hProductionVertexBC",
"tracks production vertex bunch crossing ", 41 , -20 , 20 ) ;
401 Int_t ntofbins = 1000;
405 fhTOFSignal =
new TH1F (
"hTOFSignal",
"TOF signal", ntofbins,mintof,maxtof);
411 fhTOFSignalBCOK =
new TH1F (
"hTOFSignalBCOK",
"TOF signal", ntofbins,mintof,maxtof);
416 fhTOFSignalPtCut =
new TH1F (
"hTOFSignalPtCut",
"TOF signal", ntofbins,mintof,maxtof);
420 fhPtTOFSignal =
new TH2F (
"hPtTOFSignal",
"TOF signal", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
427 fhPtTOFSignalDCACut =
new TH2F (
"hPtTOFSignalDCACut",
"TOF signal after DCA cut", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
435 fhPtTOFSignalVtxOutBC0 =
new TH2F (
"hPtTOFSignalVtxOutBC0",
"TOF signal, vtx BC!=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
440 fhPtTOFSignalVtxInBC0 =
new TH2F (
"hPtTOFSignalVtxInBC0",
"TOF signal, vtx BC=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
448 TString pileUpName[] = {
"SPD",
"EMCAL",
"SPDOrEMCAL",
"SPDAndEMCAL",
"SPDAndNotEMCAL",
"EMCALAndNotSPD",
"NotSPDAndNotEMCAL"} ;
450 for(
Int_t i = 0 ; i < 7 ; i++)
452 fhPtPileUp[i] =
new TH1F(Form(
"hPtPileUp%s",pileUpName[i].
Data()),
453 Form(
"Track #it{p}_{T}distribution, %s Pile-Up event",pileUpName[i].
Data()),
454 nptbins,ptmin,ptmax);
455 fhPtPileUp[i]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
459 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event",pileUpName[i].
Data()),
460 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
468 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event, vtx BC!=0",pileUpName[i].
Data()),
469 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
475 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event, vtx BC=0",pileUpName[i].
Data()),
476 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
485 Form(
"tracks production vertex bunch crossing, %s Pile-Up event",pileUpName[i].
Data()),
495 fhEtaPhiTOFBC0 =
new TH2F (
"hEtaPhiTOFBC0",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
500 fhEtaPhiTOFBCPlus =
new TH2F (
"hEtaPhiTOFBCPlus",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC>0",netabins,etamin,etamax, nphibins,phimin,phimax);
505 fhEtaPhiTOFBCMinus =
new TH2F (
"hEtaPhiTOFBCMinus",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC<0",netabins,etamin,etamax, nphibins,phimin,phimax);
512 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);
517 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);
522 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);
530 fhPtTOFStatus0 =
new TH1F (
"hPtTOFStatus0",
"#it{p}_{T} distribution of tracks not hitting TOF", nptbins,ptmin,ptmax);
535 fhEtaPhiTOFStatus0 =
new TH2F (
"hEtaPhiTOFStatus0",
"eta-phi for tracks without hit on TOF",netabins,etamin,etamax, nphibins,phimin,phimax);
540 TString dcaName[] = {
"xy",
"z",
"Cons"} ;
541 Int_t ndcabins = 800;
545 for(
Int_t i = 0 ; i < 3 ; i++)
548 Form(
"Track DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
549 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
550 fhPtDCA[i]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
551 fhPtDCA[i]->SetYTitle(Form(
"DCA_{%s}",dcaName[i].
Data()));
552 outputContainer->Add(
fhPtDCA[i]);
555 Form(
"Track DCA%s vs #it{p}_{T}distribution of tracks with SPD and ITS refit",dcaName[i].
Data()),
556 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
562 Form(
"Track DCA%s vs #it{p}_{T}distributionof constrained tracks no SPD and with ITSRefit",dcaName[i].
Data()),
563 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
569 Form(
"Track DCA%s vs #it{p}_{T}distribution, constrained tracks with no SPD requierement and without ITSRefit",dcaName[i].
Data()),
570 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
578 Form(
"Track DCA%s vs #it{p}_{T}distribution, BC=0",dcaName[i].
Data()),
579 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
585 Form(
"Track DCA%s vs #it{p}_{T}distribution, BC!=0",dcaName[i].
Data()),
586 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
593 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
594 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
602 Form(
"Track DCA%s vs #it{p}_{T}distribution, vertex with BC!=0",dcaName[i].
Data()),
603 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
609 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, vertex with BC!=0",dcaName[i].
Data()),
610 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
616 Form(
"Track DCA%s vs #it{p}_{T}distribution, vertex with BC==0",dcaName[i].
Data()),
617 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
623 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, vertex with BC==0",dcaName[i].
Data()),
624 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
633 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up",dcaName[i].
Data()),
634 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
642 Form(
"Track DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
643 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
650 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
651 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
659 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
660 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
666 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
667 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
673 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up,vertex with BC==0",dcaName[i].
Data()),
674 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
680 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC==0",dcaName[i].
Data()),
681 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
693 TString histoName[] = {
"Pion",
"Proton",
"Kaon",
"Muon",
"Electron",
"Unknown"};
694 TString titleName[] = {
"#pi^{#pm}",
"p^{#pm}",
"K^{#pm}",
"#mu^{#pm}",
"e^{#pm}",
"x^{#pm}"};
696 for(
Int_t imcPart = 0; imcPart < 6; imcPart++)
698 fhPtMCPart[imcPart] =
new TH1F (Form(
"hPtMC%s",histoName[imcPart].
Data()),
699 Form(
"reconstructed #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
700 nptbins,ptmin,ptmax);
701 fhPtMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
705 Form(
"reconstructed #phi vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
706 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
708 fhPhiMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
712 Form(
"reconstructed #eta vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
713 nptbins,ptmin,ptmax, netabins,etamin,etamax);
715 fhEtaMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
719 Form(
"generated #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
720 nptbins,ptmin,ptmax);
725 Form(
"generated #phi vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
726 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
732 Form(
"generated #eta vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
733 nptbins,ptmin,ptmax, netabins,etamin,etamax);
741 nptbins,ptmin,ptmax,20,0,20);
747 nptbins,ptmin,ptmax, 20,0,20 );
755 nptbins,ptmin,ptmax,20,0,20);
761 nptbins,ptmin,ptmax, 20,0,20 );
767 return outputContainer;
789 printf(
"**** Print %s %s ****\n", GetName(), GetTitle() ) ;
792 printf(
"Min Pt = %3.2f\n",
GetMinPt());
793 printf(
"Max Pt = %3.2f\n",
GetMaxPt());
802 AliFatal(
"STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!");
816 AliDebug(1,Form(
"In CTS aod entries %d", ntracks));
847 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
848 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
853 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
854 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
860 Double_t bz =
event->GetMagneticField();
867 for(
Int_t i = 0; i < ntracks; i++)
869 AliVTrack * track = (AliVTrack*) (
GetCTSTracks()->At(i));
880 AliAODTrack * aodTrack =
dynamic_cast<AliAODTrack*
>(track);
881 AliESDtrack * esdTrack =
dynamic_cast<AliESDtrack*
>(track);
895 if ( aodTrack->GetType()!= AliAODTrack::kPrimary )
900 ULong_t status = track->GetStatus();
901 Bool_t okTOF = (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ;
902 Double32_t tof = track->GetTOFsignal()*1e-3;
908 dcaCons = aodTrack->DCA();
914 track->PropagateToDCA(
GetReader()->GetInputEvent()->GetPrimaryVertex(),bz,100.,dca,covar);
934 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
980 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1013 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1048 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1090 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1096 Int_t trackBC = 1000;
1100 trackBC = track->GetTOFBunchCrossing(bz);
1125 else if(trackBC!=AliVTrack::kTOFBCNA)
1155 else if (trackBC < 0 )
1161 else if (trackBC > 0)
1171 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1196 fMomentum.SetPxPyPzE(track->Px(),track->Py(),track->Pz(),0);
1199 AliDebug(1,Form(
"Track pt %2.2f, eta %2.2f, phi %2.2f in fiducial cut %d",pt,eta,phi,in));
1214 Bool_t bITSRefit = (status & AliVTrack::kITSrefit) == AliVTrack::kITSrefit;
1215 Bool_t bConstrained = kFALSE;
1216 if (aodTrack) bConstrained = aodTrack->IsGlobalConstrained();
1217 else if(esdTrack) bConstrained = (!esdTrack->HasPointOnITSLayer(0) && !esdTrack->HasPointOnITSLayer(1));
1275 AliAODPWG4Particle tr = AliAODPWG4Particle(track->Px(),track->Py(),track->Pz(),0);
1276 tr.SetDetectorTag(
kCTS);
1277 tr.SetLabel(track->GetLabel());
1278 tr.SetTrackLabel(
GetReader()->GetTrackID(track),-1);
1279 tr.SetChargedBit(track->Charge()>0);
1284 AliDebug(1,Form(
"Final aod branch entries %d",
GetOutputAODBranch()->GetEntriesFast()));
1299 AliDebug(1,Form(
"AOD branch entries %d", naod));
1305 for(
Int_t iaod = 0; iaod < naod ; iaod++)
1315 if(track->GetChargedBit())
1343 Int_t label = track->GetLabel();
1349 TParticle * mom =
GetMCStack()->Particle(label);
1350 mompdg =TMath::Abs(mom->GetPdgCode());
1354 AliAODMCParticle * aodmom = 0;
1357 mompdg =TMath::Abs(aodmom->GetPdgCode());
1362 if (mompdg==211 ) mcType =
kmcPion;
1363 else if(mompdg==2212) mcType =
kmcProton;
1364 else if(mompdg==321 ) mcType =
kmcKaon;
1366 else if(mompdg==13 ) mcType =
kmcMuon;
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
TH1F * fhPtNotSharedClusterCut
! pT spectra of tracks not passing the shared clusters cut (AOD)
virtual void AddToHistogramsName(TString add)
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...
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
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
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()