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),
51 fhPtVtxOutBC0(0), fhEtaPhiVtxOutBC0(0),
52 fhPtVtxInBC0(0), fhEtaPhiVtxInBC0(0),
53 fhPtSPDRefit(0), fhPtNoSPDRefit(0), fhPtNoSPDNoRefit(0),
54 fhEtaPhiSPDRefitPt02(0), fhEtaPhiNoSPDRefitPt02(0), fhEtaPhiNoSPDNoRefitPt02(0),
55 fhEtaPhiSPDRefitPt3(0), fhEtaPhiNoSPDRefitPt3(0), fhEtaPhiNoSPDNoRefitPt3(0),
57 fhTOFSignal(0), fhTOFSignalPtCut(0), fhTOFSignalBCOK(0),
58 fhPtTOFSignal(0), fhPtTOFSignalDCACut(0),
59 fhPtTOFSignalVtxOutBC0(0), fhPtTOFSignalVtxInBC0(0),
60 fhPtTOFStatus0(0), fhEtaPhiTOFStatus0(0),
61 fhEtaPhiTOFBC0(0), fhEtaPhiTOFBCPlus(0), fhEtaPhiTOFBCMinus(0),
62 fhEtaPhiTOFBC0PileUpSPD(0),
63 fhEtaPhiTOFBCPlusPileUpSPD(0),
64 fhEtaPhiTOFBCMinusPileUpSPD(0),
65 fhProductionVertexBC(0),
66 fhPtNPileUpSPDVtx(0), fhPtNPileUpTrkVtx(0),
67 fhPtNPileUpSPDVtxBC0(0), fhPtNPileUpTrkVtxBC0(0)
69 for(Int_t i = 0; i < 7; i++)
78 for(Int_t i = 0; i < 3; i++)
104 for(Int_t imcPart = 0; imcPart < 6; imcPart++)
126 TParticle * primStack = 0;
127 AliAODMCParticle * primAOD = 0;
130 AliStack * stack = 0;
135 nprim = stack->GetNtrack();
139 TClonesArray * mcparticles = 0;
143 if( !mcparticles )
return;
144 nprim = mcparticles->GetEntriesFast();
147 for(Int_t i=0 ; i < nprim; i++)
149 if(
GetReader()->AcceptOnlyHIJINGLabels() && !
GetReader()->IsHIJINGLabel(i)) continue ;
153 primStack = stack->Particle(i) ;
156 AliWarning(
"ESD primaries pointer not available!!");
160 if( primStack->GetStatusCode() != 1 )
continue;
162 Int_t
charge = (Int_t )TDatabasePDG::Instance()->GetParticle(primStack->GetPdgCode())->Charge();
163 if( TMath::Abs(charge) == 0 )
continue;
165 pdg = TMath::Abs(primStack->GetPdgCode());
167 if(primStack->Energy() == TMath::Abs(primStack->Pz())) continue ;
177 primAOD = (AliAODMCParticle *) mcparticles->At(i);
180 AliWarning(
"AOD primaries pointer not available!!");
184 if( primAOD->GetStatus() != 1 )
continue;
186 if(TMath::Abs(primAOD->Charge()) == 0 )
continue;
188 pdg = TMath::Abs(primAOD->GetPdgCode());
190 if(primAOD->E() == TMath::Abs(primAOD->Pz())) continue ;
193 fMomentum.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
197 if (pdg==211 ) mcType =
kmcPion;
199 else if(pdg==321 ) mcType =
kmcKaon;
201 else if(pdg==13 ) mcType =
kmcMuon;
208 if(phiPrim < 0) phiPrim+=TMath::TwoPi();
226 TList * outputContainer =
new TList() ;
227 outputContainer->SetName(
"ChargedParticleHistos") ;
233 fhNtracks =
new TH1F (
"hNtracks",
"# of tracks", 1000,0,1000);
237 fhPt =
new TH1F (
"hPt",
"#it{p}_{T} distribution", nptbins,ptmin,ptmax);
238 fhPt->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
239 outputContainer->Add(
fhPt);
241 fhPtNoCut =
new TH1F (
"hPtNoCut",
"#it{p}_{T} distribution, raw tracks", nptbins,ptmin,ptmax);
242 fhPtNoCut->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
247 fhPtCutDCA =
new TH1F (
"hPtCutDCA",
"#it{p}_{T} distribution, cut DCA", nptbins,ptmin,ptmax);
248 fhPtCutDCA->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
254 fhPtCutDCABCOK =
new TH1F (
"hPtCutDCABCOK",
"#it{p}_{T} distribution, DCA cut, track BC=0 or -100", nptbins,ptmin,ptmax);
259 fhPtNotPrimary =
new TH1F (
"hPtNotPrimary",
"#it{p}_{T} distribution, not primary", nptbins,ptmin,ptmax);
263 fhPtNotSharedClusterCut =
new TH1F (
"hPtNotSharedClusterCut",
"#it{p}_{T} distribution, shared clusters cut out", nptbins,ptmin,ptmax);
267 fhPhiNeg =
new TH2F (
"hPhiNegative",
"#phi of negative charges distribution",
268 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
270 fhPhiNeg->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
273 fhEtaNeg =
new TH2F (
"hEtaNegative",
"#eta of negative charges distribution",
274 nptbins,ptmin,ptmax, netabins,etamin,etamax);
276 fhEtaNeg->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
279 fhPhiPos =
new TH2F (
"hPhiPositive",
"#phi of positive charges distribution",
280 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
282 fhPhiPos->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
285 fhEtaPos =
new TH2F (
"hEtaPositive",
"#eta of positive charges distribution",
286 nptbins,ptmin,ptmax, netabins,etamin,etamax);
288 fhEtaPos->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
291 fhEtaPhiPos =
new TH2F (
"hEtaPhiPositive",
"pt/eta/phi of positive charge",netabins,etamin,etamax, nphibins,phimin,phimax);
296 fhEtaPhiNeg =
new TH2F (
"hEtaPhiNegative",
"#eta vs #phi of negative charge",netabins,etamin,etamax, nphibins,phimin,phimax);
303 fhPtVtxOutBC0 =
new TH1F (
"hPtVtxOutBC0",
"#it{p}_{T} distribution, vertex in BC=0", nptbins,ptmin,ptmax);
307 fhEtaPhiVtxOutBC0 =
new TH2F (
"hEtaPhiVtxOutBC0",
"#eta vs #phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
312 fhPtVtxInBC0 =
new TH1F (
"hPtVtxInBC0",
"#it{p}_{T} distribution, vertex in BC=0", nptbins,ptmin,ptmax);
316 fhEtaPhiVtxInBC0 =
new TH2F (
"hEtaPhiVtxInBC0",
"#eta vs #phi of all charges with vertex in BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
322 fhPtSPDRefit =
new TH1F (
"hPtSPDRefit",
"#it{p}_{T} distribution of tracks with SPD and ITS refit", nptbins,ptmin,ptmax);
326 fhEtaPhiSPDRefitPt02 =
new TH2F (
"hEtaPhiSPDRefitPt02",
"#eta vs #phi of tracks with SPD and ITS refit, #it{p}_{T}< 2 GeV/#it{c}",
327 netabins,etamin,etamax, nphibins,phimin,phimax);
332 fhEtaPhiSPDRefitPt3 =
new TH2F (
"hEtaPhiSPDRefitPt3",
"#eta vs #phi of tracks with SPD and ITS refit, #it{p}_{T}> 3 GeV/#it{c}",
333 netabins,etamin,etamax, nphibins,phimin,phimax);
338 fhPtNoSPDRefit =
new TH1F (
"hPtNoSPDRefit",
"#it{p}_{T} distribution of constrained tracks no SPD and with ITSRefit",
339 nptbins,ptmin,ptmax);
343 fhEtaPhiNoSPDRefitPt02 =
new TH2F (
"hEtaPhiNoSPDRefitPt02",
"#eta vs #phi of constrained tracks no SPD and with ITSRefit, #it{p}_{T}< 2 GeV/#it{c}",
344 netabins,etamin,etamax, nphibins,phimin,phimax);
349 fhEtaPhiNoSPDRefitPt3 =
new TH2F (
"hEtaPhiNoSPDRefitPt3",
"#eta vs #phi of of constrained tracks no SPD and with ITSRefit, #it{p}_{T}> 3 GeV/#it{c}",
350 netabins,etamin,etamax, nphibins,phimin,phimax);
355 fhPtNoSPDNoRefit =
new TH1F (
"hPtNoSPDNoRefit",
"#it{p}_{T} distribution of constrained tracks with no SPD requierement and without ITSRefit",
356 nptbins,ptmin,ptmax);
361 "#eta vs #phi of constrained tracks with no SPD requierement and without ITSRefit, #it{p}_{T}< 2 GeV/#it{c}",
362 netabins,etamin,etamax, nphibins,phimin,phimax);
368 "#eta vs #phi of constrained tracks with no SPD requierement and without ITSRefit, #it{p}_{T}> 3 GeV/#it{c}",
369 netabins,etamin,etamax, nphibins,phimin,phimax);
376 fhProductionVertexBC =
new TH1F(
"hProductionVertexBC",
"tracks production vertex bunch crossing ", 41 , -20 , 20 ) ;
382 Int_t ntofbins = 1000;
386 fhTOFSignal =
new TH1F (
"hTOFSignal",
"TOF signal", ntofbins,mintof,maxtof);
392 fhTOFSignalBCOK =
new TH1F (
"hTOFSignalBCOK",
"TOF signal", ntofbins,mintof,maxtof);
397 fhTOFSignalPtCut =
new TH1F (
"hTOFSignalPtCut",
"TOF signal", ntofbins,mintof,maxtof);
401 fhPtTOFSignal =
new TH2F (
"hPtTOFSignal",
"TOF signal", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
408 fhPtTOFSignalDCACut =
new TH2F (
"hPtTOFSignalDCACut",
"TOF signal after DCA cut", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
416 fhPtTOFSignalVtxOutBC0 =
new TH2F (
"hPtTOFSignalVtxOutBC0",
"TOF signal, vtx BC!=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
421 fhPtTOFSignalVtxInBC0 =
new TH2F (
"hPtTOFSignalVtxInBC0",
"TOF signal, vtx BC=0", nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
429 TString pileUpName[] = {
"SPD",
"EMCAL",
"SPDOrEMCAL",
"SPDAndEMCAL",
"SPDAndNotEMCAL",
"EMCALAndNotSPD",
"NotSPDAndNotEMCAL"} ;
431 for(Int_t i = 0 ; i < 7 ; i++)
433 fhPtPileUp[i] =
new TH1F(Form(
"hPtPileUp%s",pileUpName[i].
Data()),
434 Form(
"Track #it{p}_{T}distribution, %s Pile-Up event",pileUpName[i].
Data()),
435 nptbins,ptmin,ptmax);
436 fhPtPileUp[i]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
440 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event",pileUpName[i].
Data()),
441 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
449 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event, vtx BC!=0",pileUpName[i].
Data()),
450 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
456 Form(
"Track TOF vs #it{p}_{T}distribution, %s Pile-Up event, vtx BC=0",pileUpName[i].
Data()),
457 nptbins,ptmin,ptmax,ntofbins,mintof,maxtof);
466 Form(
"tracks production vertex bunch crossing, %s Pile-Up event",pileUpName[i].
Data()),
476 fhEtaPhiTOFBC0 =
new TH2F (
"hEtaPhiTOFBC0",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC=0",netabins,etamin,etamax, nphibins,phimin,phimax);
481 fhEtaPhiTOFBCPlus =
new TH2F (
"hEtaPhiTOFBCPlus",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC>0",netabins,etamin,etamax, nphibins,phimin,phimax);
486 fhEtaPhiTOFBCMinus =
new TH2F (
"hEtaPhiTOFBCMinus",
"eta-phi for tracks with hit on TOF, and tof corresponding to BC<0",netabins,etamin,etamax, nphibins,phimin,phimax);
493 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);
498 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);
503 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);
511 fhPtTOFStatus0 =
new TH1F (
"hPtTOFStatus0",
"#it{p}_{T} distribution of tracks not hitting TOF", nptbins,ptmin,ptmax);
516 fhEtaPhiTOFStatus0 =
new TH2F (
"hEtaPhiTOFStatus0",
"eta-phi for tracks without hit on TOF",netabins,etamin,etamax, nphibins,phimin,phimax);
521 TString dcaName[] = {
"xy",
"z",
"Cons"} ;
522 Int_t ndcabins = 800;
526 for(Int_t i = 0 ; i < 3 ; i++)
528 fhPtDCA[i] =
new TH2F(Form(
"hPtDCA%s",dcaName[i].
Data()),
529 Form(
"Track DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
530 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
531 fhPtDCA[i]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
532 fhPtDCA[i]->SetYTitle(Form(
"DCA_{%s}",dcaName[i].
Data()));
533 outputContainer->Add(
fhPtDCA[i]);
536 Form(
"Track DCA%s vs #it{p}_{T}distribution of tracks with SPD and ITS refit",dcaName[i].
Data()),
537 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
543 Form(
"Track DCA%s vs #it{p}_{T}distributionof constrained tracks no SPD and with ITSRefit",dcaName[i].
Data()),
544 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
550 Form(
"Track DCA%s vs #it{p}_{T}distribution, constrained tracks with no SPD requierement and without ITSRefit",dcaName[i].
Data()),
551 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
559 Form(
"Track DCA%s vs #it{p}_{T}distribution, BC=0",dcaName[i].
Data()),
560 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
566 Form(
"Track DCA%s vs #it{p}_{T}distribution, BC!=0",dcaName[i].
Data()),
567 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
574 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
575 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
583 Form(
"Track DCA%s vs #it{p}_{T}distribution, vertex with BC!=0",dcaName[i].
Data()),
584 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
590 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, vertex with BC!=0",dcaName[i].
Data()),
591 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
597 Form(
"Track DCA%s vs #it{p}_{T}distribution, vertex with BC==0",dcaName[i].
Data()),
598 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
604 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, vertex with BC==0",dcaName[i].
Data()),
605 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
614 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up",dcaName[i].
Data()),
615 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
623 Form(
"Track DCA%s vs #it{p}_{T}distribution",dcaName[i].
Data()),
624 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
631 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
632 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
640 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
641 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
647 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC!=0",dcaName[i].
Data()),
648 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
654 Form(
"Track DCA%s vs #it{p}_{T}distribution, SPD Pile-Up,vertex with BC==0",dcaName[i].
Data()),
655 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
661 Form(
"Track (no TOF hit) DCA%s vs #it{p}_{T}distribution, SPD Pile-Up, vertex with BC==0",dcaName[i].
Data()),
662 nptbins,ptmin,ptmax,ndcabins,mindca,maxdca);
674 TString histoName[] = {
"Pion",
"Proton",
"Kaon",
"Muon",
"Electron",
"Unknown"};
675 TString titleName[] = {
"#pi^{#pm}",
"p^{#pm}",
"K^{#pm}",
"#mu^{#pm}",
"e^{#pm}",
"x^{#pm}"};
677 for(Int_t imcPart = 0; imcPart < 6; imcPart++)
679 fhPtMCPart[imcPart] =
new TH1F (Form(
"hPtMC%s",histoName[imcPart].
Data()),
680 Form(
"reconstructed #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
681 nptbins,ptmin,ptmax);
682 fhPtMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
685 fhPhiMCPart[imcPart] =
new TH2F (Form(
"hPhiMC%s",histoName[imcPart].
Data()),
686 Form(
"reconstructed #phi vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
687 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
689 fhPhiMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
692 fhEtaMCPart[imcPart] =
new TH2F (Form(
"hEtaMC%s",histoName[imcPart].
Data()),
693 Form(
"reconstructed #eta vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
694 nptbins,ptmin,ptmax, netabins,etamin,etamax);
696 fhEtaMCPart[imcPart]->SetXTitle(
"#it{p}_{T} (GeV/#it{c})");
700 Form(
"generated #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
701 nptbins,ptmin,ptmax);
706 Form(
"generated #phi vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
707 nptbins,ptmin,ptmax, nphibins,phimin,phimax);
713 Form(
"generated #eta vs #it{p}_{T} distribution from %s",titleName[imcPart].
Data()),
714 nptbins,ptmin,ptmax, netabins,etamin,etamax);
721 fhPtNPileUpSPDVtx =
new TH2F (
"hPt_NPileUpVertSPD",
"pT of cluster vs N pile-up SPD vertex",
722 nptbins,ptmin,ptmax,20,0,20);
727 fhPtNPileUpTrkVtx =
new TH2F (
"hPt_NPileUpVertTracks",
"pT of cluster vs N pile-up Tracks vertex",
728 nptbins,ptmin,ptmax, 20,0,20 );
735 fhPtNPileUpSPDVtxBC0 =
new TH2F (
"hPt_NPileUpVertSPD_BC0",
"pT of cluster vs N pile-up SPD vertex",
736 nptbins,ptmin,ptmax,20,0,20);
741 fhPtNPileUpTrkVtxBC0 =
new TH2F (
"hPt_NPileUpVertTracks_BC0",
"pT of cluster vs N pile-up Tracks vertex",
742 nptbins,ptmin,ptmax, 20,0,20 );
748 return outputContainer;
770 printf(
"**** Print %s %s ****\n", GetName(), GetTitle() ) ;
773 printf(
"Min Pt = %3.2f\n",
GetMinPt());
774 printf(
"Max Pt = %3.2f\n",
GetMaxPt());
783 AliFatal(
"STOP!: You want to use CTS tracks in analysis but not read!! \n!!Check the configuration file!!");
795 Double_t vert[3] = {0,0,0};
797 AliDebug(1,Form(
"In CTS aod entries %d", ntracks));
800 AliESDEvent* esdEv =
dynamic_cast<AliESDEvent*
> (event);
801 AliAODEvent* aodEv =
dynamic_cast<AliAODEvent*
> (event);
828 nVtxSPD = esdEv->GetNumberOfPileupVerticesSPD();
829 nVtxTrk = esdEv->GetNumberOfPileupVerticesTracks();
834 nVtxSPD = aodEv->GetNumberOfPileupVerticesSPD();
835 nVtxTrk = aodEv->GetNumberOfPileupVerticesTracks();
841 Double_t bz =
event->GetMagneticField();
848 for(Int_t i = 0; i < ntracks; i++)
850 AliVTrack * track = (AliVTrack*) (
GetCTSTracks()->At(i));
861 AliAODTrack * aodTrack =
dynamic_cast<AliAODTrack*
>(track);
862 AliESDtrack * esdTrack =
dynamic_cast<AliESDtrack*
>(track);
866 Double_t frac = Double_t(aodTrack->GetTPCnclsS()) / Double_t(aodTrack->GetTPCncls());
871 if ( aodTrack->GetType()!= AliAODTrack::kPrimary )
876 ULong_t status = track->GetStatus();
877 Bool_t okTOF = (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ;
878 Double32_t tof = track->GetTOFsignal()*1e-3;
881 Double_t dcaCons = -999;
884 dcaCons = aodTrack->DCA();
888 Double_t dca[2] = {1e6,1e6};
889 Double_t covar[3] = {1e6,1e6,1e6};
890 track->PropagateToDCA(
GetReader()->GetInputEvent()->GetPrimaryVertex(),bz,100.,dca,covar);
892 Float_t trackDCA = dca[0];
910 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
956 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
989 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1024 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1066 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1072 Int_t trackBC = 1000;
1076 trackBC = track->GetTOFBunchCrossing(bz);
1101 else if(trackBC!=AliVTrack::kTOFBCNA)
1131 else if (trackBC < 0 )
1137 else if (trackBC > 0)
1147 if(TMath::Abs(vtxBC) > 0 && vtxBC!=AliVTrack::kTOFBCNA)
1172 fMomentum.SetPxPyPzE(track->Px(),track->Py(),track->Pz(),0);
1175 AliDebug(1,Form(
"Track pt %2.2f, eta %2.2f, phi %2.2f in fiducial cut %d",pt,eta,phi,in));
1190 Bool_t bITSRefit = (status & AliVTrack::kITSrefit) == AliVTrack::kITSrefit;
1191 Bool_t bConstrained = kFALSE;
1192 if (aodTrack) bConstrained = aodTrack->IsGlobalConstrained();
1193 else if(esdTrack) bConstrained = (!esdTrack->HasPointOnITSLayer(0) && !esdTrack->HasPointOnITSLayer(1));
1251 AliAODPWG4Particle tr = AliAODPWG4Particle(track->Px(),track->Py(),track->Pz(),0);
1252 tr.SetDetectorTag(
kCTS);
1253 tr.SetLabel(track->GetLabel());
1254 tr.SetTrackLabel(track->GetID(),-1);
1255 tr.SetChargedBit(track->Charge()>0);
1260 AliDebug(1,Form(
"Final aod branch entries %d",
GetOutputAODBranch()->GetEntriesFast()));
1275 AliDebug(1,Form(
"AOD branch entries %d", naod));
1281 for(Int_t iaod = 0; iaod < naod ; iaod++)
1291 if(track->GetChargedBit())
1319 Int_t label = track->GetLabel();
1325 TParticle * mom =
GetMCStack()->Particle(label);
1326 mompdg =TMath::Abs(mom->GetPdgCode());
1330 AliAODMCParticle * aodmom = 0;
1333 mompdg =TMath::Abs(aodmom->GetPdgCode());
1338 if (mompdg==211 ) mcType =
kmcPion;
1339 else if(mompdg==2212) mcType =
kmcProton;
1340 else if(mompdg==321 ) mcType =
kmcKaon;
1342 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
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
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.
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
TList * GetCreateOutputObjects()