37 #include <TParticle.h> 40 #include <TDatabasePDG.h> 41 #include <AliAnalysisDataSlot.h> 42 #include <AliAnalysisDataContainer.h> 45 #include "AliMCEvent.h" 46 #include "AliAnalysisManager.h" 47 #include "AliAODMCHeader.h" 48 #include "AliAODHandler.h" 50 #include "AliVertex.h" 51 #include "AliVVertex.h" 52 #include "AliESDVertex.h" 53 #include "AliAODVertex.h" 54 #include "AliVertexerTracks.h" 55 #include "AliExternalTrackParam.h" 56 #include "AliNeutralTrackParam.h" 57 #include "AliAODRecoDecay.h" 61 #include "AliESDtrack.h" 62 #include "AliAODMCParticle.h" 63 #include "AliAODEvent.h" 65 #include "AliAODInputHandler.h" 94 fOutputDStar_DStarPt(0),
97 fQuickSignalAnalysis(0),
106 fnPtBinsD0forD0ptbin(0),
107 fnPtBinsD0forDStarptbin(0),
108 fnPtBinsDStarforDStarptbin(0),
110 fnPtBinsD0forD0ptbinLimits(0),
111 fnPtBinsD0forDStarptbinLimits(0),
112 fnPtBinsDStarforDStarptbinLimits(0),
114 fPtBinLimitsD0forD0ptbin(0),
115 fPtBinLimitsD0forDStarptbin(0),
116 fPtBinLimitsDStarforDStarptbin(0),
117 fDaughterHistogramArray(),
118 fDaughterHistogramArray2D(),
119 fDaughterHistogramArrayExtra(),
120 fMotherHistogramArray(),
121 fMotherHistogramArray2D(),
122 fMotherHistogramArrayExtra()
177 Info(
"AliAnalysisTaskSEB0toDStarPi",
"Calling Constructor");
180 DefineInput(0,TChain::Class());
181 DefineOutput(1,TList::Class());
182 DefineOutput(2,TList::Class());
183 DefineOutput(3,TList::Class());
184 DefineOutput(4,TList::Class());
185 DefineOutput(5,TList::Class());
186 DefineOutput(6,TList::Class());
187 DefineOutput(7,TList::Class());
188 DefineOutput(8,TList::Class());
189 DefineOutput(9,TList::Class());
190 DefineOutput(10,TList::Class());
191 DefineOutput(11,TList::Class());
192 DefineOutput(12,TList::Class());
193 DefineOutput(13,TList::Class());
202 Info(
"~AliAnalysisTaskSEB0toDStarPi",
"Calling Destructor");
231 if(fDebug > 1) printf(
"AliAnalysisTaskSEB0toDStarPi::Init() \n");
251 Error(
"UserExec",
"NO EVENT FOUND!");
256 std::cout <<
"\r" <<
"Analysing event number: " <<
fEvents << std::endl;
264 std::bitset<32> maskEV(((AliAODInputHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected());
265 std::cout <<
"Event mask: " << maskEV << std::endl;
275 TClonesArray * D0TracksFromFriendFile = 0;
278 if(!aodEvent && AODEvent() && IsStandardAOD())
282 aodEvent =
dynamic_cast<AliAODEvent*
> (AODEvent());
285 AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
286 if(aodHandler->GetExtensions())
288 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
290 D0TracksFromFriendFile=(TClonesArray*)aodFromExt->GetList()->FindObject(
"D0toKpi");
295 D0TracksFromFriendFile=(TClonesArray*)aodEvent->GetList()->FindObject(
"D0toKpi");
300 if(!aodEvent->GetPrimaryVertex() || TMath::Abs(aodEvent->GetMagneticField())<0.001)
return;
305 TString trigclass=aodEvent->GetFiredTriggerClasses();
306 if(trigclass.Contains(
"C0SMH-B-NOPF-ALLNOTRD")||trigclass.Contains(
"C0SMH-B-NOPF-ALL"))
fCEvents->Fill(5);
326 AliAODVertex *primaryVertex = (AliAODVertex*)aodEvent->GetPrimaryVertex();
327 if(!primaryVertex)
return;
328 if(primaryVertex->GetNContributors()<1)
return;
331 if(!D0TracksFromFriendFile)
333 AliInfo(
"Could not find array of HF vertices, skipping the event");
336 else AliDebug(2, Form(
"Found %d vertices",D0TracksFromFriendFile->GetEntriesFast()));
346 TClonesArray *mcTrackArray =
nullptr;
347 if(
fUseMCInfo) mcTrackArray =
dynamic_cast<TClonesArray*
>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
351 TMatrix * B0toDStarPiLabelMatrix =
new TMatrix(0,7);
368 B0PionSelection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix);
370 D0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile);
371 DStarAndB0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile);
378 delete B0toDStarPiLabelMatrix; B0toDStarPiLabelMatrix = NULL;
410 AliAnalysisTaskSE::Terminate();
413 printf(
"ERROR: fOutput not available\n");
421 printf(
"ERROR: fListCuts not available\n");
427 printf(
"ERROR: fOutputD0Pion not available\n");
432 printf(
"ERROR: fOutputD0Kaon not available\n");
437 printf(
"ERROR: fOutputDStarPion not available\n");
442 printf(
"ERROR: fOutputB0Pion not available\n");
447 printf(
"ERROR: fOutputD0 not available\n");
452 printf(
"ERROR: fOutputDStar not available\n");
457 printf(
"ERROR: fOutputB0 not available\n");
462 printf(
"ERROR: fOutputD0_D0Pt not available\n");
467 printf(
"ERROR: fOutputD0_DStarPt not available\n");
472 printf(
"ERROR: fOutputDStar_DStarPt not available\n");
477 printf(
"ERROR: fOutputB0MC not available\n");
486 Info(
"UserCreateOutputObjects",
"CreateOutputObjects of task %s\n", GetName());
564 std::cout <<
"bins" <<
fnPtBins + 1 << std::endl;
576 std::cout <<
"limit " << i <<
" " <<
fPtBinLimits[i] << std::endl;
640 fCEvents =
new TH1F(
"fCEvents",
"conter",13,0,13);
642 fCEvents->GetXaxis()->SetTitle(
"1");
643 fCEvents->GetYaxis()->SetTitle(
"counts");
644 fCEvents->GetXaxis()->SetBinLabel(2,
"no. of events");
645 fCEvents->GetXaxis()->SetBinLabel(3,
"good prim vtx and B field");
646 fCEvents->GetXaxis()->SetBinLabel(4,
"no event selected");
647 fCEvents->GetXaxis()->SetBinLabel(5,
"no vtx contributors");
648 fCEvents->GetXaxis()->SetBinLabel(6,
"trigger for PbPb");
649 fCEvents->GetXaxis()->SetBinLabel(7,
"no z vtx");
650 fCEvents->GetXaxis()->SetBinLabel(12,
"no. of D0 fail to be rec");
655 TString name_mc_B0_pt =
"mc_B0_pt";
656 TH1F* hist_mc_B0_pt =
new TH1F(name_mc_B0_pt.Data(),
"Pt monte carlo B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
657 hist_mc_B0_pt->Sumw2();
658 hist_mc_B0_pt->SetLineColor(6);
659 hist_mc_B0_pt->SetMarkerStyle(20);
660 hist_mc_B0_pt->SetMarkerSize(0.6);
661 hist_mc_B0_pt->SetMarkerColor(6);
662 TH1F* histogram_mc_B0_pt = (TH1F*)hist_mc_B0_pt->Clone();
665 TString name_mc_B0_pion_pt =
"mc_B0_pion_pt";
666 TH1F* hist_mc_B0_pion_pt =
new TH1F(name_mc_B0_pion_pt.Data(),
"Pt monte carlo pion of B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
667 hist_mc_B0_pion_pt->Sumw2();
668 hist_mc_B0_pion_pt->SetLineColor(6);
669 hist_mc_B0_pion_pt->SetMarkerStyle(20);
670 hist_mc_B0_pion_pt->SetMarkerSize(0.6);
671 hist_mc_B0_pion_pt->SetMarkerColor(6);
672 TH1F* histogram_mc_B0_pion_pt = (TH1F*)hist_mc_B0_pion_pt->Clone();
675 TString name_mc_DStar_pt =
"mc_DStar_pt";
676 TH1F* hist_mc_DStar_pt =
new TH1F(name_mc_DStar_pt.Data(),
"Pt monte carlo DStar in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
677 hist_mc_DStar_pt->Sumw2();
678 hist_mc_DStar_pt->SetLineColor(6);
679 hist_mc_DStar_pt->SetMarkerStyle(20);
680 hist_mc_DStar_pt->SetMarkerSize(0.6);
681 hist_mc_DStar_pt->SetMarkerColor(6);
682 TH1F* histogram_mc_DStar_pt = (TH1F*)hist_mc_DStar_pt->Clone();
685 TString name_mc_DStar_pion_pt =
"mc_DStar_pion_pt";
686 TH1F* hist_mc_DStar_pion_pt =
new TH1F(name_mc_DStar_pion_pt.Data(),
"Pt monte carlo pion of DStar in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
687 hist_mc_DStar_pion_pt->Sumw2();
688 hist_mc_DStar_pion_pt->SetLineColor(6);
689 hist_mc_DStar_pion_pt->SetMarkerStyle(20);
690 hist_mc_DStar_pion_pt->SetMarkerSize(0.6);
691 hist_mc_DStar_pion_pt->SetMarkerColor(6);
692 TH1F* histogram_mc_DStar_pion_pt = (TH1F*)hist_mc_DStar_pion_pt->Clone();
695 TString name_mc_D0_pt =
"mc_D0_pt";
696 TH1F* hist_mc_D0_pt =
new TH1F(name_mc_D0_pt.Data(),
"Pt monte carlo D0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
697 hist_mc_D0_pt->Sumw2();
698 hist_mc_D0_pt->SetLineColor(6);
699 hist_mc_D0_pt->SetMarkerStyle(20);
700 hist_mc_D0_pt->SetMarkerSize(0.6);
701 hist_mc_D0_pt->SetMarkerColor(6);
702 TH1F* histogram_mc_D0_pt = (TH1F*)hist_mc_D0_pt->Clone();
705 TString name_mc_D0_pion_pt =
"mc_D0_pion_pt";
706 TH1F* hist_mc_D0_pion_pt =
new TH1F(name_mc_D0_pion_pt.Data(),
"Pt monte carlo pion of D0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
707 hist_mc_D0_pion_pt->Sumw2();
708 hist_mc_D0_pion_pt->SetLineColor(6);
709 hist_mc_D0_pion_pt->SetMarkerStyle(20);
710 hist_mc_D0_pion_pt->SetMarkerSize(0.6);
711 hist_mc_D0_pion_pt->SetMarkerColor(6);
712 TH1F* histogram_mc_D0_pion_pt = (TH1F*)hist_mc_D0_pion_pt->Clone();
715 TString name_mc_D0_kaon_pt =
"mc_D0_kaon_pt";
716 TH1F* hist_mc_D0_kaon_pt =
new TH1F(name_mc_D0_kaon_pt.Data(),
"Pt monte carlo kaon of D0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
717 hist_mc_D0_kaon_pt->Sumw2();
718 hist_mc_D0_kaon_pt->SetLineColor(6);
719 hist_mc_D0_kaon_pt->SetMarkerStyle(20);
720 hist_mc_D0_kaon_pt->SetMarkerSize(0.6);
721 hist_mc_D0_kaon_pt->SetMarkerColor(6);
722 TH1F* histogram_mc_D0_kaon_pt = (TH1F*)hist_mc_D0_kaon_pt->Clone();
727 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
728 TH1F* hist_dca_D0_DStarPion =
new TH1F(name_dca_D0_DStarPion.Data(),
"dca_D0_DStarPion; DCA [cm]; Entries",1000,0,0.2);
729 hist_dca_D0_DStarPion->Sumw2();
730 hist_dca_D0_DStarPion->SetLineColor(6);
731 hist_dca_D0_DStarPion->SetMarkerStyle(20);
732 hist_dca_D0_DStarPion->SetMarkerSize(0.6);
733 hist_dca_D0_DStarPion->SetMarkerColor(6);
734 TH1F* histogram_dca_D0_DStarPion = (TH1F*)hist_dca_D0_DStarPion->Clone();
737 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
738 TH1F* hist_dca_D0_B0Pion =
new TH1F(name_dca_D0_B0Pion.Data(),
"dca_D0_B0Pion; DCA [cm]; Entries",1000,0,0.2);
739 hist_dca_D0_B0Pion->Sumw2();
740 hist_dca_D0_B0Pion->SetLineColor(6);
741 hist_dca_D0_B0Pion->SetMarkerStyle(20);
742 hist_dca_D0_B0Pion->SetMarkerSize(0.6);
743 hist_dca_D0_B0Pion->SetMarkerColor(6);
744 TH1F* histogram_dca_D0_B0Pion = (TH1F*)hist_dca_D0_B0Pion->Clone();
747 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
748 TH1F* hist_dca_DStarPion_B0Pion =
new TH1F(name_dca_DStarPion_B0Pion.Data(),
"dca_DStarPion_B0Pion; DCA [cm]; Entries",1000,0,0.2);
749 hist_dca_DStarPion_B0Pion->Sumw2();
750 hist_dca_DStarPion_B0Pion->SetLineColor(6);
751 hist_dca_DStarPion_B0Pion->SetMarkerStyle(20);
752 hist_dca_DStarPion_B0Pion->SetMarkerSize(0.6);
753 hist_dca_DStarPion_B0Pion->SetMarkerColor(6);
754 TH1F* histogram_dca_DStarPion_B0Pion = (TH1F*)hist_dca_DStarPion_B0Pion->Clone();
757 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
758 TH1F* hist_dca_Signal_D0_DStarPion =
new TH1F(name_dca_Signal_D0_DStarPion.Data(),
"dca_Signal_D0_DStarPion; DCA [cm]; Entries",1000,0,0.2);
759 hist_dca_Signal_D0_DStarPion->Sumw2();
760 hist_dca_Signal_D0_DStarPion->SetLineColor(4);
761 hist_dca_Signal_D0_DStarPion->SetMarkerStyle(20);
762 hist_dca_Signal_D0_DStarPion->SetMarkerSize(0.6);
763 hist_dca_Signal_D0_DStarPion->SetMarkerColor(4);
764 TH1F* histogram_dca_Signal_D0_DStarPion = (TH1F*)hist_dca_Signal_D0_DStarPion->Clone();
765 fOutputB0MC->Add(histogram_dca_Signal_D0_DStarPion);
767 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
768 TH1F* hist_dca_Signal_D0_B0Pion =
new TH1F(name_dca_Signal_D0_B0Pion.Data(),
"dca_Signal_D0_B0Pion; DCA [cm]; Entries",1000,0,0.2);
769 hist_dca_Signal_D0_B0Pion->Sumw2();
770 hist_dca_Signal_D0_B0Pion->SetLineColor(4);
771 hist_dca_Signal_D0_B0Pion->SetMarkerStyle(20);
772 hist_dca_Signal_D0_B0Pion->SetMarkerSize(0.6);
773 hist_dca_Signal_D0_B0Pion->SetMarkerColor(4);
774 TH1F* histogram_dca_Signal_D0_B0Pion = (TH1F*)hist_dca_Signal_D0_B0Pion->Clone();
777 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
778 TH1F* hist_dca_Signal_DStarPion_B0Pion =
new TH1F(name_dca_Signal_DStarPion_B0Pion.Data(),
"dca_Signal_DStarPion_B0Pion; DCA [cm]; Entries",1000,0,0.2);
779 hist_dca_Signal_DStarPion_B0Pion->Sumw2();
780 hist_dca_Signal_DStarPion_B0Pion->SetLineColor(4);
781 hist_dca_Signal_DStarPion_B0Pion->SetMarkerStyle(20);
782 hist_dca_Signal_DStarPion_B0Pion->SetMarkerSize(0.6);
783 hist_dca_Signal_DStarPion_B0Pion->SetMarkerColor(4);
784 TH1F* histogram_dca_Signal_DStarPion_B0Pion = (TH1F*)hist_dca_Signal_DStarPion_B0Pion->Clone();
785 fOutputB0MC->Add(histogram_dca_Signal_DStarPion_B0Pion);
789 TString name_B0s_in_analysis =
"B0s_in_analysis";
790 TH1F* hist_B0s_in_analysis =
new TH1F(name_B0s_in_analysis.Data(),
"Number of B0 to kpipipi in the Analysis; Entries",10,0,10);
791 hist_B0s_in_analysis->Sumw2();
792 hist_B0s_in_analysis->SetLineColor(6);
793 hist_B0s_in_analysis->SetMarkerStyle(20);
794 hist_B0s_in_analysis->SetMarkerSize(0.6);
795 hist_B0s_in_analysis->SetMarkerColor(6);
796 hist_B0s_in_analysis->SetStats(kTRUE);
797 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(1,
"no. of B0s");
798 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(2,
"no. of B0s to kpipipi");
799 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(3,
"no. with all tracks in event");
800 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(4,
"no. ...");
801 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(5,
"no. ...");
802 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(6,
"no. ...");
803 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(7,
"no. ...");
804 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(8,
"no. ...");
805 TH1F* hist_B0s_in_analysis_mc = (TH1F*)hist_B0s_in_analysis->Clone();
808 TString name_B0s_per_bin =
"B0s_per_bin";
809 TH1F* hist_B0s_per_bin =
new TH1F(name_B0s_per_bin.Data(),
"Number of B0 to kpipipi in the Analysis per bin; Entries",
fnPtBins,0,
fnPtBins);
816 hist_B0s_per_bin->GetXaxis()->SetBinLabel(i+1,bin_name);
818 TH1F* hist_B0s_per_bin_mc = (TH1F*)hist_B0s_per_bin->Clone();
824 for (
Int_t i = 0; i < 4; i++){
833 for (
Int_t j = 0; j < 6; j++){
834 if(j==0) add_name =
"";
835 if(j==1) add_name =
"Signal";
836 if(j==2) add_name =
"Cut";
837 if(j==3) add_name =
"SignalCut";
838 if(j==4) add_name =
"Result";
839 if(j==5) add_name =
"SignalResult";
842 TString discription_Histogram =
"";
843 Int_t numberOfBins = 0;
847 for (
Int_t k = 0; k < 9; ++k)
849 if(k==0){name_Histogram =
"ptTrack"; discription_Histogram =
"pt track; p_{T} [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
850 if(k==1){name_Histogram =
"momentumTrack"; discription_Histogram =
"momentum track; p [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
851 if(k==2){name_Histogram =
"numberOfITS"; discription_Histogram =
"Number of ITS clusters track; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
852 if(k==3){name_Histogram =
"numberOfTPC"; discription_Histogram =
"Number of TPC clusters track; [#]; Entries"; numberOfBins = 601; lowerBound = -0.5; upperBound = 600.5;}
853 if(k==4){name_Histogram =
"pointsOnITS"; discription_Histogram =
"Number of ITS clusters track per layer; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
854 if(k==5){name_Histogram =
"nSigmaTPC"; discription_Histogram =
"n sigma TPC for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
855 if(k==6){name_Histogram =
"nSigmaTOF"; discription_Histogram =
"n sigma TOF for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
856 if(k==7){name_Histogram =
"nSigmaTPCandTOF"; discription_Histogram =
"n sigma TPC and TOF for track PID; a.u.; Entries"; numberOfBins = 1000; lowerBound = 0; upperBound = 10;}
857 if(k==8){name_Histogram =
"impactParameter"; discription_Histogram =
"Impact Parameter track; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
859 name_Histogram += add_name;
860 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
862 if(j%2==0) histogram->SetLineColor(6);
863 if(j%2==1) histogram->SetLineColor(4);
864 histogram->SetMarkerStyle(20);
865 histogram->SetMarkerSize(0.6);
866 if(j%2==0) histogram->SetMarkerColor(6);
867 if(j%2==1) histogram->SetMarkerColor(4);
868 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
869 listout->Add(histogram_Clone);
873 TString numberofparticlesperevent=
"numberofparticlesperevent";
874 numberofparticlesperevent += add_name;
875 TH1F* hist_numberofparticlesperevent =
new TH1F(numberofparticlesperevent.Data(),
"Number of particles per event; number of particles in one event; Entries",100,0,100);
876 hist_numberofparticlesperevent->Sumw2();
877 hist_numberofparticlesperevent->SetLineColor(6);
878 hist_numberofparticlesperevent->SetMarkerStyle(20);
879 hist_numberofparticlesperevent->SetMarkerSize(0.6);
880 hist_numberofparticlesperevent->SetMarkerColor(6);
881 TH1F* histogram_numberofparticlesperevent = (TH1F*)hist_numberofparticlesperevent->Clone();
882 listout->Add(histogram_numberofparticlesperevent);
886 TH1F * effectOfCuts =
new TH1F(
"effectOfCutsOnBackground",
"Removal counter",18,0,18);
887 effectOfCuts->SetStats(kTRUE);
888 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
889 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
890 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
891 effectOfCuts->GetXaxis()->SetBinLabel(2,
"1");
892 effectOfCuts->GetXaxis()->SetBinLabel(3,
"2");
893 effectOfCuts->GetXaxis()->SetBinLabel(4,
"3");
894 effectOfCuts->GetXaxis()->SetBinLabel(5,
"4");
895 effectOfCuts->GetXaxis()->SetBinLabel(6,
"5");
896 effectOfCuts->GetXaxis()->SetBinLabel(7,
"6");
897 effectOfCuts->GetXaxis()->SetBinLabel(8,
"7");
898 effectOfCuts->GetXaxis()->SetBinLabel(9,
"8");
899 effectOfCuts->GetXaxis()->SetBinLabel(10,
"9");
900 effectOfCuts->GetXaxis()->SetBinLabel(11,
"10");
901 effectOfCuts->GetXaxis()->SetBinLabel(12,
"11");
902 effectOfCuts->GetXaxis()->SetBinLabel(13,
"12");
903 effectOfCuts->GetXaxis()->SetBinLabel(14,
"13");
904 effectOfCuts->GetXaxis()->SetBinLabel(15,
"14");
905 effectOfCuts->GetXaxis()->SetBinLabel(16,
"15");
906 effectOfCuts->GetXaxis()->SetBinLabel(17,
"16");
907 effectOfCuts->GetXaxis()->SetBinLabel(18,
"17");
908 listout->Add(effectOfCuts);
911 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsOnSignal",
"Removal counter",18,0,18);
912 effectOfCutsMC->SetStats(kTRUE);
913 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
914 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
915 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
916 effectOfCutsMC->GetXaxis()->SetBinLabel(2,
"1");
917 effectOfCutsMC->GetXaxis()->SetBinLabel(3,
"2");
918 effectOfCutsMC->GetXaxis()->SetBinLabel(4,
"3");
919 effectOfCutsMC->GetXaxis()->SetBinLabel(5,
"4");
920 effectOfCutsMC->GetXaxis()->SetBinLabel(6,
"5");
921 effectOfCutsMC->GetXaxis()->SetBinLabel(7,
"6");
922 effectOfCutsMC->GetXaxis()->SetBinLabel(8,
"7");
923 effectOfCutsMC->GetXaxis()->SetBinLabel(9,
"8");
924 effectOfCutsMC->GetXaxis()->SetBinLabel(10,
"9");
925 effectOfCutsMC->GetXaxis()->SetBinLabel(11,
"10");
926 effectOfCutsMC->GetXaxis()->SetBinLabel(12,
"11");
927 effectOfCutsMC->GetXaxis()->SetBinLabel(13,
"12");
928 effectOfCutsMC->GetXaxis()->SetBinLabel(14,
"13");
929 effectOfCutsMC->GetXaxis()->SetBinLabel(15,
"14");
930 effectOfCutsMC->GetXaxis()->SetBinLabel(16,
"15");
931 effectOfCutsMC->GetXaxis()->SetBinLabel(17,
"16");
932 effectOfCutsMC->GetXaxis()->SetBinLabel(18,
"17");
933 listout->Add(effectOfCutsMC);
936 TString name_particle_pdg =
"particle_pdg";
937 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
938 hist_particle_pdg->Sumw2();
939 hist_particle_pdg->SetLineColor(6);
940 hist_particle_pdg->SetMarkerStyle(20);
941 hist_particle_pdg->SetMarkerSize(0.6);
942 hist_particle_pdg->SetMarkerColor(6);
943 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
944 listout->Add(histogram_particle_pdg);
947 TString name_particle_mother_pdg =
"particle_mother_pdg";
948 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
949 hist_particle_mother_pdg->Sumw2();
950 hist_particle_mother_pdg->SetLineColor(6);
951 hist_particle_mother_pdg->SetMarkerStyle(20);
952 hist_particle_mother_pdg->SetMarkerSize(0.6);
953 hist_particle_mother_pdg->SetMarkerColor(6);
954 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
955 listout->Add(histogram_particle_mother_pdg);
958 TString name_ptB0_vs_ptTrack =
"ptB0_vs_ptTrackBackground";
959 TH2F* hist_ptB0_vs_ptTrack =
new TH2F(name_ptB0_vs_ptTrack.Data(),
"Pt B0 vs Pt ; p_{T} B0 [GeV/c]; p_{T} track [GeV/c]",100,0,30,100,0,30);
960 hist_ptB0_vs_ptTrack->Sumw2();
961 hist_ptB0_vs_ptTrack->SetLineColor(6);
962 hist_ptB0_vs_ptTrack->SetMarkerStyle(20);
963 hist_ptB0_vs_ptTrack->SetMarkerSize(0.6);
964 hist_ptB0_vs_ptTrack->SetMarkerColor(6);
965 TH2F* histogram_ptB0_vs_ptTrack = (
TH2F*)hist_ptB0_vs_ptTrack->Clone();
966 listout->Add(histogram_ptB0_vs_ptTrack);
969 TString name_ptB0_vs_ptTrackMC =
"ptB0_vs_ptTrackSignal";
970 TH2F* hist_ptB0_vs_ptTrackMC =
new TH2F(name_ptB0_vs_ptTrackMC.Data(),
"Pt B0 vs Pt ; p_{T} B0 [GeV/c]; p_{T} track [GeV/c]",100,0,30,100,0,30);
971 hist_ptB0_vs_ptTrackMC->Sumw2();
972 hist_ptB0_vs_ptTrackMC->SetLineColor(4);
973 hist_ptB0_vs_ptTrackMC->SetMarkerStyle(20);
974 hist_ptB0_vs_ptTrackMC->SetMarkerSize(0.6);
975 hist_ptB0_vs_ptTrackMC->SetMarkerColor(6);
976 TH2F* histogram_ptB0_vs_ptTrackMC = (
TH2F*)hist_ptB0_vs_ptTrackMC->Clone();
977 listout->Add(histogram_ptB0_vs_ptTrackMC);
982 for (
Int_t i = 0; i < 6; i++){
986 Int_t nHistogramSets = 0;
994 for (
Int_t j = 0; j < nHistogramSets; j++){
997 if(j==0) add_name =
"";
998 if(j==1) add_name =
"Signal";
999 if(j==2) add_name =
"Cut";
1000 if(j==3) add_name =
"SignalCut";
1001 if(j==4) add_name =
"Result";
1002 if(j==5) add_name =
"SignalResult";
1003 if(j%2==0 && j>5) {add_name =
"_ptbin_"; add_name +=
fPtBinLimits[(j-6)/2]; add_name +=
"_to_"; add_name +=
fPtBinLimits[(j-6)/2 + 1];}
1004 if(j%2==1 && j>5) {add_name =
"Signal_ptbin_"; add_name +=
fPtBinLimits[(j-7)/2]; add_name +=
"_to_"; add_name +=
fPtBinLimits[(j-7)/2 + 1];}
1024 TString discription_Histogram =
"";
1025 Int_t numberOfBins = 0;
1028 Int_t numberOfBinsTwo = 0;
1032 for (
Int_t k = 0; k < 40; ++k)
1034 if(k==0){name_Histogram =
"ptMother"; discription_Histogram =
"pt mother; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1035 if(k==1){name_Histogram =
"ptFirstDaughter"; discription_Histogram =
"pt first daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1036 if(k==2){name_Histogram =
"ptSecondDaughter"; discription_Histogram =
"pt second daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1037 if(k==3){name_Histogram =
"etaMother"; discription_Histogram =
"eta mother; #eta; Entries"; numberOfBins = 100; lowerBound = -2; upperBound = 2;}
1038 if(k==4){name_Histogram =
"phiMother"; discription_Histogram =
"phi mother; #phi; Entries"; numberOfBins = 25; lowerBound = 0; upperBound = 2*TMath::Pi();}
1039 if(k==5){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1040 if(k==6){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1042 if(k==7){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1044 if(k==8){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle; [Cos(#theta)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1045 if(k==9){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product; [cm^{2}]; Entries"; numberOfBins = 500; lowerBound = -0.01; upperBound = 0.01;}
1046 if(k==10){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY; [cm^{2}]; Entries"; numberOfBins = 400; lowerBound = 0; upperBound = 0.1;}
1047 if(k==11){name_Histogram =
"invariantMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1048 if(k==12){name_Histogram =
"deltaMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1049 if(k==13){name_Histogram =
"dcaMother"; discription_Histogram =
"dca mother; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 0.25;}
1050 if(k==14){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1051 if(k==15){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1052 if(k==16){name_Histogram =
"pseudoProperDecayTime"; discription_Histogram =
"Pseudo Proper Decay Time w.r.t primary vertex; [a.u.]; Entries"; numberOfBins = 1000; lowerBound = -10; upperBound = 10;}
1053 if(k==17){name_Histogram =
"DecayTime"; discription_Histogram =
"Decay Time w.r.t primary vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.00000001;}
1054 if(k==18){name_Histogram =
"normDecayTime"; discription_Histogram =
"Normalized Decay Time w.r.t primary vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.0000001;}
1055 if(k==19){name_Histogram =
"angleMotherFirstDaughter"; discription_Histogram =
"flight angle mother and first daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1056 if(k==20){name_Histogram =
"angleMotherSecondDaughter"; discription_Histogram =
"flight angle mother and second daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = 0.5; upperBound = 1;}
1057 if(k==21){name_Histogram =
"angleBetweenBothDaughters"; discription_Histogram =
"angle between both daughters; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1058 if(k==22){name_Histogram =
"cosThetaStar"; discription_Histogram =
"cosThetaStar; [Cos(#theta*)]; Entries"; numberOfBins = 200; lowerBound = -2; upperBound = 2;}
1059 if(k==23){name_Histogram =
"vertexX"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1060 if(k==24){name_Histogram =
"vertexY"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1061 if(k==25){name_Histogram =
"vertexZ"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -20; upperBound = 20;}
1064 if(k==26){
if(i==0 || i==3 || i==4){name_Histogram =
"pointingAngleToDStar"; discription_Histogram =
"Pointing angle w.r.t. DStar decay vertex; [Cos(#theta)]; Entries"; numberOfBins = 200; lowerBound = -1; upperBound = 1;}
1066 if(k==27){
if(i==0 || i==3 || i==4){name_Histogram =
"d0MotherToDStar"; discription_Histogram =
"d0 Mother w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1068 if(k==28){
if(i==0 || i==3 || i==4){name_Histogram =
"d0FirstDaughterToDStar"; discription_Histogram =
"d0 first daughter w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1070 if(k==29){
if(i==0 || i==3 || i==4){name_Histogram =
"d0SecondDaughterToDStar"; discription_Histogram =
"d0 second daughter w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1072 if(k==30){
if(i==0 || i==3 || i==4){name_Histogram =
"impactProductToDStar"; discription_Histogram =
"impact product w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = -0.02; upperBound = 0.21;}
1074 if(k==31){
if(i==0 || i==3 || i==4){name_Histogram =
"impactProductXYToDStar"; discription_Histogram =
"impact product XY w.r.t. DStar decay vertex; [cm^{2}]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.5;}
1076 if(k==32){
if(i==0 || i==3 || i==4){name_Histogram =
"normDecayLengthToDStar"; discription_Histogram =
"Normalized decay length w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1078 if(k==33){
if(i==0 || i==3 || i==4){name_Histogram =
"pseudoProperDecayTimeToDStar"; discription_Histogram =
"Pseudo Proper Decay Time w.r.t DStar vertex; [a.u.]; Entries"; numberOfBins = 1000; lowerBound = -1; upperBound = 1;}
1080 if(k==34){
if(i==0 || i==3 || i==4){name_Histogram =
"DecayTimeToDStar"; discription_Histogram =
"Decay Time w.r.t DStar vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.00000001;}
1082 if(k==35){
if(i==0 || i==3 || i==4){name_Histogram =
"normDecayTimeToDStar"; discription_Histogram =
"Normalized Decay Time w.r.t DStar vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.00001;}
1085 if(k==36){name_Histogram =
"topomaticFirstDaughter"; discription_Histogram =
"topomatic d0 first daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1086 if(k==37){name_Histogram =
"topomaticSecondDaughter"; discription_Histogram =
"topomatic d0 second daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1087 if(k==38){name_Histogram =
"topomaticMax"; discription_Histogram =
"Max topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1088 if(k==39){name_Histogram =
"topomaticMin"; discription_Histogram =
"Min topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1090 name_Histogram += add_name;
1091 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1093 if(j%2==0) histogram->SetLineColor(6);
1094 if(j%2==1) histogram->SetLineColor(4);
1095 histogram->SetMarkerStyle(20);
1096 histogram->SetMarkerSize(0.6);
1097 if(j%2==0) histogram->SetMarkerColor(6);
1098 if(j%2==1) histogram->SetMarkerColor(4);
1099 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1100 listout->Add(histogram_Clone);
1105 name_Histogram =
"";
1106 discription_Histogram =
"";
1110 numberOfBinsTwo = 0;
1111 lowerBoundTwo = 0.0;
1112 upperBoundTwo = 0.0;
1117 Int_t nVariables = 8;
1118 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
1122 TString name2D =
"2D_Histograms";
1124 list2D->SetName(name2D);
1125 listout->Add(list2D);
1127 for (
Int_t k = 0; k < nHistograms; ++k)
1129 numberOfBins = 50; numberOfBinsTwo = 50;
1130 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1131 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1132 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1133 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1134 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1135 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1136 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1137 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1138 if(nFirst==8){name_Histogram =
"pseudoProperDecayTime"; discription_Histogram =
"Pseudo Proper Decay Time w.r.t primary vertex [a.u.];"; lowerBound = -10; upperBound = 10;}
1140 if(nSecond==0){name_Histogram +=
"d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1141 if(nSecond==1){name_Histogram +=
"d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1142 if(nSecond==2){name_Histogram +=
"d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1143 if(nSecond==3){name_Histogram +=
"pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1144 if(nSecond==4){name_Histogram +=
"impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1145 if(nSecond==5){name_Histogram +=
"impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1146 if(nSecond==6){name_Histogram +=
"vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1147 if(nSecond==7){name_Histogram +=
"normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1148 if(nSecond==8){name_Histogram +=
"pseudoProperDecayTime"; discription_Histogram +=
"Pseudo Proper Decay Time w.r.t primary vertex [a.u.];"; lowerBoundTwo = -10; upperBoundTwo = 10;}
1150 name_Histogram += add_name;
1151 TH2F* histogram =
new TH2F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo);
1153 if(j%2==0) histogram->SetLineColor(6);
1154 if(j%2==1) histogram->SetLineColor(4);
1155 histogram->SetMarkerStyle(20);
1156 histogram->SetMarkerSize(0.6);
1157 histogram->SetMarkerColor(6);
1158 TH2F* histogram_Clone = (
TH2F*)histogram->Clone();
1159 list2D->Add(histogram_Clone);
1163 if(nSecond>nVariables)
1166 nSecond = nFirst + 1;
1171 TH1F * effectOfCuts =
new TH1F(
"effectOfCuts",
"Removal counter",100,0,100);
1172 effectOfCuts->SetStats(kTRUE);
1173 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1174 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1175 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1176 for (
Int_t i = 1; i < 100; ++i)
1180 effectOfCuts->GetXaxis()->SetBinLabel(i+1,integerText);
1182 listout->Add(effectOfCuts);
1185 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsMC",
"Removal counter",100,0,100);
1186 effectOfCutsMC->SetStats(kTRUE);
1187 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1188 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1189 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1190 for (
Int_t i = 1; i < 100; ++i)
1194 effectOfCutsMC->GetXaxis()->SetBinLabel(i+1,integerText);
1196 listout->Add(effectOfCutsMC);
1199 TString name_particle_pdg =
"particle_pdg";
1200 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1201 hist_particle_pdg->Sumw2();
1202 hist_particle_pdg->SetLineColor(6);
1203 hist_particle_pdg->SetMarkerStyle(20);
1204 hist_particle_pdg->SetMarkerSize(0.6);
1205 hist_particle_pdg->SetMarkerColor(6);
1206 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1207 listout->Add(histogram_particle_pdg);
1210 TString name_particle_mother_pdg =
"particle_mother_pdg";
1211 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1212 hist_particle_mother_pdg->Sumw2();
1213 hist_particle_mother_pdg->SetLineColor(6);
1214 hist_particle_mother_pdg->SetMarkerStyle(20);
1215 hist_particle_mother_pdg->SetMarkerSize(0.6);
1216 hist_particle_mother_pdg->SetMarkerColor(6);
1217 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1218 listout->Add(histogram_particle_mother_pdg);
1221 TString name_distance_vertex_from_real =
"distance_vertex_from_real";
1222 TH1F* hist_distance_vertex_from_real =
new TH1F(name_distance_vertex_from_real.Data(),
"Distance reconstructed vertex from real vertex; distance [cm]; Entries",100,0,1);
1223 hist_distance_vertex_from_real->Sumw2();
1224 hist_distance_vertex_from_real->SetLineColor(6);
1225 hist_distance_vertex_from_real->SetMarkerStyle(20);
1226 hist_distance_vertex_from_real->SetMarkerSize(0.6);
1227 hist_distance_vertex_from_real->SetMarkerColor(6);
1228 TH1F* histogram_distance_vertex_from_real = (TH1F*)hist_distance_vertex_from_real->Clone();
1229 listout->Add(histogram_distance_vertex_from_real);
1232 TString name_distance_vertex_from_real_new =
"distance_vertex_from_real_new";
1233 TH1F* hist_distance_vertex_from_real_new =
new TH1F(name_distance_vertex_from_real_new.Data(),
"Distance reconstructed vertex from real vertex; distance [cm]; Entries",100,0,1);
1234 hist_distance_vertex_from_real_new->Sumw2();
1235 hist_distance_vertex_from_real_new->SetLineColor(6);
1236 hist_distance_vertex_from_real_new->SetMarkerStyle(20);
1237 hist_distance_vertex_from_real_new->SetMarkerSize(0.6);
1238 hist_distance_vertex_from_real_new->SetMarkerColor(6);
1239 TH1F* histogram_distance_vertex_from_real_new = (TH1F*)hist_distance_vertex_from_real_new->Clone();
1240 listout->Add(histogram_distance_vertex_from_real_new);
1243 TString name_momentum_resolution =
"momentum_resolution";
1244 TH1F* hist_momentum_resolution =
new TH1F(name_momentum_resolution.Data(),
"Momentum resolution; difference between real and reconstructed momentum [GeV/c]; Entries",1000,0,1);
1245 hist_momentum_resolution->Sumw2();
1246 hist_momentum_resolution->SetLineColor(6);
1247 hist_momentum_resolution->SetMarkerStyle(20);
1248 hist_momentum_resolution->SetMarkerSize(0.6);
1249 hist_momentum_resolution->SetMarkerColor(6);
1250 TH1F* histogram_momentum_resolution = (TH1F*)hist_momentum_resolution->Clone();
1251 listout->Add(histogram_momentum_resolution);
1256 for (
Int_t k = 0; k < fnPtBins+3; ++k){
1258 if(k==0) ptBinMother =
"";
1259 if(k==1) ptBinMother =
"_ptbin_6_to_inf";
1260 if(k==2) ptBinMother =
"_ptbin_3_to_inf";
1261 if(k>2) {ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[k-3]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[k-2];}
1263 TString name_deltaMassMother =
"deltaInvMassB0";
1264 name_deltaMassMother += ptBinMother;
1265 TH1F* hist_deltaMassMother =
new TH1F(name_deltaMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1266 hist_deltaMassMother->Sumw2();
1267 hist_deltaMassMother->SetLineColor(6);
1268 hist_deltaMassMother->SetMarkerStyle(20);
1269 hist_deltaMassMother->SetMarkerSize(0.6);
1270 hist_deltaMassMother->SetMarkerColor(6);
1271 TH1F* histogram_deltaMassMother = (TH1F*)hist_deltaMassMother->Clone();
1274 for (
Int_t i = 0; i < 3; ++i){
1276 if(i==0) signName =
"";
1277 if(i==1) signName =
"_SameSign";
1278 if(i==2) signName =
"_SignSum";
1279 TString name_invariantMassMother =
"invariantMassB0";
1280 name_invariantMassMother += ptBinMother + signName;
1281 TH1F* hist_invariantMassMother =
new TH1F(name_invariantMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1282 hist_invariantMassMother->Sumw2();
1283 hist_invariantMassMother->SetLineColor(6);
1284 hist_invariantMassMother->SetMarkerStyle(20);
1285 hist_invariantMassMother->SetMarkerSize(0.6);
1286 hist_invariantMassMother->SetMarkerColor(6);
1287 TH1F* histogram_invariantMassMother = (TH1F*)hist_invariantMassMother->Clone();
1292 TString name_cutEffectBackground =
"cutEffectBackground";
1293 TH2I* hist_cutEffectBackground =
new TH2I(name_cutEffectBackground.Data(),
"Effect of Cuts on background; cut number; cut number",99,0,99,99,0,99);
1294 for (
int i = 0; i < 99; ++i)
1298 hist_cutEffectBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1299 hist_cutEffectBackground->GetYaxis()->SetBinLabel(i+1,integerText);
1301 TH2I* histogram_cutEffectBackground = (TH2I*)hist_cutEffectBackground->Clone();
1304 TString name_cutEffectSignal =
"cutEffectSignal";
1305 TH2I* hist_cutEffectSignal =
new TH2I(name_cutEffectSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99,99,0,99);
1306 for (
Int_t i = 0; i < 99; ++i)
1310 hist_cutEffectSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1311 hist_cutEffectSignal->GetYaxis()->SetBinLabel(i+1,integerText);
1313 TH2I* histogram_cutEffectSignal = (TH2I*)hist_cutEffectSignal->Clone();
1316 TString name_cutEffectUniqueBackground =
"cutEffectUniqueBackground";
1317 TH1I* hist_cutEffectUniqueBackground =
new TH1I(name_cutEffectUniqueBackground.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1318 for (
Int_t i = 0; i < 99; ++i)
1322 hist_cutEffectUniqueBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1324 TH1I* histogram_cutEffectUniqueBackground = (
TH1I*)hist_cutEffectUniqueBackground->Clone();
1325 fOutputB0MC->Add(histogram_cutEffectUniqueBackground);
1327 TString name_cutEffectUniqueSignal =
"cutEffectUniqueSignal";
1328 TH1I* hist_cutEffectUniqueSignal =
new TH1I(name_cutEffectUniqueSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1329 for (
Int_t i = 0; i < 99; ++i)
1333 hist_cutEffectUniqueSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1335 TH1I* histogram_cutEffectUniqueSignal = (
TH1I*)hist_cutEffectUniqueSignal->Clone();
1336 fOutputB0MC->Add(histogram_cutEffectUniqueSignal);
1338 TString name_totalITSBackground =
"totalITSBackground";
1339 TH1F* hist_totalITSBackground =
new TH1F(name_totalITSBackground.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1340 hist_totalITSBackground->Sumw2();
1341 hist_totalITSBackground->SetLineColor(6);
1342 hist_totalITSBackground->SetMarkerStyle(20);
1343 hist_totalITSBackground->SetMarkerSize(0.6);
1344 hist_totalITSBackground->SetMarkerColor(6);
1345 TH1F* histogram_totalITSBackground = (TH1F*)hist_totalITSBackground->Clone();
1348 TString name_totalITSSignal =
"totalITSSignal";
1349 TH1F* hist_totalITSSignal =
new TH1F(name_totalITSSignal.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1350 hist_totalITSSignal->Sumw2();
1351 hist_totalITSSignal->SetLineColor(6);
1352 hist_totalITSSignal->SetMarkerStyle(20);
1353 hist_totalITSSignal->SetMarkerSize(0.6);
1354 hist_totalITSSignal->SetMarkerColor(6);
1355 TH1F* histogram_totalITSSignal = (TH1F*)hist_totalITSSignal->Clone();
1358 TString name_totalTPCBackground =
"totalTPCBackground";
1359 TH1F* hist_totalTPCBackground =
new TH1F(name_totalTPCBackground.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1360 hist_totalTPCBackground->Sumw2();
1361 hist_totalTPCBackground->SetLineColor(6);
1362 hist_totalTPCBackground->SetMarkerStyle(20);
1363 hist_totalTPCBackground->SetMarkerSize(0.6);
1364 hist_totalTPCBackground->SetMarkerColor(6);
1365 TH1F* histogram_totalTPCBackground = (TH1F*)hist_totalTPCBackground->Clone();
1368 TString name_totalTPCSignal =
"totalTPCSignal";
1369 TH1F* hist_totalTPCSignal =
new TH1F(name_totalTPCSignal.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1370 hist_totalTPCSignal->Sumw2();
1371 hist_totalTPCSignal->SetLineColor(6);
1372 hist_totalTPCSignal->SetMarkerStyle(20);
1373 hist_totalTPCSignal->SetMarkerSize(0.6);
1374 hist_totalTPCSignal->SetMarkerColor(6);
1375 TH1F* histogram_totalTPCSignal = (TH1F*)hist_totalTPCSignal->Clone();
1378 TString name_totalSigmaPIDBackground =
"totalSigmaPIDBackground";
1379 TH1F* hist_totalSigmaPIDBackground =
new TH1F(name_totalSigmaPIDBackground.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1380 hist_totalSigmaPIDBackground->Sumw2();
1381 hist_totalSigmaPIDBackground->SetLineColor(6);
1382 hist_totalSigmaPIDBackground->SetMarkerStyle(20);
1383 hist_totalSigmaPIDBackground->SetMarkerSize(0.6);
1384 hist_totalSigmaPIDBackground->SetMarkerColor(6);
1385 TH1F* histogram_totalSigmaPIDBackground = (TH1F*)hist_totalSigmaPIDBackground->Clone();
1386 fOutputB0MC->Add(histogram_totalSigmaPIDBackground);
1388 TString name_totalSigmaPIDSignal =
"totalSigmaPIDSignal";
1389 TH1F* hist_totalSigmaPIDSignal =
new TH1F(name_totalSigmaPIDSignal.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1390 hist_totalSigmaPIDSignal->Sumw2();
1391 hist_totalSigmaPIDSignal->SetLineColor(6);
1392 hist_totalSigmaPIDSignal->SetMarkerStyle(20);
1393 hist_totalSigmaPIDSignal->SetMarkerSize(0.6);
1394 hist_totalSigmaPIDSignal->SetMarkerColor(6);
1395 TH1F* histogram_totalSigmaPIDSignal = (TH1F*)hist_totalSigmaPIDSignal->Clone();
1405 AliESDVertex *vertexESD = 0;
1406 AliAODVertex *vertexAOD = 0;
1408 AliVertexerTracks *vertexer =
new AliVertexerTracks(bField);
1410 vertexer->SetVtxStart((AliESDVertex*)primary);
1411 vertexESD = (AliESDVertex*)vertexer->VertexForSelectedESDTracks(tracks);
1413 delete vertexer; vertexer=NULL;
1415 if(!vertexESD)
return vertexAOD;
1418 if(vertexESD->GetNContributors()!=tracks->GetEntriesFast())
1420 delete vertexESD; vertexESD=NULL;
1426 for(
Int_t a=0;a<3;a++)pos[a]=0.;
1427 for(
Int_t b=0;b<6;b++)cov[b]=0.;
1430 vertexESD->GetXYZ(pos);
1431 vertexESD->GetCovMatrix(cov);
1434 Double_t vertRadius2=pos[0]*pos[0]+pos[1]*pos[1];
1437 delete vertexESD; vertexESD=NULL;
1441 chi2perNDF = vertexESD->GetChi2toNDF();
1442 dispersion = vertexESD->GetDispersion();
1443 delete vertexESD; vertexESD=NULL;
1445 vertexAOD =
new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs);
1452 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
1453 for (
Int_t i=0; i<mcTrackArray->GetEntriesFast(); i++){
1455 Int_t mcLabelPionB0 = 0;
1456 Int_t mcLabelPionDStar = 0;
1457 Int_t mcLabelPionD0 = 0;
1458 Int_t mcLabelKaon = 0;
1459 Int_t mcLabelD0 = 0;
1460 Int_t mcLabelDStar = 0;
1461 Int_t mcLabelB0 = 0;
1466 Bool_t mcPionB0Present = kFALSE;
1467 Bool_t mcPionDStarPresent = kFALSE;
1468 Bool_t mcPionD0Present = kFALSE;
1469 Bool_t mcKaonPresent = kFALSE;
1472 AliAODMCParticle *mcTrackParticle =
dynamic_cast< AliAODMCParticle*
>(mcTrackArray->At(i));
1473 if(!mcTrackParticle) {std::cout <<
"no particle" << std::endl;
continue;}
1474 Int_t pdgCodeMC=TMath::Abs(mcTrackParticle->GetPdgCode());
1476 if (pdgCodeMC==511){
1479 Int_t nDaughterB0 = mcTrackParticle->GetNDaughters();
1480 ptMC[0] = mcTrackParticle->Pt();
1482 TString fillthis=
"B0s_in_analysis";
1483 ((TH1F*)(listout->FindObject(fillthis)))->Fill(0);
1486 for(
Int_t iDaughterB0=0; iDaughterB0<2; iDaughterB0++){
1488 AliAODMCParticle* daughterB0 = (AliAODMCParticle*)mcTrackArray->At(mcTrackParticle->GetDaughter(iDaughterB0));
1489 if(!daughterB0)
break;
1490 Int_t pdgCodeDaughterB0=TMath::Abs(daughterB0->GetPdgCode());
1492 if (pdgCodeDaughterB0==211){
1493 mcLabelPionB0 = mcTrackParticle->GetDaughter(iDaughterB0);
1494 mcPionB0Present = kTRUE;
1495 ptMC[1] = daughterB0->Pt();
1497 }
else if (pdgCodeDaughterB0==413){
1498 mcLabelDStar = mcTrackParticle->GetDaughter(iDaughterB0);
1499 Int_t nDaughterDStar = daughterB0->GetNDaughters();
1500 ptMC[2] = daughterB0->Pt();
1502 if(nDaughterDStar==2){
1503 for(
Int_t iDaughterDStar=0; iDaughterDStar<2; iDaughterDStar++){
1505 AliAODMCParticle* daughterDStar = (AliAODMCParticle*)mcTrackArray->At(daughterB0->GetDaughter(iDaughterDStar));
1506 if(!daughterDStar)
break;
1507 Int_t pdgCodeDaughterDStar=TMath::Abs(daughterDStar->GetPdgCode());
1509 if (pdgCodeDaughterDStar==211){
1510 mcLabelPionDStar = daughterB0->GetDaughter(iDaughterDStar);
1511 mcPionDStarPresent = kTRUE;
1512 ptMC[3] = daughterDStar->Pt();
1514 }
else if (pdgCodeDaughterDStar==421){
1515 mcLabelD0 = daughterB0->GetDaughter(iDaughterDStar);
1516 Int_t nDaughterD0 = daughterDStar->GetNDaughters();
1517 ptMC[4] = daughterDStar->Pt();
1520 for(
Int_t iDaughterD0=0; iDaughterD0<2; iDaughterD0++){
1522 AliAODMCParticle* daughterD0 = (AliAODMCParticle*)mcTrackArray->At(daughterDStar->GetDaughter(iDaughterD0));
1523 if(!daughterD0)
break;
1524 Int_t pdgCodeDaughterD0=TMath::Abs(daughterD0->GetPdgCode());
1526 if (pdgCodeDaughterD0==211){
1527 mcLabelPionD0 = daughterDStar->GetDaughter(iDaughterD0);
1528 ptMC[5] = daughterD0->Pt();
1529 mcPionD0Present = kTRUE;
1531 }
else if (pdgCodeDaughterD0==321){
1532 mcLabelKaon = daughterDStar->GetDaughter(iDaughterD0);;
1533 mcKaonPresent = kTRUE;
1534 ptMC[6] = daughterD0->Pt();
1547 if(mcPionB0Present && mcPionDStarPresent && mcPionD0Present && mcKaonPresent){
1548 Int_t rows = B0toDStarPiLabelMatrix->GetNrows();
1550 B0toDStarPiLabelMatrix->ResizeTo(rows+1,7);
1551 particleMatrix(rows,0) = mcLabelPionB0;
1552 particleMatrix(rows,1) = mcLabelPionDStar;
1553 particleMatrix(rows,2) = mcLabelPionD0;
1554 particleMatrix(rows,3) = mcLabelKaon;
1555 particleMatrix(rows,4) = mcLabelD0;
1556 particleMatrix(rows,5) = mcLabelDStar;
1557 particleMatrix(rows,6) = mcLabelB0;
1560 TString fillthis=
"B0s_in_analysis";
1561 ((TH1F*)(listout->FindObject(fillthis)))->Fill(1);
1563 fillthis=
"B0s_per_bin";
1566 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
1569 fillthis=
"mc_B0_pt";
1570 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
1571 fillthis=
"mc_B0_pion_pt";
1572 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[1]);
1573 fillthis=
"mc_DStar_pt";
1574 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[2]);
1575 fillthis=
"mc_DStar_pion_pt";
1576 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[3]);
1577 fillthis=
"mc_D0_pt";
1578 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[4]);
1579 fillthis=
"mc_D0_pion_pt";
1580 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[5]);
1581 fillthis=
"mc_D0_kaon_pt";
1582 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[6]);
1589 Int_t numberOfB0s = 0;
1591 for (
Int_t i = 0; i < B0toDStarPiLabelMatrix->GetNrows(); i++)
1593 Int_t particleCounter = 0;
1594 for (
Int_t j = 0; j < 4; j++)
1596 Int_t labelParticleInList = (
Int_t)particleMatrix(i,j);
1597 for (
Int_t k=0; k<aodevent->GetNumberOfTracks(); k++)
1599 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodevent->GetTrack(k));
1600 if(!aodTrack) AliFatal(
"Not a standard AOD");
1601 if(TMath::Abs(aodTrack->Eta())>0.8)
continue;
1602 if(aodTrack->GetITSNcls() < 1)
continue;
1603 if(aodTrack->GetTPCNcls() < 1)
continue;
1604 if(aodTrack->GetLabel() == labelParticleInList)
1612 if (particleCounter==4)
1614 TString fillthis=
"B0s_in_analysis";
1615 ((TH1F*)(listout->FindObject(fillthis)))->Fill(2);
1617 correctLabelArray.Set(numberOfB0s);
1618 correctLabelArray.AddAt(i,numberOfB0s-1);
1622 for (
Int_t i = 0; i < correctLabelArray.GetSize(); i++)
1624 particleMatrix(i,0) = (
Int_t)particleMatrix(correctLabelArray[i],0);
1625 particleMatrix(i,1) = (
Int_t)particleMatrix(correctLabelArray[i],1);
1626 particleMatrix(i,2) = (
Int_t)particleMatrix(correctLabelArray[i],2);
1627 particleMatrix(i,3) = (
Int_t)particleMatrix(correctLabelArray[i],3);
1628 particleMatrix(i,4) = (
Int_t)particleMatrix(correctLabelArray[i],4);
1629 particleMatrix(i,5) = (
Int_t)particleMatrix(correctLabelArray[i],5);
1630 particleMatrix(i,6) = (
Int_t)particleMatrix(correctLabelArray[i],6);
1632 B0toDStarPiLabelMatrix->ResizeTo(correctLabelArray.GetSize(),7);
1639 Int_t numberofparticles = 0;
1640 Int_t numberofparticlesused = 0;
1641 Int_t iClonesArray = 0;
1646 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
1647 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
1648 if(!aodTrack) AliFatal(
"Not a standard AOD");
1651 if(aodTrack->GetITSNcls() < 1)
continue;
1652 if(aodTrack->GetTPCNcls() < 1)
continue;
1653 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
1654 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
1655 if(aodTrack->GetID() < 0)
continue;
1657 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
1659 Int_t mcLabelParticle = -1;
1660 Int_t pdgParticle = -1;
1661 mcLabelParticle = aodTrack->GetLabel();
1663 numberofparticles++;
1666 Double_t pt_track = aodTrack->Pt();
1667 Double_t momentum_track = aodTrack->P();
1668 Int_t numberOfITS = aodTrack->GetITSNcls();
1669 Int_t numberOfTPC = aodTrack->GetTPCNcls();
1672 Int_t pionPIDnumber = 2;
1673 Int_t kaonPIDnumber = 3;
1678 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
1679 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
1681 AliExternalTrackParam particleTrack;
1682 particleTrack.CopyFromVTrack(aodTrack);
1684 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
1687 Bool_t isDesiredCandidate = kFALSE;
1689 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
1690 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
1691 if(mcLabelParticle == (
Int_t)particleMatrix(k,1)){
1692 isDesiredCandidate = kTRUE;
1698 Int_t daughterType = 2;
1707 for (
Int_t j = 0; j < 10; ++j)
1715 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1718 if(isDesiredCandidate)
1726 for (
Int_t j = 0; j < 10; ++j)
1734 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1743 if(isDesiredCandidate) {
1750 if(isDesiredCandidate) {
1757 if(isDesiredCandidate) {
1764 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
1765 if(isDesiredCandidate) {
1773 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
1774 if(isDesiredCandidate) {
1783 if(isDesiredCandidate) {
1791 if(isDesiredCandidate) {
1800 if(isDesiredCandidate) {
1813 for (
Int_t j = 0; j < 10; ++j)
1821 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1824 if(isDesiredCandidate)
1832 for (
Int_t j = 0; j < 10; ++j)
1840 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1845 numberofparticlesused++;
1856 Int_t numberofparticles = 0;
1857 Int_t numberofparticlesused = 0;
1858 Int_t iClonesArray = 0;
1863 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
1864 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
1865 if(!aodTrack) AliFatal(
"Not a standard AOD");
1868 if(aodTrack->GetITSNcls() < 1)
continue;
1869 if(aodTrack->GetTPCNcls() < 1)
continue;
1870 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
1871 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
1872 if(aodTrack->GetID() < 0)
continue;
1874 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
1877 Int_t mcLabelParticle = -1;
1878 Int_t pdgParticle = -1;
1879 mcLabelParticle = aodTrack->GetLabel();
1881 numberofparticles++;
1884 Double_t pt_track = aodTrack->Pt();
1885 Double_t momentum_track = aodTrack->P();
1886 Int_t numberOfITS = aodTrack->GetITSNcls();
1887 Int_t numberOfTPC = aodTrack->GetTPCNcls();
1890 Int_t pionPIDnumber = 2;
1891 Int_t kaonPIDnumber = 3;
1896 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
1897 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
1899 AliExternalTrackParam particleTrack;
1900 particleTrack.CopyFromVTrack(aodTrack);
1902 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
1906 Bool_t isDesiredCandidate = kFALSE;
1908 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
1909 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
1910 if(mcLabelParticle == (
Int_t)particleMatrix(k,0)){
1911 isDesiredCandidate = kTRUE;
1917 Int_t daughterType = 3;
1925 for (
Int_t j = 0; j < 10; ++j)
1933 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1936 if(isDesiredCandidate)
1944 for (
Int_t j = 0; j < 10; ++j)
1952 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1961 if(isDesiredCandidate) {
1968 if(isDesiredCandidate) {
1975 if(isDesiredCandidate) {
1982 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
1983 if(isDesiredCandidate) {
1991 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
1992 if(isDesiredCandidate) {
2001 if(isDesiredCandidate) {
2009 if(isDesiredCandidate) {
2018 if(isDesiredCandidate) {
2031 for (
Int_t j = 0; j < 10; ++j)
2039 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2042 if(isDesiredCandidate)
2050 for (
Int_t j = 0; j < 10; ++j)
2058 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2064 numberofparticlesused++;
2079 for (
Int_t j = 0; j < D0TracksFromFriendFile->GetEntriesFast(); j++)
2084 if(!trackD0) {std::cout <<
"found none" << std::endl;
continue;}
2085 if(trackD0 == NULL) {std::cout <<
"found NULL" << std::endl;
continue;}
2093 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(trackD0->GetDaughter(0));
2094 AliAODTrack * trackSecondDaughter = (AliAODTrack*)(trackD0->GetDaughter(1));
2096 AliAODVertex *vertexMother = (AliAODVertex*)trackD0->GetSecondaryVtx();
2099 Int_t pdgCodeMother = -1;
2100 Float_t pdgCodeGrandMother = -1;
2101 Bool_t isDesiredCandidate = kFALSE;
2102 Int_t motherType, histType;
2104 Int_t mcLabelD0 = -1;
2112 isDesiredCandidate = kTRUE;
2114 Int_t mcLabelFirstTrack = -1;
2115 mcLabelFirstTrack = trackFirstDaughter->GetLabel();
2117 if(mcLabelFirstTrack >= 0)
2119 AliAODMCParticle *mcParticleFirstTrack = (AliAODMCParticle*)mcTrackArray->At(mcLabelFirstTrack);
2120 AliAODMCParticle *mcMotherParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0);
2122 if(mcParticleFirstTrack && mcMotherParticle)
2124 pdgCodeMother = mcMotherParticle->GetPdgCode();
2126 Double_t vertex_distance = TMath::Sqrt((vertexMother->GetX() - mcParticleFirstTrack->Xv())*(vertexMother->GetX() - mcParticleFirstTrack->Xv()) + (vertexMother->GetY() - mcParticleFirstTrack->Yv())*(vertexMother->GetY() - mcParticleFirstTrack->Yv()) + (vertexMother->GetZ() - mcParticleFirstTrack->Zv())*(vertexMother->GetZ() - mcParticleFirstTrack->Zv()));
2129 Double_t momentum_resolution = TMath::Sqrt((trackD0->Px() - mcMotherParticle->Px())*(trackD0->Px() - mcMotherParticle->Px()) + (trackD0->Py() - mcMotherParticle->Py())*(trackD0->Py() - mcMotherParticle->Py()) + (trackD0->Pz() - mcMotherParticle->Pz())*(trackD0->Pz() - mcMotherParticle->Pz()));
2141 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
2145 Bool_t cutMother = kFALSE;
2147 Bool_t bCutArray[25] = {0};
2149 if(cutReturnValue == -1) cutMother = kTRUE;
2150 if(cutReturnValue == 0) cutMother = kTRUE;
2155 for (
Int_t k = 0; k < 25; ++k)
2157 if (bCutArray[k] == kTRUE){
2158 if(isDesiredCandidate){
2170 if(isDesiredCandidate){
2183 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
2203 Int_t ObjectNumber = TProcessID::GetObjectCount();
2206 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(aodEvent->GetTrack(
fDStarPionTracks->at(i)));
2207 if(!trackFirstDaughter)
continue;
2210 if(trackFirstDaughter->Charge() == -1) pdgD0 = -421;
2218 if(!trackSecondDaughter) {std::cout <<
"found none" << std::endl;
continue;}
2219 if(trackSecondDaughter == NULL) {std::cout <<
"found NULL" << std::endl;
continue;}
2222 if(trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(0) || trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(1))
continue;
2225 if(trackFirstDaughter->Charge() == trackSecondDaughter->Charge() || TMath::Abs(trackFirstDaughter->Charge() + trackSecondDaughter->Charge()) != 1)
continue;
2229 if(trackFirstDaughter->Charge() == -1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->Charge() != -1)
continue;
2230 if(trackFirstDaughter->Charge() == 1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->Charge() != 1)
continue;
2234 if(trackFirstDaughter->Charge()==1)
2236 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),2)))
continue;
2237 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),3)))
continue;
2238 }
else if (trackFirstDaughter->Charge()==-1){
2239 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),3)))
continue;
2240 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),2)))
continue;
2244 AliExternalTrackParam DStarPionTrackParam;
2245 DStarPionTrackParam.CopyFromVTrack(trackFirstDaughter);
2246 AliExternalTrackParam D0TrackParam;
2247 D0TrackParam.CopyFromVTrack(trackSecondDaughter);
2252 tracksTestVertex.Add(&DStarPionTrackParam);
2253 tracksTestVertex.Add(&D0TrackParam);
2256 AliAODVertex *testVertex =
RecalculateVertex(primaryVertex,&tracksTestVertex,bz,dispersionTest);
2257 if(!testVertex) {
delete testVertex; testVertex = NULL;
continue;}
2259 Double_t d0z0Test[2],covd0z0Test[3];
2262 DStarPionTrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
2263 D0TrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
2264 delete testVertex; testVertex = NULL;
2266 Double_t pdgMassPion = TDatabasePDG::Instance()->GetParticle(211)->Mass();
2267 Double_t pdgMassD0 = TDatabasePDG::Instance()->GetParticle(421)->Mass();
2268 Double_t pdgMassDStar = TDatabasePDG::Instance()->GetParticle(413)->Mass();
2270 Double_t energyDStarPion = pdgMassPion*pdgMassPion + DStarPionTrackParam.Px()*DStarPionTrackParam.Px()+DStarPionTrackParam.Py()*DStarPionTrackParam.Py()+DStarPionTrackParam.Pz()*DStarPionTrackParam.Pz();
2271 Double_t energyD0 = pdgMassD0*pdgMassD0 + D0TrackParam.Px()*D0TrackParam.Px()+D0TrackParam.Py()*D0TrackParam.Py()+D0TrackParam.Pz()*D0TrackParam.Pz();
2272 Double_t energySum = TMath::Sqrt(energyDStarPion) + TMath::Sqrt(energyD0);
2274 Double_t pxDStarTest = DStarPionTrackParam.Px() + D0TrackParam.Px();
2275 Double_t pyDStarTest = DStarPionTrackParam.Py() + D0TrackParam.Py();
2276 Double_t pzDStarTest = DStarPionTrackParam.Pz() + D0TrackParam.Pz();
2277 Double_t p2DStarTest = pxDStarTest*pxDStarTest + pyDStarTest*pyDStarTest + pzDStarTest*pzDStarTest;
2279 Double_t invMassDStarTest = TMath::Sqrt(energySum*energySum-p2DStarTest);
2282 Int_t nCutIndex = 35;
2283 Bool_t bCutArrayTemp[25];
2284 Double_t cutVariableValue = TMath::Abs(invMassDStarTest-pdgMassDStar)/2.0;
2286 if(!bPassedCut)
continue;
2294 AliAODTrack * trackB0Pion =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(
fB0PionTracks->at(i)));
2295 if(!trackB0Pion)
continue;
2298 AliAODTrack* twoProngdaughter0 = (AliAODTrack*)trackSecondDaughter->GetDaughter(0);
2299 AliAODTrack* twoProngdaughter1 = (AliAODTrack*)trackSecondDaughter->GetDaughter(1);
2300 UShort_t idProng0 = twoProngdaughter0->GetID();
2301 UShort_t idProng1 = twoProngdaughter1->GetID();
2303 if(trackB0Pion->GetID() == trackFirstDaughter->GetID() || trackB0Pion->GetID() == idProng0 || trackB0Pion->GetID() == idProng1)
continue;
2308 Bool_t bSameSign = kFALSE;
2309 if(trackB0Pion->Charge() == (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) && trackB0Pion->Charge() + (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) != 0) bSameSign = kTRUE;
2318 AliExternalTrackParam firstTrack;
2319 firstTrack.CopyFromVTrack(trackFirstDaughter);
2320 AliExternalTrackParam secondTrack;
2321 secondTrack.CopyFromVTrack(trackSecondDaughter);
2322 AliExternalTrackParam thirdTrack;
2323 thirdTrack.CopyFromVTrack(trackB0Pion);
2326 TObjArray daughterTracksWithRecalculation;
2328 daughterTracksWithRecalculation.Add(&firstTrack);
2329 daughterTracksWithRecalculation.Add(&secondTrack);
2330 daughterTracksWithRecalculation.Add(&thirdTrack);
2333 AliAODVertex *vertexMother =
RecalculateVertex(primaryVertex,&daughterTracksWithRecalculation,bz,dispersion);
2334 if(!vertexMother) {
delete vertexMother; vertexMother = NULL;
continue;}
2337 if(vertexMother->GetNDaughters()!=2)
2339 std::cout <<
"bad reconstruction - number of daughters for vertex is incorrect" << std::endl;
2340 delete vertexMother; vertexMother = NULL;
2344 Double_t xdummyDStar=0.,ydummyDStar=0.,eDStar[2];
2345 Double_t d0z0DStar[2],covd0z0DStar[3],d0DStar[2],d0errDStar[2];
2348 firstTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
2349 secondTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
2351 Double_t pxDStar[2],pyDStar[2],pzDStar[2];
2352 pxDStar[0] = firstTrack.Px();
2353 pyDStar[0] = firstTrack.Py();
2354 pzDStar[0] = firstTrack.Pz();
2355 pxDStar[1] = secondTrack.Px();
2356 pyDStar[1] = secondTrack.Py();
2357 pzDStar[1] = secondTrack.Pz();
2360 xyz_track1[0] = firstTrack.GetX();
2361 firstTrack.GetYAt(xyz_track1[0],bz,xyz_track1[1]);
2362 firstTrack.GetZAt(xyz_track1[0],bz,xyz_track1[2]);
2365 xyz_track2[0] = secondTrack.GetX();
2366 secondTrack.GetYAt(xyz_track2[0],bz,xyz_track2[1]);
2367 secondTrack.GetZAt(xyz_track2[0],bz,xyz_track2[2]);
2369 Double_t distanceAtVertex = TMath::Sqrt((xyz_track1[0]-xyz_track2[0])*(xyz_track1[0]-xyz_track2[0]) + (xyz_track1[1]-xyz_track2[1])*(xyz_track1[1]-xyz_track2[1]) + (xyz_track1[2]-xyz_track2[2])*(xyz_track1[2]-xyz_track2[2]));
2371 firstTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
2372 d0DStar[0] = d0z0DStar[0];
2373 d0errDStar[0] = TMath::Sqrt(covd0z0DStar[0]);
2374 secondTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
2375 d0DStar[1] = d0z0DStar[0];
2376 d0errDStar[1] = TMath::Sqrt(covd0z0DStar[0]);
2379 Double_t dcaDStarPionD0 = secondTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
2380 Double_t dcaDStarPionB0Pion = secondTrack.GetDCA(&thirdTrack,bz,xdummyDStar,ydummyDStar);
2381 Double_t dcaB0PionD0 = thirdTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
2389 Short_t chargeDStar = trackFirstDaughter->Charge() + trackSecondDaughter->Charge();
2390 AliAODVertex * vertexDStar =
new AliAODVertex(*vertexMother);
2393 std::cout <<
"no dstar vertex" << std::endl;
2394 delete vertexMother; vertexMother = NULL;
2395 delete vertexDStar; vertexDStar = NULL;
2400 Int_t nProngsDStar = 2;
2404 delete vertexMother; vertexMother = NULL;
2405 delete vertexDStar; vertexDStar = NULL;
2406 delete trackDStar; trackDStar = NULL;
2410 trackDStar->SetCharge(chargeDStar);
2413 idDStar[0]= trackFirstDaughter->GetID();
2417 prongsDStar[0] = 211;
2418 prongsDStar[1] = 421;
2421 if(vertexDStar->GetNDaughters()!=2)
2423 std::cout <<
"bad reconstruction 2 - number of daughters for vertex is incorrect" << std::endl;
2424 delete vertexMother; vertexMother = NULL;
2425 delete vertexDStar; vertexDStar = NULL;
2426 delete trackDStar; trackDStar = NULL;
2430 trackDStar->GetSecondaryVtx()->AddDaughter(trackFirstDaughter);
2431 trackDStar->GetSecondaryVtx()->AddDaughter(trackSecondDaughter);
2443 Double_t xdummy=0.,ydummy=0.,dca,e[2];
2444 Double_t d0z0[2],covd0z0[3],d0[2],d0err[2];
2446 AliExternalTrackParam fourthTrack;
2447 fourthTrack.CopyFromVTrack(trackDStar);
2449 thirdTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
2450 fourthTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
2453 px[0] = thirdTrack.Px();
2454 py[0] = thirdTrack.Py();
2455 pz[0] = thirdTrack.Pz();
2456 px[1] = fourthTrack.Px();
2457 py[1] = fourthTrack.Py();
2458 pz[1] = fourthTrack.Pz();
2465 id[0]= thirdTrack.GetID();
2468 thirdTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
2470 d0err[0] = TMath::Sqrt(covd0z0[0]);
2471 fourthTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
2473 d0err[1] = TMath::Sqrt(covd0z0[0]);
2475 dca = fourthTrack.GetDCA(&thirdTrack,bz,xdummy,ydummy);
2478 Short_t chargeMother = trackFirstDaughter->Charge() + trackDStar->Charge();
2479 Int_t nProngsB0 = 2;
2483 delete vertexMother; vertexMother = NULL;
2484 delete vertexDStar; vertexDStar = NULL;
2485 delete trackDStar; trackDStar = NULL;
2486 delete trackB0; trackB0 = NULL;
2490 trackB0->SetCharge(chargeMother);
2492 trackB0->GetSecondaryVtx()->AddDaughter(trackB0Pion);
2493 trackB0->GetSecondaryVtx()->AddDaughter(trackDStar);
2505 Bool_t isDesiredCandidate = kFALSE;
2506 Int_t mcLabelB0 = -1;
2507 Int_t mcLabelDStar = -1;
2509 Int_t motherType, histType;
2517 if (mcLabelB0 >= 0 && mcLabelDStar >= 0 && trackB0Pion->GetLabel() >= 0)
2519 AliAODMCParticle *mcTrackDStarPion = (AliAODMCParticle*)mcTrackArray->At(trackB0Pion->GetLabel());
2520 AliAODMCParticle *mcTrackDStar = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStar);
2522 Double_t vertex_distance = TMath::Sqrt((vertexMother->GetX() - mcTrackDStarPion->Xv())*(vertexMother->GetX() - mcTrackDStarPion->Xv()) + (vertexMother->GetY() - mcTrackDStarPion->Yv())*(vertexMother->GetY() - mcTrackDStarPion->Yv()) + (vertexMother->GetZ() - mcTrackDStarPion->Zv())*(vertexMother->GetZ() - mcTrackDStarPion->Zv()));
2525 Double_t momentum_resolution = TMath::Sqrt((trackDStar->Px() - mcTrackDStar->Px())*(trackDStar->Px() - mcTrackDStar->Px()) + (trackDStar->Py() - mcTrackDStar->Py())*(trackDStar->Py() - mcTrackDStar->Py()) + (trackDStar->Pz() - mcTrackDStar->Pz())*(trackDStar->Pz() - mcTrackDStar->Pz()));
2528 isDesiredCandidate = kTRUE;
2543 Bool_t cutDStar = kFALSE;
2545 Bool_t bCutArrayDStar[25] = {0};
2547 if(cutReturnValueDStar == -1) cutDStar = kTRUE;
2548 if(cutReturnValueDStar == 0) cutDStar = kTRUE;
2550 Bool_t bCutArrayD0[35] = {0};
2552 if(cutReturnValueD0 == -1) cutDStar = kTRUE;
2553 if(cutReturnValueD0 == 0) cutDStar = kTRUE;
2559 for (
Int_t n = 0; n < 25; ++n)
2561 if(bCutArrayDStar[n] == kTRUE){
2562 if(isDesiredCandidate){
2569 for (
Int_t n = 0; n < 35; ++n)
2571 if(bCutArrayD0[n] == kTRUE){
2572 if(isDesiredCandidate){
2584 if(isDesiredCandidate)
2588 delete vertexMother; vertexMother = NULL;
2589 delete vertexDStar; vertexDStar = NULL;
2590 delete trackDStar; trackDStar = NULL;
2619 if(isDesiredCandidate)
2621 AliAODMCParticle *mcTrackFirstDaughter = (AliAODMCParticle*)mcTrackArray->At(trackB0Pion->GetLabel());
2622 AliAODMCParticle *mcTrackB0 = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0);
2624 Double_t vertex_distance = TMath::Sqrt((vertexMother->GetX() - mcTrackFirstDaughter->Xv())*(vertexMother->GetX() - mcTrackFirstDaughter->Xv()) + (vertexMother->GetY() - mcTrackFirstDaughter->Yv())*(vertexMother->GetY() - mcTrackFirstDaughter->Yv()) + (vertexMother->GetZ() - mcTrackFirstDaughter->Zv())*(vertexMother->GetZ() - mcTrackFirstDaughter->Zv()));
2627 Double_t momentum_resolution = TMath::Sqrt((trackB0->Px() - mcTrackB0->Px())*(trackB0->Px() - mcTrackB0->Px()) + (trackB0->Py() - mcTrackB0->Py())*(trackB0->Py() - mcTrackB0->Py()) + (trackB0->Pz() - mcTrackB0->Pz())*(trackB0->Pz() - mcTrackB0->Pz()));
2637 if(isDesiredCandidate)
2646 Bool_t cutMother = kFALSE;
2648 Bool_t bCutArray[85] = {0};
2649 Int_t numberOfCuts = 85;
2651 if(cutReturnValue == -1) cutMother = kTRUE;
2652 if(cutReturnValue == 0) cutMother = kTRUE;
2657 Double_t invariantMassMother = trackB0->InvMass(2,prongs);
2658 Double_t pdgMassMother=TDatabasePDG::Instance()->GetParticle(511)->Mass();
2662 for (
Int_t n = 0; n < 85; ++n)
2664 if(bCutArray[n] == kTRUE){
2665 if(isDesiredCandidate){
2672 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow){
2673 for (
Int_t i = 0; i < numberOfCuts; ++i)
2675 if(bCutArray[i] == kFALSE)
continue;
2676 for (
Int_t j = 0; j < numberOfCuts; ++j)
2678 if(bCutArray[j] == kFALSE)
continue;
2679 if(isDesiredCandidate == kFALSE) histName =
"cutEffectBackground";
2680 if(isDesiredCandidate == kTRUE) histName =
"cutEffectSignal";
2681 ((TH2I*)(
fOutputB0MC->FindObject(histName)))->Fill(i,j);
2685 for (
Int_t i = 0; i < numberOfCuts; ++i)
2687 if(bCutArray[i] == kFALSE)
continue;
2689 for (
Int_t j = 0; j < numberOfCuts; ++j)
2692 if(bCutArray[j] == kTRUE)
2701 if(isDesiredCandidate == kFALSE) histName =
"cutEffectUniqueBackground";
2702 if(isDesiredCandidate == kTRUE) histName =
"cutEffectUniqueSignal";
2714 if(isDesiredCandidate)
2718 delete vertexMother; vertexMother = NULL;
2719 delete trackB0; trackB0 = NULL;
2720 delete vertexDStar; vertexDStar = NULL;
2721 delete trackDStar; trackDStar = NULL;
2726 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
2727 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_DStarPion)))->Fill(dcaDStarPionD0);
2729 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
2730 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_B0Pion)))->Fill(dcaB0PionD0);
2732 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
2733 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
2737 TString name_dca_MC_D0_DStarPion =
"dca_Signal_D0_DStarPion";
2738 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_MC_D0_DStarPion)))->Fill(dcaDStarPionD0);
2740 TString name_dca_MC_D0_B0Pion =
"dca_Signal_D0_B0Pion";
2741 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_MC_D0_B0Pion)))->Fill(dcaB0PionD0);
2743 TString name_dca_MC_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
2744 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_MC_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
2765 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
2770 if(!isDesiredCandidate)
2772 motherType = 0; histType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2776 if(isDesiredCandidate)
2778 motherType = 0; histType = 5;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2788 ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[ptBin]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[ptBin+1];
2789 histType = 6 + 2 * ptBin;
2792 Int_t histTypeD0 = 2 * d0PtBin;
2795 Int_t histTypeD0DStar = 2 * d0DStarPtBin;
2798 Int_t histTypeDStar = 2 * dstarPtBin;
2801 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
2803 if(!bSameSign && histType > 5)
2805 if(!isDesiredCandidate)
2807 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2810 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0, pdgD0);
2811 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar, pdgD0);
2815 if(isDesiredCandidate)
2818 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2821 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0 + 1, pdgD0);
2822 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar + 1, pdgD0);
2831 fillthis=
"invariantMassB0";
2832 fillthis +=
"_SameSign";
2833 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2834 fillthis=
"invariantMassB0";
2835 fillthis += ptBinMother +
"_SameSign";
2836 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2837 fillthis=
"invariantMassB0";
2838 fillthis +=
"_SignSum";
2839 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2840 fillthis=
"invariantMassB0";
2841 fillthis += ptBinMother +
"_SignSum";
2842 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2847 fillthis=
"deltaInvMassB0";
2848 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2849 fillthis=
"deltaInvMassB0";
2850 fillthis += ptBinMother;
2851 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2853 fillthis=
"invariantMassB0";
2854 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2855 fillthis=
"invariantMassB0";
2856 fillthis += ptBinMother;
2857 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2858 fillthis=
"invariantMassB0";
2859 fillthis +=
"_SignSum";
2860 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2861 fillthis=
"invariantMassB0";
2862 fillthis += ptBinMother +
"_SignSum";
2863 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2866 if(trackB0->Pt() > 6.0)
2868 ptBinMother =
"_ptbin_6_to_inf";
2871 fillthis=
"invariantMassB0";
2872 fillthis += ptBinMother +
"_SameSign";
2873 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2874 fillthis=
"invariantMassB0";
2875 fillthis += ptBinMother +
"_SignSum";
2876 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2880 fillthis=
"deltaInvMassB0";
2881 fillthis += ptBinMother;
2882 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2884 fillthis=
"invariantMassB0";
2885 fillthis += ptBinMother;
2886 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2887 fillthis=
"invariantMassB0";
2888 fillthis += ptBinMother +
"_SignSum";
2889 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2894 if(trackB0->Pt() > 3.0)
2896 ptBinMother =
"_ptbin_3_to_inf";
2899 fillthis=
"invariantMassB0";
2900 fillthis += ptBinMother +
"_SameSign";
2901 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2902 fillthis=
"invariantMassB0";
2903 fillthis += ptBinMother +
"_SignSum";
2904 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2908 fillthis=
"deltaInvMassB0";
2909 fillthis += ptBinMother;
2910 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2912 fillthis=
"invariantMassB0";
2913 fillthis += ptBinMother;
2914 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2915 fillthis=
"invariantMassB0";
2916 fillthis += ptBinMother +
"_SignSum";
2917 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2922 delete vertexMother; vertexMother = NULL;
2923 delete trackB0; trackB0 = NULL;
2924 delete vertexDStar; vertexDStar = NULL;
2925 delete trackDStar; trackDStar = NULL;
2932 TProcessID::SetObjectCount(ObjectNumber);
2941 AliAODTrack* selectedB0Pion = (AliAODTrack*)selectedB0->GetDaughter(0);
2944 AliAODTrack* selectedDStarPion = (AliAODTrack*)selectedDStar->GetDaughter(0);
2947 AliAODTrack* selectedD0Pion;
2948 AliAODTrack* selectedD0Kaon;
2950 if(selectedDStarPion->Charge() == 1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(0);
2951 if(selectedDStarPion->Charge() == -1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(1);
2953 if(selectedDStarPion->Charge() == 1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(1);
2954 if(selectedDStarPion->Charge() == -1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(0);
2956 Double_t d0B0pion = TMath::Abs(selectedB0->Getd0Prong(0));
2957 Double_t d0DStarpion = TMath::Abs(selectedDStar->Getd0Prong(0));
2961 if(selectedDStarPion->Charge() == 1) d0D0pion = selectedD0->Getd0Prong(0);
2962 if(selectedDStarPion->Charge() == -1) d0D0pion = selectedD0->Getd0Prong(1);
2964 if(selectedDStarPion->Charge() == 1) d0D0kaon = selectedD0->Getd0Prong(1);
2965 if(selectedDStarPion->Charge() == -1) d0D0kaon = selectedD0->Getd0Prong(0);
2969 Int_t numberOfITS = 0;
2970 Int_t numberOfTPC = 0;
2971 Int_t daughterType, histType;
2972 Int_t totalNumberOfITS = 0;
2973 Int_t totalNumberOfTPC = 0;
2978 Int_t pionPIDnumber = 2;
2979 Int_t kaonPIDnumber = 3;
2986 pt_track = selectedD0Pion->Pt();
2987 momentum_track = selectedD0Pion->P();
2988 numberOfITS = selectedD0Pion->GetITSNcls();
2989 numberOfTPC = selectedD0Pion->GetTPCNcls();
2990 totalNumberOfITS += numberOfITS;
2991 totalNumberOfTPC += numberOfTPC;
2992 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Pion, pionPIDnumber, nSigmaTPC);
2993 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Pion, pionPIDnumber, nSigmaTOF);
2994 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
2995 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
3001 if(!isDesiredCandidate)
3008 for (
Int_t j = 0; j < 10; ++j)
3010 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3016 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3021 if(isDesiredCandidate)
3029 for (
Int_t j = 0; j < 10; ++j)
3031 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3037 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3046 Float_t pdgCodeParticleMother = -1;
3047 Int_t mcLabelParticle = -1;
3048 Int_t mcLabelParticleMother = -1;
3049 mcLabelParticle = selectedD0Pion->GetLabel();
3051 if(mcLabelParticle >= 0){
3053 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3054 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3056 mcLabelParticleMother = mcTrackParticle->GetMother();
3058 if(mcLabelParticleMother >= 0){
3059 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3060 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3061 ((TH1F*)fDaughterHistogramArrayExtra[0][3])->Fill(pdgCodeParticleMother);
3069 pt_track = selectedD0Kaon->Pt();
3070 momentum_track = selectedD0Kaon->P();
3071 numberOfITS = selectedD0Kaon->GetITSNcls();
3072 numberOfTPC = selectedD0Kaon->GetTPCNcls();
3073 totalNumberOfITS += numberOfITS;
3074 totalNumberOfTPC += numberOfTPC;
3075 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Kaon, kaonPIDnumber, nSigmaTPC);
3076 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Kaon, kaonPIDnumber, nSigmaTOF);
3077 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
3078 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
3082 if(!isDesiredCandidate)
3089 for (
Int_t j = 0; j < 10; ++j)
3091 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3097 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3102 if(isDesiredCandidate)
3110 for (
Int_t j = 0; j < 10; ++j)
3112 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3118 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3127 Float_t pdgCodeParticleMother = -1;
3128 Int_t mcLabelParticle = -1;
3129 Int_t mcLabelParticleMother = -1;
3130 mcLabelParticle = selectedD0Kaon->GetLabel();
3132 if(mcLabelParticle >= 0){
3134 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3135 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3137 mcLabelParticleMother = mcTrackParticle->GetMother();
3139 if(mcLabelParticleMother >= 0){
3140 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3141 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3142 ((TH1F*)fDaughterHistogramArrayExtra[1][3])->Fill(pdgCodeParticleMother);
3148 pt_track = selectedDStarPion->Pt();
3149 momentum_track = selectedDStarPion->P();
3150 numberOfITS = selectedDStarPion->GetITSNcls();
3151 numberOfTPC = selectedDStarPion->GetTPCNcls();
3152 totalNumberOfITS += numberOfITS;
3153 totalNumberOfTPC += numberOfTPC;
3154 TPCok = trackPIDHF->
GetnSigmaTPC(selectedDStarPion, pionPIDnumber, nSigmaTPC);
3155 TOFok = trackPIDHF->
GetnSigmaTOF(selectedDStarPion, pionPIDnumber, nSigmaTOF);
3156 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
3160 if(!isDesiredCandidate)
3167 for (
Int_t j = 0; j < 10; ++j)
3169 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3175 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3180 if(isDesiredCandidate)
3188 for (
Int_t j = 0; j < 10; ++j)
3190 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3196 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3205 Float_t pdgCodeParticleMother = -1;
3206 Int_t mcLabelParticle = -1;
3207 Int_t mcLabelParticleMother = -1;
3208 mcLabelParticle = selectedDStarPion->GetLabel();
3210 if(mcLabelParticle >= 0){
3212 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3213 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3215 mcLabelParticleMother = mcTrackParticle->GetMother();
3217 if(mcLabelParticleMother >= 0){
3218 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3219 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3220 ((TH1F*)fDaughterHistogramArrayExtra[2][3])->Fill(pdgCodeParticleMother);
3226 pt_track = selectedB0Pion->Pt();
3227 momentum_track = selectedB0Pion->P();
3228 numberOfITS = selectedB0Pion->GetITSNcls();
3229 numberOfTPC = selectedB0Pion->GetTPCNcls();
3230 totalNumberOfITS += numberOfITS;
3231 totalNumberOfTPC += numberOfTPC;
3232 TPCok = trackPIDHF->
GetnSigmaTPC(selectedB0Pion, pionPIDnumber, nSigmaTPC);
3233 TOFok = trackPIDHF->
GetnSigmaTOF(selectedB0Pion, pionPIDnumber, nSigmaTOF);
3234 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
3235 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
3239 if(!isDesiredCandidate)
3246 for (
Int_t j = 0; j < 10; ++j)
3248 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3254 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3259 if(isDesiredCandidate)
3267 for (
Int_t j = 0; j < 10; ++j)
3269 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3275 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3284 Float_t pdgCodeParticleMother = -1;
3285 Int_t mcLabelParticle = -1;
3286 Int_t mcLabelParticleMother = -1;
3287 mcLabelParticle = selectedB0Pion->GetLabel();
3289 if(mcLabelParticle >= 0){
3291 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3292 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3294 mcLabelParticleMother = mcTrackParticle->GetMother();
3296 if(mcLabelParticleMother >= 0){
3297 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3298 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3299 ((TH1F*)fDaughterHistogramArrayExtra[3][3])->Fill(pdgCodeParticleMother);
3304 if(!isDesiredCandidate)
3306 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSBackground")))->Fill(totalNumberOfITS);
3307 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCBackground")))->Fill(totalNumberOfTPC);
3308 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDBackground")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
3310 if(isDesiredCandidate)
3312 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSSignal")))->Fill(totalNumberOfITS);
3313 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCSignal")))->Fill(totalNumberOfTPC);
3314 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDSignal")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
3326 Int_t chargeDStar = DStar->Charge();
3336 else if (chargeDStar==-1)
3345 std::cout <<
"Wrong charge DStar." << std::endl;
3348 e[2]=DStar->EProng(0,211);
3351 Double_t invMassDStar = TMath::Sqrt(esum*esum-DStar->P()*DStar->P());
3354 return invMassDStar - invMassD0;
3364 Int_t chargeDStar = DStar->Charge();
3374 else if (chargeDStar==-1)
3383 std::cout <<
"Wrong charge DStar." << std::endl;
3386 e[0]=DStar->EProng(0,211);
3387 e[3]=B0->EProng(0,211);
3389 Double_t esum = e[0]+e[1]+e[2]+e[3];
3390 Double_t invMassB0 = TMath::Sqrt(esum*esum-B0->P()*B0->P());
3394 return invMassB0 - invMassD0;
3399 if(histType<0)
return;
3412 Double_t invariantMassMother = 0.0;
3415 AliAODVertex * vertexMother = 0x0;
3416 AliAODVertex * vertexDaughter = 0x0;
3418 Double_t decayLengthDaughter = 0.0;
3420 Double_t angleMotherFirstDaughter = 0.0;
3421 Double_t angleMotherSecondDaughter = 0.0;
3422 Double_t topomaticFirstDaughter = 0.0;
3423 Double_t topomaticSecondDaughter = 0.0;
3426 UInt_t prongs[2], prongs2[2];
3427 Double_t angleBetweenBothDaughters = 0;
3430 Double_t pdgMassMother=TDatabasePDG::Instance()->GetParticle(421)->Mass();
3433 prongs[0] = 211; prongs[1] = 321;
3434 prongs2[0] = 321; prongs2[1] = 211;
3435 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
3436 AliAODTrack * secondDaughter = (AliAODTrack*)selectedMother->GetDaughter(1);
3437 vertexMother = selectedMother->GetSecondaryVtx();
3438 ptFirstDaughter = firstDaughter->Pt();
3439 ptSecondDaughter = secondDaughter->Pt();
3446 for(
Int_t ipr=0; ipr<2; ipr++)
3451 if(errdiffIP>0.) normdd0=diffIP/errdiffIP;
3452 if(ipr==0) dd0pr1=normdd0;
3453 if(ipr==1) dd0pr2=normdd0;
3456 if(TMath::Abs(dd0pr1)>TMath::Abs(dd0pr2)) {dd0max=dd0pr1; dd0min=dd0pr2;}
3457 else {dd0max=dd0pr2; dd0min=dd0pr1;}
3459 AliExternalTrackParam motherTrack;
3460 motherTrack.CopyFromVTrack(selectedMother);
3462 motherTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3465 ptMother = selectedMother->Pt();
3466 momentumMother = selectedMother->P();
3467 etaMother = selectedMother->Eta();
3468 phiMother = selectedMother->Phi();
3470 d0Mother = TMath::Abs(d0[0]);
3471 d0firstTrack = TMath::Abs(selectedMother->Getd0Prong(0));
3472 d0secondTrack = TMath::Abs(selectedMother->Getd0Prong(1));
3474 impactProduct = selectedMother->
Prodd0d0();
3475 impactProductXY = TMath::Abs(selectedMother->
ImpParXY());
3476 invariantMassMother = selectedMother->InvMass(2,prongs);
3477 if(pdgCodeMother == -421) invariantMassMother = selectedMother->InvMass(2,prongs2);
3479 dcaMother = selectedMother->GetDCA();
3480 vertexDistance = vertexMother->DistanceToVertex(primaryVertex);
3481 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) /(selectedMother->P() * firstDaughter->P());
3482 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) /(selectedMother->P() * secondDaughter->P());
3483 cosThetaStar = selectedMother->CosThetaStar(0,421,211,321);
3484 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) /(firstDaughter->P() * secondDaughter->P());
3487 Double_t pseudoProperDecayLength = ((vertexMother->GetX() - primaryVertex->GetX()) * selectedMother->Px() / TMath::Abs(selectedMother->Pt())) + ((vertexMother->GetY() - primaryVertex->GetY()) * selectedMother->Py() / TMath::Abs(selectedMother->Pt()));
3488 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother/ptMother;
3489 decayTime = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
3491 Double_t phi = selectedMother->Phi();
3492 Double_t theta = selectedMother->Theta();
3494 selectedMother->GetCovarianceXYZPxPyPz(covMatrix);
3501 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
3502 +covMatrix[13]*2.*cp*sp*ct*ct
3503 +covMatrix[18]*2.*cp*ct*st
3504 +covMatrix[14]*sp*sp*ct*ct
3505 +covMatrix[19]*2.*sp*ct*st
3506 +covMatrix[20]*st*st;
3507 Double_t normalizedDecayTime = selectedMother->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
3509 Double_t eKaon = selectedMother->EProng(1,321);
3510 Double_t invMassKaon = TMath::Sqrt(eKaon*eKaon-secondDaughter->P()*secondDaughter->P());
3512 invmassDelta = invMassD0 - invMassKaon;
3514 Double_t vertexMotherX = vertexMother->GetX();
3515 Double_t vertexMotherY = vertexMother->GetY();
3516 Double_t vertexMotherZ = vertexMother->GetZ();
3556 Int_t nVariables = 8;
3557 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
3558 for (
Int_t k = 0; k < nHistograms; ++k)
3563 if(nFirst==0) firstVariable = d0firstTrack;
3564 if(nFirst==1) firstVariable = d0secondTrack;
3565 if(nFirst==2) firstVariable = d0Mother;
3566 if(nFirst==3) firstVariable = pointingAngle;
3567 if(nFirst==4) firstVariable = impactProduct;
3568 if(nFirst==5) firstVariable = impactProductXY;
3569 if(nFirst==6) firstVariable = vertexDistance;
3570 if(nFirst==7) firstVariable = normDecayLength;
3571 if(nFirst==8) firstVariable = pseudoProperDecayTime;
3573 if(nSecond==0) secondVariable = d0firstTrack;
3574 if(nSecond==1) secondVariable = d0secondTrack;
3575 if(nSecond==2) secondVariable = d0Mother;
3576 if(nSecond==3) secondVariable = pointingAngle;
3577 if(nSecond==4) secondVariable = impactProduct;
3578 if(nSecond==5) secondVariable = impactProductXY;
3579 if(nSecond==6) secondVariable = vertexDistance;
3580 if(nSecond==7) secondVariable = normDecayLength;
3581 if(nSecond==8) secondVariable = pseudoProperDecayTime;
3586 if(nSecond>nVariables)
3589 nSecond = nFirst + 1;
3598 if(histType<0)
return;
3611 Double_t invariantMassMother = 0.0;
3614 AliAODVertex * vertexMother = 0x0;
3615 AliAODVertex * vertexDaughter = 0x0;
3619 Double_t angleMotherFirstDaughter = 0.0;
3620 Double_t angleMotherSecondDaughter = 0.0;
3621 Double_t topomaticFirstDaughter = 0.0;
3622 Double_t topomaticSecondDaughter = 0.0;
3627 Double_t angleBetweenBothDaughters = 0;
3631 if(motherType==1 || motherType==5){
3632 prongs[0] = 211; prongs[1] = 421;
3634 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
3637 ptFirstDaughter = firstDaughter->Pt();
3638 ptSecondDaughter = secondDaughter->Pt();
3639 vertexMother = selectedMother->GetSecondaryVtx();
3640 vertexDaughter = secondDaughter->GetSecondaryVtx();
3641 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) /(selectedMother->P() * firstDaughter->P());
3642 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) /(selectedMother->P() * secondDaughter->P());
3643 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) /(firstDaughter->P() * secondDaughter->P());
3644 cosThetaStar = selectedMother->CosThetaStar(0,413,211,421);
3645 pdgMassMother = TDatabasePDG::Instance()->GetParticle(413)->Mass();
3648 prongs[0] = 211; prongs[1] = 413;
3650 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
3653 ptFirstDaughter = firstDaughter->Pt();
3654 ptSecondDaughter = secondDaughter->Pt();
3655 vertexMother = selectedMother->GetSecondaryVtx();
3656 vertexDaughter = secondDaughter->GetSecondaryVtx();
3657 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) /(selectedMother->P() * firstDaughter->P());
3658 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) /(selectedMother->P() * secondDaughter->P());
3659 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) /(firstDaughter->P() * secondDaughter->P());
3660 cosThetaStar = selectedMother->CosThetaStar(0,511,211,413);
3661 pdgMassMother = TDatabasePDG::Instance()->GetParticle(511)->Mass();
3670 for(
Int_t ipr=0; ipr<2; ipr++)
3675 if(errdiffIP>0.) normdd0=diffIP/errdiffIP;
3676 if(ipr==0) dd0pr1=normdd0;
3677 if(ipr==1) dd0pr2=normdd0;
3681 if(TMath::Abs(dd0pr1)>TMath::Abs(dd0pr2)) {dd0max=dd0pr1; dd0min=dd0pr2;}
3682 else {dd0max=dd0pr2; dd0min=dd0pr1;}
3686 AliExternalTrackParam motherTrack;
3687 motherTrack.CopyFromVTrack(selectedMother);
3689 motherTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3692 ptMother = selectedMother->Pt();
3693 momentumMother = selectedMother->P();
3694 etaMother = selectedMother->Eta();
3695 phiMother = selectedMother->Phi();
3696 d0Mother = TMath::Abs(d0[0]);
3699 impactProduct = selectedMother->
Prodd0d0();
3700 impactProductXY = TMath::Abs(selectedMother->
ImpParXY());
3701 invariantMassMother = selectedMother->InvMass(2,prongs);
3702 dcaMother = selectedMother->GetDCA();
3703 vertexDistance = vertexMother->DistanceToVertex(primaryVertex);
3704 d0firstTrack = TMath::Abs(selectedMother->Getd0Prong(0));
3705 d0secondTrack = TMath::Abs(selectedMother->Getd0Prong(1));
3708 Double_t pseudoProperDecayLength = ((vertexMother->GetX() - primaryVertex->GetX()) * selectedMother->Px() / TMath::Abs(selectedMother->Pt())) + ((vertexMother->GetY() - primaryVertex->GetY()) * selectedMother->Py() / TMath::Abs(selectedMother->Pt()));
3709 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother/ptMother;
3710 decayTime = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
3712 Double_t phi = selectedMother->Phi();
3713 Double_t theta = selectedMother->Theta();
3715 selectedMother->GetCovarianceXYZPxPyPz(covMatrix);
3722 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
3723 +covMatrix[13]*2.*cp*sp*ct*ct
3724 +covMatrix[18]*2.*cp*ct*st
3725 +covMatrix[14]*sp*sp*ct*ct
3726 +covMatrix[19]*2.*sp*ct*st
3727 +covMatrix[20]*st*st;
3728 Double_t normalizedDecayTime = selectedMother->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
3730 Double_t vertexMotherX = vertexMother->GetX();
3731 Double_t vertexMotherY = vertexMother->GetY();
3732 Double_t vertexMotherZ = vertexMother->GetZ();
3770 Int_t nVariables = 8;
3771 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
3772 for (
Int_t k = 0; k < nHistograms; ++k)
3777 if(nFirst==0) firstVariable = d0firstTrack;
3778 if(nFirst==1) firstVariable = d0secondTrack;
3779 if(nFirst==2) firstVariable = d0Mother;
3780 if(nFirst==3) firstVariable = pointingAngle;
3781 if(nFirst==4) firstVariable = impactProduct;
3782 if(nFirst==5) firstVariable = impactProductXY;
3783 if(nFirst==6) firstVariable = vertexDistance;
3784 if(nFirst==7) firstVariable = normDecayLength;
3785 if(nFirst==8) firstVariable = pseudoProperDecayTime;
3787 if(nSecond==0) secondVariable = d0firstTrack;
3788 if(nSecond==1) secondVariable = d0secondTrack;
3789 if(nSecond==2) secondVariable = d0Mother;
3790 if(nSecond==3) secondVariable = pointingAngle;
3791 if(nSecond==4) secondVariable = impactProduct;
3792 if(nSecond==5) secondVariable = impactProductXY;
3793 if(nSecond==6) secondVariable = vertexDistance;
3794 if(nSecond==7) secondVariable = normDecayLength;
3795 if(nSecond==8) secondVariable = pseudoProperDecayTime;
3800 if(nSecond>nVariables)
3803 nSecond = nFirst + 1;
3807 if(motherType==1 || motherType==5){
3808 motherType = motherType -1;
3810 AliAODRecoDecay* secondDaughter = (AliAODRecoDecay*)selectedMother->GetDaughter(1);
3811 AliAODTrack * pionD0 = (AliAODTrack*)selectedMother->GetDaughter(0);
3812 AliAODTrack * kaonD0 = (AliAODTrack*)selectedMother->GetDaughter(1);
3814 AliAODVertex * vertexDStar = vertexMother;
3815 AliAODVertex * vertexD0 = secondDaughter->GetSecondaryVtx();
3816 pdgMassMother = TDatabasePDG::Instance()->GetParticle(421)->Mass();
3818 AliExternalTrackParam pionD0Track;
3819 AliExternalTrackParam kaonD0Track;
3823 pionD0Track.CopyFromVTrack(pionD0);
3824 pionD0Track.PropagateToDCA(vertexDStar,bz,100.,d0z0,covd0z0);
3827 kaonD0Track.CopyFromVTrack(kaonD0);
3828 kaonD0Track.PropagateToDCA(vertexDStar,bz,100.,d0z0,covd0z0);
3831 AliExternalTrackParam D0Track;
3832 D0Track.CopyFromVTrack(secondDaughter);
3833 Double_t d0z0D0[2],covd0z0D0[3],d0D0;
3834 motherTrack.PropagateToDCA(vertexDStar,bz,100.,d0z0D0,covd0z0D0);
3837 Double_t impactProductToDStar = d0[0]*d0[1];
3840 Double_t momentumMother = secondDaughter->P();
3841 Double_t pointingAngleToDStar = secondDaughter->CosPointingAngle(vertexDStar);
3842 Double_t d0FirstDaughterToDStar = TMath::Abs(d0[0]);
3843 Double_t d0SecondDaughterToDStar = TMath::Abs(d0[1]);
3844 Double_t normDecayLengthToDStar = secondDaughter->NormalizedDecayLength(vertexDStar);
3846 Double_t pseudoProperDecayLength = ((vertexD0->GetX() - vertexDStar->GetX()) * secondDaughter->Px() / TMath::Abs(secondDaughter->Pt())) + ((vertexD0->GetY() - vertexDStar->GetY()) * secondDaughter->Py() / TMath::Abs(secondDaughter->Pt()));
3847 Double_t pseudoProperDecayTimeToDStar = pseudoProperDecayLength * pdgMassMother/ptMother;
3848 Double_t DecayTimeToDStar = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
3850 Double_t phi = secondDaughter->Phi();
3851 Double_t theta = secondDaughter->Theta();
3853 secondDaughter->GetCovarianceXYZPxPyPz(covMatrix);
3860 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
3861 +covMatrix[13]*2.*cp*sp*ct*ct
3862 +covMatrix[18]*2.*cp*ct*st
3863 +covMatrix[14]*sp*sp*ct*ct
3864 +covMatrix[19]*2.*sp*ct*st
3865 +covMatrix[20]*st*st;
3866 Double_t normDecayTimeToDStar = secondDaughter->NormalizedDecayLength(vertexDStar) / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
3893 Int_t ndg = candidate->GetNDaughters();
3894 if(!ndg) { AliError(
"No daughters available");
return -1;}
3895 if(ndg != 2)
return -1;
3898 if(B0toDStarPiLabelMatrix->GetNrows() == 0)
return -1;
3901 Int_t dgLabels[2] = {-1};
3902 Int_t pdgDg[2] = {0};
3903 Int_t signalPosition = -1;
3906 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
3907 dgLabels[0] = trk0->GetLabel();
3908 AliAODTrack *trk1 = (AliAODTrack*)candidate->GetDaughter(1);
3909 dgLabels[1] = trk1->GetLabel();
3910 pdgDg[0] = 211; pdgDg[1] = 321;
3913 else if(pdgabs==413)
3915 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
3916 dgLabels[0] = trk0->GetLabel();
3918 pdgDg[0] = 211; pdgDg[1] = 421;
3921 else if(pdgabs==511)
3923 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
3924 dgLabels[0] = trk0->GetLabel();
3926 pdgDg[0] = 211; pdgDg[1] = 413;
3931 std::cout <<
"Wrong pdg supplied for function to match candidate to monte carlo signal." << std::endl;
3934 if(dgLabels[0]==-1)
return -1;
3935 if(dgLabels[1]==-1)
return -1;
3938 Int_t labMom[2]={0,0};
3939 Int_t i,j,lab,labMother,pdgMother,pdgPart;
3940 AliAODMCParticle *part=0;
3941 AliAODMCParticle *mother=0;
3942 Double_t pxSumDgs=0.,pySumDgs=0.,pzSumDgs=0.;
3943 Bool_t pdgUsed[2]={kFALSE,kFALSE};
3946 for(i=0; i<ndg; i++)
3949 lab = TMath::Abs(dgLabels[i]);
3952 printf(
"daughter with negative label %d\n",lab);
3955 part = (AliAODMCParticle*)mcArray->At(lab);
3958 printf(
"no MC particle\n");
3963 pdgPart=TMath::Abs(part->GetPdgCode());
3964 for(j=0; j<ndg; j++)
3966 if(!pdgUsed[j] && pdgPart==pdgDg[j])
3975 while(mother->GetMother()>=0)
3977 labMother=mother->GetMother();
3978 mother = (AliAODMCParticle*)mcArray->At(labMother);
3981 printf(
"no MC mother particle\n");
3984 pdgMother = TMath::Abs(mother->GetPdgCode());
3985 if(pdgMother==pdgabs)
3987 labMom[i]=labMother;
3989 pxSumDgs += part->Px();
3990 pySumDgs += part->Py();
3991 pzSumDgs += part->Pz();
3996 if(labMom[i]==-1)
return -1;
4000 labMother=labMom[0];
4002 for(i=0; i<ndg; i++)
4004 if(labMom[i]==-1)
return -1;
4005 if(labMom[i]!=labMother)
return -1;
4009 for(i=0; i<ndg; i++)
4011 if(pdgUsed[i]==kFALSE)
return -1;
4015 mother = (AliAODMCParticle*)mcArray->At(labMother);
4020 if((TMath::Abs(pxMother-pxSumDgs)/(TMath::Abs(pxMother)+1.e-13)) > 0.001 &&
4021 (TMath::Abs(pyMother-pySumDgs)/(TMath::Abs(pyMother)+1.e-13)) > 0.001 &&
4022 (TMath::Abs(pzMother-pzSumDgs)/(TMath::Abs(pzMother)+1.e-13)) > 0.001)
4032 Int_t bIsSignal = kFALSE;
4033 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
4034 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k)
4036 if(labMother == (
Int_t)particleMatrix(k,signalPosition))
4042 if(!bIsSignal)
return -1;
TH1F * fDaughterHistogramArrayExtra[4][6]
Double_t NormalizedDecayLength() const
void FillD0Histograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType, Int_t pdgCodeMother=-1)
Int_t fnPtBinsD0forD0ptbinLimits
virtual Int_t SelectPID(AliAODTrack *track, Int_t type)
Bool_t UseTPCRefitB0Pion()
ULong64_t GetTriggerMask()
TList * fOutput
! User output
Int_t fnPtBinsD0forDStarptbin
[fnPtBinsD0forD0ptbinLimits]
Int_t GetMinTPCNclsB0Pion()
void Getd0MeasMinusExpProng(Int_t ip, Double_t magf, Double_t &d0diff, Double_t &errd0diff) const
Int_t GetnSigmaTOF(AliAODTrack *track, Int_t species, Double_t &sigma) const
Float_t * fPtBinLimitsD0forDStarptbin
void FillDStarAndB0Histograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType)
Float_t * fPtBinLimitsDStarforDStarptbin
virtual ~AliAnalysisTaskSEB0toDStarPi()
TList * fOutputD0Pion
! User output
virtual void Terminate(Option_t *option)
Int_t GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const
TList * fOutputD0
! User output
Bool_t UseTPCRefitDStarPion()
Double_t ImpParXY() const
TH2F * fMotherHistogramArray2D[6][16][60]
Int_t ApplyCutOnVariableDStarforDStarptbin(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[25])
Bool_t fQuickSignalAnalysis
Int_t MatchCandidateToMonteCarlo(Int_t pdgabs, AliAODRecoDecayHF2Prong *candidate, TClonesArray *mcArray, TMatrix *B0toDStarPiLabelMatrix) const
void InvMass(Int_t icalo, TString particle, TString fileName)
Double_t DeltaInvMassB0Kpipipi(AliAODRecoDecayHF2Prong *B0) const
Int_t PtBinDStarforDStarptbin(Double_t pt) const
Int_t GetWhyRejection() const
Double_t GetMinPtDStarPion()
Int_t IsD0forD0ptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
Bool_t FillRecoCand(AliVEvent *event, AliAODRecoDecayHF3Prong *rd3)
Double_t InvMassD0() const
Double_t Prodd0d0() const
AliAnalysisTaskSEB0toDStarPi()
std::vector< Int_t > * fD0Tracks
TList * fOutputDStar_DStarPt
! User output
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Int_t PtBinD0forDStarptbin(Double_t pt) const
TH1F * fDaughterHistogramArray[4][6][15]
[fnPtBinsDStarforDStarptbinLimits]
void DefineHistograms()
histos
AliAODPidHF * GetPidHF() const
AliRDHFCutsB0toDStarPi * fCuts
void D0Selection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, TClonesArray *D0TracksFromFriendFile)
TList * fOutputDStarPion
! User output
TList * fOutputD0Kaon
! User output
TList * fOutputB0
! User output
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
void B0toDStarPiSignalTracksInMC(TClonesArray *mcTrackArray, AliAODEvent *aodevent, TMatrix *B0toDStarPiLabelMatrix, TList *listout)
selection and reconstruction
TList * fOutputB0Pion
! User output
Int_t fnPtBinsD0forDStarptbinLimits
TList * fListCuts
! User output
Int_t IsDStarforDStarptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
Bool_t UseFilterBitDStarPion()
Float_t * GetPtBinLimitsDStarforDStarptbin() const
Int_t GetNPtBinsD0forD0ptbin() const
void DStarAndB0Selection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, TClonesArray *D0TracksFromFriendFile)
Int_t fnPtBinsD0forD0ptbin
[fnPtBinLimits]
Float_t * GetPtBinLimitsD0forD0ptbin() const
void SetProngIDs(Int_t nIDs, UShort_t *id)
UShort_t GetProngID(Int_t ip) const
virtual void UserExec(Option_t *option)
std::vector< Int_t > * fDStarPionTracks
std::vector< Int_t > * fB0PionTracks
TList * fOutputB0MC
! User output
Double_t GetMinPtB0Pion()
void SetPrimaryVtxRef(TObject *vtx)
primary vertex
Int_t GetMinITSNclsDStarPion()
Int_t GetMinTPCNclsDStarPion()
Bool_t UseFilterBitB0Pion()
void B0PionSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix)
void FillFinalTrackHistograms(AliAODRecoDecayHF2Prong *trackB0, Bool_t isDesiredCandidate, TClonesArray *mcTrackArray)
Int_t GetFilterBitDStarPion()
TList * fOutputDStar
! User output
Bool_t IsEventSelected(AliVEvent *event)
AliAODVertex * RecalculateVertex(const AliVVertex *primary, TObjArray *tracks, Double_t bField, Double_t dispersion)
TList * fOutputD0_D0Pt
! User output
Int_t PtBinD0forD0ptbin(Double_t pt) const
TList * fOutputD0_DStarPt
! User output
TH2F * fDaughterHistogramArray2D[4][6]
TH1F * fMotherHistogramArray[6][50][46]
Float_t * GetPtBinLimits() const
Int_t GetMinITSNclsB0Pion()
Int_t GetNPtBinsDStarforDStarptbin() const
Bool_t UseITSRefitB0Pion()
Double_t DeltaInvMassDStarKpipi(AliAODRecoDecayHF2Prong *DStar) const
Int_t IsD0forDStarptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
Float_t * GetPtBinLimitsD0forDStarptbin() const
Int_t GetNPtBinsD0forDStarptbin() const
Int_t fnPtBinsDStarforDStarptbin
[fnPtBinsD0forDStarptbinLimits]
Int_t fnPtBinsDStarforDStarptbinLimits
Double_t CosPointingAngle() const
Float_t * fPtBinLimitsD0forD0ptbin
Int_t GetFilterBitB0Pion()
TH1F * fMotherHistogramArrayExtra[7][10]
Int_t PtBin(Double_t pt) const
Bool_t UseITSRefitDStarPion()
void DStarPionSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix)