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" 62 #include "AliESDtrack.h" 63 #include "AliAODMCParticle.h" 64 #include "AliAODEvent.h" 66 #include "AliAODInputHandler.h" 87 fOutputD0FirstDaughter(0),
88 fOutputD0SecondDaughter(0),
96 fOutputDStar_DStarPt(0),
99 fQuickSignalAnalysis(0),
102 fDStarPionTracks(0x0),
108 fnPtBinsD0forD0ptbin(0),
109 fnPtBinsD0forDStarptbin(0),
110 fnPtBinsDStarforDStarptbin(0),
112 fnPtBinsD0forD0ptbinLimits(0),
113 fnPtBinsD0forDStarptbinLimits(0),
114 fnPtBinsDStarforDStarptbinLimits(0),
116 fPtBinLimitsD0forD0ptbin(0x0),
117 fPtBinLimitsD0forDStarptbin(0x0),
118 fPtBinLimitsDStarforDStarptbin(0x0),
119 fDaughterHistogramArray(),
120 fDaughterHistogramArray2D(),
121 fDaughterHistogramArrayExtra(),
122 fMotherHistogramArray(),
123 fMotherHistogramArray2D(),
124 fMotherHistogramArrayExtra(),
125 fMotherHistogramArray3D(),
128 fHistMassWindow(0.125),
129 fDegreePerRotation(0),
130 fNumberOfRotations(0),
199 Info(
"AliAnalysisTaskSEB0toDStarPi",
"Calling Constructor");
203 DefineInput(0,TChain::Class());
204 DefineOutput(1,TList::Class());
205 DefineOutput(2,TList::Class());
206 DefineOutput(3,TList::Class());
207 DefineOutput(4,TList::Class());
208 DefineOutput(5,TList::Class());
209 DefineOutput(6,TList::Class());
210 DefineOutput(7,TList::Class());
211 DefineOutput(8,TList::Class());
212 DefineOutput(9,TList::Class());
213 DefineOutput(10,TList::Class());
214 DefineOutput(11,TList::Class());
215 DefineOutput(12,TList::Class());
216 DefineOutput(13,TList::Class());
225 Info(
"~AliAnalysisTaskSEB0toDStarPi",
"Calling Destructor");
252 if(fDebug > 1) printf(
"AliAnalysisTaskSEB0toDStarPi::Init() \n");
268 Error(
"UserExec",
"NO EVENT FOUND!");
273 std::cout <<
"\r" <<
"Analysing event number: " <<
fEvents << std::endl;
281 std::bitset<32> maskEV(((AliAODInputHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected());
282 std::cout <<
"Event mask: " << maskEV << std::endl;
292 TClonesArray * D0TracksFromFriendFile = 0;
295 if(!aodEvent && AODEvent() && IsStandardAOD())
299 aodEvent =
dynamic_cast<AliAODEvent*
> (AODEvent());
302 AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
303 if(aodHandler->GetExtensions())
305 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
307 D0TracksFromFriendFile=(TClonesArray*)aodFromExt->GetList()->FindObject(
"D0toKpi");
312 D0TracksFromFriendFile=(TClonesArray*)aodEvent->GetList()->FindObject(
"D0toKpi");
317 if(!aodEvent->GetPrimaryVertex() || TMath::Abs(aodEvent->GetMagneticField())<0.001)
return;
322 TString trigclass=aodEvent->GetFiredTriggerClasses();
323 if(trigclass.Contains(
"C0SMH-B-NOPF-ALLNOTRD")||trigclass.Contains(
"C0SMH-B-NOPF-ALL"))
fCEvents->Fill(5);
343 AliAODVertex *primaryVertex = (AliAODVertex*)aodEvent->GetPrimaryVertex();
344 if(!primaryVertex)
return;
345 if(primaryVertex->GetNContributors()<1)
return;
348 if(!D0TracksFromFriendFile)
350 AliInfo(
"Could not find array of HF vertices, skipping the event");
353 else AliDebug(2, Form(
"Found %d vertices",D0TracksFromFriendFile->GetEntriesFast()));
355 AliAODMCHeader *mcHeader = 0;
358 mcHeader = (AliAODMCHeader*)aodEvent->GetList()->FindObject(AliAODMCHeader::StdBranchName());
360 printf(
" MC header branch not found!\n");
373 TClonesArray *mcTrackArray =
nullptr;
374 if(
fUseMCInfo) mcTrackArray =
dynamic_cast<TClonesArray*
>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
378 TMatrix * B0toDStarPiLabelMatrix =
new TMatrix(0,7);
394 DStarPionSelection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,mcHeader);
395 B0PionSelection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,mcHeader);
396 D0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile,mcHeader);
398 DStarAndB0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile,mcHeader);
405 delete B0toDStarPiLabelMatrix; B0toDStarPiLabelMatrix =
nullptr;
437 AliAnalysisTaskSE::Terminate();
440 printf(
"ERROR: fOutput not available\n");
448 printf(
"ERROR: fListCuts not available\n");
453 printf(
"ERROR: fOutputD0FirstDaughter not available\n");
458 printf(
"ERROR: fOutputD0SecondDaughter not available\n");
463 printf(
"ERROR: fOutputDStarPion not available\n");
468 printf(
"ERROR: fOutputB0Pion not available\n");
473 printf(
"ERROR: fOutputD0 not available\n");
478 printf(
"ERROR: fOutputDStar not available\n");
483 printf(
"ERROR: fOutputB0 not available\n");
488 printf(
"ERROR: fOutputD0_D0Pt not available\n");
493 printf(
"ERROR: fOutputD0_DStarPt not available\n");
498 printf(
"ERROR: fOutputDStar_DStarPt not available\n");
503 printf(
"ERROR: fOutputB0MC not available\n");
512 Info(
"UserCreateOutputObjects",
"CreateOutputObjects of task %s\n", GetName());
585 std::cout <<
"Nr. of B0 meson bins: " <<
fCuts->
GetNPtBins() <<
" limits: " << std::endl;
590 std::cout << std::endl;
596 std::cout << std::endl;
602 std::cout << std::endl;
608 std::cout << std::endl;
665 fCEvents =
new TH1F(
"fCEvents",
"conter",13,0,13);
667 fCEvents->GetXaxis()->SetTitle(
"1");
668 fCEvents->GetYaxis()->SetTitle(
"counts");
669 fCEvents->GetXaxis()->SetBinLabel(2,
"no. of events");
670 fCEvents->GetXaxis()->SetBinLabel(3,
"good prim vtx and B field");
671 fCEvents->GetXaxis()->SetBinLabel(4,
"no event selected");
672 fCEvents->GetXaxis()->SetBinLabel(5,
"no vtx contributors");
673 fCEvents->GetXaxis()->SetBinLabel(6,
"trigger for PbPb");
674 fCEvents->GetXaxis()->SetBinLabel(7,
"no z vtx");
675 fCEvents->GetXaxis()->SetBinLabel(12,
"no. of D0 fail to be rec");
680 TString name_mc_B0_pt_bins =
"mc_B0_pt_bins";
681 TH1F* hist_mc_B0_pt_bins =
new TH1F(name_mc_B0_pt_bins.Data(),
"Pt monte carlo B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",
fnPtBins,0,
fnPtBins);
682 hist_mc_B0_pt_bins->Sumw2();
683 hist_mc_B0_pt_bins->SetLineColor(6);
684 hist_mc_B0_pt_bins->SetMarkerStyle(20);
685 hist_mc_B0_pt_bins->SetMarkerSize(0.6);
686 hist_mc_B0_pt_bins->SetMarkerColor(6);
693 hist_mc_B0_pt_bins->GetXaxis()->SetBinLabel(i+1,bin_name);
695 TH1F* histogram_mc_B0_pt_bins = (TH1F*)hist_mc_B0_pt_bins->Clone();
698 TString name_mc_B0_pt_bins_acc =
"mc_B0_pt_bins_acc";
699 TH1F* hist_mc_B0_pt_bins_acc =
new TH1F(name_mc_B0_pt_bins_acc.Data(),
"Pt monte carlo B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",
fnPtBins,0,
fnPtBins);
700 hist_mc_B0_pt_bins_acc->Sumw2();
701 hist_mc_B0_pt_bins_acc->SetLineColor(6);
702 hist_mc_B0_pt_bins_acc->SetMarkerStyle(20);
703 hist_mc_B0_pt_bins_acc->SetMarkerSize(0.6);
704 hist_mc_B0_pt_bins_acc->SetMarkerColor(6);
711 hist_mc_B0_pt_bins_acc->GetXaxis()->SetBinLabel(i+1,bin_name);
713 TH1F* histogram_mc_B0_pt_bins_acc = (TH1F*)hist_mc_B0_pt_bins_acc->Clone();
716 TString name_mc_B0_pt_bins_lim_acc =
"mc_B0_pt_bins_lim_acc";
717 TH1F* hist_mc_B0_pt_bins_lim_acc =
new TH1F(name_mc_B0_pt_bins_lim_acc.Data(),
"Pt monte carlo B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",
fnPtBins,0,
fnPtBins);
718 hist_mc_B0_pt_bins_lim_acc->Sumw2();
719 hist_mc_B0_pt_bins_lim_acc->SetLineColor(6);
720 hist_mc_B0_pt_bins_lim_acc->SetMarkerStyle(20);
721 hist_mc_B0_pt_bins_lim_acc->SetMarkerSize(0.6);
722 hist_mc_B0_pt_bins_lim_acc->SetMarkerColor(6);
729 hist_mc_B0_pt_bins_lim_acc->GetXaxis()->SetBinLabel(i+1,bin_name);
731 TH1F* histogram_mc_B0_pt_bins_lim_acc = (TH1F*)hist_mc_B0_pt_bins_lim_acc->Clone();
734 TString name_mc_B0_pt_bins_acc_lim_acc =
"mc_B0_pt_bins_acc_lim_acc";
735 TH1F* hist_mc_B0_pt_bins_acc_lim_acc =
new TH1F(name_mc_B0_pt_bins_acc_lim_acc.Data(),
"Pt monte carlo B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",
fnPtBins,0,
fnPtBins);
736 hist_mc_B0_pt_bins_acc_lim_acc->Sumw2();
737 hist_mc_B0_pt_bins_acc_lim_acc->SetLineColor(6);
738 hist_mc_B0_pt_bins_acc_lim_acc->SetMarkerStyle(20);
739 hist_mc_B0_pt_bins_acc_lim_acc->SetMarkerSize(0.6);
740 hist_mc_B0_pt_bins_acc_lim_acc->SetMarkerColor(6);
747 hist_mc_B0_pt_bins_acc_lim_acc->GetXaxis()->SetBinLabel(i+1,bin_name);
749 TH1F* histogram_mc_B0_pt_bins_acc_lim_acc = (TH1F*)hist_mc_B0_pt_bins_acc_lim_acc->Clone();
750 fOutputB0MC->Add(histogram_mc_B0_pt_bins_acc_lim_acc);
752 TString name_mc_B0_pt =
"mc_B0_pt";
753 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);
754 hist_mc_B0_pt->Sumw2();
755 hist_mc_B0_pt->SetLineColor(6);
756 hist_mc_B0_pt->SetMarkerStyle(20);
757 hist_mc_B0_pt->SetMarkerSize(0.6);
758 hist_mc_B0_pt->SetMarkerColor(6);
759 TH1F* histogram_mc_B0_pt = (TH1F*)hist_mc_B0_pt->Clone();
762 TString name_mc_B0_pion_pt =
"mc_B0_pion_pt";
763 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);
764 hist_mc_B0_pion_pt->Sumw2();
765 hist_mc_B0_pion_pt->SetLineColor(6);
766 hist_mc_B0_pion_pt->SetMarkerStyle(20);
767 hist_mc_B0_pion_pt->SetMarkerSize(0.6);
768 hist_mc_B0_pion_pt->SetMarkerColor(6);
769 TH1F* histogram_mc_B0_pion_pt = (TH1F*)hist_mc_B0_pion_pt->Clone();
772 TString name_mc_DStar_pt =
"mc_DStar_pt";
773 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);
774 hist_mc_DStar_pt->Sumw2();
775 hist_mc_DStar_pt->SetLineColor(6);
776 hist_mc_DStar_pt->SetMarkerStyle(20);
777 hist_mc_DStar_pt->SetMarkerSize(0.6);
778 hist_mc_DStar_pt->SetMarkerColor(6);
779 TH1F* histogram_mc_DStar_pt = (TH1F*)hist_mc_DStar_pt->Clone();
782 TString name_mc_DStar_pion_pt =
"mc_DStar_pion_pt";
783 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);
784 hist_mc_DStar_pion_pt->Sumw2();
785 hist_mc_DStar_pion_pt->SetLineColor(6);
786 hist_mc_DStar_pion_pt->SetMarkerStyle(20);
787 hist_mc_DStar_pion_pt->SetMarkerSize(0.6);
788 hist_mc_DStar_pion_pt->SetMarkerColor(6);
789 TH1F* histogram_mc_DStar_pion_pt = (TH1F*)hist_mc_DStar_pion_pt->Clone();
792 TString name_mc_D0_pt =
"mc_D0_pt";
793 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);
794 hist_mc_D0_pt->Sumw2();
795 hist_mc_D0_pt->SetLineColor(6);
796 hist_mc_D0_pt->SetMarkerStyle(20);
797 hist_mc_D0_pt->SetMarkerSize(0.6);
798 hist_mc_D0_pt->SetMarkerColor(6);
799 TH1F* histogram_mc_D0_pt = (TH1F*)hist_mc_D0_pt->Clone();
802 TString name_mc_D0_pion_pt =
"mc_D0_pion_pt";
803 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);
804 hist_mc_D0_pion_pt->Sumw2();
805 hist_mc_D0_pion_pt->SetLineColor(6);
806 hist_mc_D0_pion_pt->SetMarkerStyle(20);
807 hist_mc_D0_pion_pt->SetMarkerSize(0.6);
808 hist_mc_D0_pion_pt->SetMarkerColor(6);
809 TH1F* histogram_mc_D0_pion_pt = (TH1F*)hist_mc_D0_pion_pt->Clone();
812 TString name_mc_D0_kaon_pt =
"mc_D0_kaon_pt";
813 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);
814 hist_mc_D0_kaon_pt->Sumw2();
815 hist_mc_D0_kaon_pt->SetLineColor(6);
816 hist_mc_D0_kaon_pt->SetMarkerStyle(20);
817 hist_mc_D0_kaon_pt->SetMarkerSize(0.6);
818 hist_mc_D0_kaon_pt->SetMarkerColor(6);
819 TH1F* histogram_mc_D0_kaon_pt = (TH1F*)hist_mc_D0_kaon_pt->Clone();
822 TString name_mc_B0_rapidity_true =
"mc_B0_rapidity_true";
823 TH1F* hist_mc_B0_rapidity_true =
new TH1F(name_mc_B0_rapidity_true.Data(),
"rapidity_true monte carlo B0 in B0->D*#pi; Y; Entries",5000,-20,20);
824 hist_mc_B0_rapidity_true->Sumw2();
825 hist_mc_B0_rapidity_true->SetLineColor(6);
826 hist_mc_B0_rapidity_true->SetMarkerStyle(20);
827 hist_mc_B0_rapidity_true->SetMarkerSize(0.6);
828 hist_mc_B0_rapidity_true->SetMarkerColor(6);
829 TH1F* histogram_mc_B0_rapidity_true = (TH1F*)hist_mc_B0_rapidity_true->Clone();
832 TString name_mc_B0_pion_rapidity_true =
"mc_B0_pion_rapidity_true";
833 TH1F* hist_mc_B0_pion_rapidity_true =
new TH1F(name_mc_B0_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of B0 in B0->D*#pi; Y; Entries",5000,-20,20);
834 hist_mc_B0_pion_rapidity_true->Sumw2();
835 hist_mc_B0_pion_rapidity_true->SetLineColor(6);
836 hist_mc_B0_pion_rapidity_true->SetMarkerStyle(20);
837 hist_mc_B0_pion_rapidity_true->SetMarkerSize(0.6);
838 hist_mc_B0_pion_rapidity_true->SetMarkerColor(6);
839 TH1F* histogram_mc_B0_pion_rapidity_true = (TH1F*)hist_mc_B0_pion_rapidity_true->Clone();
840 fOutputB0MC->Add(histogram_mc_B0_pion_rapidity_true);
842 TString name_mc_DStar_rapidity_true =
"mc_DStar_rapidity_true";
843 TH1F* hist_mc_DStar_rapidity_true =
new TH1F(name_mc_DStar_rapidity_true.Data(),
"rapidity_true monte carlo DStar in B0->D*#pi; Y; Entries",5000,-20,20);
844 hist_mc_DStar_rapidity_true->Sumw2();
845 hist_mc_DStar_rapidity_true->SetLineColor(6);
846 hist_mc_DStar_rapidity_true->SetMarkerStyle(20);
847 hist_mc_DStar_rapidity_true->SetMarkerSize(0.6);
848 hist_mc_DStar_rapidity_true->SetMarkerColor(6);
849 TH1F* histogram_mc_DStar_rapidity_true = (TH1F*)hist_mc_DStar_rapidity_true->Clone();
850 fOutputB0MC->Add(histogram_mc_DStar_rapidity_true);
852 TString name_mc_DStar_pion_rapidity_true =
"mc_DStar_pion_rapidity_true";
853 TH1F* hist_mc_DStar_pion_rapidity_true =
new TH1F(name_mc_DStar_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of DStar in B0->D*#pi; Y; Entries",5000,-20,20);
854 hist_mc_DStar_pion_rapidity_true->Sumw2();
855 hist_mc_DStar_pion_rapidity_true->SetLineColor(6);
856 hist_mc_DStar_pion_rapidity_true->SetMarkerStyle(20);
857 hist_mc_DStar_pion_rapidity_true->SetMarkerSize(0.6);
858 hist_mc_DStar_pion_rapidity_true->SetMarkerColor(6);
859 TH1F* histogram_mc_DStar_pion_rapidity_true = (TH1F*)hist_mc_DStar_pion_rapidity_true->Clone();
860 fOutputB0MC->Add(histogram_mc_DStar_pion_rapidity_true);
862 TString name_mc_D0_rapidity_true =
"mc_D0_rapidity_true";
863 TH1F* hist_mc_D0_rapidity_true =
new TH1F(name_mc_D0_rapidity_true.Data(),
"rapidity_true monte carlo D0 in B0->D*#pi; Y; Entries",5000,-20,20);
864 hist_mc_D0_rapidity_true->Sumw2();
865 hist_mc_D0_rapidity_true->SetLineColor(6);
866 hist_mc_D0_rapidity_true->SetMarkerStyle(20);
867 hist_mc_D0_rapidity_true->SetMarkerSize(0.6);
868 hist_mc_D0_rapidity_true->SetMarkerColor(6);
869 TH1F* histogram_mc_D0_rapidity_true = (TH1F*)hist_mc_D0_rapidity_true->Clone();
872 TString name_mc_D0_pion_rapidity_true =
"mc_D0_pion_rapidity_true";
873 TH1F* hist_mc_D0_pion_rapidity_true =
new TH1F(name_mc_D0_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of D0 in B0->D*#pi; Y; Entries",5000,-20,20);
874 hist_mc_D0_pion_rapidity_true->Sumw2();
875 hist_mc_D0_pion_rapidity_true->SetLineColor(6);
876 hist_mc_D0_pion_rapidity_true->SetMarkerStyle(20);
877 hist_mc_D0_pion_rapidity_true->SetMarkerSize(0.6);
878 hist_mc_D0_pion_rapidity_true->SetMarkerColor(6);
879 TH1F* histogram_mc_D0_pion_rapidity_true = (TH1F*)hist_mc_D0_pion_rapidity_true->Clone();
880 fOutputB0MC->Add(histogram_mc_D0_pion_rapidity_true);
882 TString name_mc_D0_kaon_rapidity_true =
"mc_D0_kaon_rapidity_true";
883 TH1F* hist_mc_D0_kaon_rapidity_true =
new TH1F(name_mc_D0_kaon_rapidity_true.Data(),
"rapidity_true monte carlo kaon of D0 in B0->D*#pi; Y; Entries",5000,-20,20);
884 hist_mc_D0_kaon_rapidity_true->Sumw2();
885 hist_mc_D0_kaon_rapidity_true->SetLineColor(6);
886 hist_mc_D0_kaon_rapidity_true->SetMarkerStyle(20);
887 hist_mc_D0_kaon_rapidity_true->SetMarkerSize(0.6);
888 hist_mc_D0_kaon_rapidity_true->SetMarkerColor(6);
889 TH1F* histogram_mc_D0_kaon_rapidity_true = (TH1F*)hist_mc_D0_kaon_rapidity_true->Clone();
890 fOutputB0MC->Add(histogram_mc_D0_kaon_rapidity_true);
892 TString name_mc_B0_pseudorapidity_true =
"mc_B0_pseudorapidity_true";
893 TH1F* hist_mc_B0_pseudorapidity_true =
new TH1F(name_mc_B0_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo B0 in B0->D*#pi; #eta; Entries",5000,-20,20);
894 hist_mc_B0_pseudorapidity_true->Sumw2();
895 hist_mc_B0_pseudorapidity_true->SetLineColor(6);
896 hist_mc_B0_pseudorapidity_true->SetMarkerStyle(20);
897 hist_mc_B0_pseudorapidity_true->SetMarkerSize(0.6);
898 hist_mc_B0_pseudorapidity_true->SetMarkerColor(6);
899 TH1F* histogram_mc_B0_pseudorapidity_true = (TH1F*)hist_mc_B0_pseudorapidity_true->Clone();
900 fOutputB0MC->Add(histogram_mc_B0_pseudorapidity_true);
902 TString name_mc_B0_pion_pseudorapidity_true =
"mc_B0_pion_pseudorapidity_true";
903 TH1F* hist_mc_B0_pion_pseudorapidity_true =
new TH1F(name_mc_B0_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of B0 in B0->D*#pi; #eta; Entries",5000,-20,20);
904 hist_mc_B0_pion_pseudorapidity_true->Sumw2();
905 hist_mc_B0_pion_pseudorapidity_true->SetLineColor(6);
906 hist_mc_B0_pion_pseudorapidity_true->SetMarkerStyle(20);
907 hist_mc_B0_pion_pseudorapidity_true->SetMarkerSize(0.6);
908 hist_mc_B0_pion_pseudorapidity_true->SetMarkerColor(6);
909 TH1F* histogram_mc_B0_pion_pseudorapidity_true = (TH1F*)hist_mc_B0_pion_pseudorapidity_true->Clone();
910 fOutputB0MC->Add(histogram_mc_B0_pion_pseudorapidity_true);
912 TString name_mc_DStar_pseudorapidity_true =
"mc_DStar_pseudorapidity_true";
913 TH1F* hist_mc_DStar_pseudorapidity_true =
new TH1F(name_mc_DStar_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo DStar in B0->D*#pi; #eta; Entries",5000,-20,20);
914 hist_mc_DStar_pseudorapidity_true->Sumw2();
915 hist_mc_DStar_pseudorapidity_true->SetLineColor(6);
916 hist_mc_DStar_pseudorapidity_true->SetMarkerStyle(20);
917 hist_mc_DStar_pseudorapidity_true->SetMarkerSize(0.6);
918 hist_mc_DStar_pseudorapidity_true->SetMarkerColor(6);
919 TH1F* histogram_mc_DStar_pseudorapidity_true = (TH1F*)hist_mc_DStar_pseudorapidity_true->Clone();
920 fOutputB0MC->Add(histogram_mc_DStar_pseudorapidity_true);
922 TString name_mc_DStar_pion_pseudorapidity_true =
"mc_DStar_pion_pseudorapidity_true";
923 TH1F* hist_mc_DStar_pion_pseudorapidity_true =
new TH1F(name_mc_DStar_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of DStar in B0->D*#pi; #eta; Entries",5000,-20,20);
924 hist_mc_DStar_pion_pseudorapidity_true->Sumw2();
925 hist_mc_DStar_pion_pseudorapidity_true->SetLineColor(6);
926 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerStyle(20);
927 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerSize(0.6);
928 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerColor(6);
929 TH1F* histogram_mc_DStar_pion_pseudorapidity_true = (TH1F*)hist_mc_DStar_pion_pseudorapidity_true->Clone();
930 fOutputB0MC->Add(histogram_mc_DStar_pion_pseudorapidity_true);
932 TString name_mc_D0_pseudorapidity_true =
"mc_D0_pseudorapidity_true";
933 TH1F* hist_mc_D0_pseudorapidity_true =
new TH1F(name_mc_D0_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo D0 in B0->D*#pi; #eta; Entries",5000,-20,20);
934 hist_mc_D0_pseudorapidity_true->Sumw2();
935 hist_mc_D0_pseudorapidity_true->SetLineColor(6);
936 hist_mc_D0_pseudorapidity_true->SetMarkerStyle(20);
937 hist_mc_D0_pseudorapidity_true->SetMarkerSize(0.6);
938 hist_mc_D0_pseudorapidity_true->SetMarkerColor(6);
939 TH1F* histogram_mc_D0_pseudorapidity_true = (TH1F*)hist_mc_D0_pseudorapidity_true->Clone();
940 fOutputB0MC->Add(histogram_mc_D0_pseudorapidity_true);
942 TString name_mc_D0_pion_pseudorapidity_true =
"mc_D0_pion_pseudorapidity_true";
943 TH1F* hist_mc_D0_pion_pseudorapidity_true =
new TH1F(name_mc_D0_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of D0 in B0->D*#pi; #eta; Entries",5000,-20,20);
944 hist_mc_D0_pion_pseudorapidity_true->Sumw2();
945 hist_mc_D0_pion_pseudorapidity_true->SetLineColor(6);
946 hist_mc_D0_pion_pseudorapidity_true->SetMarkerStyle(20);
947 hist_mc_D0_pion_pseudorapidity_true->SetMarkerSize(0.6);
948 hist_mc_D0_pion_pseudorapidity_true->SetMarkerColor(6);
949 TH1F* histogram_mc_D0_pion_pseudorapidity_true = (TH1F*)hist_mc_D0_pion_pseudorapidity_true->Clone();
950 fOutputB0MC->Add(histogram_mc_D0_pion_pseudorapidity_true);
952 TString name_mc_D0_kaon_pseudorapidity_true =
"mc_D0_kaon_pseudorapidity_true";
953 TH1F* hist_mc_D0_kaon_pseudorapidity_true =
new TH1F(name_mc_D0_kaon_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo kaon of D0 in B0->D*#pi; #eta; Entries",5000,-20,20);
954 hist_mc_D0_kaon_pseudorapidity_true->Sumw2();
955 hist_mc_D0_kaon_pseudorapidity_true->SetLineColor(6);
956 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerStyle(20);
957 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerSize(0.6);
958 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerColor(6);
959 TH1F* histogram_mc_D0_kaon_pseudorapidity_true = (TH1F*)hist_mc_D0_kaon_pseudorapidity_true->Clone();
960 fOutputB0MC->Add(histogram_mc_D0_kaon_pseudorapidity_true);
964 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
965 TH1F* hist_dca_D0_DStarPion =
new TH1F(name_dca_D0_DStarPion.Data(),
"dca_D0_DStarPion; DCA [cm]; Entries",1000,0,0.2);
966 hist_dca_D0_DStarPion->Sumw2();
967 hist_dca_D0_DStarPion->SetLineColor(6);
968 hist_dca_D0_DStarPion->SetMarkerStyle(20);
969 hist_dca_D0_DStarPion->SetMarkerSize(0.6);
970 hist_dca_D0_DStarPion->SetMarkerColor(6);
971 TH1F* histogram_dca_D0_DStarPion = (TH1F*)hist_dca_D0_DStarPion->Clone();
974 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
975 TH1F* hist_dca_D0_B0Pion =
new TH1F(name_dca_D0_B0Pion.Data(),
"dca_D0_B0Pion; DCA [cm]; Entries",1000,0,0.2);
976 hist_dca_D0_B0Pion->Sumw2();
977 hist_dca_D0_B0Pion->SetLineColor(6);
978 hist_dca_D0_B0Pion->SetMarkerStyle(20);
979 hist_dca_D0_B0Pion->SetMarkerSize(0.6);
980 hist_dca_D0_B0Pion->SetMarkerColor(6);
981 TH1F* histogram_dca_D0_B0Pion = (TH1F*)hist_dca_D0_B0Pion->Clone();
984 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
985 TH1F* hist_dca_DStarPion_B0Pion =
new TH1F(name_dca_DStarPion_B0Pion.Data(),
"dca_DStarPion_B0Pion; DCA [cm]; Entries",1000,0,0.2);
986 hist_dca_DStarPion_B0Pion->Sumw2();
987 hist_dca_DStarPion_B0Pion->SetLineColor(6);
988 hist_dca_DStarPion_B0Pion->SetMarkerStyle(20);
989 hist_dca_DStarPion_B0Pion->SetMarkerSize(0.6);
990 hist_dca_DStarPion_B0Pion->SetMarkerColor(6);
991 TH1F* histogram_dca_DStarPion_B0Pion = (TH1F*)hist_dca_DStarPion_B0Pion->Clone();
994 TString name_dca_Combined =
"dca_Combined";
995 TH1F* hist_dca_Combined =
new TH1F(name_dca_Combined.Data(),
"dca_Combined; DCA [cm]; Entries",1000,0,1.0);
996 hist_dca_Combined->Sumw2();
997 hist_dca_Combined->SetLineColor(6);
998 hist_dca_Combined->SetMarkerStyle(20);
999 hist_dca_Combined->SetMarkerSize(0.6);
1000 hist_dca_Combined->SetMarkerColor(6);
1001 TH1F* histogram_dca_Combined = (TH1F*)hist_dca_Combined->Clone();
1004 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
1005 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);
1006 hist_dca_Signal_D0_DStarPion->Sumw2();
1007 hist_dca_Signal_D0_DStarPion->SetLineColor(4);
1008 hist_dca_Signal_D0_DStarPion->SetMarkerStyle(20);
1009 hist_dca_Signal_D0_DStarPion->SetMarkerSize(0.6);
1010 hist_dca_Signal_D0_DStarPion->SetMarkerColor(4);
1011 TH1F* histogram_dca_Signal_D0_DStarPion = (TH1F*)hist_dca_Signal_D0_DStarPion->Clone();
1012 fOutputB0MC->Add(histogram_dca_Signal_D0_DStarPion);
1014 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
1015 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);
1016 hist_dca_Signal_D0_B0Pion->Sumw2();
1017 hist_dca_Signal_D0_B0Pion->SetLineColor(4);
1018 hist_dca_Signal_D0_B0Pion->SetMarkerStyle(20);
1019 hist_dca_Signal_D0_B0Pion->SetMarkerSize(0.6);
1020 hist_dca_Signal_D0_B0Pion->SetMarkerColor(4);
1021 TH1F* histogram_dca_Signal_D0_B0Pion = (TH1F*)hist_dca_Signal_D0_B0Pion->Clone();
1024 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
1025 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);
1026 hist_dca_Signal_DStarPion_B0Pion->Sumw2();
1027 hist_dca_Signal_DStarPion_B0Pion->SetLineColor(4);
1028 hist_dca_Signal_DStarPion_B0Pion->SetMarkerStyle(20);
1029 hist_dca_Signal_DStarPion_B0Pion->SetMarkerSize(0.6);
1030 hist_dca_Signal_DStarPion_B0Pion->SetMarkerColor(4);
1031 TH1F* histogram_dca_Signal_DStarPion_B0Pion = (TH1F*)hist_dca_Signal_DStarPion_B0Pion->Clone();
1032 fOutputB0MC->Add(histogram_dca_Signal_DStarPion_B0Pion);
1034 TString name_dca_Signal_Combined =
"dca_Signal_Combined";
1035 TH1F* hist_dca_Signal_Combined =
new TH1F(name_dca_Signal_Combined.Data(),
"dca_Signal_Combined; DCA [cm]; Entries",1000,0,1.0);
1036 hist_dca_Signal_Combined->Sumw2();
1037 hist_dca_Signal_Combined->SetLineColor(4);
1038 hist_dca_Signal_Combined->SetMarkerStyle(20);
1039 hist_dca_Signal_Combined->SetMarkerSize(0.6);
1040 hist_dca_Signal_Combined->SetMarkerColor(4);
1041 TH1F* histogram_dca_Signal_Combined = (TH1F*)hist_dca_Signal_Combined->Clone();
1046 TString name_B0s_in_analysis =
"B0s_in_analysis";
1047 TH1F* hist_B0s_in_analysis =
new TH1F(name_B0s_in_analysis.Data(),
"Number of B0 to kpipipi in the Analysis; Entries",10,0,10);
1048 hist_B0s_in_analysis->Sumw2();
1049 hist_B0s_in_analysis->SetLineColor(6);
1050 hist_B0s_in_analysis->SetMarkerStyle(20);
1051 hist_B0s_in_analysis->SetMarkerSize(0.6);
1052 hist_B0s_in_analysis->SetMarkerColor(6);
1053 hist_B0s_in_analysis->SetStats(kTRUE);
1054 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(1,
"no. of B0s");
1055 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(2,
"no. of B0s to kpipipi");
1056 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(3,
"no. with all tracks in event");
1057 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(4,
"no. ...");
1058 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(5,
"no. ...");
1059 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(6,
"no. ...");
1060 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(7,
"no. ...");
1061 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(8,
"no. ...");
1062 TH1F* hist_B0s_in_analysis_mc = (TH1F*)hist_B0s_in_analysis->Clone();
1065 TString name_B0s_per_bin =
"B0s_per_bin";
1066 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);
1073 hist_B0s_per_bin->GetXaxis()->SetBinLabel(i+1,bin_name);
1075 TH1F* hist_B0s_per_bin_mc = (TH1F*)hist_B0s_per_bin->Clone();
1078 TString name_B0s_per_bin_in_Acc =
"B0s_per_bin_in_Acc";
1079 TH1F* hist_B0s_per_bin_in_Acc =
new TH1F(name_B0s_per_bin_in_Acc.Data(),
"Number of B0 to kpipipi in the Analysis per bin with all daughters in acceptance; Entries",
fnPtBins,0,
fnPtBins);
1086 hist_B0s_per_bin_in_Acc->GetXaxis()->SetBinLabel(i+1,bin_name);
1088 TH1F* hist_B0s_per_bin_in_Acc_mc = (TH1F*)hist_B0s_per_bin_in_Acc->Clone();
1091 TString name_B0s_per_bin_in_Lim_Acc =
"B0s_per_bin_in_Lim_Acc";
1092 TH1F* hist_B0s_per_bin_in_Lim_Acc =
new TH1F(name_B0s_per_bin_in_Lim_Acc.Data(),
"Number of B0 to kpipipi in the Analysis per bin with all daughters in acceptance; Entries",
fnPtBins,0,
fnPtBins);
1099 hist_B0s_per_bin_in_Lim_Acc->GetXaxis()->SetBinLabel(i+1,bin_name);
1101 TH1F* hist_B0s_per_bin_in_Lim_Acc_mc = (TH1F*)hist_B0s_per_bin_in_Lim_Acc->Clone();
1107 for (
Int_t i = 0; i < 4; i++){
1116 for (
Int_t j = 0; j < 6; j++){
1117 if(j==0) add_name =
"";
1118 if(j==1) add_name =
"Signal";
1119 if(j==2) add_name =
"Cut";
1120 if(j==3) add_name =
"SignalCut";
1121 if(j==4) add_name =
"Result";
1122 if(j==5) add_name =
"SignalResult";
1125 TString discription_Histogram =
"";
1126 Int_t numberOfBins = 0;
1130 for (
Int_t k = 0; k < 9; ++k)
1132 if(k==0){name_Histogram =
"ptTrack"; discription_Histogram =
"pt track; p_{T} [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
1133 if(k==1){name_Histogram =
"momentumTrack"; discription_Histogram =
"momentum track; p [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
1134 if(k==2){name_Histogram =
"numberOfITS"; discription_Histogram =
"Number of ITS clusters track; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
1135 if(k==3){name_Histogram =
"numberOfTPC"; discription_Histogram =
"Number of TPC clusters track; [#]; Entries"; numberOfBins = 601; lowerBound = -0.5; upperBound = 600.5;}
1136 if(k==4){name_Histogram =
"pointsOnITS"; discription_Histogram =
"Number of ITS clusters track per layer; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
1137 if(k==5){name_Histogram =
"nSigmaTPC"; discription_Histogram =
"n sigma TPC for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1138 if(k==6){name_Histogram =
"nSigmaTOF"; discription_Histogram =
"n sigma TOF for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1139 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;}
1140 if(k==8){name_Histogram =
"impactParameter"; discription_Histogram =
"Impact Parameter track; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1142 name_Histogram += add_name;
1143 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1145 if(j%2==0) histogram->SetLineColor(6);
1146 if(j%2==1) histogram->SetLineColor(4);
1147 histogram->SetMarkerStyle(20);
1148 histogram->SetMarkerSize(0.6);
1149 if(j%2==0) histogram->SetMarkerColor(6);
1150 if(j%2==1) histogram->SetMarkerColor(4);
1151 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1152 listout->Add(histogram_Clone);
1156 TString numberofparticlesperevent=
"numberofparticlesperevent";
1157 numberofparticlesperevent += add_name;
1158 TH1F* hist_numberofparticlesperevent =
new TH1F(numberofparticlesperevent.Data(),
"Number of particles per event; number of particles in one event; Entries",100,0,100);
1159 hist_numberofparticlesperevent->Sumw2();
1160 hist_numberofparticlesperevent->SetLineColor(6);
1161 hist_numberofparticlesperevent->SetMarkerStyle(20);
1162 hist_numberofparticlesperevent->SetMarkerSize(0.6);
1163 hist_numberofparticlesperevent->SetMarkerColor(6);
1164 TH1F* histogram_numberofparticlesperevent = (TH1F*)hist_numberofparticlesperevent->Clone();
1165 listout->Add(histogram_numberofparticlesperevent);
1169 TH1F * effectOfCuts =
new TH1F(
"effectOfCutsOnBackground",
"Removal counter",18,0,18);
1170 effectOfCuts->SetStats(kTRUE);
1171 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1172 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1173 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1174 effectOfCuts->GetXaxis()->SetBinLabel(2,
"1");
1175 effectOfCuts->GetXaxis()->SetBinLabel(3,
"2");
1176 effectOfCuts->GetXaxis()->SetBinLabel(4,
"3");
1177 effectOfCuts->GetXaxis()->SetBinLabel(5,
"4");
1178 effectOfCuts->GetXaxis()->SetBinLabel(6,
"5");
1179 effectOfCuts->GetXaxis()->SetBinLabel(7,
"6");
1180 effectOfCuts->GetXaxis()->SetBinLabel(8,
"7");
1181 effectOfCuts->GetXaxis()->SetBinLabel(9,
"8");
1182 effectOfCuts->GetXaxis()->SetBinLabel(10,
"9");
1183 effectOfCuts->GetXaxis()->SetBinLabel(11,
"10");
1184 effectOfCuts->GetXaxis()->SetBinLabel(12,
"11");
1185 effectOfCuts->GetXaxis()->SetBinLabel(13,
"12");
1186 effectOfCuts->GetXaxis()->SetBinLabel(14,
"13");
1187 effectOfCuts->GetXaxis()->SetBinLabel(15,
"14");
1188 effectOfCuts->GetXaxis()->SetBinLabel(16,
"15");
1189 effectOfCuts->GetXaxis()->SetBinLabel(17,
"16");
1190 effectOfCuts->GetXaxis()->SetBinLabel(18,
"17");
1191 listout->Add(effectOfCuts);
1194 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsOnSignal",
"Removal counter",18,0,18);
1195 effectOfCutsMC->SetStats(kTRUE);
1196 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1197 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1198 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1199 effectOfCutsMC->GetXaxis()->SetBinLabel(2,
"1");
1200 effectOfCutsMC->GetXaxis()->SetBinLabel(3,
"2");
1201 effectOfCutsMC->GetXaxis()->SetBinLabel(4,
"3");
1202 effectOfCutsMC->GetXaxis()->SetBinLabel(5,
"4");
1203 effectOfCutsMC->GetXaxis()->SetBinLabel(6,
"5");
1204 effectOfCutsMC->GetXaxis()->SetBinLabel(7,
"6");
1205 effectOfCutsMC->GetXaxis()->SetBinLabel(8,
"7");
1206 effectOfCutsMC->GetXaxis()->SetBinLabel(9,
"8");
1207 effectOfCutsMC->GetXaxis()->SetBinLabel(10,
"9");
1208 effectOfCutsMC->GetXaxis()->SetBinLabel(11,
"10");
1209 effectOfCutsMC->GetXaxis()->SetBinLabel(12,
"11");
1210 effectOfCutsMC->GetXaxis()->SetBinLabel(13,
"12");
1211 effectOfCutsMC->GetXaxis()->SetBinLabel(14,
"13");
1212 effectOfCutsMC->GetXaxis()->SetBinLabel(15,
"14");
1213 effectOfCutsMC->GetXaxis()->SetBinLabel(16,
"15");
1214 effectOfCutsMC->GetXaxis()->SetBinLabel(17,
"16");
1215 effectOfCutsMC->GetXaxis()->SetBinLabel(18,
"17");
1216 listout->Add(effectOfCutsMC);
1219 TString name_particle_pdg =
"particle_pdg";
1220 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1221 hist_particle_pdg->Sumw2();
1222 hist_particle_pdg->SetLineColor(6);
1223 hist_particle_pdg->SetMarkerStyle(20);
1224 hist_particle_pdg->SetMarkerSize(0.6);
1225 hist_particle_pdg->SetMarkerColor(6);
1226 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1227 listout->Add(histogram_particle_pdg);
1230 TString name_particle_mother_pdg =
"particle_mother_pdg";
1231 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1232 hist_particle_mother_pdg->Sumw2();
1233 hist_particle_mother_pdg->SetLineColor(6);
1234 hist_particle_mother_pdg->SetMarkerStyle(20);
1235 hist_particle_mother_pdg->SetMarkerSize(0.6);
1236 hist_particle_mother_pdg->SetMarkerColor(6);
1237 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1238 listout->Add(histogram_particle_mother_pdg);
1241 TString name_ptB0_vs_ptTrack =
"ptB0_vs_ptTrackBackground";
1242 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);
1243 hist_ptB0_vs_ptTrack->Sumw2();
1244 hist_ptB0_vs_ptTrack->SetLineColor(6);
1245 hist_ptB0_vs_ptTrack->SetMarkerStyle(20);
1246 hist_ptB0_vs_ptTrack->SetMarkerSize(0.6);
1247 hist_ptB0_vs_ptTrack->SetMarkerColor(6);
1248 TH2F* histogram_ptB0_vs_ptTrack = (
TH2F*)hist_ptB0_vs_ptTrack->Clone();
1249 listout->Add(histogram_ptB0_vs_ptTrack);
1252 TString name_ptB0_vs_ptTrackMC =
"ptB0_vs_ptTrackSignal";
1253 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);
1254 hist_ptB0_vs_ptTrackMC->Sumw2();
1255 hist_ptB0_vs_ptTrackMC->SetLineColor(4);
1256 hist_ptB0_vs_ptTrackMC->SetMarkerStyle(20);
1257 hist_ptB0_vs_ptTrackMC->SetMarkerSize(0.6);
1258 hist_ptB0_vs_ptTrackMC->SetMarkerColor(6);
1259 TH2F* histogram_ptB0_vs_ptTrackMC = (
TH2F*)hist_ptB0_vs_ptTrackMC->Clone();
1260 listout->Add(histogram_ptB0_vs_ptTrackMC);
1265 for (
Int_t i = 0; i < 6; i++){
1269 Int_t nHistogramSets = 0;
1277 for (
Int_t j = 0; j < nHistogramSets; j++){
1280 if(j==0) add_name =
"";
1281 if(j==1) add_name =
"Signal";
1282 if(j==2) add_name =
"Cut";
1283 if(j==3) add_name =
"SignalCut";
1284 if(j==4) add_name =
"Result";
1285 if(j==5) add_name =
"SignalResult";
1286 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];}
1287 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];}
1307 TString discription_Histogram =
"";
1308 Int_t numberOfBins = 0;
1311 Int_t numberOfBinsTwo = 0;
1315 for (
Int_t k = 0; k < 43; ++k)
1317 if(k==0){name_Histogram =
"ptMother"; discription_Histogram =
"pt mother; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1318 if(k==1){name_Histogram =
"ptFirstDaughter"; discription_Histogram =
"pt first daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1319 if(k==2){name_Histogram =
"ptSecondDaughter"; discription_Histogram =
"pt second daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1320 if(k==3){name_Histogram =
"etaMother"; discription_Histogram =
"eta mother; #eta; Entries"; numberOfBins = 100; lowerBound = -2; upperBound = 2;}
1321 if(k==4){name_Histogram =
"phiMother"; discription_Histogram =
"phi mother; #phi; Entries"; numberOfBins = 25; lowerBound = 0; upperBound = 2*TMath::Pi();}
1322 if(k==5){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1323 if(k==6){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1325 if(k==7){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1327 if(k==8){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle; [Cos(#theta)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1328 if(k==9){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product; [cm^{2}]; Entries"; numberOfBins = 500; lowerBound = -0.01; upperBound = 0.01;}
1329 if(k==10){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY; [cm^{2}]; Entries"; numberOfBins = 400; lowerBound = 0; upperBound = 0.1;}
1330 if(k==11){name_Histogram =
"invariantMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 20000; lowerBound = 0; upperBound = 10;}
1331 if(k==12){name_Histogram =
"deltaMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1332 if(k==13){name_Histogram =
"dcaMother"; discription_Histogram =
"dca mother; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 0.25;}
1333 if(k==14){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1334 if(k==15){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1335 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;}
1336 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;}
1337 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;}
1338 if(k==19){name_Histogram =
"angleMotherFirstDaughter"; discription_Histogram =
"flight angle mother and first daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1339 if(k==20){name_Histogram =
"angleMotherSecondDaughter"; discription_Histogram =
"flight angle mother and second daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = 0.5; upperBound = 1;}
1340 if(k==21){name_Histogram =
"angleBetweenBothDaughters"; discription_Histogram =
"angle between both daughters; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1341 if(k==22){name_Histogram =
"cosThetaStar"; discription_Histogram =
"cosThetaStar; [Cos(#theta*)]; Entries"; numberOfBins = 200; lowerBound = -2; upperBound = 2;}
1342 if(k==23){name_Histogram =
"vertexX"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 200; lowerBound = -5; upperBound = 5;}
1343 if(k==24){name_Histogram =
"vertexY"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 200; lowerBound = -5; upperBound = 5;}
1344 if(k==25){name_Histogram =
"vertexZ"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 200; lowerBound = -20; upperBound = 20;}
1347 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;}
1349 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 = 200; lowerBound = 0; upperBound = 1;}
1351 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 = 200; lowerBound = 0; upperBound = 1;}
1353 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 = 200; lowerBound = 0; upperBound = 1;}
1355 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 = 200; lowerBound = -0.02; upperBound = 0.02;}
1357 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;}
1359 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;}
1361 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;}
1363 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;}
1365 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;}
1368 if(k==36){name_Histogram =
"topomaticFirstDaughter"; discription_Histogram =
"topomatic d0 first daughter; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1369 if(k==37){name_Histogram =
"topomaticSecondDaughter"; discription_Histogram =
"topomatic d0 second daughter; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1370 if(k==38){name_Histogram =
"topomaticMax"; discription_Histogram =
"Max topomatic; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1371 if(k==39){name_Histogram =
"topomaticMin"; discription_Histogram =
"Min topomatic; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1372 if(k==40){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY; [Cos(#theta)]; Entries"; numberOfBins = 1000; lowerBound = -1; upperBound = 1;}
1373 if(k==41){name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY; distance [cm]; Entries"; numberOfBins = 1000; lowerBound = 0; upperBound = 10;}
1374 if(k==42){name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1377 name_Histogram += add_name;
1378 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1380 if(j%2==0) histogram->SetLineColor(6);
1381 if(j%2==1) histogram->SetLineColor(4);
1382 histogram->SetMarkerStyle(20);
1383 histogram->SetMarkerSize(0.6);
1384 if(j%2==0) histogram->SetMarkerColor(6);
1385 if(j%2==1) histogram->SetMarkerColor(4);
1386 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1387 listout->Add(histogram_Clone);
1392 name_Histogram =
"";
1393 discription_Histogram =
"";
1397 numberOfBinsTwo = 0;
1398 lowerBoundTwo = 0.0;
1399 upperBoundTwo = 0.0;
1404 Int_t nVariables = 10;
1405 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
1409 TString name2D =
"2D_Histograms";
1411 list2D->SetName(name2D.Data());
1412 listout->Add(list2D);
1414 for (
Int_t k = 0; k < nHistograms; ++k)
1416 numberOfBins = 50; numberOfBinsTwo = 50;
1417 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1418 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1419 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1420 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1421 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1422 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1423 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1424 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1425 if(nFirst==8){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1426 if(nFirst==9){name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY [cm];"; lowerBound = 0; upperBound = 1;}
1427 if(nFirst==10){name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBound = 0; upperBound = 50;}
1429 if(nSecond==0){name_Histogram +=
"d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1430 if(nSecond==1){name_Histogram +=
"d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1431 if(nSecond==2){name_Histogram +=
"d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1432 if(nSecond==3){name_Histogram +=
"pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1433 if(nSecond==4){name_Histogram +=
"impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1434 if(nSecond==5){name_Histogram +=
"impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1435 if(nSecond==6){name_Histogram +=
"vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1436 if(nSecond==7){name_Histogram +=
"normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1437 if(nSecond==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1438 if(nSecond==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1439 if(nSecond==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1441 name_Histogram += add_name;
1442 TH2F* histogram =
new TH2F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo);
1444 if(j%2==0) histogram->SetLineColor(6);
1445 if(j%2==1) histogram->SetLineColor(4);
1446 histogram->SetMarkerStyle(20);
1447 histogram->SetMarkerSize(0.6);
1448 histogram->SetMarkerColor(6);
1449 TH2F* histogram_Clone = (
TH2F*)histogram->Clone();
1450 list2D->Add(histogram_Clone);
1454 if(nSecond>nVariables)
1457 nSecond = nFirst + 1;
1463 name_Histogram =
"";
1464 discription_Histogram =
"";
1468 numberOfBinsTwo = 0;
1469 lowerBoundTwo = 0.0;
1470 upperBoundTwo = 0.0;
1471 Int_t numberOfBinsThree = 0;
1472 Int_t lowerBoundThree = 0.0;
1473 Int_t upperBoundThree = 0.0;
1480 nHistograms = nVariables * (nVariables - 1) * (nVariables - 2) / 6;
1484 TString name3D =
"3D_Histograms";
1486 list3D->SetName(name2D.Data());
1487 listout->Add(list3D);
1489 for (
Int_t k = 0; k < nHistograms; ++k)
1491 numberOfBins = 50; numberOfBinsTwo = 50;
1492 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1493 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1494 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1495 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1496 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1497 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1498 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1499 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1500 if(nFirst==8){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1501 if(nFirst==9){name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY [cm];"; lowerBound = 0; upperBound = 1;}
1502 if(nFirst==10){name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBound = 0; upperBound = 50;}
1504 if(nSecond==0){name_Histogram +=
"_d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1505 if(nSecond==1){name_Histogram +=
"_d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1506 if(nSecond==2){name_Histogram +=
"_d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1507 if(nSecond==3){name_Histogram +=
"_pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1508 if(nSecond==4){name_Histogram +=
"_impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1509 if(nSecond==5){name_Histogram +=
"_impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1510 if(nSecond==6){name_Histogram +=
"_vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1511 if(nSecond==7){name_Histogram +=
"_normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1512 if(nSecond==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1513 if(nSecond==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1514 if(nSecond==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1516 if(nThird==0){name_Histogram +=
"_d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1517 if(nThird==1){name_Histogram +=
"_d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1518 if(nThird==2){name_Histogram +=
"_d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1519 if(nThird==3){name_Histogram +=
"_pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundThree = -1; upperBoundThree = 1;}
1520 if(nThird==4){name_Histogram +=
"_impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundThree = -0.01; upperBoundThree = 0.01;}
1521 if(nThird==5){name_Histogram +=
"_impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundThree = 0; upperBoundThree = 0.5;}
1522 if(nThird==6){name_Histogram +=
"_vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1523 if(nThird==7){name_Histogram +=
"_normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundThree = 0; upperBoundThree = 50;}
1524 if(nThird==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundThree = -1; upperBoundThree = 1;}
1525 if(nThird==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1526 if(nThird==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundThree = 0; upperBoundThree = 50;}
1529 name_Histogram += add_name;
1530 TH3F* histogram3D =
new TH3F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo,numberOfBinsThree,lowerBoundThree,upperBoundThree);
1531 histogram3D->Sumw2();
1532 if(j%2==0) histogram3D->SetLineColor(6);
1533 if(j%2==1) histogram3D->SetLineColor(4);
1534 histogram3D->SetMarkerStyle(20);
1535 histogram3D->SetMarkerSize(0.6);
1536 histogram3D->SetMarkerColor(6);
1537 TH3F* histogram_Clone3D = (
TH3F*)histogram3D->Clone();
1538 list3D->Add(histogram_Clone3D);
1543 if(nThird>nVariables)
1546 nThird = nSecond + 1;
1547 if(nSecond>nVariables)
1550 nSecond = nFirst + 1;
1551 nThird = nFirst + 2;
1559 TH1F * effectOfCuts =
new TH1F(
"effectOfCuts",
"Removal counter",100,0,100);
1560 effectOfCuts->SetStats(kTRUE);
1561 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1562 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1563 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1564 for (
Int_t i = 1; i < 100; ++i)
1568 effectOfCuts->GetXaxis()->SetBinLabel(i+1,integerText);
1570 listout->Add(effectOfCuts);
1573 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsMC",
"Removal counter",100,0,100);
1574 effectOfCutsMC->SetStats(kTRUE);
1575 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1576 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1577 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1578 for (
Int_t i = 1; i < 100; ++i)
1582 effectOfCutsMC->GetXaxis()->SetBinLabel(i+1,integerText);
1584 listout->Add(effectOfCutsMC);
1587 TString name_particle_pdg =
"particle_pdg";
1588 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1589 hist_particle_pdg->Sumw2();
1590 hist_particle_pdg->SetLineColor(6);
1591 hist_particle_pdg->SetMarkerStyle(20);
1592 hist_particle_pdg->SetMarkerSize(0.6);
1593 hist_particle_pdg->SetMarkerColor(6);
1594 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1595 listout->Add(histogram_particle_pdg);
1598 TString name_particle_mother_pdg =
"particle_mother_pdg";
1599 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1600 hist_particle_mother_pdg->Sumw2();
1601 hist_particle_mother_pdg->SetLineColor(6);
1602 hist_particle_mother_pdg->SetMarkerStyle(20);
1603 hist_particle_mother_pdg->SetMarkerSize(0.6);
1604 hist_particle_mother_pdg->SetMarkerColor(6);
1605 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1606 listout->Add(histogram_particle_mother_pdg);
1609 TString name_distance_vertex_from_real =
"distance_vertex_from_real";
1610 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);
1611 hist_distance_vertex_from_real->Sumw2();
1612 hist_distance_vertex_from_real->SetLineColor(6);
1613 hist_distance_vertex_from_real->SetMarkerStyle(20);
1614 hist_distance_vertex_from_real->SetMarkerSize(0.6);
1615 hist_distance_vertex_from_real->SetMarkerColor(6);
1616 TH1F* histogram_distance_vertex_from_real = (TH1F*)hist_distance_vertex_from_real->Clone();
1617 listout->Add(histogram_distance_vertex_from_real);
1620 TString name_distance_vertex_from_real_new =
"distance_vertex_from_real_new";
1621 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);
1622 hist_distance_vertex_from_real_new->Sumw2();
1623 hist_distance_vertex_from_real_new->SetLineColor(6);
1624 hist_distance_vertex_from_real_new->SetMarkerStyle(20);
1625 hist_distance_vertex_from_real_new->SetMarkerSize(0.6);
1626 hist_distance_vertex_from_real_new->SetMarkerColor(6);
1627 TH1F* histogram_distance_vertex_from_real_new = (TH1F*)hist_distance_vertex_from_real_new->Clone();
1628 listout->Add(histogram_distance_vertex_from_real_new);
1631 TString name_momentum_resolution =
"momentum_resolution";
1632 TH1F* hist_momentum_resolution =
new TH1F(name_momentum_resolution.Data(),
"Momentum resolution; difference between real and reconstructed momentum [GeV/c]; Entries",1000,0,1);
1633 hist_momentum_resolution->Sumw2();
1634 hist_momentum_resolution->SetLineColor(6);
1635 hist_momentum_resolution->SetMarkerStyle(20);
1636 hist_momentum_resolution->SetMarkerSize(0.6);
1637 hist_momentum_resolution->SetMarkerColor(6);
1638 TH1F* histogram_momentum_resolution = (TH1F*)hist_momentum_resolution->Clone();
1639 listout->Add(histogram_momentum_resolution);
1644 for (
Int_t k = 0; k < fnPtBins+3; ++k){
1646 if(k==0) ptBinMother =
"";
1647 if(k==1) ptBinMother =
"_ptbin_6_to_inf";
1648 if(k==2) ptBinMother =
"_ptbin_3_to_inf";
1649 if(k>2) {ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[k-3]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[k-2];}
1651 for (
Int_t i = 0; i < 8; ++i){
1653 if(i==0) signName =
"";
1654 if(i==1) signName =
"_SameSign";
1655 if(i==2) signName =
"_SignSum";
1656 if(i==3) signName =
"_HIJING_Background";
1657 if(i==4) signName =
"_HIJING_Signal";
1658 if(i==5) signName =
"_Background_rotation";
1659 if(i==6) signName =
"_HIJING_Background_rotation";
1660 if(i==7) signName =
"_correlated511";
1661 TString name_invariantMassMother =
"invariantMassB0";
1662 name_invariantMassMother += ptBinMother + signName;
1663 TH1F* hist_invariantMassMother =
new TH1F(name_invariantMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1664 hist_invariantMassMother->Sumw2();
1665 hist_invariantMassMother->SetLineColor(6);
1666 hist_invariantMassMother->SetMarkerStyle(20);
1667 hist_invariantMassMother->SetMarkerSize(0.6);
1668 hist_invariantMassMother->SetMarkerColor(6);
1669 TH1F* histogram_invariantMassMother = (TH1F*)hist_invariantMassMother->Clone();
1672 TString name_deltainvariantMassMother =
"deltainvariantMassB0";
1673 name_deltainvariantMassMother += ptBinMother + signName;
1674 TH1F* hist_deltainvariantMassMother =
new TH1F(name_deltainvariantMassMother.Data(),
"delta mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1675 hist_deltainvariantMassMother->Sumw2();
1676 hist_deltainvariantMassMother->SetLineColor(6);
1677 hist_deltainvariantMassMother->SetMarkerStyle(20);
1678 hist_deltainvariantMassMother->SetMarkerSize(0.6);
1679 hist_deltainvariantMassMother->SetMarkerColor(6);
1680 TH1F* histogram_deltainvariantMassMother = (TH1F*)hist_deltainvariantMassMother->Clone();
1681 fOutputB0MC->Add(histogram_deltainvariantMassMother);
1726 TString name_cutEffectBackground =
"cutEffectBackground";
1727 TH2I* hist_cutEffectBackground =
new TH2I(name_cutEffectBackground.Data(),
"Effect of Cuts on background; cut number; cut number",99,0,99,99,0,99);
1728 for (
int i = 0; i < 99; ++i)
1732 hist_cutEffectBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1733 hist_cutEffectBackground->GetYaxis()->SetBinLabel(i+1,integerText);
1735 TH2I* histogram_cutEffectBackground = (TH2I*)hist_cutEffectBackground->Clone();
1738 TString name_cutEffectSignal =
"cutEffectSignal";
1739 TH2I* hist_cutEffectSignal =
new TH2I(name_cutEffectSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99,99,0,99);
1740 for (
Int_t i = 0; i < 99; ++i)
1744 hist_cutEffectSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1745 hist_cutEffectSignal->GetYaxis()->SetBinLabel(i+1,integerText);
1747 TH2I* histogram_cutEffectSignal = (TH2I*)hist_cutEffectSignal->Clone();
1750 TString name_cutEffectUniqueBackground =
"cutEffectUniqueBackground";
1751 TH1I* hist_cutEffectUniqueBackground =
new TH1I(name_cutEffectUniqueBackground.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1752 for (
Int_t i = 0; i < 99; ++i)
1756 hist_cutEffectUniqueBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1758 TH1I* histogram_cutEffectUniqueBackground = (
TH1I*)hist_cutEffectUniqueBackground->Clone();
1759 fOutputB0MC->Add(histogram_cutEffectUniqueBackground);
1761 TString name_cutEffectUniqueSignal =
"cutEffectUniqueSignal";
1762 TH1I* hist_cutEffectUniqueSignal =
new TH1I(name_cutEffectUniqueSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1763 for (
Int_t i = 0; i < 99; ++i)
1767 hist_cutEffectUniqueSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1769 TH1I* histogram_cutEffectUniqueSignal = (
TH1I*)hist_cutEffectUniqueSignal->Clone();
1770 fOutputB0MC->Add(histogram_cutEffectUniqueSignal);
1772 TString name_totalITSBackground =
"totalITSBackground";
1773 TH1F* hist_totalITSBackground =
new TH1F(name_totalITSBackground.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1774 hist_totalITSBackground->Sumw2();
1775 hist_totalITSBackground->SetLineColor(6);
1776 hist_totalITSBackground->SetMarkerStyle(20);
1777 hist_totalITSBackground->SetMarkerSize(0.6);
1778 hist_totalITSBackground->SetMarkerColor(6);
1779 TH1F* histogram_totalITSBackground = (TH1F*)hist_totalITSBackground->Clone();
1782 TString name_totalITSSignal =
"totalITSSignal";
1783 TH1F* hist_totalITSSignal =
new TH1F(name_totalITSSignal.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1784 hist_totalITSSignal->Sumw2();
1785 hist_totalITSSignal->SetLineColor(6);
1786 hist_totalITSSignal->SetMarkerStyle(20);
1787 hist_totalITSSignal->SetMarkerSize(0.6);
1788 hist_totalITSSignal->SetMarkerColor(6);
1789 TH1F* histogram_totalITSSignal = (TH1F*)hist_totalITSSignal->Clone();
1792 TString name_totalTPCBackground =
"totalTPCBackground";
1793 TH1F* hist_totalTPCBackground =
new TH1F(name_totalTPCBackground.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1794 hist_totalTPCBackground->Sumw2();
1795 hist_totalTPCBackground->SetLineColor(6);
1796 hist_totalTPCBackground->SetMarkerStyle(20);
1797 hist_totalTPCBackground->SetMarkerSize(0.6);
1798 hist_totalTPCBackground->SetMarkerColor(6);
1799 TH1F* histogram_totalTPCBackground = (TH1F*)hist_totalTPCBackground->Clone();
1802 TString name_totalTPCSignal =
"totalTPCSignal";
1803 TH1F* hist_totalTPCSignal =
new TH1F(name_totalTPCSignal.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1804 hist_totalTPCSignal->Sumw2();
1805 hist_totalTPCSignal->SetLineColor(6);
1806 hist_totalTPCSignal->SetMarkerStyle(20);
1807 hist_totalTPCSignal->SetMarkerSize(0.6);
1808 hist_totalTPCSignal->SetMarkerColor(6);
1809 TH1F* histogram_totalTPCSignal = (TH1F*)hist_totalTPCSignal->Clone();
1812 TString name_totalSigmaPIDBackground =
"totalSigmaPIDBackground";
1813 TH1F* hist_totalSigmaPIDBackground =
new TH1F(name_totalSigmaPIDBackground.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1814 hist_totalSigmaPIDBackground->Sumw2();
1815 hist_totalSigmaPIDBackground->SetLineColor(6);
1816 hist_totalSigmaPIDBackground->SetMarkerStyle(20);
1817 hist_totalSigmaPIDBackground->SetMarkerSize(0.6);
1818 hist_totalSigmaPIDBackground->SetMarkerColor(6);
1819 TH1F* histogram_totalSigmaPIDBackground = (TH1F*)hist_totalSigmaPIDBackground->Clone();
1820 fOutputB0MC->Add(histogram_totalSigmaPIDBackground);
1822 TString name_totalSigmaPIDSignal =
"totalSigmaPIDSignal";
1823 TH1F* hist_totalSigmaPIDSignal =
new TH1F(name_totalSigmaPIDSignal.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1824 hist_totalSigmaPIDSignal->Sumw2();
1825 hist_totalSigmaPIDSignal->SetLineColor(6);
1826 hist_totalSigmaPIDSignal->SetMarkerStyle(20);
1827 hist_totalSigmaPIDSignal->SetMarkerSize(0.6);
1828 hist_totalSigmaPIDSignal->SetMarkerColor(6);
1829 TH1F* histogram_totalSigmaPIDSignal = (TH1F*)hist_totalSigmaPIDSignal->Clone();
1832 TString name_particle_pdgB0Pion =
"particle_pdgB0Pion";
1833 TH2F* hist_particle_pdgB0Pion =
new TH2F(name_particle_pdgB0Pion.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1834 hist_particle_pdgB0Pion->Sumw2();
1835 hist_particle_pdgB0Pion->SetLineColor(6);
1836 hist_particle_pdgB0Pion->SetMarkerStyle(20);
1837 hist_particle_pdgB0Pion->SetMarkerSize(0.6);
1838 hist_particle_pdgB0Pion->SetMarkerColor(6);
1839 TH2F* histogram_particle_pdgB0Pion = (
TH2F*)hist_particle_pdgB0Pion->Clone();
1842 TString name_particle_pdgDStarPion =
"particle_pdgDStarPion";
1843 TH2F* hist_particle_pdgDStarPion =
new TH2F(name_particle_pdgDStarPion.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1844 hist_particle_pdgDStarPion->Sumw2();
1845 hist_particle_pdgDStarPion->SetLineColor(6);
1846 hist_particle_pdgDStarPion->SetMarkerStyle(20);
1847 hist_particle_pdgDStarPion->SetMarkerSize(0.6);
1848 hist_particle_pdgDStarPion->SetMarkerColor(6);
1849 TH2F* histogram_particle_pdgDStarPion = (
TH2F*)hist_particle_pdgDStarPion->Clone();
1850 fOutputB0MC->Add(histogram_particle_pdgDStarPion);
1852 TString name_particle_pdgD0First =
"particle_pdgD0First";
1853 TH2F* hist_particle_pdgD0First =
new TH2F(name_particle_pdgD0First.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1854 hist_particle_pdgD0First->Sumw2();
1855 hist_particle_pdgD0First->SetLineColor(6);
1856 hist_particle_pdgD0First->SetMarkerStyle(20);
1857 hist_particle_pdgD0First->SetMarkerSize(0.6);
1858 hist_particle_pdgD0First->SetMarkerColor(6);
1859 TH2F* histogram_particle_pdgD0First = (
TH2F*)hist_particle_pdgD0First->Clone();
1862 TString name_particle_pdgD0Second =
"particle_pdgD0Second";
1863 TH2F* hist_particle_pdgD0Second =
new TH2F(name_particle_pdgD0Second.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1864 hist_particle_pdgD0Second->Sumw2();
1865 hist_particle_pdgD0Second->SetLineColor(6);
1866 hist_particle_pdgD0Second->SetMarkerStyle(20);
1867 hist_particle_pdgD0Second->SetMarkerSize(0.6);
1868 hist_particle_pdgD0Second->SetMarkerColor(6);
1869 TH2F* histogram_particle_pdgD0Second = (
TH2F*)hist_particle_pdgD0Second->Clone();
1872 TString name_particle_pdgAll =
"particle_pdgAll";
1873 TH1F* hist_particle_pdgAll =
new TH1F(name_particle_pdgAll.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1874 hist_particle_pdgAll->Sumw2();
1875 hist_particle_pdgAll->SetLineColor(6);
1876 hist_particle_pdgAll->SetMarkerStyle(20);
1877 hist_particle_pdgAll->SetMarkerSize(0.6);
1878 hist_particle_pdgAll->SetMarkerColor(6);
1879 TH1F* histogram_particle_pdgAll = (TH1F*)hist_particle_pdgAll->Clone();
1882 TString name_particle_pdgAllSecond =
"particle_pdgAllSecond";
1883 TH1F* hist_particle_pdgAllSecond =
new TH1F(name_particle_pdgAllSecond.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1884 hist_particle_pdgAllSecond->Sumw2();
1885 hist_particle_pdgAllSecond->SetLineColor(6);
1886 hist_particle_pdgAllSecond->SetMarkerStyle(20);
1887 hist_particle_pdgAllSecond->SetMarkerSize(0.6);
1888 hist_particle_pdgAllSecond->SetMarkerColor(6);
1889 TH1F* histogram_particle_pdgAllSecond = (TH1F*)hist_particle_pdgAllSecond->Clone();
1890 fOutputB0MC->Add(histogram_particle_pdgAllSecond);
1892 TString name_particle_pdgAllThird =
"particle_pdgAllThird";
1893 TH1F* hist_particle_pdgAllThird =
new TH1F(name_particle_pdgAllThird.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1894 hist_particle_pdgAllThird->Sumw2();
1895 hist_particle_pdgAllThird->SetLineColor(6);
1896 hist_particle_pdgAllThird->SetMarkerStyle(20);
1897 hist_particle_pdgAllThird->SetMarkerSize(0.6);
1898 hist_particle_pdgAllThird->SetMarkerColor(6);
1899 TH1F* histogram_particle_pdgAllThird = (TH1F*)hist_particle_pdgAllThird->Clone();
1902 TString name_particle_pdgAllFourth =
"particle_pdgAllFourth";
1903 TH1F* hist_particle_pdgAllFourth =
new TH1F(name_particle_pdgAllFourth.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1904 hist_particle_pdgAllFourth->Sumw2();
1905 hist_particle_pdgAllFourth->SetLineColor(6);
1906 hist_particle_pdgAllFourth->SetMarkerStyle(20);
1907 hist_particle_pdgAllFourth->SetMarkerSize(0.6);
1908 hist_particle_pdgAllFourth->SetMarkerColor(6);
1909 TH1F* histogram_particle_pdgAllFourth = (TH1F*)hist_particle_pdgAllFourth->Clone();
1910 fOutputB0MC->Add(histogram_particle_pdgAllFourth);
1912 TString name_particle_pdgAllFifth =
"particle_pdgAllFifth";
1913 TH1F* hist_particle_pdgAllFifth =
new TH1F(name_particle_pdgAllFifth.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1914 hist_particle_pdgAllFifth->Sumw2();
1915 hist_particle_pdgAllFifth->SetLineColor(6);
1916 hist_particle_pdgAllFifth->SetMarkerStyle(20);
1917 hist_particle_pdgAllFifth->SetMarkerSize(0.6);
1918 hist_particle_pdgAllFifth->SetMarkerColor(6);
1919 TH1F* histogram_particle_pdgAllFifth = (TH1F*)hist_particle_pdgAllFifth->Clone();
1922 TString name_particle_pdgAllInvMass =
"particle_pdgAllInvMass";
1923 TH2F* hist_particle_pdgAllInvMass =
new TH2F(name_particle_pdgAllInvMass.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1924 hist_particle_pdgAllInvMass->Sumw2();
1925 hist_particle_pdgAllInvMass->SetLineColor(6);
1926 hist_particle_pdgAllInvMass->SetMarkerStyle(20);
1927 hist_particle_pdgAllInvMass->SetMarkerSize(0.6);
1928 hist_particle_pdgAllInvMass->SetMarkerColor(6);
1929 TH2F* histogram_particle_pdgAllInvMass = (
TH2F*)hist_particle_pdgAllInvMass->Clone();
1930 fOutputB0MC->Add(histogram_particle_pdgAllInvMass);
1932 TString name_particle_pdgAllInvMassSecond =
"particle_pdgAllInvMassSecond";
1933 TH2F* hist_particle_pdgAllInvMassSecond =
new TH2F(name_particle_pdgAllInvMassSecond.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1934 hist_particle_pdgAllInvMassSecond->Sumw2();
1935 hist_particle_pdgAllInvMassSecond->SetLineColor(6);
1936 hist_particle_pdgAllInvMassSecond->SetMarkerStyle(20);
1937 hist_particle_pdgAllInvMassSecond->SetMarkerSize(0.6);
1938 hist_particle_pdgAllInvMassSecond->SetMarkerColor(6);
1939 TH2F* histogram_particle_pdgAllInvMassSecond = (
TH2F*)hist_particle_pdgAllInvMassSecond->Clone();
1940 fOutputB0MC->Add(histogram_particle_pdgAllInvMassSecond);
1942 TString name_particle_pdgAllInvMassThird =
"particle_pdgAllInvMassThird";
1943 TH2F* hist_particle_pdgAllInvMassThird =
new TH2F(name_particle_pdgAllInvMassThird.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1944 hist_particle_pdgAllInvMassThird->Sumw2();
1945 hist_particle_pdgAllInvMassThird->SetLineColor(6);
1946 hist_particle_pdgAllInvMassThird->SetMarkerStyle(20);
1947 hist_particle_pdgAllInvMassThird->SetMarkerSize(0.6);
1948 hist_particle_pdgAllInvMassThird->SetMarkerColor(6);
1949 TH2F* histogram_particle_pdgAllInvMassThird = (
TH2F*)hist_particle_pdgAllInvMassThird->Clone();
1950 fOutputB0MC->Add(histogram_particle_pdgAllInvMassThird);
1952 TString name_particle_pdgAllInvMassFourth =
"particle_pdgAllInvMassFourth";
1953 TH2F* hist_particle_pdgAllInvMassFourth =
new TH2F(name_particle_pdgAllInvMassFourth.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1954 hist_particle_pdgAllInvMassFourth->Sumw2();
1955 hist_particle_pdgAllInvMassFourth->SetLineColor(6);
1956 hist_particle_pdgAllInvMassFourth->SetMarkerStyle(20);
1957 hist_particle_pdgAllInvMassFourth->SetMarkerSize(0.6);
1958 hist_particle_pdgAllInvMassFourth->SetMarkerColor(6);
1959 TH2F* histogram_particle_pdgAllInvMassFourth = (
TH2F*)hist_particle_pdgAllInvMassFourth->Clone();
1960 fOutputB0MC->Add(histogram_particle_pdgAllInvMassFourth);
1962 TString name_particle_pdgAllInvMassFifth =
"particle_pdgAllInvMassFifth";
1963 TH2F* hist_particle_pdgAllInvMassFifth =
new TH2F(name_particle_pdgAllInvMassFifth.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1964 hist_particle_pdgAllInvMassFifth->Sumw2();
1965 hist_particle_pdgAllInvMassFifth->SetLineColor(6);
1966 hist_particle_pdgAllInvMassFifth->SetMarkerStyle(20);
1967 hist_particle_pdgAllInvMassFifth->SetMarkerSize(0.6);
1968 hist_particle_pdgAllInvMassFifth->SetMarkerColor(6);
1969 TH2F* histogram_particle_pdgAllInvMassFifth = (
TH2F*)hist_particle_pdgAllInvMassFifth->Clone();
1970 fOutputB0MC->Add(histogram_particle_pdgAllInvMassFifth);
1972 TString name_particle_daughterPdgOneStep511a =
"particle_daughterPdgOneStep511a";
1973 TH2F* hist_particle_daughterPdgOneStep511a =
new TH2F(name_particle_daughterPdgOneStep511a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1974 hist_particle_daughterPdgOneStep511a->Sumw2();
1975 hist_particle_daughterPdgOneStep511a->SetLineColor(6);
1976 hist_particle_daughterPdgOneStep511a->SetMarkerStyle(20);
1977 hist_particle_daughterPdgOneStep511a->SetMarkerSize(0.6);
1978 hist_particle_daughterPdgOneStep511a->SetMarkerColor(6);
1979 TH2F* histogram_particle_daughterPdgOneStep511a = (
TH2F*)hist_particle_daughterPdgOneStep511a->Clone();
1980 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep511a);
1982 TString name_particle_daughterPdgOneStep521a =
"particle_daughterPdgOneStep521a";
1983 TH2F* hist_particle_daughterPdgOneStep521a =
new TH2F(name_particle_daughterPdgOneStep521a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1984 hist_particle_daughterPdgOneStep521a->Sumw2();
1985 hist_particle_daughterPdgOneStep521a->SetLineColor(6);
1986 hist_particle_daughterPdgOneStep521a->SetMarkerStyle(20);
1987 hist_particle_daughterPdgOneStep521a->SetMarkerSize(0.6);
1988 hist_particle_daughterPdgOneStep521a->SetMarkerColor(6);
1989 TH2F* histogram_particle_daughterPdgOneStep521a = (
TH2F*)hist_particle_daughterPdgOneStep521a->Clone();
1990 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep521a);
1992 TString name_particle_daughterPdgOneStep511b =
"particle_daughterPdgOneStep511b";
1993 TH2F* hist_particle_daughterPdgOneStep511b =
new TH2F(name_particle_daughterPdgOneStep511b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1994 hist_particle_daughterPdgOneStep511b->Sumw2();
1995 hist_particle_daughterPdgOneStep511b->SetLineColor(6);
1996 hist_particle_daughterPdgOneStep511b->SetMarkerStyle(20);
1997 hist_particle_daughterPdgOneStep511b->SetMarkerSize(0.6);
1998 hist_particle_daughterPdgOneStep511b->SetMarkerColor(6);
1999 TH2F* histogram_particle_daughterPdgOneStep511b = (
TH2F*)hist_particle_daughterPdgOneStep511b->Clone();
2000 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep511b);
2002 TString name_particle_daughterPdgOneStep521b =
"particle_daughterPdgOneStep521b";
2003 TH2F* hist_particle_daughterPdgOneStep521b =
new TH2F(name_particle_daughterPdgOneStep521b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
2004 hist_particle_daughterPdgOneStep521b->Sumw2();
2005 hist_particle_daughterPdgOneStep521b->SetLineColor(6);
2006 hist_particle_daughterPdgOneStep521b->SetMarkerStyle(20);
2007 hist_particle_daughterPdgOneStep521b->SetMarkerSize(0.6);
2008 hist_particle_daughterPdgOneStep521b->SetMarkerColor(6);
2009 TH2F* histogram_particle_daughterPdgOneStep521b = (
TH2F*)hist_particle_daughterPdgOneStep521b->Clone();
2010 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep521b);
2012 TString name_particle_daughterPdgTwoStep511a =
"particle_daughterPdgTwoStep511a";
2013 TH2F* hist_particle_daughterPdgTwoStep511a =
new TH2F(name_particle_daughterPdgTwoStep511a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
2014 hist_particle_daughterPdgTwoStep511a->Sumw2();
2015 hist_particle_daughterPdgTwoStep511a->SetLineColor(6);
2016 hist_particle_daughterPdgTwoStep511a->SetMarkerStyle(20);
2017 hist_particle_daughterPdgTwoStep511a->SetMarkerSize(0.6);
2018 hist_particle_daughterPdgTwoStep511a->SetMarkerColor(6);
2019 TH2F* histogram_particle_daughterPdgTwoStep511a = (
TH2F*)hist_particle_daughterPdgTwoStep511a->Clone();
2020 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511a);
2022 TString name_particle_daughterPdgTwoStep521a =
"particle_daughterPdgTwoStep521a";
2023 TH2F* hist_particle_daughterPdgTwoStep521a =
new TH2F(name_particle_daughterPdgTwoStep521a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
2024 hist_particle_daughterPdgTwoStep521a->Sumw2();
2025 hist_particle_daughterPdgTwoStep521a->SetLineColor(6);
2026 hist_particle_daughterPdgTwoStep521a->SetMarkerStyle(20);
2027 hist_particle_daughterPdgTwoStep521a->SetMarkerSize(0.6);
2028 hist_particle_daughterPdgTwoStep521a->SetMarkerColor(6);
2029 TH2F* histogram_particle_daughterPdgTwoStep521a = (
TH2F*)hist_particle_daughterPdgTwoStep521a->Clone();
2030 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521a);
2032 TString name_particle_daughterPdgTwoStep511b =
"particle_daughterPdgTwoStep511b";
2033 TH2F* hist_particle_daughterPdgTwoStep511b =
new TH2F(name_particle_daughterPdgTwoStep511b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
2034 hist_particle_daughterPdgTwoStep511b->Sumw2();
2035 hist_particle_daughterPdgTwoStep511b->SetLineColor(6);
2036 hist_particle_daughterPdgTwoStep511b->SetMarkerStyle(20);
2037 hist_particle_daughterPdgTwoStep511b->SetMarkerSize(0.6);
2038 hist_particle_daughterPdgTwoStep511b->SetMarkerColor(6);
2039 TH2F* histogram_particle_daughterPdgTwoStep511b = (
TH2F*)hist_particle_daughterPdgTwoStep511b->Clone();
2040 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511b);
2042 TString name_particle_daughterPdgTwoStep521b =
"particle_daughterPdgTwoStep521b";
2043 TH2F* hist_particle_daughterPdgTwoStep521b =
new TH2F(name_particle_daughterPdgTwoStep521b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
2044 hist_particle_daughterPdgTwoStep521b->Sumw2();
2045 hist_particle_daughterPdgTwoStep521b->SetLineColor(6);
2046 hist_particle_daughterPdgTwoStep521b->SetMarkerStyle(20);
2047 hist_particle_daughterPdgTwoStep521b->SetMarkerSize(0.6);
2048 hist_particle_daughterPdgTwoStep521b->SetMarkerColor(6);
2049 TH2F* histogram_particle_daughterPdgTwoStep521b = (
TH2F*)hist_particle_daughterPdgTwoStep521b->Clone();
2050 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521b);
2052 TString name_particle_daughterPdgTwoStep511c =
"particle_daughterPdgTwoStep511c";
2053 TH2F* hist_particle_daughterPdgTwoStep511c =
new TH2F(name_particle_daughterPdgTwoStep511c.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
2054 hist_particle_daughterPdgTwoStep511c->Sumw2();
2055 hist_particle_daughterPdgTwoStep511c->SetLineColor(6);
2056 hist_particle_daughterPdgTwoStep511c->SetMarkerStyle(20);
2057 hist_particle_daughterPdgTwoStep511c->SetMarkerSize(0.6);
2058 hist_particle_daughterPdgTwoStep511c->SetMarkerColor(6);
2059 TH2F* histogram_particle_daughterPdgTwoStep511c = (
TH2F*)hist_particle_daughterPdgTwoStep511c->Clone();
2060 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511c);
2062 TString name_particle_daughterPdgTwoStep521c =
"particle_daughterPdgTwoStep521c";
2063 TH2F* hist_particle_daughterPdgTwoStep521c =
new TH2F(name_particle_daughterPdgTwoStep521c.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
2064 hist_particle_daughterPdgTwoStep521c->Sumw2();
2065 hist_particle_daughterPdgTwoStep521c->SetLineColor(6);
2066 hist_particle_daughterPdgTwoStep521c->SetMarkerStyle(20);
2067 hist_particle_daughterPdgTwoStep521c->SetMarkerSize(0.6);
2068 hist_particle_daughterPdgTwoStep521c->SetMarkerColor(6);
2069 TH2F* histogram_particle_daughterPdgTwoStep521c = (
TH2F*)hist_particle_daughterPdgTwoStep521c->Clone();
2070 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521c);
2072 TString name_invariantMassB0Signal_BA =
"invariantMassB0Signal_BA";
2073 TH1F* hist_invariantMassB0Signal_BA =
new TH1F(name_invariantMassB0Signal_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
2074 hist_invariantMassB0Signal_BA->Sumw2();
2075 hist_invariantMassB0Signal_BA->SetLineColor(6);
2076 hist_invariantMassB0Signal_BA->SetMarkerStyle(20);
2077 hist_invariantMassB0Signal_BA->SetMarkerSize(0.6);
2078 hist_invariantMassB0Signal_BA->SetMarkerColor(6);
2079 TH1F* histogram_invariantMassB0Signal_BA = (TH1F*)hist_invariantMassB0Signal_BA->Clone();
2080 fOutputB0MC->Add(histogram_invariantMassB0Signal_BA);
2082 TString name_invariantMassB0Correlated_BA =
"invariantMassB0Correlated_BA";
2083 TH1F* hist_invariantMassB0Correlated_BA =
new TH1F(name_invariantMassB0Correlated_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
2084 hist_invariantMassB0Correlated_BA->Sumw2();
2085 hist_invariantMassB0Correlated_BA->SetLineColor(6);
2086 hist_invariantMassB0Correlated_BA->SetMarkerStyle(20);
2087 hist_invariantMassB0Correlated_BA->SetMarkerSize(0.6);
2088 hist_invariantMassB0Correlated_BA->SetMarkerColor(6);
2089 TH1F* histogram_invariantMassB0Correlated_BA = (TH1F*)hist_invariantMassB0Correlated_BA->Clone();
2090 fOutputB0MC->Add(histogram_invariantMassB0Correlated_BA);
2092 TString name_invariantMassB0Background_BA =
"invariantMassB0Background_BA";
2093 TH1F* hist_invariantMassB0Background_BA =
new TH1F(name_invariantMassB0Background_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
2094 hist_invariantMassB0Background_BA->Sumw2();
2095 hist_invariantMassB0Background_BA->SetLineColor(6);
2096 hist_invariantMassB0Background_BA->SetMarkerStyle(20);
2097 hist_invariantMassB0Background_BA->SetMarkerSize(0.6);
2098 hist_invariantMassB0Background_BA->SetMarkerColor(6);
2099 TH1F* histogram_invariantMassB0Background_BA = (TH1F*)hist_invariantMassB0Background_BA->Clone();
2100 fOutputB0MC->Add(histogram_invariantMassB0Background_BA);
2110 AliESDVertex *vertexESD = 0;
2111 AliAODVertex *vertexAOD = 0;
2113 AliVertexerTracks vertexer;
2114 vertexer.SetFieldkG(bField);
2116 vertexer.SetVtxStart((AliESDVertex*)primary);
2117 vertexESD = (AliESDVertex*)vertexer.VertexForSelectedESDTracks(tracks);
2121 if(!vertexESD)
return vertexAOD;
2124 if(vertexESD->GetNContributors()!=tracks->GetEntriesFast())
2126 delete vertexESD; vertexESD=
nullptr;
2132 for(
Int_t a=0;a<3;a++)pos[a]=0.;
2133 for(
Int_t b=0;b<6;b++)cov[b]=0.;
2136 vertexESD->GetXYZ(pos);
2137 vertexESD->GetCovMatrix(cov);
2140 Double_t vertRadius2=pos[0]*pos[0]+pos[1]*pos[1];
2143 delete vertexESD; vertexESD=
nullptr;
2147 chi2perNDF = vertexESD->GetChi2toNDF();
2148 dispersion = vertexESD->GetDispersion();
2149 delete vertexESD; vertexESD=
nullptr;
2151 vertexAOD =
new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs);
2158 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2159 for (
Int_t i=0; i<mcTrackArray->GetEntriesFast(); i++){
2161 Int_t mcLabelPionB0 = 0;
2162 Int_t mcLabelPionDStar = 0;
2163 Int_t mcLabelPionD0 = 0;
2164 Int_t mcLabelKaon = 0;
2165 Int_t mcLabelD0 = 0;
2166 Int_t mcLabelDStar = 0;
2167 Int_t mcLabelB0 = 0;
2174 Bool_t mcPionB0Present = kFALSE;
2175 Bool_t mcPionDStarPresent = kFALSE;
2176 Bool_t mcPionD0Present = kFALSE;
2177 Bool_t mcKaonPresent = kFALSE;
2180 AliAODMCParticle *mcTrackParticle =
dynamic_cast< AliAODMCParticle*
>(mcTrackArray->At(i));
2181 if(!mcTrackParticle) {std::cout <<
"no particle" << std::endl;
continue;}
2182 Int_t pdgCodeMC=TMath::Abs(mcTrackParticle->GetPdgCode());
2184 if (pdgCodeMC==511){
2187 Int_t nDaughterB0 = mcTrackParticle->GetNDaughters();
2188 ptMC[0] = mcTrackParticle->Pt();
2189 yMC[0] = mcTrackParticle->Y();
2190 pseudoYMC[0] = mcTrackParticle->Eta();
2192 TString fillthis=
"B0s_in_analysis";
2193 ((TH1F*)(listout->FindObject(fillthis)))->Fill(0);
2196 for(
Int_t iDaughterB0=0; iDaughterB0<2; iDaughterB0++){
2198 AliAODMCParticle* daughterB0 = (AliAODMCParticle*)mcTrackArray->At(mcTrackParticle->GetDaughter(iDaughterB0));
2199 if(!daughterB0)
break;
2200 Int_t pdgCodeDaughterB0=TMath::Abs(daughterB0->GetPdgCode());
2202 if (pdgCodeDaughterB0==211){
2203 mcLabelPionB0 = mcTrackParticle->GetDaughter(iDaughterB0);
2204 mcPionB0Present = kTRUE;
2205 ptMC[1] = daughterB0->Pt();
2206 yMC[1] = daughterB0->Y();
2207 pseudoYMC[1] = daughterB0->Eta();
2209 }
else if (pdgCodeDaughterB0==413){
2210 mcLabelDStar = mcTrackParticle->GetDaughter(iDaughterB0);
2211 Int_t nDaughterDStar = daughterB0->GetNDaughters();
2212 ptMC[2] = daughterB0->Pt();
2213 yMC[2] = daughterB0->Y();
2214 pseudoYMC[2] = daughterB0->Eta();
2216 if(nDaughterDStar==2){
2217 for(
Int_t iDaughterDStar=0; iDaughterDStar<2; iDaughterDStar++){
2219 AliAODMCParticle* daughterDStar = (AliAODMCParticle*)mcTrackArray->At(daughterB0->GetDaughter(iDaughterDStar));
2220 if(!daughterDStar)
break;
2221 Int_t pdgCodeDaughterDStar=TMath::Abs(daughterDStar->GetPdgCode());
2223 if (pdgCodeDaughterDStar==211){
2224 mcLabelPionDStar = daughterB0->GetDaughter(iDaughterDStar);
2225 mcPionDStarPresent = kTRUE;
2226 ptMC[3] = daughterDStar->Pt();
2227 yMC[3] = daughterDStar->Y();
2228 pseudoYMC[3] = daughterDStar->Eta();
2230 }
else if (pdgCodeDaughterDStar==421){
2231 mcLabelD0 = daughterB0->GetDaughter(iDaughterDStar);
2232 Int_t nDaughterD0 = daughterDStar->GetNDaughters();
2233 ptMC[4] = daughterDStar->Pt();
2234 yMC[4] = daughterDStar->Y();
2235 pseudoYMC[4] = daughterDStar->Eta();
2238 for(
Int_t iDaughterD0=0; iDaughterD0<2; iDaughterD0++){
2240 AliAODMCParticle* daughterD0 = (AliAODMCParticle*)mcTrackArray->At(daughterDStar->GetDaughter(iDaughterD0));
2241 if(!daughterD0)
break;
2242 Int_t pdgCodeDaughterD0=TMath::Abs(daughterD0->GetPdgCode());
2244 if (pdgCodeDaughterD0==211){
2245 mcLabelPionD0 = daughterDStar->GetDaughter(iDaughterD0);
2246 ptMC[5] = daughterD0->Pt();
2247 yMC[5] = daughterD0->Y();
2248 pseudoYMC[5] = daughterD0->Eta();
2249 mcPionD0Present = kTRUE;
2251 }
else if (pdgCodeDaughterD0==321){
2252 mcLabelKaon = daughterDStar->GetDaughter(iDaughterD0);;
2253 mcKaonPresent = kTRUE;
2254 ptMC[6] = daughterD0->Pt();
2255 yMC[6] = daughterD0->Y();
2256 pseudoYMC[6] = daughterD0->Eta();
2270 if(mcPionB0Present && mcPionDStarPresent && mcPionD0Present && mcKaonPresent){
2273 TString fillthis=
"B0s_in_analysis";
2274 ((TH1F*)(listout->FindObject(fillthis)))->Fill(1);
2276 fillthis=
"B0s_per_bin";
2279 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
2282 fillthis=
"mc_B0_pt";
2283 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
2284 fillthis=
"mc_B0_pion_pt";
2285 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[1]);
2286 fillthis=
"mc_DStar_pt";
2287 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[2]);
2288 fillthis=
"mc_DStar_pion_pt";
2289 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[3]);
2290 fillthis=
"mc_D0_pt";
2291 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[4]);
2292 fillthis=
"mc_D0_pion_pt";
2293 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[5]);
2294 fillthis=
"mc_D0_kaon_pt";
2295 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[6]);
2297 fillthis=
"mc_B0_rapidity_true";
2298 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[0]);
2299 fillthis=
"mc_B0_pion_rapidity_true";
2300 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[1]);
2301 fillthis=
"mc_DStar_rapidity_true";
2302 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[2]);
2303 fillthis=
"mc_DStar_pion_rapidity_true";
2304 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[3]);
2305 fillthis=
"mc_D0_rapidity_true";
2306 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[4]);
2307 fillthis=
"mc_D0_pion_rapidity_true";
2308 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[5]);
2309 fillthis=
"mc_D0_kaon_rapidity_true";
2310 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[6]);
2312 fillthis=
"mc_B0_pseudorapidity_true";
2313 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[0]);
2314 fillthis=
"mc_B0_pion_pseudorapidity_true";
2315 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[1]);
2316 fillthis=
"mc_DStar_pseudorapidity_true";
2317 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[2]);
2318 fillthis=
"mc_DStar_pion_pseudorapidity_true";
2319 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[3]);
2320 fillthis=
"mc_D0_pseudorapidity_true";
2321 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[4]);
2322 fillthis=
"mc_D0_pion_pseudorapidity_true";
2323 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[5]);
2324 fillthis=
"mc_D0_kaon_pseudorapidity_true";
2325 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[6]);
2327 fillthis=
"mc_B0_pt_bins";
2328 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
2329 if(TMath::Abs(yMC[0]) < 0.5)
2331 fillthis=
"mc_B0_pt_bins_lim_acc";
2332 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
2335 if(TMath::Abs(yMC[0]) < 0.5)
2337 fillthis=
"B0s_per_bin_in_Lim_Acc";
2340 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
2345 if(ptMC[1] < 0.1 || TMath::Abs(pseudoYMC[1]) > 0.9 )
continue;
2346 if(ptMC[3] < 0.1 || TMath::Abs(pseudoYMC[3]) > 0.9 )
continue;
2347 if(ptMC[5] < 0.1 || TMath::Abs(pseudoYMC[5]) > 0.9 )
continue;
2348 if(ptMC[6] < 0.1 || TMath::Abs(pseudoYMC[6]) > 0.9 )
continue;
2351 if(TMath::Abs(yMC[0]) > 0.8)
continue;
2353 Int_t rows = B0toDStarPiLabelMatrix->GetNrows();
2355 B0toDStarPiLabelMatrix->ResizeTo(rows+1,7);
2356 particleMatrix(rows,0) = mcLabelPionB0;
2357 particleMatrix(rows,1) = mcLabelPionDStar;
2358 particleMatrix(rows,2) = mcLabelPionD0;
2359 particleMatrix(rows,3) = mcLabelKaon;
2360 particleMatrix(rows,4) = mcLabelD0;
2361 particleMatrix(rows,5) = mcLabelDStar;
2362 particleMatrix(rows,6) = mcLabelB0;
2364 fillthis=
"mc_B0_pt_bins_acc";
2365 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
2367 if(TMath::Abs(yMC[0]) < 0.5)
2369 fillthis=
"mc_B0_pt_bins_acc_lim_acc";
2370 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
2373 fillthis=
"B0s_in_analysis";
2374 ((TH1F*)(listout->FindObject(fillthis)))->Fill(2);
2377 fillthis=
"B0s_per_bin_in_Acc";
2380 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
2450 if(!aodTrack) AliFatal(
"Not a standard AOD");
2453 if(aodTrack->GetITSNcls() < 1)
return kFALSE;
2454 if(aodTrack->GetTPCNcls() < 1)
return kFALSE;
2455 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
2456 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
2457 if(aodTrack->GetID() < 0)
return kFALSE;
2459 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
2461 Int_t mcLabelParticle = -1;
2462 Int_t pdgParticle = -1;
2463 mcLabelParticle = aodTrack->GetLabel();
2466 Double_t pt_track = aodTrack->Pt();
2467 Double_t momentum_track = aodTrack->P();
2468 Int_t numberOfITS = aodTrack->GetITSNcls();
2469 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2471 AliExternalTrackParam particleTrack;
2472 particleTrack.CopyFromVTrack(aodTrack);
2474 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2477 Bool_t isDesiredCandidate = kFALSE;
2479 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2480 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2481 if(mcLabelParticle == (
Int_t)particleMatrix(k,2) || mcLabelParticle == (
Int_t)particleMatrix(k,3)){
2482 isDesiredCandidate = kTRUE;
2492 Int_t daughterType = 0;
2501 for (
Int_t j = 0; j < 10; ++j)
2508 if(isDesiredCandidate)
2516 for (
Int_t j = 0; j < 10; ++j)
2530 if(isDesiredCandidate) {
2537 if(isDesiredCandidate) {
2544 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2545 if(isDesiredCandidate) {
2553 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2554 if(isDesiredCandidate) {
2563 if(isDesiredCandidate) {
2571 if(isDesiredCandidate) {
2578 if(isDesiredCandidate) {
2585 if(isDesiredCandidate) {
2591 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2593 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2596 Bool_t bHardITSPass = kTRUE;
2597 for (
Int_t j = 0; j < 7; ++j)
2599 if(bHardSelectionArrayITS[j])
2601 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2605 Int_t nCounterSoftSelection = 0;
2606 Bool_t bSoftITSPass = kTRUE;
2607 for (
Int_t j = 0; j < 7; ++j)
2609 if(bSoftSelectionArrayITS[j])
2611 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2614 if(nCounterSoftSelection < fCuts->GetNSoftITSCutD0FirstDaughter()) bSoftITSPass = kFALSE;
2617 if(isDesiredCandidate) {
2624 if(isDesiredCandidate) {
2633 if(isDesiredCandidate) {
2646 for (
Int_t j = 0; j < 10; ++j)
2653 if(isDesiredCandidate)
2661 for (
Int_t j = 0; j < 10; ++j)
2675 if(!aodTrack) AliFatal(
"Not a standard AOD");
2678 if(aodTrack->GetITSNcls() < 1)
return kFALSE;
2679 if(aodTrack->GetTPCNcls() < 1)
return kFALSE;
2680 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
2681 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
2682 if(aodTrack->GetID() < 0)
return kFALSE;
2684 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
2686 Int_t mcLabelParticle = -1;
2687 Int_t pdgParticle = -1;
2688 mcLabelParticle = aodTrack->GetLabel();
2691 Double_t pt_track = aodTrack->Pt();
2692 Double_t momentum_track = aodTrack->P();
2693 Int_t numberOfITS = aodTrack->GetITSNcls();
2694 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2696 AliExternalTrackParam particleTrack;
2697 particleTrack.CopyFromVTrack(aodTrack);
2699 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2702 Bool_t isDesiredCandidate = kFALSE;
2704 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2705 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2706 if(mcLabelParticle == (
Int_t)particleMatrix(k,2) || mcLabelParticle == (
Int_t)particleMatrix(k,3)){
2707 isDesiredCandidate = kTRUE;
2717 Int_t daughterType = 1;
2726 for (
Int_t j = 0; j < 10; ++j)
2733 if(isDesiredCandidate)
2741 for (
Int_t j = 0; j < 10; ++j)
2755 if(isDesiredCandidate) {
2762 if(isDesiredCandidate) {
2769 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2770 if(isDesiredCandidate) {
2778 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2779 if(isDesiredCandidate) {
2788 if(isDesiredCandidate) {
2796 if(isDesiredCandidate) {
2803 if(isDesiredCandidate) {
2810 if(isDesiredCandidate) {
2816 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2818 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2821 Bool_t bHardITSPass = kTRUE;
2822 for (
Int_t j = 0; j < 7; ++j)
2824 if(bHardSelectionArrayITS[j])
2826 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2830 Int_t nCounterSoftSelection = 0;
2831 Bool_t bSoftITSPass = kTRUE;
2832 for (
Int_t j = 0; j < 7; ++j)
2834 if(bSoftSelectionArrayITS[j])
2836 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2839 if(nCounterSoftSelection < fCuts->GetNSoftITSCutD0SecondDaughter()) bSoftITSPass = kFALSE;
2842 if(isDesiredCandidate) {
2849 if(isDesiredCandidate) {
2858 if(isDesiredCandidate) {
2871 for (
Int_t j = 0; j < 10; ++j)
2878 if(isDesiredCandidate)
2886 for (
Int_t j = 0; j < 10; ++j)
2900 Int_t numberofparticles = 0;
2901 Int_t numberofparticlesused = 0;
2902 Int_t iClonesArray = 0;
2907 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
2908 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
2909 if(!aodTrack) AliFatal(
"Not a standard AOD");
2912 if(aodTrack->GetITSNcls() < 1)
continue;
2913 if(aodTrack->GetTPCNcls() < 1)
continue;
2914 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
2915 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
2916 if(aodTrack->GetID() < 0)
continue;
2918 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
2920 Int_t mcLabelParticle = -1;
2921 Int_t pdgParticle = -1;
2922 mcLabelParticle = aodTrack->GetLabel();
2924 numberofparticles++;
2927 Double_t pt_track = aodTrack->Pt();
2928 Double_t momentum_track = aodTrack->P();
2929 Int_t numberOfITS = aodTrack->GetITSNcls();
2930 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2933 Int_t pionPIDnumber = 2;
2934 Int_t kaonPIDnumber = 3;
2939 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
2940 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
2942 AliExternalTrackParam particleTrack;
2943 particleTrack.CopyFromVTrack(aodTrack);
2945 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2948 Bool_t isDesiredCandidate = kFALSE;
2950 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2951 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2952 if(mcLabelParticle == (
Int_t)particleMatrix(k,1)){
2953 isDesiredCandidate = kTRUE;
2963 Int_t daughterType = 2;
2972 for (
Int_t j = 0; j < 10; ++j)
2980 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2983 if(isDesiredCandidate)
2991 for (
Int_t j = 0; j < 10; ++j)
2999 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3008 if(isDesiredCandidate) {
3015 if(isDesiredCandidate) {
3022 if(isDesiredCandidate) {
3029 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
3030 if(isDesiredCandidate) {
3038 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
3039 if(isDesiredCandidate) {
3048 if(isDesiredCandidate) {
3056 if(isDesiredCandidate) {
3063 if(isDesiredCandidate) {
3071 if(isDesiredCandidate) {
3079 if(isDesiredCandidate) {
3085 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
3087 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
3090 Bool_t bHardITSPass = kTRUE;
3091 for (
Int_t j = 0; j < 7; ++j)
3093 if(bHardSelectionArrayITS[j])
3095 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
3099 Int_t nCounterSoftSelection = 0;
3100 Bool_t bSoftITSPass = kTRUE;
3101 for (
Int_t j = 0; j < 7; ++j)
3103 if(bSoftSelectionArrayITS[j])
3105 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
3108 if(nCounterSoftSelection < fCuts->GetNSoftITSCutDStarPion()) bSoftITSPass = kFALSE;
3111 if(isDesiredCandidate) {
3118 if(isDesiredCandidate) {
3127 if(isDesiredCandidate) {
3140 for (
Int_t j = 0; j < 10; ++j)
3148 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3151 if(isDesiredCandidate)
3159 for (
Int_t j = 0; j < 10; ++j)
3167 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3172 numberofparticlesused++;
3183 Int_t numberofparticles = 0;
3184 Int_t numberofparticlesused = 0;
3185 Int_t iClonesArray = 0;
3190 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
3191 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
3192 if(!aodTrack) AliFatal(
"Not a standard AOD");
3195 if(aodTrack->GetITSNcls() < 1)
continue;
3196 if(aodTrack->GetTPCNcls() < 1)
continue;
3197 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
3198 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
3199 if(aodTrack->GetID() < 0)
continue;
3201 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
3204 Int_t mcLabelParticle = -1;
3205 Int_t pdgParticle = -1;
3206 mcLabelParticle = aodTrack->GetLabel();
3208 numberofparticles++;
3211 Double_t pt_track = aodTrack->Pt();
3212 Double_t momentum_track = aodTrack->P();
3213 Int_t numberOfITS = aodTrack->GetITSNcls();
3214 Int_t numberOfTPC = aodTrack->GetTPCNcls();
3217 Int_t pionPIDnumber = 2;
3218 Int_t kaonPIDnumber = 3;
3223 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
3224 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
3226 AliExternalTrackParam particleTrack;
3227 particleTrack.CopyFromVTrack(aodTrack);
3229 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
3233 Bool_t isDesiredCandidate = kFALSE;
3235 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
3236 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
3237 if(mcLabelParticle == (
Int_t)particleMatrix(k,0)){
3238 isDesiredCandidate = kTRUE;
3249 Int_t daughterType = 3;
3257 for (
Int_t j = 0; j < 10; ++j)
3265 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3268 if(isDesiredCandidate)
3276 for (
Int_t j = 0; j < 10; ++j)
3284 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3293 if(isDesiredCandidate) {
3300 if(isDesiredCandidate) {
3307 if(isDesiredCandidate) {
3314 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
3315 if(isDesiredCandidate) {
3323 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
3324 if(isDesiredCandidate) {
3333 if(isDesiredCandidate) {
3342 if(isDesiredCandidate) {
3350 if(isDesiredCandidate) {
3357 if(isDesiredCandidate) {
3363 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
3365 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
3368 Bool_t bHardITSPass = kTRUE;
3369 for (
Int_t j = 0; j < 7; ++j)
3371 if(bHardSelectionArrayITS[j])
3373 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
3377 Int_t nCounterSoftSelection = 0;
3378 Bool_t bSoftITSPass = kTRUE;
3379 for (
Int_t j = 0; j < 7; ++j)
3381 if(bSoftSelectionArrayITS[j])
3383 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
3386 if(nCounterSoftSelection < fCuts->GetNSoftITSCutB0Pion()) bSoftITSPass = kFALSE;
3389 if(isDesiredCandidate) {
3396 if(isDesiredCandidate) {
3406 if(isDesiredCandidate) {
3419 for (
Int_t j = 0; j < 10; ++j)
3427 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3430 if(isDesiredCandidate)
3438 for (
Int_t j = 0; j < 10; ++j)
3446 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3452 numberofparticlesused++;
3467 for (
Int_t j = 0; j < D0TracksFromFriendFile->GetEntriesFast(); j++)
3472 if(!trackD0) {std::cout <<
"found none" << std::endl;
continue;}
3473 if(trackD0 ==
nullptr) {std::cout <<
"found nullptr" << std::endl;
continue;}
3481 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(trackD0->GetDaughter(0));
3482 AliAODTrack * trackSecondDaughter = (AliAODTrack*)(trackD0->GetDaughter(1));
3483 if(!
D0FirstDaughterSelection(trackFirstDaughter, primaryVertex, bz, mcTrackArray, B0toDStarPiLabelMatrix,header))
continue;
3484 if(!
D0SecondDaughterSelection(trackSecondDaughter, primaryVertex, bz, mcTrackArray, B0toDStarPiLabelMatrix,header))
continue;
3487 AliAODVertex *vertexMother = (AliAODVertex*)trackD0->GetSecondaryVtx();
3490 Int_t pdgCodeMother = -1;
3491 Float_t pdgCodeGrandMother = -1;
3492 Bool_t isDesiredCandidate = kFALSE;
3493 Int_t motherType, histType;
3495 Int_t mcLabelD0 = -1;
3503 isDesiredCandidate = kTRUE;
3505 Int_t mcLabelFirstTrack = -1;
3506 mcLabelFirstTrack = trackFirstDaughter->GetLabel();
3508 if(mcLabelFirstTrack >= 0)
3510 AliAODMCParticle *mcParticleFirstTrack = (AliAODMCParticle*)mcTrackArray->At(mcLabelFirstTrack);
3511 AliAODMCParticle *mcMotherParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0);
3513 if(mcParticleFirstTrack && mcMotherParticle)
3515 pdgCodeMother = mcMotherParticle->GetPdgCode();
3517 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()));
3520 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()));
3532 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
3536 Bool_t cutMother = kFALSE;
3538 Bool_t bCutArray[29] = {0};
3540 if(cutReturnValue == -1) cutMother = kTRUE;
3541 if(cutReturnValue == 0) cutMother = kTRUE;
3546 for (
Int_t k = 0; k < 29; ++k)
3548 if (bCutArray[k] == kTRUE){
3549 if(isDesiredCandidate){
3561 if(isDesiredCandidate){
3574 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
3581 delete vHF; vHF =
nullptr;
3593 Int_t ObjectNumber = TProcessID::GetObjectCount();
3596 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(aodEvent->GetTrack(
fDStarPionTracks->at(i)));
3597 if(!trackFirstDaughter)
continue;
3600 if(trackFirstDaughter->Charge() == -1) pdgD0 = -421;
3607 if(!trackSecondDaughter) {std::cout <<
"found none" << std::endl;
continue;}
3608 if(trackSecondDaughter ==
nullptr) {std::cout <<
"found nullptr" << std::endl;
continue;}
3611 if(trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(0) || trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(1))
continue;
3614 if(trackFirstDaughter->Charge() == trackSecondDaughter->Charge() || TMath::Abs(trackFirstDaughter->Charge() + trackSecondDaughter->Charge()) != 1)
continue;
3618 if(trackFirstDaughter->Charge() == -1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->Charge() != -1)
continue;
3619 if(trackFirstDaughter->Charge() == 1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->Charge() != 1)
continue;
3623 if(trackFirstDaughter->Charge()==1)
3625 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),2)))
continue;
3626 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),3)))
continue;
3627 }
else if (trackFirstDaughter->Charge()==-1){
3628 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),3)))
continue;
3629 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),2)))
continue;
3635 AliExternalTrackParam DStarPionTrackParam;
3636 DStarPionTrackParam.CopyFromVTrack(trackFirstDaughter);
3637 AliExternalTrackParam D0TrackParam;
3638 D0TrackParam.CopyFromVTrack(trackSecondDaughter);
3643 tracksTestVertex.Add(&DStarPionTrackParam);
3644 tracksTestVertex.Add(&D0TrackParam);
3647 AliAODVertex *testVertex =
RecalculateVertex(primaryVertex,&tracksTestVertex,bz,dispersionTest);
3648 if(!testVertex) {
delete testVertex; testVertex =
nullptr;
continue;}
3650 Double_t d0z0Test[2],covd0z0Test[3];
3653 DStarPionTrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
3654 D0TrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
3655 delete testVertex; testVertex =
nullptr;
3657 Double_t pdgMassPion = TDatabasePDG::Instance()->GetParticle(211)->Mass();
3658 Double_t pdgMassD0 = TDatabasePDG::Instance()->GetParticle(421)->Mass();
3659 Double_t pdgMassDStar = TDatabasePDG::Instance()->GetParticle(413)->Mass();
3661 Double_t energyDStarPion = pdgMassPion*pdgMassPion + DStarPionTrackParam.Px()*DStarPionTrackParam.Px()+DStarPionTrackParam.Py()*DStarPionTrackParam.Py()+DStarPionTrackParam.Pz()*DStarPionTrackParam.Pz();
3662 Double_t energyD0 = pdgMassD0*pdgMassD0 + D0TrackParam.Px()*D0TrackParam.Px()+D0TrackParam.Py()*D0TrackParam.Py()+D0TrackParam.Pz()*D0TrackParam.Pz();
3663 Double_t energySum = TMath::Sqrt(energyDStarPion) + TMath::Sqrt(energyD0);
3665 Double_t pxDStarTest = DStarPionTrackParam.Px() + D0TrackParam.Px();
3666 Double_t pyDStarTest = DStarPionTrackParam.Py() + D0TrackParam.Py();
3667 Double_t pzDStarTest = DStarPionTrackParam.Pz() + D0TrackParam.Pz();
3668 Double_t p2DStarTest = pxDStarTest*pxDStarTest + pyDStarTest*pyDStarTest + pzDStarTest*pzDStarTest;
3670 Double_t invMassDStarTest = TMath::Sqrt(energySum*energySum-p2DStarTest);
3673 Int_t nCutIndex = 0;
3674 Bool_t bCutArrayTemp[29];
3675 Double_t cutVariableValue = TMath::Abs(invMassDStarTest-pdgMassDStar)/2.0;
3677 if(!bPassedCut)
continue;
3680 AliExternalTrackParam firstTrack;
3681 firstTrack.CopyFromVTrack(trackFirstDaughter);
3682 AliExternalTrackParam secondTrack;
3683 secondTrack.CopyFromVTrack(trackSecondDaughter);
3685 Double_t d0z0DStar[2],covd0z0DStar[3],d0DStar[2],d0errDStar[2];
3687 firstTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
3688 d0DStar[0] = d0z0DStar[0];
3689 d0errDStar[0] = TMath::Sqrt(covd0z0DStar[0]);
3690 secondTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
3691 d0DStar[1] = d0z0DStar[0];
3692 d0errDStar[1] = TMath::Sqrt(covd0z0DStar[0]);
3695 cutVariableValue = d0DStar[0] * d0DStar[1];
3697 if(!bPassedCut)
continue;
3703 AliAODTrack * trackB0Pion =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(
fB0PionTracks->at(k)));
3704 if(!trackB0Pion)
continue;
3707 AliAODTrack* twoProngdaughter0 = (AliAODTrack*)trackSecondDaughter->GetDaughter(0);
3708 AliAODTrack* twoProngdaughter1 = (AliAODTrack*)trackSecondDaughter->GetDaughter(1);
3709 UShort_t idProng0 = twoProngdaughter0->GetID();
3710 UShort_t idProng1 = twoProngdaughter1->GetID();
3712 if(trackB0Pion->GetID() == trackFirstDaughter->GetID() || trackB0Pion->GetID() == idProng0 || trackB0Pion->GetID() == idProng1)
continue;
3715 Bool_t bSameSign = kFALSE;
3716 if(trackB0Pion->Charge() == (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) && trackB0Pion->Charge() + (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) != 0) bSameSign = kTRUE;
3722 AliAODTrack * trackB0PionRotated =
new AliAODTrack(*trackB0Pion);
3729 trackB0PionRotated->SetPhi(dPhiRotated);
3740 AliExternalTrackParam thirdTrack;
3741 thirdTrack.CopyFromVTrack(trackB0PionRotated);
3744 TObjArray daughterTracksWithRecalculation;
3746 daughterTracksWithRecalculation.Add(&firstTrack);
3747 daughterTracksWithRecalculation.Add(&secondTrack);
3748 daughterTracksWithRecalculation.Add(&thirdTrack);
3751 AliAODVertex *vertexMother =
RecalculateVertex(primaryVertex,&daughterTracksWithRecalculation,bz,dispersion);
3753 delete vertexMother; vertexMother =
nullptr;
3754 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3758 if(vertexMother->GetNDaughters()!=2)
3760 std::cout <<
"bad reconstruction - number of daughters for vertex is incorrect" << std::endl;
3761 delete vertexMother; vertexMother =
nullptr;
3762 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3766 Double_t xdummyDStar=0.,ydummyDStar=0.,eDStar[2];
3770 firstTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
3771 secondTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
3773 Double_t pxDStar[2],pyDStar[2],pzDStar[2];
3774 pxDStar[0] = firstTrack.Px();
3775 pyDStar[0] = firstTrack.Py();
3776 pzDStar[0] = firstTrack.Pz();
3777 pxDStar[1] = secondTrack.Px();
3778 pyDStar[1] = secondTrack.Py();
3779 pzDStar[1] = secondTrack.Pz();
3782 xyz_track1[0] = firstTrack.GetX();
3783 firstTrack.GetYAt(xyz_track1[0],bz,xyz_track1[1]);
3784 firstTrack.GetZAt(xyz_track1[0],bz,xyz_track1[2]);
3787 xyz_track2[0] = secondTrack.GetX();
3788 secondTrack.GetYAt(xyz_track2[0],bz,xyz_track2[1]);
3789 secondTrack.GetZAt(xyz_track2[0],bz,xyz_track2[2]);
3791 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]));
3801 Double_t dcaDStarPionD0 = secondTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
3802 Double_t dcaDStarPionB0Pion = secondTrack.GetDCA(&thirdTrack,bz,xdummyDStar,ydummyDStar);
3803 Double_t dcaB0PionD0 = thirdTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
3807 delete vertexMother; vertexMother =
nullptr;
3808 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3813 delete vertexMother; vertexMother =
nullptr;
3814 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3819 delete vertexMother; vertexMother =
nullptr;
3820 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3824 Double_t dcaCombined = TMath::Sqrt(TMath::Abs(dcaDStarPionD0) + TMath::Abs(dcaDStarPionB0Pion) + TMath::Abs(dcaB0PionD0));
3827 delete vertexMother; vertexMother =
nullptr;
3828 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3832 Short_t chargeDStar = trackFirstDaughter->Charge() + trackSecondDaughter->Charge();
3833 AliAODVertex * vertexDStar =
new AliAODVertex(*vertexMother);
3836 std::cout <<
"no dstar vertex" << std::endl;
3837 delete vertexMother; vertexMother =
nullptr;
3838 delete vertexDStar; vertexDStar =
nullptr;
3839 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3844 Int_t nProngsDStar = 2;
3848 delete vertexMother; vertexMother =
nullptr;
3849 delete vertexDStar; vertexDStar =
nullptr;
3850 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3854 trackDStar.SetCharge(chargeDStar);
3857 idDStar[0]= trackFirstDaughter->GetID();
3861 prongsDStar[0] = 211;
3862 prongsDStar[1] = 421;
3865 if(vertexDStar->GetNDaughters()!=2)
3867 std::cout <<
"bad reconstruction 2 - number of daughters for vertex is incorrect" << std::endl;
3868 delete vertexMother; vertexMother =
nullptr;
3869 delete vertexDStar; vertexDStar =
nullptr;
3870 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3874 trackDStar.GetSecondaryVtx()->AddDaughter(trackFirstDaughter);
3875 trackDStar.GetSecondaryVtx()->AddDaughter(trackSecondDaughter);
3889 Double_t xdummy=0.,ydummy=0.,dca,e[2];
3890 Double_t d0z0[2],covd0z0[3],d0[2],d0err[2];
3892 AliExternalTrackParam fourthTrack;
3893 fourthTrack.CopyFromVTrack(&trackDStar);
3895 thirdTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
3896 fourthTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
3899 px[0] = thirdTrack.Px();
3900 py[0] = thirdTrack.Py();
3901 pz[0] = thirdTrack.Pz();
3902 px[1] = fourthTrack.Px();
3903 py[1] = fourthTrack.Py();
3904 pz[1] = fourthTrack.Pz();
3911 id[0]= thirdTrack.GetID();
3914 thirdTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3916 d0err[0] = TMath::Sqrt(covd0z0[0]);
3917 fourthTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3919 d0err[1] = TMath::Sqrt(covd0z0[0]);
3921 dca = fourthTrack.GetDCA(&thirdTrack,bz,xdummy,ydummy);
3924 Short_t chargeMother = trackFirstDaughter->Charge() + trackDStar.Charge();
3925 Int_t nProngsB0 = 2;
3929 delete vertexMother; vertexMother =
nullptr;
3930 delete vertexDStar; vertexDStar =
nullptr;
3931 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3935 trackB0.SetCharge(chargeMother);
3937 trackB0.GetSecondaryVtx()->AddDaughter(trackB0PionRotated);
3938 trackB0.GetSecondaryVtx()->AddDaughter(&trackDStar);
3943 if(TMath::Abs(trackB0.Y(511)) > 0.8) {
3944 delete vertexMother; vertexMother =
nullptr;
3945 delete vertexDStar; vertexDStar =
nullptr;
3946 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3957 Bool_t isDesiredCandidate = kFALSE;
3958 Int_t mcLabelB0 = -1;
3959 Int_t mcLabelDStar = -1;
3961 Int_t motherType, histType;
3969 if (mcLabelB0 >= 0 && mcLabelDStar >= 0 && trackB0PionRotated->GetLabel() >= 0 && iRot == 0)
3971 AliAODMCParticle *mcTrackDStarPion = (AliAODMCParticle*)mcTrackArray->At(trackB0PionRotated->GetLabel());
3972 AliAODMCParticle *mcTrackDStar = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStar);
3974 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()));
3977 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()));
3980 isDesiredCandidate = kTRUE;
3985 Bool_t bIsInjected = kFALSE;
3991 if(
fRemoveInjected == 1 && isDesiredCandidate == kFALSE && bIsInjected) {
3992 delete vertexMother; vertexMother =
nullptr;
3993 delete vertexDStar; vertexDStar =
nullptr;
3994 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3998 delete vertexMother; vertexMother =
nullptr;
3999 delete vertexDStar; vertexDStar =
nullptr;
4000 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4016 Bool_t cutDStar = kFALSE;
4018 Bool_t bCutArrayDStar[29] = {0};
4020 if(cutReturnValueDStar == -1) cutDStar = kTRUE;
4021 if(cutReturnValueDStar == 0) cutDStar = kTRUE;
4023 Bool_t bCutArrayD0[39] = {0};
4025 if(cutReturnValueD0 == -1) cutDStar = kTRUE;
4026 if(cutReturnValueD0 == 0) cutDStar = kTRUE;
4032 for (
Int_t n = 0; n < 29; ++n)
4034 if(bCutArrayDStar[n] == kTRUE){
4035 if(isDesiredCandidate){
4042 for (
Int_t n = 0; n < 39; ++n)
4044 if(bCutArrayD0[n] == kTRUE){
4045 if(isDesiredCandidate){
4057 if(isDesiredCandidate)
4061 delete vertexMother; vertexMother =
nullptr;
4062 delete vertexDStar; vertexDStar =
nullptr;
4063 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4092 if(isDesiredCandidate)
4094 AliAODMCParticle *mcTrackFirstDaughter = (AliAODMCParticle*)mcTrackArray->At(trackB0PionRotated->GetLabel());
4095 AliAODMCParticle *mcTrackB0 = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0);
4097 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()));
4100 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()));
4110 if(isDesiredCandidate)
4119 Bool_t cutMother = kFALSE;
4121 Bool_t bCutArray[97] = {0};
4122 Int_t numberOfCuts = 97;
4124 if(cutReturnValue == -1) cutMother = kTRUE;
4125 if(cutReturnValue == 0) cutMother = kTRUE;
4130 Double_t invariantMassMother = trackB0.InvMass(2,prongs);
4131 Double_t pdgMassMother=TDatabasePDG::Instance()->GetParticle(511)->Mass();
4135 for (
Int_t n = 0; n < 97; ++n)
4137 if(bCutArray[n] == kTRUE){
4138 if(isDesiredCandidate){
4145 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow){
4146 for (
Int_t l = 0; l < numberOfCuts; ++l)
4148 if(bCutArray[l] == kFALSE)
continue;
4149 for (
Int_t j = 0; j < numberOfCuts; ++j)
4151 if(bCutArray[j] == kFALSE)
continue;
4152 if(isDesiredCandidate == kFALSE) histName =
"cutEffectBackground";
4153 if(isDesiredCandidate == kTRUE) histName =
"cutEffectSignal";
4154 ((TH2I*)(
fOutputB0MC->FindObject(histName)))->Fill(l,j);
4158 for (
Int_t l = 0; l < numberOfCuts; ++l)
4160 if(bCutArray[l] == kFALSE)
continue;
4162 for (
Int_t j = 0; j < numberOfCuts; ++j)
4165 if(bCutArray[j] == kTRUE)
4174 if(isDesiredCandidate == kFALSE) histName =
"cutEffectUniqueBackground";
4175 if(isDesiredCandidate == kTRUE) histName =
"cutEffectUniqueSignal";
4187 if(isDesiredCandidate)
4191 delete vertexMother; vertexMother =
nullptr;
4192 delete vertexDStar; vertexDStar =
nullptr;
4193 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4198 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
4199 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_DStarPion)))->Fill(dcaDStarPionD0);
4201 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
4202 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_B0Pion)))->Fill(dcaB0PionD0);
4204 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
4205 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
4207 TString name_dca_Combined =
"dca_Combined";
4208 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Combined)))->Fill(dcaCombined);
4212 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
4213 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_D0_DStarPion)))->Fill(dcaDStarPionD0);
4215 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
4216 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_D0_B0Pion)))->Fill(dcaB0PionD0);
4218 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
4219 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
4221 TString name_dca_Signal_Combined =
"dca_Signal_Combined";
4222 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_Combined)))->Fill(dcaCombined);
4227 Bool_t bIsCorrelatedBackground = kFALSE;
4228 Bool_t bIsCorrelatedBackground511 = kFALSE;
4231 Int_t mcLabelB0Pion = trackB0PionRotated->GetLabel();
4232 Int_t mcLabelDStarPion = trackFirstDaughter->GetLabel();
4233 Int_t mcLabelD0first = ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->GetLabel();
4234 Int_t mcLabelD0second = ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->GetLabel();
4236 if(mcLabelB0Pion >= 0 && mcLabelDStarPion >= 0 && mcLabelD0first >= 0 && mcLabelD0second >= 0)
4238 AliAODMCParticle * mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0Pion);
4239 AliAODMCParticle * mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStarPion);
4240 AliAODMCParticle * mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0first);
4241 AliAODMCParticle * mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0second);
4246 while(mcB0Pion->GetMother() >= 0)
4248 mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcB0Pion->GetMother());
4249 fillthis=
"particle_pdgB0Pion";
4250 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcB0Pion->GetPdgCode()),iterator++);
4257 while(mcDStarPion->GetMother() >= 0)
4259 mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcDStarPion->GetMother());
4260 fillthis=
"particle_pdgB0Pion";
4261 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcDStarPion->GetPdgCode()),iterator++);
4268 while(mcD0first->GetMother() >= 0)
4270 mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4271 fillthis=
"particle_pdgD0First";
4272 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcD0first->GetPdgCode()),iterator++);
4279 while(mcD0second->GetMother() >= 0)
4281 mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcD0second->GetMother());
4282 fillthis=
"particle_pdgD0Second";
4283 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcD0second->GetPdgCode()),iterator++);
4287 mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0Pion);
4288 mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStarPion);
4289 mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0first);
4290 mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0second);
4292 if(mcB0Pion && mcDStarPion && mcD0first && mcD0second)
4295 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4297 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4298 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4299 if(D0Mother->GetMother() == mcDStarPion->GetMother() && D0Mother->GetMother() >= 0 && D0GrandMother->GetMother() == mcB0Pion->GetMother() && D0GrandMother->GetMother() >= 0)
4301 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4302 fillthis=
"particle_pdgAll";
4303 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4304 fillthis=
"particle_pdgAllInvMass";
4305 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4306 if(TMath::Abs(finalMother->GetPdgCode())==511)
4308 bIsCorrelatedBackground = kTRUE;
4309 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4311 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4312 fillthis=
"particle_daughterPdgTwoStep511a";
4313 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4315 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4317 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4318 fillthis=
"particle_daughterPdgTwoStep511a";
4319 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4321 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4323 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4324 fillthis=
"particle_daughterPdgTwoStep511a";
4325 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4328 if(TMath::Abs(finalMother->GetPdgCode())==521)
4330 bIsCorrelatedBackground = kTRUE;
4331 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4333 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4334 fillthis=
"particle_daughterPdgTwoStep521a";
4335 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4337 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4339 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4340 fillthis=
"particle_daughterPdgTwoStep521a";
4341 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4343 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4345 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4346 fillthis=
"particle_daughterPdgTwoStep521a";
4347 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4354 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4356 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4357 if(D0Mother->GetMother() == mcB0Pion->GetMother() && D0Mother->GetMother() >= 0)
4359 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4360 fillthis=
"particle_pdgAllSecond";
4361 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4362 fillthis=
"particle_pdgAllInvMassSecond";
4363 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4364 if(TMath::Abs(finalMother->GetPdgCode())==511)
4366 bIsCorrelatedBackground = kTRUE;
4367 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4369 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4370 fillthis=
"particle_daughterPdgOneStep511a";
4371 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4373 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4375 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4376 fillthis=
"particle_daughterPdgOneStep511a";
4377 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4380 if(TMath::Abs(finalMother->GetPdgCode())==521)
4384 delete vertexMother; vertexMother =
nullptr;
4385 delete vertexDStar; vertexDStar =
nullptr;
4386 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4389 bIsCorrelatedBackground = kTRUE;
4390 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4392 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4393 fillthis=
"particle_daughterPdgOneStep521a";
4394 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4396 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4398 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4399 fillthis=
"particle_daughterPdgOneStep521a";
4400 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4407 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4409 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4410 if(D0Mother->GetMother() == mcDStarPion->GetMother() && D0Mother->GetMother() >= 0)
4412 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4413 fillthis=
"particle_pdgAllThird";
4414 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4415 fillthis=
"particle_pdgAllInvMassThird";
4416 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4417 if(TMath::Abs(finalMother->GetPdgCode())==511)
4419 bIsCorrelatedBackground = kTRUE;
4420 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4422 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4423 fillthis=
"particle_daughterPdgOneStep511b";
4424 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4426 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4428 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4429 fillthis=
"particle_daughterPdgOneStep511b";
4430 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4433 if(TMath::Abs(finalMother->GetPdgCode())==521)
4435 bIsCorrelatedBackground = kTRUE;
4436 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4438 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4439 fillthis=
"particle_daughterPdgOneStep521b";
4440 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4442 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4444 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4445 fillthis=
"particle_daughterPdgOneStep521b";
4446 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4453 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4455 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4456 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4457 if(D0GrandMother->GetMother() == mcB0Pion->GetMother() && D0GrandMother->GetMother() >= 0)
4459 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4460 fillthis=
"particle_pdgAllFourth";
4461 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4462 fillthis=
"particle_pdgAllInvMassFourth";
4463 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4464 if(TMath::Abs(finalMother->GetPdgCode())==511)
4468 delete vertexMother; vertexMother =
nullptr;
4469 delete vertexDStar; vertexDStar =
nullptr;
4470 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4473 bIsCorrelatedBackground = kTRUE;
4474 bIsCorrelatedBackground511 = kTRUE;
4475 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4477 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4478 fillthis=
"particle_daughterPdgTwoStep511b";
4479 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4481 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4483 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4484 fillthis=
"particle_daughterPdgTwoStep511b";
4485 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4487 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4489 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4490 fillthis=
"particle_daughterPdgTwoStep511b";
4491 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4494 if(TMath::Abs(finalMother->GetPdgCode())==521)
4496 bIsCorrelatedBackground = kTRUE;
4497 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4499 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4500 fillthis=
"particle_daughterPdgTwoStep521b";
4501 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4503 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4505 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4506 fillthis=
"particle_daughterPdgTwoStep521b";
4507 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4509 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4511 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4512 fillthis=
"particle_daughterPdgTwoStep521b";
4513 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4520 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4522 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4523 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4524 if(D0GrandMother->GetMother() == mcDStarPion->GetMother() && D0GrandMother->GetMother() >= 0)
4526 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4527 fillthis=
"particle_pdgAllFifth";
4528 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4529 fillthis=
"particle_pdgAllInvMassFifth";
4530 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4531 if(TMath::Abs(finalMother->GetPdgCode())==511)
4533 bIsCorrelatedBackground = kTRUE;
4534 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4536 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4537 fillthis=
"particle_daughterPdgTwoStep511c";
4538 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4540 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4542 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4543 fillthis=
"particle_daughterPdgTwoStep511c";
4544 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4546 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4548 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4549 fillthis=
"particle_daughterPdgTwoStep511c";
4550 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4553 if(TMath::Abs(finalMother->GetPdgCode())==521)
4555 bIsCorrelatedBackground = kTRUE;
4556 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4558 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4559 fillthis=
"particle_daughterPdgTwoStep521c";
4560 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4562 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4564 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4565 fillthis=
"particle_daughterPdgTwoStep521c";
4566 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4568 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4570 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4571 fillthis=
"particle_daughterPdgTwoStep521c";
4572 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4598 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
4603 if(!isDesiredCandidate)
4605 motherType = 0; histType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4609 if(isDesiredCandidate)
4611 motherType = 0; histType = 5;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4621 ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[ptBin]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[ptBin+1];
4622 histType = 6 + 2 * ptBin;
4625 Int_t histTypeD0 = 2 * d0PtBin;
4628 Int_t histTypeD0DStar = 2 * d0DStarPtBin;
4631 Int_t histTypeDStar = 2 * dstarPtBin;
4634 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
4636 if(!bSameSign && histType > 5)
4638 if(!isDesiredCandidate)
4640 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4643 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0, pdgD0);
4644 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar, pdgD0);
4648 if(isDesiredCandidate)
4651 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4654 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0 + 1, pdgD0);
4655 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar + 1, pdgD0);
4662 if(bSameSign && iRot == 0)
4664 fillthis=
"invariantMassB0";
4665 fillthis +=
"_SameSign";
4666 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4667 fillthis=
"invariantMassB0";
4668 fillthis += ptBinMother +
"_SameSign";
4669 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4670 fillthis=
"invariantMassB0";
4671 fillthis +=
"_SignSum";
4672 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4673 fillthis=
"invariantMassB0";
4674 fillthis += ptBinMother +
"_SignSum";
4675 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4681 fillthis=
"invariantMassB0";
4682 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4683 fillthis=
"invariantMassB0";
4684 fillthis += ptBinMother;
4685 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4686 fillthis=
"invariantMassB0";
4687 fillthis +=
"_SignSum";
4688 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4689 fillthis=
"invariantMassB0";
4690 fillthis += ptBinMother +
"_SignSum";
4691 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4693 fillthis =
"invariantMassB0Signal_BA";
4694 if(isDesiredCandidate) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4696 fillthis =
"invariantMassB0Correlated_BA";
4697 if(bIsCorrelatedBackground) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4699 fillthis =
"invariantMassB0Background_BA";
4700 if(!isDesiredCandidate && !bIsCorrelatedBackground) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4702 if(bIsCorrelatedBackground511)
4704 fillthis=
"invariantMassB0_correlated511";
4705 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4706 fillthis=
"invariantMassB0";
4707 fillthis += ptBinMother +
"_correlated511";
4708 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4711 if(!isDesiredCandidate && !bIsInjected)
4713 TString signName =
"_HIJING_Background";
4714 fillthis=
"invariantMassB0";
4715 fillthis += signName;
4716 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4717 fillthis=
"invariantMassB0";
4718 fillthis += ptBinMother + signName;
4719 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4721 if(isDesiredCandidate && !bIsInjected)
4723 TString signName =
"_HIJING_Signal";
4724 fillthis=
"invariantMassB0";
4725 fillthis += signName;
4726 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4727 fillthis=
"invariantMassB0";
4728 fillthis += ptBinMother + signName;
4729 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4734 TString signName =
"_Background_rotation";
4735 fillthis=
"invariantMassB0";
4736 fillthis += signName;
4737 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4738 fillthis=
"invariantMassB0";
4739 fillthis += ptBinMother + signName;
4740 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4741 if(!isDesiredCandidate && !bIsInjected)
4743 signName =
"_HIJING_Background_rotation";
4744 fillthis=
"invariantMassB0";
4745 fillthis += signName;
4746 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4747 fillthis=
"invariantMassB0";
4748 fillthis += ptBinMother + signName;
4749 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4754 if(trackB0.Pt() > 6.0)
4756 TString broadptBinMother =
"_ptbin_6_to_inf";
4757 if(bSameSign && iRot == 0)
4759 fillthis=
"invariantMassB0";
4760 fillthis += broadptBinMother +
"_SameSign";
4761 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4762 fillthis=
"invariantMassB0";
4763 fillthis += broadptBinMother +
"_SignSum";
4764 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4770 fillthis=
"invariantMassB0";
4771 fillthis += broadptBinMother;
4772 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4773 fillthis=
"invariantMassB0";
4774 fillthis += broadptBinMother +
"_SignSum";
4775 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4776 if(!isDesiredCandidate && !bIsInjected)
4778 TString signName =
"_HIJING_Background";
4779 fillthis=
"invariantMassB0";
4780 fillthis += broadptBinMother + signName;
4781 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4783 if(isDesiredCandidate && !bIsInjected)
4785 TString signName =
"_HIJING_Signal";
4786 fillthis=
"invariantMassB0";
4787 fillthis += broadptBinMother + signName;
4788 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4793 TString signName =
"_Background_rotation";
4794 fillthis=
"invariantMassB0";
4795 fillthis += broadptBinMother + signName;
4796 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4797 if(!isDesiredCandidate && !bIsInjected)
4799 signName =
"_HIJING_Background_rotation";
4800 fillthis=
"invariantMassB0";
4801 fillthis += broadptBinMother + signName;
4802 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4808 if(trackB0.Pt() > 3.0)
4810 TString broadptBinMother =
"_ptbin_3_to_inf";
4811 if(bSameSign && iRot == 0)
4813 fillthis=
"invariantMassB0";
4814 fillthis += broadptBinMother +
"_SameSign";
4815 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4816 fillthis=
"invariantMassB0";
4817 fillthis += broadptBinMother +
"_SignSum";
4818 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4824 fillthis=
"invariantMassB0";
4825 fillthis += broadptBinMother;
4826 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4827 fillthis=
"invariantMassB0";
4828 fillthis += broadptBinMother +
"_SignSum";
4829 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4830 if(!isDesiredCandidate && !bIsInjected)
4832 TString signName =
"_HIJING_Background";
4833 fillthis=
"invariantMassB0";
4834 fillthis += broadptBinMother + signName;
4835 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4837 if(isDesiredCandidate && !bIsInjected)
4839 TString signName =
"_HIJING_Signal";
4840 fillthis=
"invariantMassB0";
4841 fillthis += broadptBinMother + signName;
4842 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4847 TString signName =
"_Background_rotation";
4848 fillthis=
"invariantMassB0";
4849 fillthis += broadptBinMother + signName;
4850 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4851 if(!isDesiredCandidate && !bIsInjected)
4853 signName =
"_HIJING_Background_rotation";
4854 fillthis=
"invariantMassB0";
4855 fillthis += broadptBinMother + signName;
4856 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
5046 if(bSameSign && iRot == 0)
5048 fillthis=
"deltainvariantMassB0";
5049 fillthis +=
"_SameSign";
5050 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5051 fillthis=
"deltainvariantMassB0";
5052 fillthis += ptBinMother +
"_SameSign";
5053 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5054 fillthis=
"deltainvariantMassB0";
5055 fillthis +=
"_SignSum";
5056 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5057 fillthis=
"deltainvariantMassB0";
5058 fillthis += ptBinMother +
"_SignSum";
5059 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5065 fillthis=
"deltainvariantMassB0";
5066 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5067 fillthis=
"deltainvariantMassB0";
5068 fillthis += ptBinMother;
5069 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5070 fillthis=
"deltainvariantMassB0";
5071 fillthis +=
"_SignSum";
5072 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5073 fillthis=
"deltainvariantMassB0";
5074 fillthis += ptBinMother +
"_SignSum";
5075 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5077 if(bIsCorrelatedBackground511)
5079 fillthis=
"deltainvariantMassB0_correlated511";
5080 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5081 fillthis=
"deltainvariantMassB0";
5082 fillthis += ptBinMother +
"_correlated511" ;
5083 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5086 if(!isDesiredCandidate && !bIsInjected)
5088 TString signName =
"_HIJING_Background";
5089 fillthis=
"deltainvariantMassB0";
5090 fillthis += signName;
5091 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5092 fillthis=
"deltainvariantMassB0";
5093 fillthis += ptBinMother + signName;
5094 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5096 if(isDesiredCandidate && !bIsInjected)
5098 TString signName =
"_HIJING_Signal";
5099 fillthis=
"deltainvariantMassB0";
5100 fillthis += signName;
5101 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5102 fillthis=
"deltainvariantMassB0";
5103 fillthis += ptBinMother + signName;
5104 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5109 TString signName =
"_Background_rotation";
5110 fillthis=
"deltainvariantMassB0";
5111 fillthis += signName;
5112 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5113 fillthis=
"deltainvariantMassB0";
5114 fillthis += ptBinMother + signName;
5115 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5116 if(!isDesiredCandidate && !bIsInjected)
5118 signName =
"_HIJING_Background_rotation";
5119 fillthis=
"deltainvariantMassB0";
5120 fillthis += signName;
5121 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5122 fillthis=
"deltainvariantMassB0";
5123 fillthis += ptBinMother + signName;
5124 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5129 if(trackB0.Pt() > 6.0)
5131 TString broadptBinMother =
"_ptbin_6_to_inf";
5132 if(bSameSign && iRot == 0)
5134 fillthis=
"deltainvariantMassB0";
5135 fillthis += broadptBinMother +
"_SameSign";
5136 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5137 fillthis=
"deltainvariantMassB0";
5138 fillthis += broadptBinMother +
"_SignSum";
5139 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5145 fillthis=
"deltainvariantMassB0";
5146 fillthis += broadptBinMother;
5147 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5148 fillthis=
"deltainvariantMassB0";
5149 fillthis += broadptBinMother +
"_SignSum";
5150 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5151 if(!isDesiredCandidate && !bIsInjected)
5153 TString signName =
"_HIJING_Background";
5154 fillthis=
"deltainvariantMassB0";
5155 fillthis += broadptBinMother + signName;
5156 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5158 if(isDesiredCandidate && !bIsInjected)
5160 TString signName =
"_HIJING_Signal";
5161 fillthis=
"deltainvariantMassB0";
5162 fillthis += broadptBinMother + signName;
5163 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5168 TString signName =
"_Background_rotation";
5169 fillthis=
"deltainvariantMassB0";
5170 fillthis += broadptBinMother + signName;
5171 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5172 if(!isDesiredCandidate && !bIsInjected)
5174 signName =
"_HIJING_Background_rotation";
5175 fillthis=
"deltainvariantMassB0";
5176 fillthis += broadptBinMother + signName;
5177 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5183 if(trackB0.Pt() > 3.0)
5185 TString broadptBinMother =
"_ptbin_3_to_inf";
5186 if(bSameSign && iRot == 0)
5188 fillthis=
"deltainvariantMassB0";
5189 fillthis += broadptBinMother +
"_SameSign";
5190 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5191 fillthis=
"deltainvariantMassB0";
5192 fillthis += broadptBinMother +
"_SignSum";
5193 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5199 fillthis=
"deltainvariantMassB0";
5200 fillthis += broadptBinMother;
5201 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5202 fillthis=
"deltainvariantMassB0";
5203 fillthis += broadptBinMother +
"_SignSum";
5204 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5205 if(!isDesiredCandidate && !bIsInjected)
5207 TString signName =
"_HIJING_Background";
5208 fillthis=
"deltainvariantMassB0";
5209 fillthis += broadptBinMother + signName;
5210 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5212 if(isDesiredCandidate && !bIsInjected)
5214 TString signName =
"_HIJING_Signal";
5215 fillthis=
"deltainvariantMassB0";
5216 fillthis += broadptBinMother + signName;
5217 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5222 TString signName =
"_Background_rotation";
5223 fillthis=
"deltainvariantMassB0";
5224 fillthis += broadptBinMother + signName;
5225 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5226 if(!isDesiredCandidate && !bIsInjected)
5228 signName =
"_HIJING_Background_rotation";
5229 fillthis=
"deltainvariantMassB0";
5230 fillthis += broadptBinMother + signName;
5231 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5420 delete vertexMother; vertexMother =
nullptr;
5421 delete vertexDStar; vertexDStar =
nullptr;
5422 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
5430 TProcessID::SetObjectCount(ObjectNumber);
5439 AliAODTrack* selectedB0Pion = (AliAODTrack*)selectedB0->GetDaughter(0);
5442 AliAODTrack* selectedDStarPion = (AliAODTrack*)selectedDStar->GetDaughter(0);
5445 AliAODTrack* selectedD0Pion;
5446 AliAODTrack* selectedD0Kaon;
5448 if(selectedDStarPion->Charge() == 1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(0);
5449 if(selectedDStarPion->Charge() == -1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(1);
5451 if(selectedDStarPion->Charge() == 1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(1);
5452 if(selectedDStarPion->Charge() == -1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(0);
5454 Double_t d0B0pion = TMath::Abs(selectedB0->Getd0Prong(0));
5455 Double_t d0DStarpion = TMath::Abs(selectedDStar->Getd0Prong(0));
5459 if(selectedDStarPion->Charge() == 1) d0D0pion = selectedD0->Getd0Prong(0);
5460 if(selectedDStarPion->Charge() == -1) d0D0pion = selectedD0->Getd0Prong(1);
5462 if(selectedDStarPion->Charge() == 1) d0D0kaon = selectedD0->Getd0Prong(1);
5463 if(selectedDStarPion->Charge() == -1) d0D0kaon = selectedD0->Getd0Prong(0);
5467 Int_t numberOfITS = 0;
5468 Int_t numberOfTPC = 0;
5469 Int_t daughterType, histType;
5470 Int_t totalNumberOfITS = 0;
5471 Int_t totalNumberOfTPC = 0;
5476 Int_t pionPIDnumber = 2;
5477 Int_t kaonPIDnumber = 3;
5484 pt_track = selectedD0Pion->Pt();
5485 momentum_track = selectedD0Pion->P();
5486 numberOfITS = selectedD0Pion->GetITSNcls();
5487 numberOfTPC = selectedD0Pion->GetTPCNcls();
5488 totalNumberOfITS += numberOfITS;
5489 totalNumberOfTPC += numberOfTPC;
5490 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Pion, pionPIDnumber, nSigmaTPC);
5491 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Pion, pionPIDnumber, nSigmaTOF);
5492 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5493 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5499 if(!isDesiredCandidate)
5506 for (
Int_t j = 0; j < 10; ++j)
5508 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5514 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5519 if(isDesiredCandidate)
5527 for (
Int_t j = 0; j < 10; ++j)
5529 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5535 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5544 Float_t pdgCodeParticleMother = -1;
5545 Int_t mcLabelParticle = -1;
5546 Int_t mcLabelParticleMother = -1;
5547 mcLabelParticle = selectedD0Pion->GetLabel();
5549 if(mcLabelParticle >= 0){
5551 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5552 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5554 mcLabelParticleMother = mcTrackParticle->GetMother();
5556 if(mcLabelParticleMother >= 0){
5557 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5558 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5559 ((TH1F*)fDaughterHistogramArrayExtra[0][3])->Fill(pdgCodeParticleMother);
5567 pt_track = selectedD0Kaon->Pt();
5568 momentum_track = selectedD0Kaon->P();
5569 numberOfITS = selectedD0Kaon->GetITSNcls();
5570 numberOfTPC = selectedD0Kaon->GetTPCNcls();
5571 totalNumberOfITS += numberOfITS;
5572 totalNumberOfTPC += numberOfTPC;
5573 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Kaon, kaonPIDnumber, nSigmaTPC);
5574 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Kaon, kaonPIDnumber, nSigmaTOF);
5575 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5576 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5580 if(!isDesiredCandidate)
5587 for (
Int_t j = 0; j < 10; ++j)
5589 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5595 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5600 if(isDesiredCandidate)
5608 for (
Int_t j = 0; j < 10; ++j)
5610 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5616 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5625 Float_t pdgCodeParticleMother = -1;
5626 Int_t mcLabelParticle = -1;
5627 Int_t mcLabelParticleMother = -1;
5628 mcLabelParticle = selectedD0Kaon->GetLabel();
5630 if(mcLabelParticle >= 0){
5632 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5633 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5635 mcLabelParticleMother = mcTrackParticle->GetMother();
5637 if(mcLabelParticleMother >= 0){
5638 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5639 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5640 ((TH1F*)fDaughterHistogramArrayExtra[1][3])->Fill(pdgCodeParticleMother);
5646 pt_track = selectedDStarPion->Pt();
5647 momentum_track = selectedDStarPion->P();
5648 numberOfITS = selectedDStarPion->GetITSNcls();
5649 numberOfTPC = selectedDStarPion->GetTPCNcls();
5650 totalNumberOfITS += numberOfITS;
5651 totalNumberOfTPC += numberOfTPC;
5652 TPCok = trackPIDHF->
GetnSigmaTPC(selectedDStarPion, pionPIDnumber, nSigmaTPC);
5653 TOFok = trackPIDHF->
GetnSigmaTOF(selectedDStarPion, pionPIDnumber, nSigmaTOF);
5654 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5658 if(!isDesiredCandidate)
5665 for (
Int_t j = 0; j < 10; ++j)
5667 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5673 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5678 if(isDesiredCandidate)
5686 for (
Int_t j = 0; j < 10; ++j)
5688 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5694 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5703 Float_t pdgCodeParticleMother = -1;
5704 Int_t mcLabelParticle = -1;
5705 Int_t mcLabelParticleMother = -1;
5706 mcLabelParticle = selectedDStarPion->GetLabel();
5708 if(mcLabelParticle >= 0){
5710 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5711 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5713 mcLabelParticleMother = mcTrackParticle->GetMother();
5715 if(mcLabelParticleMother >= 0){
5716 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);