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 =
"mc_B0_pt";
681 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);
682 hist_mc_B0_pt->Sumw2();
683 hist_mc_B0_pt->SetLineColor(6);
684 hist_mc_B0_pt->SetMarkerStyle(20);
685 hist_mc_B0_pt->SetMarkerSize(0.6);
686 hist_mc_B0_pt->SetMarkerColor(6);
687 TH1F* histogram_mc_B0_pt = (TH1F*)hist_mc_B0_pt->Clone();
690 TString name_mc_B0_pion_pt =
"mc_B0_pion_pt";
691 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);
692 hist_mc_B0_pion_pt->Sumw2();
693 hist_mc_B0_pion_pt->SetLineColor(6);
694 hist_mc_B0_pion_pt->SetMarkerStyle(20);
695 hist_mc_B0_pion_pt->SetMarkerSize(0.6);
696 hist_mc_B0_pion_pt->SetMarkerColor(6);
697 TH1F* histogram_mc_B0_pion_pt = (TH1F*)hist_mc_B0_pion_pt->Clone();
700 TString name_mc_DStar_pt =
"mc_DStar_pt";
701 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);
702 hist_mc_DStar_pt->Sumw2();
703 hist_mc_DStar_pt->SetLineColor(6);
704 hist_mc_DStar_pt->SetMarkerStyle(20);
705 hist_mc_DStar_pt->SetMarkerSize(0.6);
706 hist_mc_DStar_pt->SetMarkerColor(6);
707 TH1F* histogram_mc_DStar_pt = (TH1F*)hist_mc_DStar_pt->Clone();
710 TString name_mc_DStar_pion_pt =
"mc_DStar_pion_pt";
711 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);
712 hist_mc_DStar_pion_pt->Sumw2();
713 hist_mc_DStar_pion_pt->SetLineColor(6);
714 hist_mc_DStar_pion_pt->SetMarkerStyle(20);
715 hist_mc_DStar_pion_pt->SetMarkerSize(0.6);
716 hist_mc_DStar_pion_pt->SetMarkerColor(6);
717 TH1F* histogram_mc_DStar_pion_pt = (TH1F*)hist_mc_DStar_pion_pt->Clone();
720 TString name_mc_D0_pt =
"mc_D0_pt";
721 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);
722 hist_mc_D0_pt->Sumw2();
723 hist_mc_D0_pt->SetLineColor(6);
724 hist_mc_D0_pt->SetMarkerStyle(20);
725 hist_mc_D0_pt->SetMarkerSize(0.6);
726 hist_mc_D0_pt->SetMarkerColor(6);
727 TH1F* histogram_mc_D0_pt = (TH1F*)hist_mc_D0_pt->Clone();
730 TString name_mc_D0_pion_pt =
"mc_D0_pion_pt";
731 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);
732 hist_mc_D0_pion_pt->Sumw2();
733 hist_mc_D0_pion_pt->SetLineColor(6);
734 hist_mc_D0_pion_pt->SetMarkerStyle(20);
735 hist_mc_D0_pion_pt->SetMarkerSize(0.6);
736 hist_mc_D0_pion_pt->SetMarkerColor(6);
737 TH1F* histogram_mc_D0_pion_pt = (TH1F*)hist_mc_D0_pion_pt->Clone();
740 TString name_mc_D0_kaon_pt =
"mc_D0_kaon_pt";
741 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);
742 hist_mc_D0_kaon_pt->Sumw2();
743 hist_mc_D0_kaon_pt->SetLineColor(6);
744 hist_mc_D0_kaon_pt->SetMarkerStyle(20);
745 hist_mc_D0_kaon_pt->SetMarkerSize(0.6);
746 hist_mc_D0_kaon_pt->SetMarkerColor(6);
747 TH1F* histogram_mc_D0_kaon_pt = (TH1F*)hist_mc_D0_kaon_pt->Clone();
750 TString name_mc_B0_rapidity_true =
"mc_B0_rapidity_true";
751 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);
752 hist_mc_B0_rapidity_true->Sumw2();
753 hist_mc_B0_rapidity_true->SetLineColor(6);
754 hist_mc_B0_rapidity_true->SetMarkerStyle(20);
755 hist_mc_B0_rapidity_true->SetMarkerSize(0.6);
756 hist_mc_B0_rapidity_true->SetMarkerColor(6);
757 TH1F* histogram_mc_B0_rapidity_true = (TH1F*)hist_mc_B0_rapidity_true->Clone();
760 TString name_mc_B0_pion_rapidity_true =
"mc_B0_pion_rapidity_true";
761 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);
762 hist_mc_B0_pion_rapidity_true->Sumw2();
763 hist_mc_B0_pion_rapidity_true->SetLineColor(6);
764 hist_mc_B0_pion_rapidity_true->SetMarkerStyle(20);
765 hist_mc_B0_pion_rapidity_true->SetMarkerSize(0.6);
766 hist_mc_B0_pion_rapidity_true->SetMarkerColor(6);
767 TH1F* histogram_mc_B0_pion_rapidity_true = (TH1F*)hist_mc_B0_pion_rapidity_true->Clone();
768 fOutputB0MC->Add(histogram_mc_B0_pion_rapidity_true);
770 TString name_mc_DStar_rapidity_true =
"mc_DStar_rapidity_true";
771 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);
772 hist_mc_DStar_rapidity_true->Sumw2();
773 hist_mc_DStar_rapidity_true->SetLineColor(6);
774 hist_mc_DStar_rapidity_true->SetMarkerStyle(20);
775 hist_mc_DStar_rapidity_true->SetMarkerSize(0.6);
776 hist_mc_DStar_rapidity_true->SetMarkerColor(6);
777 TH1F* histogram_mc_DStar_rapidity_true = (TH1F*)hist_mc_DStar_rapidity_true->Clone();
778 fOutputB0MC->Add(histogram_mc_DStar_rapidity_true);
780 TString name_mc_DStar_pion_rapidity_true =
"mc_DStar_pion_rapidity_true";
781 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);
782 hist_mc_DStar_pion_rapidity_true->Sumw2();
783 hist_mc_DStar_pion_rapidity_true->SetLineColor(6);
784 hist_mc_DStar_pion_rapidity_true->SetMarkerStyle(20);
785 hist_mc_DStar_pion_rapidity_true->SetMarkerSize(0.6);
786 hist_mc_DStar_pion_rapidity_true->SetMarkerColor(6);
787 TH1F* histogram_mc_DStar_pion_rapidity_true = (TH1F*)hist_mc_DStar_pion_rapidity_true->Clone();
788 fOutputB0MC->Add(histogram_mc_DStar_pion_rapidity_true);
790 TString name_mc_D0_rapidity_true =
"mc_D0_rapidity_true";
791 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);
792 hist_mc_D0_rapidity_true->Sumw2();
793 hist_mc_D0_rapidity_true->SetLineColor(6);
794 hist_mc_D0_rapidity_true->SetMarkerStyle(20);
795 hist_mc_D0_rapidity_true->SetMarkerSize(0.6);
796 hist_mc_D0_rapidity_true->SetMarkerColor(6);
797 TH1F* histogram_mc_D0_rapidity_true = (TH1F*)hist_mc_D0_rapidity_true->Clone();
800 TString name_mc_D0_pion_rapidity_true =
"mc_D0_pion_rapidity_true";
801 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);
802 hist_mc_D0_pion_rapidity_true->Sumw2();
803 hist_mc_D0_pion_rapidity_true->SetLineColor(6);
804 hist_mc_D0_pion_rapidity_true->SetMarkerStyle(20);
805 hist_mc_D0_pion_rapidity_true->SetMarkerSize(0.6);
806 hist_mc_D0_pion_rapidity_true->SetMarkerColor(6);
807 TH1F* histogram_mc_D0_pion_rapidity_true = (TH1F*)hist_mc_D0_pion_rapidity_true->Clone();
808 fOutputB0MC->Add(histogram_mc_D0_pion_rapidity_true);
810 TString name_mc_D0_kaon_rapidity_true =
"mc_D0_kaon_rapidity_true";
811 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);
812 hist_mc_D0_kaon_rapidity_true->Sumw2();
813 hist_mc_D0_kaon_rapidity_true->SetLineColor(6);
814 hist_mc_D0_kaon_rapidity_true->SetMarkerStyle(20);
815 hist_mc_D0_kaon_rapidity_true->SetMarkerSize(0.6);
816 hist_mc_D0_kaon_rapidity_true->SetMarkerColor(6);
817 TH1F* histogram_mc_D0_kaon_rapidity_true = (TH1F*)hist_mc_D0_kaon_rapidity_true->Clone();
818 fOutputB0MC->Add(histogram_mc_D0_kaon_rapidity_true);
820 TString name_mc_B0_pseudorapidity_true =
"mc_B0_pseudorapidity_true";
821 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);
822 hist_mc_B0_pseudorapidity_true->Sumw2();
823 hist_mc_B0_pseudorapidity_true->SetLineColor(6);
824 hist_mc_B0_pseudorapidity_true->SetMarkerStyle(20);
825 hist_mc_B0_pseudorapidity_true->SetMarkerSize(0.6);
826 hist_mc_B0_pseudorapidity_true->SetMarkerColor(6);
827 TH1F* histogram_mc_B0_pseudorapidity_true = (TH1F*)hist_mc_B0_pseudorapidity_true->Clone();
828 fOutputB0MC->Add(histogram_mc_B0_pseudorapidity_true);
830 TString name_mc_B0_pion_pseudorapidity_true =
"mc_B0_pion_pseudorapidity_true";
831 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);
832 hist_mc_B0_pion_pseudorapidity_true->Sumw2();
833 hist_mc_B0_pion_pseudorapidity_true->SetLineColor(6);
834 hist_mc_B0_pion_pseudorapidity_true->SetMarkerStyle(20);
835 hist_mc_B0_pion_pseudorapidity_true->SetMarkerSize(0.6);
836 hist_mc_B0_pion_pseudorapidity_true->SetMarkerColor(6);
837 TH1F* histogram_mc_B0_pion_pseudorapidity_true = (TH1F*)hist_mc_B0_pion_pseudorapidity_true->Clone();
838 fOutputB0MC->Add(histogram_mc_B0_pion_pseudorapidity_true);
840 TString name_mc_DStar_pseudorapidity_true =
"mc_DStar_pseudorapidity_true";
841 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);
842 hist_mc_DStar_pseudorapidity_true->Sumw2();
843 hist_mc_DStar_pseudorapidity_true->SetLineColor(6);
844 hist_mc_DStar_pseudorapidity_true->SetMarkerStyle(20);
845 hist_mc_DStar_pseudorapidity_true->SetMarkerSize(0.6);
846 hist_mc_DStar_pseudorapidity_true->SetMarkerColor(6);
847 TH1F* histogram_mc_DStar_pseudorapidity_true = (TH1F*)hist_mc_DStar_pseudorapidity_true->Clone();
848 fOutputB0MC->Add(histogram_mc_DStar_pseudorapidity_true);
850 TString name_mc_DStar_pion_pseudorapidity_true =
"mc_DStar_pion_pseudorapidity_true";
851 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);
852 hist_mc_DStar_pion_pseudorapidity_true->Sumw2();
853 hist_mc_DStar_pion_pseudorapidity_true->SetLineColor(6);
854 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerStyle(20);
855 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerSize(0.6);
856 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerColor(6);
857 TH1F* histogram_mc_DStar_pion_pseudorapidity_true = (TH1F*)hist_mc_DStar_pion_pseudorapidity_true->Clone();
858 fOutputB0MC->Add(histogram_mc_DStar_pion_pseudorapidity_true);
860 TString name_mc_D0_pseudorapidity_true =
"mc_D0_pseudorapidity_true";
861 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);
862 hist_mc_D0_pseudorapidity_true->Sumw2();
863 hist_mc_D0_pseudorapidity_true->SetLineColor(6);
864 hist_mc_D0_pseudorapidity_true->SetMarkerStyle(20);
865 hist_mc_D0_pseudorapidity_true->SetMarkerSize(0.6);
866 hist_mc_D0_pseudorapidity_true->SetMarkerColor(6);
867 TH1F* histogram_mc_D0_pseudorapidity_true = (TH1F*)hist_mc_D0_pseudorapidity_true->Clone();
868 fOutputB0MC->Add(histogram_mc_D0_pseudorapidity_true);
870 TString name_mc_D0_pion_pseudorapidity_true =
"mc_D0_pion_pseudorapidity_true";
871 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);
872 hist_mc_D0_pion_pseudorapidity_true->Sumw2();
873 hist_mc_D0_pion_pseudorapidity_true->SetLineColor(6);
874 hist_mc_D0_pion_pseudorapidity_true->SetMarkerStyle(20);
875 hist_mc_D0_pion_pseudorapidity_true->SetMarkerSize(0.6);
876 hist_mc_D0_pion_pseudorapidity_true->SetMarkerColor(6);
877 TH1F* histogram_mc_D0_pion_pseudorapidity_true = (TH1F*)hist_mc_D0_pion_pseudorapidity_true->Clone();
878 fOutputB0MC->Add(histogram_mc_D0_pion_pseudorapidity_true);
880 TString name_mc_D0_kaon_pseudorapidity_true =
"mc_D0_kaon_pseudorapidity_true";
881 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);
882 hist_mc_D0_kaon_pseudorapidity_true->Sumw2();
883 hist_mc_D0_kaon_pseudorapidity_true->SetLineColor(6);
884 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerStyle(20);
885 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerSize(0.6);
886 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerColor(6);
887 TH1F* histogram_mc_D0_kaon_pseudorapidity_true = (TH1F*)hist_mc_D0_kaon_pseudorapidity_true->Clone();
888 fOutputB0MC->Add(histogram_mc_D0_kaon_pseudorapidity_true);
892 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
893 TH1F* hist_dca_D0_DStarPion =
new TH1F(name_dca_D0_DStarPion.Data(),
"dca_D0_DStarPion; DCA [cm]; Entries",1000,0,0.2);
894 hist_dca_D0_DStarPion->Sumw2();
895 hist_dca_D0_DStarPion->SetLineColor(6);
896 hist_dca_D0_DStarPion->SetMarkerStyle(20);
897 hist_dca_D0_DStarPion->SetMarkerSize(0.6);
898 hist_dca_D0_DStarPion->SetMarkerColor(6);
899 TH1F* histogram_dca_D0_DStarPion = (TH1F*)hist_dca_D0_DStarPion->Clone();
902 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
903 TH1F* hist_dca_D0_B0Pion =
new TH1F(name_dca_D0_B0Pion.Data(),
"dca_D0_B0Pion; DCA [cm]; Entries",1000,0,0.2);
904 hist_dca_D0_B0Pion->Sumw2();
905 hist_dca_D0_B0Pion->SetLineColor(6);
906 hist_dca_D0_B0Pion->SetMarkerStyle(20);
907 hist_dca_D0_B0Pion->SetMarkerSize(0.6);
908 hist_dca_D0_B0Pion->SetMarkerColor(6);
909 TH1F* histogram_dca_D0_B0Pion = (TH1F*)hist_dca_D0_B0Pion->Clone();
912 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
913 TH1F* hist_dca_DStarPion_B0Pion =
new TH1F(name_dca_DStarPion_B0Pion.Data(),
"dca_DStarPion_B0Pion; DCA [cm]; Entries",1000,0,0.2);
914 hist_dca_DStarPion_B0Pion->Sumw2();
915 hist_dca_DStarPion_B0Pion->SetLineColor(6);
916 hist_dca_DStarPion_B0Pion->SetMarkerStyle(20);
917 hist_dca_DStarPion_B0Pion->SetMarkerSize(0.6);
918 hist_dca_DStarPion_B0Pion->SetMarkerColor(6);
919 TH1F* histogram_dca_DStarPion_B0Pion = (TH1F*)hist_dca_DStarPion_B0Pion->Clone();
922 TString name_dca_Combined =
"dca_Combined";
923 TH1F* hist_dca_Combined =
new TH1F(name_dca_Combined.Data(),
"dca_Combined; DCA [cm]; Entries",1000,0,1.0);
924 hist_dca_Combined->Sumw2();
925 hist_dca_Combined->SetLineColor(6);
926 hist_dca_Combined->SetMarkerStyle(20);
927 hist_dca_Combined->SetMarkerSize(0.6);
928 hist_dca_Combined->SetMarkerColor(6);
929 TH1F* histogram_dca_Combined = (TH1F*)hist_dca_Combined->Clone();
932 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
933 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);
934 hist_dca_Signal_D0_DStarPion->Sumw2();
935 hist_dca_Signal_D0_DStarPion->SetLineColor(4);
936 hist_dca_Signal_D0_DStarPion->SetMarkerStyle(20);
937 hist_dca_Signal_D0_DStarPion->SetMarkerSize(0.6);
938 hist_dca_Signal_D0_DStarPion->SetMarkerColor(4);
939 TH1F* histogram_dca_Signal_D0_DStarPion = (TH1F*)hist_dca_Signal_D0_DStarPion->Clone();
940 fOutputB0MC->Add(histogram_dca_Signal_D0_DStarPion);
942 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
943 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);
944 hist_dca_Signal_D0_B0Pion->Sumw2();
945 hist_dca_Signal_D0_B0Pion->SetLineColor(4);
946 hist_dca_Signal_D0_B0Pion->SetMarkerStyle(20);
947 hist_dca_Signal_D0_B0Pion->SetMarkerSize(0.6);
948 hist_dca_Signal_D0_B0Pion->SetMarkerColor(4);
949 TH1F* histogram_dca_Signal_D0_B0Pion = (TH1F*)hist_dca_Signal_D0_B0Pion->Clone();
952 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
953 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);
954 hist_dca_Signal_DStarPion_B0Pion->Sumw2();
955 hist_dca_Signal_DStarPion_B0Pion->SetLineColor(4);
956 hist_dca_Signal_DStarPion_B0Pion->SetMarkerStyle(20);
957 hist_dca_Signal_DStarPion_B0Pion->SetMarkerSize(0.6);
958 hist_dca_Signal_DStarPion_B0Pion->SetMarkerColor(4);
959 TH1F* histogram_dca_Signal_DStarPion_B0Pion = (TH1F*)hist_dca_Signal_DStarPion_B0Pion->Clone();
960 fOutputB0MC->Add(histogram_dca_Signal_DStarPion_B0Pion);
962 TString name_dca_Signal_Combined =
"dca_Signal_Combined";
963 TH1F* hist_dca_Signal_Combined =
new TH1F(name_dca_Signal_Combined.Data(),
"dca_Signal_Combined; DCA [cm]; Entries",1000,0,1.0);
964 hist_dca_Signal_Combined->Sumw2();
965 hist_dca_Signal_Combined->SetLineColor(4);
966 hist_dca_Signal_Combined->SetMarkerStyle(20);
967 hist_dca_Signal_Combined->SetMarkerSize(0.6);
968 hist_dca_Signal_Combined->SetMarkerColor(4);
969 TH1F* histogram_dca_Signal_Combined = (TH1F*)hist_dca_Signal_Combined->Clone();
974 TString name_B0s_in_analysis =
"B0s_in_analysis";
975 TH1F* hist_B0s_in_analysis =
new TH1F(name_B0s_in_analysis.Data(),
"Number of B0 to kpipipi in the Analysis; Entries",10,0,10);
976 hist_B0s_in_analysis->Sumw2();
977 hist_B0s_in_analysis->SetLineColor(6);
978 hist_B0s_in_analysis->SetMarkerStyle(20);
979 hist_B0s_in_analysis->SetMarkerSize(0.6);
980 hist_B0s_in_analysis->SetMarkerColor(6);
981 hist_B0s_in_analysis->SetStats(kTRUE);
982 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(1,
"no. of B0s");
983 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(2,
"no. of B0s to kpipipi");
984 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(3,
"no. with all tracks in event");
985 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(4,
"no. ...");
986 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(5,
"no. ...");
987 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(6,
"no. ...");
988 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(7,
"no. ...");
989 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(8,
"no. ...");
990 TH1F* hist_B0s_in_analysis_mc = (TH1F*)hist_B0s_in_analysis->Clone();
993 TString name_B0s_per_bin =
"B0s_per_bin";
994 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);
1001 hist_B0s_per_bin->GetXaxis()->SetBinLabel(i+1,bin_name);
1003 TH1F* hist_B0s_per_bin_mc = (TH1F*)hist_B0s_per_bin->Clone();
1006 TString name_B0s_per_bin_in_Acc =
"B0s_per_bin_in_Acc";
1007 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);
1014 hist_B0s_per_bin_in_Acc->GetXaxis()->SetBinLabel(i+1,bin_name);
1016 TH1F* hist_B0s_per_bin_in_Acc_mc = (TH1F*)hist_B0s_per_bin_in_Acc->Clone();
1022 for (
Int_t i = 0; i < 4; i++){
1031 for (
Int_t j = 0; j < 6; j++){
1032 if(j==0) add_name =
"";
1033 if(j==1) add_name =
"Signal";
1034 if(j==2) add_name =
"Cut";
1035 if(j==3) add_name =
"SignalCut";
1036 if(j==4) add_name =
"Result";
1037 if(j==5) add_name =
"SignalResult";
1040 TString discription_Histogram =
"";
1041 Int_t numberOfBins = 0;
1045 for (
Int_t k = 0; k < 9; ++k)
1047 if(k==0){name_Histogram =
"ptTrack"; discription_Histogram =
"pt track; p_{T} [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
1048 if(k==1){name_Histogram =
"momentumTrack"; discription_Histogram =
"momentum track; p [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
1049 if(k==2){name_Histogram =
"numberOfITS"; discription_Histogram =
"Number of ITS clusters track; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
1050 if(k==3){name_Histogram =
"numberOfTPC"; discription_Histogram =
"Number of TPC clusters track; [#]; Entries"; numberOfBins = 601; lowerBound = -0.5; upperBound = 600.5;}
1051 if(k==4){name_Histogram =
"pointsOnITS"; discription_Histogram =
"Number of ITS clusters track per layer; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
1052 if(k==5){name_Histogram =
"nSigmaTPC"; discription_Histogram =
"n sigma TPC for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1053 if(k==6){name_Histogram =
"nSigmaTOF"; discription_Histogram =
"n sigma TOF for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1054 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;}
1055 if(k==8){name_Histogram =
"impactParameter"; discription_Histogram =
"Impact Parameter track; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1057 name_Histogram += add_name;
1058 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1060 if(j%2==0) histogram->SetLineColor(6);
1061 if(j%2==1) histogram->SetLineColor(4);
1062 histogram->SetMarkerStyle(20);
1063 histogram->SetMarkerSize(0.6);
1064 if(j%2==0) histogram->SetMarkerColor(6);
1065 if(j%2==1) histogram->SetMarkerColor(4);
1066 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1067 listout->Add(histogram_Clone);
1071 TString numberofparticlesperevent=
"numberofparticlesperevent";
1072 numberofparticlesperevent += add_name;
1073 TH1F* hist_numberofparticlesperevent =
new TH1F(numberofparticlesperevent.Data(),
"Number of particles per event; number of particles in one event; Entries",100,0,100);
1074 hist_numberofparticlesperevent->Sumw2();
1075 hist_numberofparticlesperevent->SetLineColor(6);
1076 hist_numberofparticlesperevent->SetMarkerStyle(20);
1077 hist_numberofparticlesperevent->SetMarkerSize(0.6);
1078 hist_numberofparticlesperevent->SetMarkerColor(6);
1079 TH1F* histogram_numberofparticlesperevent = (TH1F*)hist_numberofparticlesperevent->Clone();
1080 listout->Add(histogram_numberofparticlesperevent);
1084 TH1F * effectOfCuts =
new TH1F(
"effectOfCutsOnBackground",
"Removal counter",18,0,18);
1085 effectOfCuts->SetStats(kTRUE);
1086 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1087 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1088 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1089 effectOfCuts->GetXaxis()->SetBinLabel(2,
"1");
1090 effectOfCuts->GetXaxis()->SetBinLabel(3,
"2");
1091 effectOfCuts->GetXaxis()->SetBinLabel(4,
"3");
1092 effectOfCuts->GetXaxis()->SetBinLabel(5,
"4");
1093 effectOfCuts->GetXaxis()->SetBinLabel(6,
"5");
1094 effectOfCuts->GetXaxis()->SetBinLabel(7,
"6");
1095 effectOfCuts->GetXaxis()->SetBinLabel(8,
"7");
1096 effectOfCuts->GetXaxis()->SetBinLabel(9,
"8");
1097 effectOfCuts->GetXaxis()->SetBinLabel(10,
"9");
1098 effectOfCuts->GetXaxis()->SetBinLabel(11,
"10");
1099 effectOfCuts->GetXaxis()->SetBinLabel(12,
"11");
1100 effectOfCuts->GetXaxis()->SetBinLabel(13,
"12");
1101 effectOfCuts->GetXaxis()->SetBinLabel(14,
"13");
1102 effectOfCuts->GetXaxis()->SetBinLabel(15,
"14");
1103 effectOfCuts->GetXaxis()->SetBinLabel(16,
"15");
1104 effectOfCuts->GetXaxis()->SetBinLabel(17,
"16");
1105 effectOfCuts->GetXaxis()->SetBinLabel(18,
"17");
1106 listout->Add(effectOfCuts);
1109 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsOnSignal",
"Removal counter",18,0,18);
1110 effectOfCutsMC->SetStats(kTRUE);
1111 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1112 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1113 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1114 effectOfCutsMC->GetXaxis()->SetBinLabel(2,
"1");
1115 effectOfCutsMC->GetXaxis()->SetBinLabel(3,
"2");
1116 effectOfCutsMC->GetXaxis()->SetBinLabel(4,
"3");
1117 effectOfCutsMC->GetXaxis()->SetBinLabel(5,
"4");
1118 effectOfCutsMC->GetXaxis()->SetBinLabel(6,
"5");
1119 effectOfCutsMC->GetXaxis()->SetBinLabel(7,
"6");
1120 effectOfCutsMC->GetXaxis()->SetBinLabel(8,
"7");
1121 effectOfCutsMC->GetXaxis()->SetBinLabel(9,
"8");
1122 effectOfCutsMC->GetXaxis()->SetBinLabel(10,
"9");
1123 effectOfCutsMC->GetXaxis()->SetBinLabel(11,
"10");
1124 effectOfCutsMC->GetXaxis()->SetBinLabel(12,
"11");
1125 effectOfCutsMC->GetXaxis()->SetBinLabel(13,
"12");
1126 effectOfCutsMC->GetXaxis()->SetBinLabel(14,
"13");
1127 effectOfCutsMC->GetXaxis()->SetBinLabel(15,
"14");
1128 effectOfCutsMC->GetXaxis()->SetBinLabel(16,
"15");
1129 effectOfCutsMC->GetXaxis()->SetBinLabel(17,
"16");
1130 effectOfCutsMC->GetXaxis()->SetBinLabel(18,
"17");
1131 listout->Add(effectOfCutsMC);
1134 TString name_particle_pdg =
"particle_pdg";
1135 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1136 hist_particle_pdg->Sumw2();
1137 hist_particle_pdg->SetLineColor(6);
1138 hist_particle_pdg->SetMarkerStyle(20);
1139 hist_particle_pdg->SetMarkerSize(0.6);
1140 hist_particle_pdg->SetMarkerColor(6);
1141 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1142 listout->Add(histogram_particle_pdg);
1145 TString name_particle_mother_pdg =
"particle_mother_pdg";
1146 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1147 hist_particle_mother_pdg->Sumw2();
1148 hist_particle_mother_pdg->SetLineColor(6);
1149 hist_particle_mother_pdg->SetMarkerStyle(20);
1150 hist_particle_mother_pdg->SetMarkerSize(0.6);
1151 hist_particle_mother_pdg->SetMarkerColor(6);
1152 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1153 listout->Add(histogram_particle_mother_pdg);
1156 TString name_ptB0_vs_ptTrack =
"ptB0_vs_ptTrackBackground";
1157 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);
1158 hist_ptB0_vs_ptTrack->Sumw2();
1159 hist_ptB0_vs_ptTrack->SetLineColor(6);
1160 hist_ptB0_vs_ptTrack->SetMarkerStyle(20);
1161 hist_ptB0_vs_ptTrack->SetMarkerSize(0.6);
1162 hist_ptB0_vs_ptTrack->SetMarkerColor(6);
1163 TH2F* histogram_ptB0_vs_ptTrack = (
TH2F*)hist_ptB0_vs_ptTrack->Clone();
1164 listout->Add(histogram_ptB0_vs_ptTrack);
1167 TString name_ptB0_vs_ptTrackMC =
"ptB0_vs_ptTrackSignal";
1168 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);
1169 hist_ptB0_vs_ptTrackMC->Sumw2();
1170 hist_ptB0_vs_ptTrackMC->SetLineColor(4);
1171 hist_ptB0_vs_ptTrackMC->SetMarkerStyle(20);
1172 hist_ptB0_vs_ptTrackMC->SetMarkerSize(0.6);
1173 hist_ptB0_vs_ptTrackMC->SetMarkerColor(6);
1174 TH2F* histogram_ptB0_vs_ptTrackMC = (
TH2F*)hist_ptB0_vs_ptTrackMC->Clone();
1175 listout->Add(histogram_ptB0_vs_ptTrackMC);
1180 for (
Int_t i = 0; i < 6; i++){
1184 Int_t nHistogramSets = 0;
1192 for (
Int_t j = 0; j < nHistogramSets; j++){
1195 if(j==0) add_name =
"";
1196 if(j==1) add_name =
"Signal";
1197 if(j==2) add_name =
"Cut";
1198 if(j==3) add_name =
"SignalCut";
1199 if(j==4) add_name =
"Result";
1200 if(j==5) add_name =
"SignalResult";
1201 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];}
1202 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];}
1222 TString discription_Histogram =
"";
1223 Int_t numberOfBins = 0;
1226 Int_t numberOfBinsTwo = 0;
1230 for (
Int_t k = 0; k < 43; ++k)
1232 if(k==0){name_Histogram =
"ptMother"; discription_Histogram =
"pt mother; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1233 if(k==1){name_Histogram =
"ptFirstDaughter"; discription_Histogram =
"pt first daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1234 if(k==2){name_Histogram =
"ptSecondDaughter"; discription_Histogram =
"pt second daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1235 if(k==3){name_Histogram =
"etaMother"; discription_Histogram =
"eta mother; #eta; Entries"; numberOfBins = 100; lowerBound = -2; upperBound = 2;}
1236 if(k==4){name_Histogram =
"phiMother"; discription_Histogram =
"phi mother; #phi; Entries"; numberOfBins = 25; lowerBound = 0; upperBound = 2*TMath::Pi();}
1237 if(k==5){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1238 if(k==6){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1240 if(k==7){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1242 if(k==8){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle; [Cos(#theta)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1243 if(k==9){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product; [cm^{2}]; Entries"; numberOfBins = 500; lowerBound = -0.01; upperBound = 0.01;}
1244 if(k==10){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY; [cm^{2}]; Entries"; numberOfBins = 400; lowerBound = 0; upperBound = 0.1;}
1245 if(k==11){name_Histogram =
"invariantMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 20000; lowerBound = 0; upperBound = 10;}
1246 if(k==12){name_Histogram =
"deltaMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1247 if(k==13){name_Histogram =
"dcaMother"; discription_Histogram =
"dca mother; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 0.25;}
1248 if(k==14){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1249 if(k==15){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1250 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;}
1251 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;}
1252 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;}
1253 if(k==19){name_Histogram =
"angleMotherFirstDaughter"; discription_Histogram =
"flight angle mother and first daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1254 if(k==20){name_Histogram =
"angleMotherSecondDaughter"; discription_Histogram =
"flight angle mother and second daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = 0.5; upperBound = 1;}
1255 if(k==21){name_Histogram =
"angleBetweenBothDaughters"; discription_Histogram =
"angle between both daughters; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1256 if(k==22){name_Histogram =
"cosThetaStar"; discription_Histogram =
"cosThetaStar; [Cos(#theta*)]; Entries"; numberOfBins = 200; lowerBound = -2; upperBound = 2;}
1257 if(k==23){name_Histogram =
"vertexX"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 200; lowerBound = -5; upperBound = 5;}
1258 if(k==24){name_Histogram =
"vertexY"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 200; lowerBound = -5; upperBound = 5;}
1259 if(k==25){name_Histogram =
"vertexZ"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 200; lowerBound = -20; upperBound = 20;}
1262 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;}
1264 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;}
1266 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;}
1268 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;}
1270 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;}
1272 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;}
1274 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;}
1276 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;}
1278 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;}
1280 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;}
1283 if(k==36){name_Histogram =
"topomaticFirstDaughter"; discription_Histogram =
"topomatic d0 first daughter; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1284 if(k==37){name_Histogram =
"topomaticSecondDaughter"; discription_Histogram =
"topomatic d0 second daughter; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1285 if(k==38){name_Histogram =
"topomaticMax"; discription_Histogram =
"Max topomatic; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1286 if(k==39){name_Histogram =
"topomaticMin"; discription_Histogram =
"Min topomatic; [cm]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 20;}
1287 if(k==40){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY; [Cos(#theta)]; Entries"; numberOfBins = 1000; lowerBound = -1; upperBound = 1;}
1288 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;}
1289 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;}
1292 name_Histogram += add_name;
1293 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1295 if(j%2==0) histogram->SetLineColor(6);
1296 if(j%2==1) histogram->SetLineColor(4);
1297 histogram->SetMarkerStyle(20);
1298 histogram->SetMarkerSize(0.6);
1299 if(j%2==0) histogram->SetMarkerColor(6);
1300 if(j%2==1) histogram->SetMarkerColor(4);
1301 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1302 listout->Add(histogram_Clone);
1307 name_Histogram =
"";
1308 discription_Histogram =
"";
1312 numberOfBinsTwo = 0;
1313 lowerBoundTwo = 0.0;
1314 upperBoundTwo = 0.0;
1319 Int_t nVariables = 10;
1320 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
1324 TString name2D =
"2D_Histograms";
1326 list2D->SetName(name2D.Data());
1327 listout->Add(list2D);
1329 for (
Int_t k = 0; k < nHistograms; ++k)
1331 numberOfBins = 50; numberOfBinsTwo = 50;
1332 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1333 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1334 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1335 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1336 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1337 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1338 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1339 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1340 if(nFirst==8){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1341 if(nFirst==9){name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY [cm];"; lowerBound = 0; upperBound = 1;}
1342 if(nFirst==10){name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBound = 0; upperBound = 50;}
1344 if(nSecond==0){name_Histogram +=
"d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1345 if(nSecond==1){name_Histogram +=
"d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1346 if(nSecond==2){name_Histogram +=
"d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1347 if(nSecond==3){name_Histogram +=
"pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1348 if(nSecond==4){name_Histogram +=
"impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1349 if(nSecond==5){name_Histogram +=
"impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1350 if(nSecond==6){name_Histogram +=
"vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1351 if(nSecond==7){name_Histogram +=
"normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1352 if(nSecond==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1353 if(nSecond==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1354 if(nSecond==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1356 name_Histogram += add_name;
1357 TH2F* histogram =
new TH2F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo);
1359 if(j%2==0) histogram->SetLineColor(6);
1360 if(j%2==1) histogram->SetLineColor(4);
1361 histogram->SetMarkerStyle(20);
1362 histogram->SetMarkerSize(0.6);
1363 histogram->SetMarkerColor(6);
1364 TH2F* histogram_Clone = (
TH2F*)histogram->Clone();
1365 list2D->Add(histogram_Clone);
1369 if(nSecond>nVariables)
1372 nSecond = nFirst + 1;
1378 name_Histogram =
"";
1379 discription_Histogram =
"";
1383 numberOfBinsTwo = 0;
1384 lowerBoundTwo = 0.0;
1385 upperBoundTwo = 0.0;
1386 Int_t numberOfBinsThree = 0;
1387 Int_t lowerBoundThree = 0.0;
1388 Int_t upperBoundThree = 0.0;
1395 nHistograms = nVariables * (nVariables - 1) * (nVariables - 2) / 6;
1399 TString name3D =
"3D_Histograms";
1401 list3D->SetName(name2D.Data());
1402 listout->Add(list3D);
1404 for (
Int_t k = 0; k < nHistograms; ++k)
1406 numberOfBins = 50; numberOfBinsTwo = 50;
1407 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1408 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1409 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1410 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1411 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1412 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1413 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1414 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1415 if(nFirst==8){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1416 if(nFirst==9){name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY [cm];"; lowerBound = 0; upperBound = 1;}
1417 if(nFirst==10){name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBound = 0; upperBound = 50;}
1419 if(nSecond==0){name_Histogram +=
"_d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1420 if(nSecond==1){name_Histogram +=
"_d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1421 if(nSecond==2){name_Histogram +=
"_d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1422 if(nSecond==3){name_Histogram +=
"_pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1423 if(nSecond==4){name_Histogram +=
"_impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1424 if(nSecond==5){name_Histogram +=
"_impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1425 if(nSecond==6){name_Histogram +=
"_vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1426 if(nSecond==7){name_Histogram +=
"_normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1427 if(nSecond==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1428 if(nSecond==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1429 if(nSecond==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1431 if(nThird==0){name_Histogram +=
"_d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1432 if(nThird==1){name_Histogram +=
"_d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1433 if(nThird==2){name_Histogram +=
"_d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1434 if(nThird==3){name_Histogram +=
"_pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundThree = -1; upperBoundThree = 1;}
1435 if(nThird==4){name_Histogram +=
"_impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundThree = -0.01; upperBoundThree = 0.01;}
1436 if(nThird==5){name_Histogram +=
"_impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundThree = 0; upperBoundThree = 0.5;}
1437 if(nThird==6){name_Histogram +=
"_vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1438 if(nThird==7){name_Histogram +=
"_normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundThree = 0; upperBoundThree = 50;}
1439 if(nThird==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundThree = -1; upperBoundThree = 1;}
1440 if(nThird==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1441 if(nThird==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundThree = 0; upperBoundThree = 50;}
1444 name_Histogram += add_name;
1445 TH3F* histogram3D =
new TH3F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo,numberOfBinsThree,lowerBoundThree,upperBoundThree);
1446 histogram3D->Sumw2();
1447 if(j%2==0) histogram3D->SetLineColor(6);
1448 if(j%2==1) histogram3D->SetLineColor(4);
1449 histogram3D->SetMarkerStyle(20);
1450 histogram3D->SetMarkerSize(0.6);
1451 histogram3D->SetMarkerColor(6);
1452 TH3F* histogram_Clone3D = (
TH3F*)histogram3D->Clone();
1453 list3D->Add(histogram_Clone3D);
1458 if(nThird>nVariables)
1461 nThird = nSecond + 1;
1462 if(nSecond>nVariables)
1465 nSecond = nFirst + 1;
1466 nThird = nFirst + 2;
1474 TH1F * effectOfCuts =
new TH1F(
"effectOfCuts",
"Removal counter",100,0,100);
1475 effectOfCuts->SetStats(kTRUE);
1476 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1477 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1478 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1479 for (
Int_t i = 1; i < 100; ++i)
1483 effectOfCuts->GetXaxis()->SetBinLabel(i+1,integerText);
1485 listout->Add(effectOfCuts);
1488 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsMC",
"Removal counter",100,0,100);
1489 effectOfCutsMC->SetStats(kTRUE);
1490 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1491 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1492 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1493 for (
Int_t i = 1; i < 100; ++i)
1497 effectOfCutsMC->GetXaxis()->SetBinLabel(i+1,integerText);
1499 listout->Add(effectOfCutsMC);
1502 TString name_particle_pdg =
"particle_pdg";
1503 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1504 hist_particle_pdg->Sumw2();
1505 hist_particle_pdg->SetLineColor(6);
1506 hist_particle_pdg->SetMarkerStyle(20);
1507 hist_particle_pdg->SetMarkerSize(0.6);
1508 hist_particle_pdg->SetMarkerColor(6);
1509 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1510 listout->Add(histogram_particle_pdg);
1513 TString name_particle_mother_pdg =
"particle_mother_pdg";
1514 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1515 hist_particle_mother_pdg->Sumw2();
1516 hist_particle_mother_pdg->SetLineColor(6);
1517 hist_particle_mother_pdg->SetMarkerStyle(20);
1518 hist_particle_mother_pdg->SetMarkerSize(0.6);
1519 hist_particle_mother_pdg->SetMarkerColor(6);
1520 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1521 listout->Add(histogram_particle_mother_pdg);
1524 TString name_distance_vertex_from_real =
"distance_vertex_from_real";
1525 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);
1526 hist_distance_vertex_from_real->Sumw2();
1527 hist_distance_vertex_from_real->SetLineColor(6);
1528 hist_distance_vertex_from_real->SetMarkerStyle(20);
1529 hist_distance_vertex_from_real->SetMarkerSize(0.6);
1530 hist_distance_vertex_from_real->SetMarkerColor(6);
1531 TH1F* histogram_distance_vertex_from_real = (TH1F*)hist_distance_vertex_from_real->Clone();
1532 listout->Add(histogram_distance_vertex_from_real);
1535 TString name_distance_vertex_from_real_new =
"distance_vertex_from_real_new";
1536 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);
1537 hist_distance_vertex_from_real_new->Sumw2();
1538 hist_distance_vertex_from_real_new->SetLineColor(6);
1539 hist_distance_vertex_from_real_new->SetMarkerStyle(20);
1540 hist_distance_vertex_from_real_new->SetMarkerSize(0.6);
1541 hist_distance_vertex_from_real_new->SetMarkerColor(6);
1542 TH1F* histogram_distance_vertex_from_real_new = (TH1F*)hist_distance_vertex_from_real_new->Clone();
1543 listout->Add(histogram_distance_vertex_from_real_new);
1546 TString name_momentum_resolution =
"momentum_resolution";
1547 TH1F* hist_momentum_resolution =
new TH1F(name_momentum_resolution.Data(),
"Momentum resolution; difference between real and reconstructed momentum [GeV/c]; Entries",1000,0,1);
1548 hist_momentum_resolution->Sumw2();
1549 hist_momentum_resolution->SetLineColor(6);
1550 hist_momentum_resolution->SetMarkerStyle(20);
1551 hist_momentum_resolution->SetMarkerSize(0.6);
1552 hist_momentum_resolution->SetMarkerColor(6);
1553 TH1F* histogram_momentum_resolution = (TH1F*)hist_momentum_resolution->Clone();
1554 listout->Add(histogram_momentum_resolution);
1559 for (
Int_t k = 0; k < fnPtBins+3; ++k){
1561 if(k==0) ptBinMother =
"";
1562 if(k==1) ptBinMother =
"_ptbin_6_to_inf";
1563 if(k==2) ptBinMother =
"_ptbin_3_to_inf";
1564 if(k>2) {ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[k-3]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[k-2];}
1566 for (
Int_t i = 0; i < 8; ++i){
1568 if(i==0) signName =
"";
1569 if(i==1) signName =
"_SameSign";
1570 if(i==2) signName =
"_SignSum";
1571 if(i==3) signName =
"_HIJING_Background";
1572 if(i==4) signName =
"_HIJING_Signal";
1573 if(i==5) signName =
"_Background_rotation";
1574 if(i==6) signName =
"_HIJING_Background_rotation";
1575 if(i==7) signName =
"_correlated511";
1576 TString name_invariantMassMother =
"invariantMassB0";
1577 name_invariantMassMother += ptBinMother + signName;
1578 TH1F* hist_invariantMassMother =
new TH1F(name_invariantMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1579 hist_invariantMassMother->Sumw2();
1580 hist_invariantMassMother->SetLineColor(6);
1581 hist_invariantMassMother->SetMarkerStyle(20);
1582 hist_invariantMassMother->SetMarkerSize(0.6);
1583 hist_invariantMassMother->SetMarkerColor(6);
1584 TH1F* histogram_invariantMassMother = (TH1F*)hist_invariantMassMother->Clone();
1587 TString name_deltainvariantMassMother =
"deltainvariantMassB0";
1588 name_deltainvariantMassMother += ptBinMother + signName;
1589 TH1F* hist_deltainvariantMassMother =
new TH1F(name_deltainvariantMassMother.Data(),
"delta mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1590 hist_deltainvariantMassMother->Sumw2();
1591 hist_deltainvariantMassMother->SetLineColor(6);
1592 hist_deltainvariantMassMother->SetMarkerStyle(20);
1593 hist_deltainvariantMassMother->SetMarkerSize(0.6);
1594 hist_deltainvariantMassMother->SetMarkerColor(6);
1595 TH1F* histogram_deltainvariantMassMother = (TH1F*)hist_deltainvariantMassMother->Clone();
1596 fOutputB0MC->Add(histogram_deltainvariantMassMother);
1641 TString name_cutEffectBackground =
"cutEffectBackground";
1642 TH2I* hist_cutEffectBackground =
new TH2I(name_cutEffectBackground.Data(),
"Effect of Cuts on background; cut number; cut number",99,0,99,99,0,99);
1643 for (
int i = 0; i < 99; ++i)
1647 hist_cutEffectBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1648 hist_cutEffectBackground->GetYaxis()->SetBinLabel(i+1,integerText);
1650 TH2I* histogram_cutEffectBackground = (TH2I*)hist_cutEffectBackground->Clone();
1653 TString name_cutEffectSignal =
"cutEffectSignal";
1654 TH2I* hist_cutEffectSignal =
new TH2I(name_cutEffectSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99,99,0,99);
1655 for (
Int_t i = 0; i < 99; ++i)
1659 hist_cutEffectSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1660 hist_cutEffectSignal->GetYaxis()->SetBinLabel(i+1,integerText);
1662 TH2I* histogram_cutEffectSignal = (TH2I*)hist_cutEffectSignal->Clone();
1665 TString name_cutEffectUniqueBackground =
"cutEffectUniqueBackground";
1666 TH1I* hist_cutEffectUniqueBackground =
new TH1I(name_cutEffectUniqueBackground.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1667 for (
Int_t i = 0; i < 99; ++i)
1671 hist_cutEffectUniqueBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1673 TH1I* histogram_cutEffectUniqueBackground = (
TH1I*)hist_cutEffectUniqueBackground->Clone();
1674 fOutputB0MC->Add(histogram_cutEffectUniqueBackground);
1676 TString name_cutEffectUniqueSignal =
"cutEffectUniqueSignal";
1677 TH1I* hist_cutEffectUniqueSignal =
new TH1I(name_cutEffectUniqueSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1678 for (
Int_t i = 0; i < 99; ++i)
1682 hist_cutEffectUniqueSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1684 TH1I* histogram_cutEffectUniqueSignal = (
TH1I*)hist_cutEffectUniqueSignal->Clone();
1685 fOutputB0MC->Add(histogram_cutEffectUniqueSignal);
1687 TString name_totalITSBackground =
"totalITSBackground";
1688 TH1F* hist_totalITSBackground =
new TH1F(name_totalITSBackground.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1689 hist_totalITSBackground->Sumw2();
1690 hist_totalITSBackground->SetLineColor(6);
1691 hist_totalITSBackground->SetMarkerStyle(20);
1692 hist_totalITSBackground->SetMarkerSize(0.6);
1693 hist_totalITSBackground->SetMarkerColor(6);
1694 TH1F* histogram_totalITSBackground = (TH1F*)hist_totalITSBackground->Clone();
1697 TString name_totalITSSignal =
"totalITSSignal";
1698 TH1F* hist_totalITSSignal =
new TH1F(name_totalITSSignal.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1699 hist_totalITSSignal->Sumw2();
1700 hist_totalITSSignal->SetLineColor(6);
1701 hist_totalITSSignal->SetMarkerStyle(20);
1702 hist_totalITSSignal->SetMarkerSize(0.6);
1703 hist_totalITSSignal->SetMarkerColor(6);
1704 TH1F* histogram_totalITSSignal = (TH1F*)hist_totalITSSignal->Clone();
1707 TString name_totalTPCBackground =
"totalTPCBackground";
1708 TH1F* hist_totalTPCBackground =
new TH1F(name_totalTPCBackground.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1709 hist_totalTPCBackground->Sumw2();
1710 hist_totalTPCBackground->SetLineColor(6);
1711 hist_totalTPCBackground->SetMarkerStyle(20);
1712 hist_totalTPCBackground->SetMarkerSize(0.6);
1713 hist_totalTPCBackground->SetMarkerColor(6);
1714 TH1F* histogram_totalTPCBackground = (TH1F*)hist_totalTPCBackground->Clone();
1717 TString name_totalTPCSignal =
"totalTPCSignal";
1718 TH1F* hist_totalTPCSignal =
new TH1F(name_totalTPCSignal.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1719 hist_totalTPCSignal->Sumw2();
1720 hist_totalTPCSignal->SetLineColor(6);
1721 hist_totalTPCSignal->SetMarkerStyle(20);
1722 hist_totalTPCSignal->SetMarkerSize(0.6);
1723 hist_totalTPCSignal->SetMarkerColor(6);
1724 TH1F* histogram_totalTPCSignal = (TH1F*)hist_totalTPCSignal->Clone();
1727 TString name_totalSigmaPIDBackground =
"totalSigmaPIDBackground";
1728 TH1F* hist_totalSigmaPIDBackground =
new TH1F(name_totalSigmaPIDBackground.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1729 hist_totalSigmaPIDBackground->Sumw2();
1730 hist_totalSigmaPIDBackground->SetLineColor(6);
1731 hist_totalSigmaPIDBackground->SetMarkerStyle(20);
1732 hist_totalSigmaPIDBackground->SetMarkerSize(0.6);
1733 hist_totalSigmaPIDBackground->SetMarkerColor(6);
1734 TH1F* histogram_totalSigmaPIDBackground = (TH1F*)hist_totalSigmaPIDBackground->Clone();
1735 fOutputB0MC->Add(histogram_totalSigmaPIDBackground);
1737 TString name_totalSigmaPIDSignal =
"totalSigmaPIDSignal";
1738 TH1F* hist_totalSigmaPIDSignal =
new TH1F(name_totalSigmaPIDSignal.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1739 hist_totalSigmaPIDSignal->Sumw2();
1740 hist_totalSigmaPIDSignal->SetLineColor(6);
1741 hist_totalSigmaPIDSignal->SetMarkerStyle(20);
1742 hist_totalSigmaPIDSignal->SetMarkerSize(0.6);
1743 hist_totalSigmaPIDSignal->SetMarkerColor(6);
1744 TH1F* histogram_totalSigmaPIDSignal = (TH1F*)hist_totalSigmaPIDSignal->Clone();
1747 TString name_particle_pdgB0Pion =
"particle_pdgB0Pion";
1748 TH2F* hist_particle_pdgB0Pion =
new TH2F(name_particle_pdgB0Pion.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1749 hist_particle_pdgB0Pion->Sumw2();
1750 hist_particle_pdgB0Pion->SetLineColor(6);
1751 hist_particle_pdgB0Pion->SetMarkerStyle(20);
1752 hist_particle_pdgB0Pion->SetMarkerSize(0.6);
1753 hist_particle_pdgB0Pion->SetMarkerColor(6);
1754 TH2F* histogram_particle_pdgB0Pion = (
TH2F*)hist_particle_pdgB0Pion->Clone();
1757 TString name_particle_pdgDStarPion =
"particle_pdgDStarPion";
1758 TH2F* hist_particle_pdgDStarPion =
new TH2F(name_particle_pdgDStarPion.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1759 hist_particle_pdgDStarPion->Sumw2();
1760 hist_particle_pdgDStarPion->SetLineColor(6);
1761 hist_particle_pdgDStarPion->SetMarkerStyle(20);
1762 hist_particle_pdgDStarPion->SetMarkerSize(0.6);
1763 hist_particle_pdgDStarPion->SetMarkerColor(6);
1764 TH2F* histogram_particle_pdgDStarPion = (
TH2F*)hist_particle_pdgDStarPion->Clone();
1765 fOutputB0MC->Add(histogram_particle_pdgDStarPion);
1767 TString name_particle_pdgD0First =
"particle_pdgD0First";
1768 TH2F* hist_particle_pdgD0First =
new TH2F(name_particle_pdgD0First.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1769 hist_particle_pdgD0First->Sumw2();
1770 hist_particle_pdgD0First->SetLineColor(6);
1771 hist_particle_pdgD0First->SetMarkerStyle(20);
1772 hist_particle_pdgD0First->SetMarkerSize(0.6);
1773 hist_particle_pdgD0First->SetMarkerColor(6);
1774 TH2F* histogram_particle_pdgD0First = (
TH2F*)hist_particle_pdgD0First->Clone();
1777 TString name_particle_pdgD0Second =
"particle_pdgD0Second";
1778 TH2F* hist_particle_pdgD0Second =
new TH2F(name_particle_pdgD0Second.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1779 hist_particle_pdgD0Second->Sumw2();
1780 hist_particle_pdgD0Second->SetLineColor(6);
1781 hist_particle_pdgD0Second->SetMarkerStyle(20);
1782 hist_particle_pdgD0Second->SetMarkerSize(0.6);
1783 hist_particle_pdgD0Second->SetMarkerColor(6);
1784 TH2F* histogram_particle_pdgD0Second = (
TH2F*)hist_particle_pdgD0Second->Clone();
1787 TString name_particle_pdgAll =
"particle_pdgAll";
1788 TH1F* hist_particle_pdgAll =
new TH1F(name_particle_pdgAll.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1789 hist_particle_pdgAll->Sumw2();
1790 hist_particle_pdgAll->SetLineColor(6);
1791 hist_particle_pdgAll->SetMarkerStyle(20);
1792 hist_particle_pdgAll->SetMarkerSize(0.6);
1793 hist_particle_pdgAll->SetMarkerColor(6);
1794 TH1F* histogram_particle_pdgAll = (TH1F*)hist_particle_pdgAll->Clone();
1797 TString name_particle_pdgAllSecond =
"particle_pdgAllSecond";
1798 TH1F* hist_particle_pdgAllSecond =
new TH1F(name_particle_pdgAllSecond.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1799 hist_particle_pdgAllSecond->Sumw2();
1800 hist_particle_pdgAllSecond->SetLineColor(6);
1801 hist_particle_pdgAllSecond->SetMarkerStyle(20);
1802 hist_particle_pdgAllSecond->SetMarkerSize(0.6);
1803 hist_particle_pdgAllSecond->SetMarkerColor(6);
1804 TH1F* histogram_particle_pdgAllSecond = (TH1F*)hist_particle_pdgAllSecond->Clone();
1805 fOutputB0MC->Add(histogram_particle_pdgAllSecond);
1807 TString name_particle_pdgAllThird =
"particle_pdgAllThird";
1808 TH1F* hist_particle_pdgAllThird =
new TH1F(name_particle_pdgAllThird.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1809 hist_particle_pdgAllThird->Sumw2();
1810 hist_particle_pdgAllThird->SetLineColor(6);
1811 hist_particle_pdgAllThird->SetMarkerStyle(20);
1812 hist_particle_pdgAllThird->SetMarkerSize(0.6);
1813 hist_particle_pdgAllThird->SetMarkerColor(6);
1814 TH1F* histogram_particle_pdgAllThird = (TH1F*)hist_particle_pdgAllThird->Clone();
1817 TString name_particle_pdgAllFourth =
"particle_pdgAllFourth";
1818 TH1F* hist_particle_pdgAllFourth =
new TH1F(name_particle_pdgAllFourth.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1819 hist_particle_pdgAllFourth->Sumw2();
1820 hist_particle_pdgAllFourth->SetLineColor(6);
1821 hist_particle_pdgAllFourth->SetMarkerStyle(20);
1822 hist_particle_pdgAllFourth->SetMarkerSize(0.6);
1823 hist_particle_pdgAllFourth->SetMarkerColor(6);
1824 TH1F* histogram_particle_pdgAllFourth = (TH1F*)hist_particle_pdgAllFourth->Clone();
1825 fOutputB0MC->Add(histogram_particle_pdgAllFourth);
1827 TString name_particle_pdgAllFifth =
"particle_pdgAllFifth";
1828 TH1F* hist_particle_pdgAllFifth =
new TH1F(name_particle_pdgAllFifth.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1829 hist_particle_pdgAllFifth->Sumw2();
1830 hist_particle_pdgAllFifth->SetLineColor(6);
1831 hist_particle_pdgAllFifth->SetMarkerStyle(20);
1832 hist_particle_pdgAllFifth->SetMarkerSize(0.6);
1833 hist_particle_pdgAllFifth->SetMarkerColor(6);
1834 TH1F* histogram_particle_pdgAllFifth = (TH1F*)hist_particle_pdgAllFifth->Clone();
1837 TString name_particle_pdgAllInvMass =
"particle_pdgAllInvMass";
1838 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);
1839 hist_particle_pdgAllInvMass->Sumw2();
1840 hist_particle_pdgAllInvMass->SetLineColor(6);
1841 hist_particle_pdgAllInvMass->SetMarkerStyle(20);
1842 hist_particle_pdgAllInvMass->SetMarkerSize(0.6);
1843 hist_particle_pdgAllInvMass->SetMarkerColor(6);
1844 TH2F* histogram_particle_pdgAllInvMass = (
TH2F*)hist_particle_pdgAllInvMass->Clone();
1845 fOutputB0MC->Add(histogram_particle_pdgAllInvMass);
1847 TString name_particle_pdgAllInvMassSecond =
"particle_pdgAllInvMassSecond";
1848 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);
1849 hist_particle_pdgAllInvMassSecond->Sumw2();
1850 hist_particle_pdgAllInvMassSecond->SetLineColor(6);
1851 hist_particle_pdgAllInvMassSecond->SetMarkerStyle(20);
1852 hist_particle_pdgAllInvMassSecond->SetMarkerSize(0.6);
1853 hist_particle_pdgAllInvMassSecond->SetMarkerColor(6);
1854 TH2F* histogram_particle_pdgAllInvMassSecond = (
TH2F*)hist_particle_pdgAllInvMassSecond->Clone();
1855 fOutputB0MC->Add(histogram_particle_pdgAllInvMassSecond);
1857 TString name_particle_pdgAllInvMassThird =
"particle_pdgAllInvMassThird";
1858 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);
1859 hist_particle_pdgAllInvMassThird->Sumw2();
1860 hist_particle_pdgAllInvMassThird->SetLineColor(6);
1861 hist_particle_pdgAllInvMassThird->SetMarkerStyle(20);
1862 hist_particle_pdgAllInvMassThird->SetMarkerSize(0.6);
1863 hist_particle_pdgAllInvMassThird->SetMarkerColor(6);
1864 TH2F* histogram_particle_pdgAllInvMassThird = (
TH2F*)hist_particle_pdgAllInvMassThird->Clone();
1865 fOutputB0MC->Add(histogram_particle_pdgAllInvMassThird);
1867 TString name_particle_pdgAllInvMassFourth =
"particle_pdgAllInvMassFourth";
1868 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);
1869 hist_particle_pdgAllInvMassFourth->Sumw2();
1870 hist_particle_pdgAllInvMassFourth->SetLineColor(6);
1871 hist_particle_pdgAllInvMassFourth->SetMarkerStyle(20);
1872 hist_particle_pdgAllInvMassFourth->SetMarkerSize(0.6);
1873 hist_particle_pdgAllInvMassFourth->SetMarkerColor(6);
1874 TH2F* histogram_particle_pdgAllInvMassFourth = (
TH2F*)hist_particle_pdgAllInvMassFourth->Clone();
1875 fOutputB0MC->Add(histogram_particle_pdgAllInvMassFourth);
1877 TString name_particle_pdgAllInvMassFifth =
"particle_pdgAllInvMassFifth";
1878 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);
1879 hist_particle_pdgAllInvMassFifth->Sumw2();
1880 hist_particle_pdgAllInvMassFifth->SetLineColor(6);
1881 hist_particle_pdgAllInvMassFifth->SetMarkerStyle(20);
1882 hist_particle_pdgAllInvMassFifth->SetMarkerSize(0.6);
1883 hist_particle_pdgAllInvMassFifth->SetMarkerColor(6);
1884 TH2F* histogram_particle_pdgAllInvMassFifth = (
TH2F*)hist_particle_pdgAllInvMassFifth->Clone();
1885 fOutputB0MC->Add(histogram_particle_pdgAllInvMassFifth);
1887 TString name_particle_daughterPdgOneStep511a =
"particle_daughterPdgOneStep511a";
1888 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);
1889 hist_particle_daughterPdgOneStep511a->Sumw2();
1890 hist_particle_daughterPdgOneStep511a->SetLineColor(6);
1891 hist_particle_daughterPdgOneStep511a->SetMarkerStyle(20);
1892 hist_particle_daughterPdgOneStep511a->SetMarkerSize(0.6);
1893 hist_particle_daughterPdgOneStep511a->SetMarkerColor(6);
1894 TH2F* histogram_particle_daughterPdgOneStep511a = (
TH2F*)hist_particle_daughterPdgOneStep511a->Clone();
1895 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep511a);
1897 TString name_particle_daughterPdgOneStep521a =
"particle_daughterPdgOneStep521a";
1898 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);
1899 hist_particle_daughterPdgOneStep521a->Sumw2();
1900 hist_particle_daughterPdgOneStep521a->SetLineColor(6);
1901 hist_particle_daughterPdgOneStep521a->SetMarkerStyle(20);
1902 hist_particle_daughterPdgOneStep521a->SetMarkerSize(0.6);
1903 hist_particle_daughterPdgOneStep521a->SetMarkerColor(6);
1904 TH2F* histogram_particle_daughterPdgOneStep521a = (
TH2F*)hist_particle_daughterPdgOneStep521a->Clone();
1905 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep521a);
1907 TString name_particle_daughterPdgOneStep511b =
"particle_daughterPdgOneStep511b";
1908 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);
1909 hist_particle_daughterPdgOneStep511b->Sumw2();
1910 hist_particle_daughterPdgOneStep511b->SetLineColor(6);
1911 hist_particle_daughterPdgOneStep511b->SetMarkerStyle(20);
1912 hist_particle_daughterPdgOneStep511b->SetMarkerSize(0.6);
1913 hist_particle_daughterPdgOneStep511b->SetMarkerColor(6);
1914 TH2F* histogram_particle_daughterPdgOneStep511b = (
TH2F*)hist_particle_daughterPdgOneStep511b->Clone();
1915 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep511b);
1917 TString name_particle_daughterPdgOneStep521b =
"particle_daughterPdgOneStep521b";
1918 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);
1919 hist_particle_daughterPdgOneStep521b->Sumw2();
1920 hist_particle_daughterPdgOneStep521b->SetLineColor(6);
1921 hist_particle_daughterPdgOneStep521b->SetMarkerStyle(20);
1922 hist_particle_daughterPdgOneStep521b->SetMarkerSize(0.6);
1923 hist_particle_daughterPdgOneStep521b->SetMarkerColor(6);
1924 TH2F* histogram_particle_daughterPdgOneStep521b = (
TH2F*)hist_particle_daughterPdgOneStep521b->Clone();
1925 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep521b);
1927 TString name_particle_daughterPdgTwoStep511a =
"particle_daughterPdgTwoStep511a";
1928 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);
1929 hist_particle_daughterPdgTwoStep511a->Sumw2();
1930 hist_particle_daughterPdgTwoStep511a->SetLineColor(6);
1931 hist_particle_daughterPdgTwoStep511a->SetMarkerStyle(20);
1932 hist_particle_daughterPdgTwoStep511a->SetMarkerSize(0.6);
1933 hist_particle_daughterPdgTwoStep511a->SetMarkerColor(6);
1934 TH2F* histogram_particle_daughterPdgTwoStep511a = (
TH2F*)hist_particle_daughterPdgTwoStep511a->Clone();
1935 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511a);
1937 TString name_particle_daughterPdgTwoStep521a =
"particle_daughterPdgTwoStep521a";
1938 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);
1939 hist_particle_daughterPdgTwoStep521a->Sumw2();
1940 hist_particle_daughterPdgTwoStep521a->SetLineColor(6);
1941 hist_particle_daughterPdgTwoStep521a->SetMarkerStyle(20);
1942 hist_particle_daughterPdgTwoStep521a->SetMarkerSize(0.6);
1943 hist_particle_daughterPdgTwoStep521a->SetMarkerColor(6);
1944 TH2F* histogram_particle_daughterPdgTwoStep521a = (
TH2F*)hist_particle_daughterPdgTwoStep521a->Clone();
1945 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521a);
1947 TString name_particle_daughterPdgTwoStep511b =
"particle_daughterPdgTwoStep511b";
1948 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);
1949 hist_particle_daughterPdgTwoStep511b->Sumw2();
1950 hist_particle_daughterPdgTwoStep511b->SetLineColor(6);
1951 hist_particle_daughterPdgTwoStep511b->SetMarkerStyle(20);
1952 hist_particle_daughterPdgTwoStep511b->SetMarkerSize(0.6);
1953 hist_particle_daughterPdgTwoStep511b->SetMarkerColor(6);
1954 TH2F* histogram_particle_daughterPdgTwoStep511b = (
TH2F*)hist_particle_daughterPdgTwoStep511b->Clone();
1955 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511b);
1957 TString name_particle_daughterPdgTwoStep521b =
"particle_daughterPdgTwoStep521b";
1958 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);
1959 hist_particle_daughterPdgTwoStep521b->Sumw2();
1960 hist_particle_daughterPdgTwoStep521b->SetLineColor(6);
1961 hist_particle_daughterPdgTwoStep521b->SetMarkerStyle(20);
1962 hist_particle_daughterPdgTwoStep521b->SetMarkerSize(0.6);
1963 hist_particle_daughterPdgTwoStep521b->SetMarkerColor(6);
1964 TH2F* histogram_particle_daughterPdgTwoStep521b = (
TH2F*)hist_particle_daughterPdgTwoStep521b->Clone();
1965 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521b);
1967 TString name_particle_daughterPdgTwoStep511c =
"particle_daughterPdgTwoStep511c";
1968 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);
1969 hist_particle_daughterPdgTwoStep511c->Sumw2();
1970 hist_particle_daughterPdgTwoStep511c->SetLineColor(6);
1971 hist_particle_daughterPdgTwoStep511c->SetMarkerStyle(20);
1972 hist_particle_daughterPdgTwoStep511c->SetMarkerSize(0.6);
1973 hist_particle_daughterPdgTwoStep511c->SetMarkerColor(6);
1974 TH2F* histogram_particle_daughterPdgTwoStep511c = (
TH2F*)hist_particle_daughterPdgTwoStep511c->Clone();
1975 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511c);
1977 TString name_particle_daughterPdgTwoStep521c =
"particle_daughterPdgTwoStep521c";
1978 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);
1979 hist_particle_daughterPdgTwoStep521c->Sumw2();
1980 hist_particle_daughterPdgTwoStep521c->SetLineColor(6);
1981 hist_particle_daughterPdgTwoStep521c->SetMarkerStyle(20);
1982 hist_particle_daughterPdgTwoStep521c->SetMarkerSize(0.6);
1983 hist_particle_daughterPdgTwoStep521c->SetMarkerColor(6);
1984 TH2F* histogram_particle_daughterPdgTwoStep521c = (
TH2F*)hist_particle_daughterPdgTwoStep521c->Clone();
1985 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521c);
1987 TString name_invariantMassB0Signal_BA =
"invariantMassB0Signal_BA";
1988 TH1F* hist_invariantMassB0Signal_BA =
new TH1F(name_invariantMassB0Signal_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1989 hist_invariantMassB0Signal_BA->Sumw2();
1990 hist_invariantMassB0Signal_BA->SetLineColor(6);
1991 hist_invariantMassB0Signal_BA->SetMarkerStyle(20);
1992 hist_invariantMassB0Signal_BA->SetMarkerSize(0.6);
1993 hist_invariantMassB0Signal_BA->SetMarkerColor(6);
1994 TH1F* histogram_invariantMassB0Signal_BA = (TH1F*)hist_invariantMassB0Signal_BA->Clone();
1995 fOutputB0MC->Add(histogram_invariantMassB0Signal_BA);
1997 TString name_invariantMassB0Correlated_BA =
"invariantMassB0Correlated_BA";
1998 TH1F* hist_invariantMassB0Correlated_BA =
new TH1F(name_invariantMassB0Correlated_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1999 hist_invariantMassB0Correlated_BA->Sumw2();
2000 hist_invariantMassB0Correlated_BA->SetLineColor(6);
2001 hist_invariantMassB0Correlated_BA->SetMarkerStyle(20);
2002 hist_invariantMassB0Correlated_BA->SetMarkerSize(0.6);
2003 hist_invariantMassB0Correlated_BA->SetMarkerColor(6);
2004 TH1F* histogram_invariantMassB0Correlated_BA = (TH1F*)hist_invariantMassB0Correlated_BA->Clone();
2005 fOutputB0MC->Add(histogram_invariantMassB0Correlated_BA);
2007 TString name_invariantMassB0Background_BA =
"invariantMassB0Background_BA";
2008 TH1F* hist_invariantMassB0Background_BA =
new TH1F(name_invariantMassB0Background_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
2009 hist_invariantMassB0Background_BA->Sumw2();
2010 hist_invariantMassB0Background_BA->SetLineColor(6);
2011 hist_invariantMassB0Background_BA->SetMarkerStyle(20);
2012 hist_invariantMassB0Background_BA->SetMarkerSize(0.6);
2013 hist_invariantMassB0Background_BA->SetMarkerColor(6);
2014 TH1F* histogram_invariantMassB0Background_BA = (TH1F*)hist_invariantMassB0Background_BA->Clone();
2015 fOutputB0MC->Add(histogram_invariantMassB0Background_BA);
2025 AliESDVertex *vertexESD = 0;
2026 AliAODVertex *vertexAOD = 0;
2028 AliVertexerTracks vertexer;
2029 vertexer.SetFieldkG(bField);
2031 vertexer.SetVtxStart((AliESDVertex*)primary);
2032 vertexESD = (AliESDVertex*)vertexer.VertexForSelectedESDTracks(tracks);
2036 if(!vertexESD)
return vertexAOD;
2039 if(vertexESD->GetNContributors()!=tracks->GetEntriesFast())
2041 delete vertexESD; vertexESD=
nullptr;
2047 for(
Int_t a=0;a<3;a++)pos[a]=0.;
2048 for(
Int_t b=0;b<6;b++)cov[b]=0.;
2051 vertexESD->GetXYZ(pos);
2052 vertexESD->GetCovMatrix(cov);
2055 Double_t vertRadius2=pos[0]*pos[0]+pos[1]*pos[1];
2058 delete vertexESD; vertexESD=
nullptr;
2062 chi2perNDF = vertexESD->GetChi2toNDF();
2063 dispersion = vertexESD->GetDispersion();
2064 delete vertexESD; vertexESD=
nullptr;
2066 vertexAOD =
new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs);
2073 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2074 for (
Int_t i=0; i<mcTrackArray->GetEntriesFast(); i++){
2076 Int_t mcLabelPionB0 = 0;
2077 Int_t mcLabelPionDStar = 0;
2078 Int_t mcLabelPionD0 = 0;
2079 Int_t mcLabelKaon = 0;
2080 Int_t mcLabelD0 = 0;
2081 Int_t mcLabelDStar = 0;
2082 Int_t mcLabelB0 = 0;
2089 Bool_t mcPionB0Present = kFALSE;
2090 Bool_t mcPionDStarPresent = kFALSE;
2091 Bool_t mcPionD0Present = kFALSE;
2092 Bool_t mcKaonPresent = kFALSE;
2095 AliAODMCParticle *mcTrackParticle =
dynamic_cast< AliAODMCParticle*
>(mcTrackArray->At(i));
2096 if(!mcTrackParticle) {std::cout <<
"no particle" << std::endl;
continue;}
2097 Int_t pdgCodeMC=TMath::Abs(mcTrackParticle->GetPdgCode());
2099 if (pdgCodeMC==511){
2102 Int_t nDaughterB0 = mcTrackParticle->GetNDaughters();
2103 ptMC[0] = mcTrackParticle->Pt();
2104 yMC[0] = mcTrackParticle->Y();
2105 pseudoYMC[0] = mcTrackParticle->Eta();
2107 TString fillthis=
"B0s_in_analysis";
2108 ((TH1F*)(listout->FindObject(fillthis)))->Fill(0);
2111 for(
Int_t iDaughterB0=0; iDaughterB0<2; iDaughterB0++){
2113 AliAODMCParticle* daughterB0 = (AliAODMCParticle*)mcTrackArray->At(mcTrackParticle->GetDaughter(iDaughterB0));
2114 if(!daughterB0)
break;
2115 Int_t pdgCodeDaughterB0=TMath::Abs(daughterB0->GetPdgCode());
2117 if (pdgCodeDaughterB0==211){
2118 mcLabelPionB0 = mcTrackParticle->GetDaughter(iDaughterB0);
2119 mcPionB0Present = kTRUE;
2120 ptMC[1] = daughterB0->Pt();
2121 yMC[1] = daughterB0->Y();
2122 pseudoYMC[1] = daughterB0->Eta();
2124 }
else if (pdgCodeDaughterB0==413){
2125 mcLabelDStar = mcTrackParticle->GetDaughter(iDaughterB0);
2126 Int_t nDaughterDStar = daughterB0->GetNDaughters();
2127 ptMC[2] = daughterB0->Pt();
2128 yMC[2] = daughterB0->Y();
2129 pseudoYMC[2] = daughterB0->Eta();
2131 if(nDaughterDStar==2){
2132 for(
Int_t iDaughterDStar=0; iDaughterDStar<2; iDaughterDStar++){
2134 AliAODMCParticle* daughterDStar = (AliAODMCParticle*)mcTrackArray->At(daughterB0->GetDaughter(iDaughterDStar));
2135 if(!daughterDStar)
break;
2136 Int_t pdgCodeDaughterDStar=TMath::Abs(daughterDStar->GetPdgCode());
2138 if (pdgCodeDaughterDStar==211){
2139 mcLabelPionDStar = daughterB0->GetDaughter(iDaughterDStar);
2140 mcPionDStarPresent = kTRUE;
2141 ptMC[3] = daughterDStar->Pt();
2142 yMC[3] = daughterDStar->Y();
2143 pseudoYMC[3] = daughterDStar->Eta();
2145 }
else if (pdgCodeDaughterDStar==421){
2146 mcLabelD0 = daughterB0->GetDaughter(iDaughterDStar);
2147 Int_t nDaughterD0 = daughterDStar->GetNDaughters();
2148 ptMC[4] = daughterDStar->Pt();
2149 yMC[4] = daughterDStar->Y();
2150 pseudoYMC[4] = daughterDStar->Eta();
2153 for(
Int_t iDaughterD0=0; iDaughterD0<2; iDaughterD0++){
2155 AliAODMCParticle* daughterD0 = (AliAODMCParticle*)mcTrackArray->At(daughterDStar->GetDaughter(iDaughterD0));
2156 if(!daughterD0)
break;
2157 Int_t pdgCodeDaughterD0=TMath::Abs(daughterD0->GetPdgCode());
2159 if (pdgCodeDaughterD0==211){
2160 mcLabelPionD0 = daughterDStar->GetDaughter(iDaughterD0);
2161 ptMC[5] = daughterD0->Pt();
2162 yMC[5] = daughterD0->Y();
2163 pseudoYMC[5] = daughterD0->Eta();
2164 mcPionD0Present = kTRUE;
2166 }
else if (pdgCodeDaughterD0==321){
2167 mcLabelKaon = daughterDStar->GetDaughter(iDaughterD0);;
2168 mcKaonPresent = kTRUE;
2169 ptMC[6] = daughterD0->Pt();
2170 yMC[6] = daughterD0->Y();
2171 pseudoYMC[6] = daughterD0->Eta();
2185 if(mcPionB0Present && mcPionDStarPresent && mcPionD0Present && mcKaonPresent){
2188 TString fillthis=
"B0s_in_analysis";
2189 ((TH1F*)(listout->FindObject(fillthis)))->Fill(1);
2191 fillthis=
"B0s_per_bin";
2194 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
2197 fillthis=
"mc_B0_pt";
2198 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
2199 fillthis=
"mc_B0_pion_pt";
2200 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[1]);
2201 fillthis=
"mc_DStar_pt";
2202 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[2]);
2203 fillthis=
"mc_DStar_pion_pt";
2204 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[3]);
2205 fillthis=
"mc_D0_pt";
2206 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[4]);
2207 fillthis=
"mc_D0_pion_pt";
2208 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[5]);
2209 fillthis=
"mc_D0_kaon_pt";
2210 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[6]);
2212 fillthis=
"mc_B0_rapidity_true";
2213 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[0]);
2214 fillthis=
"mc_B0_pion_rapidity_true";
2215 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[1]);
2216 fillthis=
"mc_DStar_rapidity_true";
2217 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[2]);
2218 fillthis=
"mc_DStar_pion_rapidity_true";
2219 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[3]);
2220 fillthis=
"mc_D0_rapidity_true";
2221 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[4]);
2222 fillthis=
"mc_D0_pion_rapidity_true";
2223 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[5]);
2224 fillthis=
"mc_D0_kaon_rapidity_true";
2225 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[6]);
2227 fillthis=
"mc_B0_pseudorapidity_true";
2228 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[0]);
2229 fillthis=
"mc_B0_pion_pseudorapidity_true";
2230 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[1]);
2231 fillthis=
"mc_DStar_pseudorapidity_true";
2232 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[2]);
2233 fillthis=
"mc_DStar_pion_pseudorapidity_true";
2234 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[3]);
2235 fillthis=
"mc_D0_pseudorapidity_true";
2236 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[4]);
2237 fillthis=
"mc_D0_pion_pseudorapidity_true";
2238 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[5]);
2239 fillthis=
"mc_D0_kaon_pseudorapidity_true";
2240 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[6]);
2243 if(ptMC[1] < 0.1 || TMath::Abs(pseudoYMC[1]) > 0.9 )
continue;
2244 if(ptMC[3] < 0.1 || TMath::Abs(pseudoYMC[3]) > 0.9 )
continue;
2245 if(ptMC[5] < 0.1 || TMath::Abs(pseudoYMC[5]) > 0.9 )
continue;
2246 if(ptMC[6] < 0.1 || TMath::Abs(pseudoYMC[6]) > 0.9 )
continue;
2249 if(TMath::Abs(yMC[0]) > 0.8)
continue;
2251 Int_t rows = B0toDStarPiLabelMatrix->GetNrows();
2253 B0toDStarPiLabelMatrix->ResizeTo(rows+1,7);
2254 particleMatrix(rows,0) = mcLabelPionB0;
2255 particleMatrix(rows,1) = mcLabelPionDStar;
2256 particleMatrix(rows,2) = mcLabelPionD0;
2257 particleMatrix(rows,3) = mcLabelKaon;
2258 particleMatrix(rows,4) = mcLabelD0;
2259 particleMatrix(rows,5) = mcLabelDStar;
2260 particleMatrix(rows,6) = mcLabelB0;
2262 fillthis=
"B0s_in_analysis";
2263 ((TH1F*)(listout->FindObject(fillthis)))->Fill(2);
2266 fillthis=
"B0s_per_bin_in_Acc";
2269 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
2339 if(!aodTrack) AliFatal(
"Not a standard AOD");
2342 if(aodTrack->GetITSNcls() < 1)
return kFALSE;
2343 if(aodTrack->GetTPCNcls() < 1)
return kFALSE;
2344 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
2345 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
2346 if(aodTrack->GetID() < 0)
return kFALSE;
2348 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
2350 Int_t mcLabelParticle = -1;
2351 Int_t pdgParticle = -1;
2352 mcLabelParticle = aodTrack->GetLabel();
2355 Double_t pt_track = aodTrack->Pt();
2356 Double_t momentum_track = aodTrack->P();
2357 Int_t numberOfITS = aodTrack->GetITSNcls();
2358 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2360 AliExternalTrackParam particleTrack;
2361 particleTrack.CopyFromVTrack(aodTrack);
2363 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2366 Bool_t isDesiredCandidate = kFALSE;
2368 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2369 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2370 if(mcLabelParticle == (
Int_t)particleMatrix(k,2) || mcLabelParticle == (
Int_t)particleMatrix(k,3)){
2371 isDesiredCandidate = kTRUE;
2381 Int_t daughterType = 0;
2390 for (
Int_t j = 0; j < 10; ++j)
2397 if(isDesiredCandidate)
2405 for (
Int_t j = 0; j < 10; ++j)
2419 if(isDesiredCandidate) {
2426 if(isDesiredCandidate) {
2433 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2434 if(isDesiredCandidate) {
2442 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2443 if(isDesiredCandidate) {
2452 if(isDesiredCandidate) {
2460 if(isDesiredCandidate) {
2467 if(isDesiredCandidate) {
2474 if(isDesiredCandidate) {
2480 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2482 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2485 Bool_t bHardITSPass = kTRUE;
2486 for (
Int_t j = 0; j < 7; ++j)
2488 if(bHardSelectionArrayITS[j])
2490 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2494 Int_t nCounterSoftSelection = 0;
2495 Bool_t bSoftITSPass = kTRUE;
2496 for (
Int_t j = 0; j < 7; ++j)
2498 if(bSoftSelectionArrayITS[j])
2500 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2503 if(nCounterSoftSelection < fCuts->GetNSoftITSCutD0FirstDaughter()) bSoftITSPass = kFALSE;
2506 if(isDesiredCandidate) {
2513 if(isDesiredCandidate) {
2522 if(isDesiredCandidate) {
2535 for (
Int_t j = 0; j < 10; ++j)
2542 if(isDesiredCandidate)
2550 for (
Int_t j = 0; j < 10; ++j)
2564 if(!aodTrack) AliFatal(
"Not a standard AOD");
2567 if(aodTrack->GetITSNcls() < 1)
return kFALSE;
2568 if(aodTrack->GetTPCNcls() < 1)
return kFALSE;
2569 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
2570 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
2571 if(aodTrack->GetID() < 0)
return kFALSE;
2573 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
2575 Int_t mcLabelParticle = -1;
2576 Int_t pdgParticle = -1;
2577 mcLabelParticle = aodTrack->GetLabel();
2580 Double_t pt_track = aodTrack->Pt();
2581 Double_t momentum_track = aodTrack->P();
2582 Int_t numberOfITS = aodTrack->GetITSNcls();
2583 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2585 AliExternalTrackParam particleTrack;
2586 particleTrack.CopyFromVTrack(aodTrack);
2588 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2591 Bool_t isDesiredCandidate = kFALSE;
2593 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2594 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2595 if(mcLabelParticle == (
Int_t)particleMatrix(k,2) || mcLabelParticle == (
Int_t)particleMatrix(k,3)){
2596 isDesiredCandidate = kTRUE;
2606 Int_t daughterType = 1;
2615 for (
Int_t j = 0; j < 10; ++j)
2622 if(isDesiredCandidate)
2630 for (
Int_t j = 0; j < 10; ++j)
2644 if(isDesiredCandidate) {
2651 if(isDesiredCandidate) {
2658 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2659 if(isDesiredCandidate) {
2667 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2668 if(isDesiredCandidate) {
2677 if(isDesiredCandidate) {
2685 if(isDesiredCandidate) {
2692 if(isDesiredCandidate) {
2699 if(isDesiredCandidate) {
2705 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2707 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2710 Bool_t bHardITSPass = kTRUE;
2711 for (
Int_t j = 0; j < 7; ++j)
2713 if(bHardSelectionArrayITS[j])
2715 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2719 Int_t nCounterSoftSelection = 0;
2720 Bool_t bSoftITSPass = kTRUE;
2721 for (
Int_t j = 0; j < 7; ++j)
2723 if(bSoftSelectionArrayITS[j])
2725 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2728 if(nCounterSoftSelection < fCuts->GetNSoftITSCutD0SecondDaughter()) bSoftITSPass = kFALSE;
2731 if(isDesiredCandidate) {
2738 if(isDesiredCandidate) {
2747 if(isDesiredCandidate) {
2760 for (
Int_t j = 0; j < 10; ++j)
2767 if(isDesiredCandidate)
2775 for (
Int_t j = 0; j < 10; ++j)
2789 Int_t numberofparticles = 0;
2790 Int_t numberofparticlesused = 0;
2791 Int_t iClonesArray = 0;
2796 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
2797 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
2798 if(!aodTrack) AliFatal(
"Not a standard AOD");
2801 if(aodTrack->GetITSNcls() < 1)
continue;
2802 if(aodTrack->GetTPCNcls() < 1)
continue;
2803 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
2804 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
2805 if(aodTrack->GetID() < 0)
continue;
2807 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
2809 Int_t mcLabelParticle = -1;
2810 Int_t pdgParticle = -1;
2811 mcLabelParticle = aodTrack->GetLabel();
2813 numberofparticles++;
2816 Double_t pt_track = aodTrack->Pt();
2817 Double_t momentum_track = aodTrack->P();
2818 Int_t numberOfITS = aodTrack->GetITSNcls();
2819 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2822 Int_t pionPIDnumber = 2;
2823 Int_t kaonPIDnumber = 3;
2828 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
2829 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
2831 AliExternalTrackParam particleTrack;
2832 particleTrack.CopyFromVTrack(aodTrack);
2834 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2837 Bool_t isDesiredCandidate = kFALSE;
2839 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2840 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2841 if(mcLabelParticle == (
Int_t)particleMatrix(k,1)){
2842 isDesiredCandidate = kTRUE;
2852 Int_t daughterType = 2;
2861 for (
Int_t j = 0; j < 10; ++j)
2869 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2872 if(isDesiredCandidate)
2880 for (
Int_t j = 0; j < 10; ++j)
2888 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2897 if(isDesiredCandidate) {
2904 if(isDesiredCandidate) {
2911 if(isDesiredCandidate) {
2918 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2919 if(isDesiredCandidate) {
2927 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2928 if(isDesiredCandidate) {
2937 if(isDesiredCandidate) {
2945 if(isDesiredCandidate) {
2952 if(isDesiredCandidate) {
2960 if(isDesiredCandidate) {
2968 if(isDesiredCandidate) {
2974 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2976 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2979 Bool_t bHardITSPass = kTRUE;
2980 for (
Int_t j = 0; j < 7; ++j)
2982 if(bHardSelectionArrayITS[j])
2984 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2988 Int_t nCounterSoftSelection = 0;
2989 Bool_t bSoftITSPass = kTRUE;
2990 for (
Int_t j = 0; j < 7; ++j)
2992 if(bSoftSelectionArrayITS[j])
2994 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2997 if(nCounterSoftSelection < fCuts->GetNSoftITSCutDStarPion()) bSoftITSPass = kFALSE;
3000 if(isDesiredCandidate) {
3007 if(isDesiredCandidate) {
3016 if(isDesiredCandidate) {
3029 for (
Int_t j = 0; j < 10; ++j)
3037 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3040 if(isDesiredCandidate)
3048 for (
Int_t j = 0; j < 10; ++j)
3056 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3061 numberofparticlesused++;
3072 Int_t numberofparticles = 0;
3073 Int_t numberofparticlesused = 0;
3074 Int_t iClonesArray = 0;
3079 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
3080 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
3081 if(!aodTrack) AliFatal(
"Not a standard AOD");
3084 if(aodTrack->GetITSNcls() < 1)
continue;
3085 if(aodTrack->GetTPCNcls() < 1)
continue;
3086 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
3087 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
3088 if(aodTrack->GetID() < 0)
continue;
3090 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
3093 Int_t mcLabelParticle = -1;
3094 Int_t pdgParticle = -1;
3095 mcLabelParticle = aodTrack->GetLabel();
3097 numberofparticles++;
3100 Double_t pt_track = aodTrack->Pt();
3101 Double_t momentum_track = aodTrack->P();
3102 Int_t numberOfITS = aodTrack->GetITSNcls();
3103 Int_t numberOfTPC = aodTrack->GetTPCNcls();
3106 Int_t pionPIDnumber = 2;
3107 Int_t kaonPIDnumber = 3;
3112 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
3113 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
3115 AliExternalTrackParam particleTrack;
3116 particleTrack.CopyFromVTrack(aodTrack);
3118 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
3122 Bool_t isDesiredCandidate = kFALSE;
3124 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
3125 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
3126 if(mcLabelParticle == (
Int_t)particleMatrix(k,0)){
3127 isDesiredCandidate = kTRUE;
3138 Int_t daughterType = 3;
3146 for (
Int_t j = 0; j < 10; ++j)
3154 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3157 if(isDesiredCandidate)
3165 for (
Int_t j = 0; j < 10; ++j)
3173 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3182 if(isDesiredCandidate) {
3189 if(isDesiredCandidate) {
3196 if(isDesiredCandidate) {
3203 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
3204 if(isDesiredCandidate) {
3212 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
3213 if(isDesiredCandidate) {
3222 if(isDesiredCandidate) {
3231 if(isDesiredCandidate) {
3239 if(isDesiredCandidate) {
3246 if(isDesiredCandidate) {
3252 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
3254 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
3257 Bool_t bHardITSPass = kTRUE;
3258 for (
Int_t j = 0; j < 7; ++j)
3260 if(bHardSelectionArrayITS[j])
3262 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
3266 Int_t nCounterSoftSelection = 0;
3267 Bool_t bSoftITSPass = kTRUE;
3268 for (
Int_t j = 0; j < 7; ++j)
3270 if(bSoftSelectionArrayITS[j])
3272 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
3275 if(nCounterSoftSelection < fCuts->GetNSoftITSCutB0Pion()) bSoftITSPass = kFALSE;
3278 if(isDesiredCandidate) {
3285 if(isDesiredCandidate) {
3295 if(isDesiredCandidate) {
3308 for (
Int_t j = 0; j < 10; ++j)
3316 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3319 if(isDesiredCandidate)
3327 for (
Int_t j = 0; j < 10; ++j)
3335 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3341 numberofparticlesused++;
3356 for (
Int_t j = 0; j < D0TracksFromFriendFile->GetEntriesFast(); j++)
3361 if(!trackD0) {std::cout <<
"found none" << std::endl;
continue;}
3362 if(trackD0 ==
nullptr) {std::cout <<
"found nullptr" << std::endl;
continue;}
3370 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(trackD0->GetDaughter(0));
3371 AliAODTrack * trackSecondDaughter = (AliAODTrack*)(trackD0->GetDaughter(1));
3372 if(!
D0FirstDaughterSelection(trackFirstDaughter, primaryVertex, bz, mcTrackArray, B0toDStarPiLabelMatrix,header))
continue;
3373 if(!
D0SecondDaughterSelection(trackSecondDaughter, primaryVertex, bz, mcTrackArray, B0toDStarPiLabelMatrix,header))
continue;
3376 AliAODVertex *vertexMother = (AliAODVertex*)trackD0->GetSecondaryVtx();
3379 Int_t pdgCodeMother = -1;
3380 Float_t pdgCodeGrandMother = -1;
3381 Bool_t isDesiredCandidate = kFALSE;
3382 Int_t motherType, histType;
3384 Int_t mcLabelD0 = -1;
3392 isDesiredCandidate = kTRUE;
3394 Int_t mcLabelFirstTrack = -1;
3395 mcLabelFirstTrack = trackFirstDaughter->GetLabel();
3397 if(mcLabelFirstTrack >= 0)
3399 AliAODMCParticle *mcParticleFirstTrack = (AliAODMCParticle*)mcTrackArray->At(mcLabelFirstTrack);
3400 AliAODMCParticle *mcMotherParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0);
3402 if(mcParticleFirstTrack && mcMotherParticle)
3404 pdgCodeMother = mcMotherParticle->GetPdgCode();
3406 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()));
3409 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()));
3421 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
3425 Bool_t cutMother = kFALSE;
3427 Bool_t bCutArray[29] = {0};
3429 if(cutReturnValue == -1) cutMother = kTRUE;
3430 if(cutReturnValue == 0) cutMother = kTRUE;
3435 for (
Int_t k = 0; k < 29; ++k)
3437 if (bCutArray[k] == kTRUE){
3438 if(isDesiredCandidate){
3450 if(isDesiredCandidate){
3463 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
3470 delete vHF; vHF =
nullptr;
3482 Int_t ObjectNumber = TProcessID::GetObjectCount();
3485 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(aodEvent->GetTrack(
fDStarPionTracks->at(i)));
3486 if(!trackFirstDaughter)
continue;
3489 if(trackFirstDaughter->Charge() == -1) pdgD0 = -421;
3496 if(!trackSecondDaughter) {std::cout <<
"found none" << std::endl;
continue;}
3497 if(trackSecondDaughter ==
nullptr) {std::cout <<
"found nullptr" << std::endl;
continue;}
3500 if(trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(0) || trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(1))
continue;
3503 if(trackFirstDaughter->Charge() == trackSecondDaughter->Charge() || TMath::Abs(trackFirstDaughter->Charge() + trackSecondDaughter->Charge()) != 1)
continue;
3507 if(trackFirstDaughter->Charge() == -1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->Charge() != -1)
continue;
3508 if(trackFirstDaughter->Charge() == 1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->Charge() != 1)
continue;
3512 if(trackFirstDaughter->Charge()==1)
3514 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),2)))
continue;
3515 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),3)))
continue;
3516 }
else if (trackFirstDaughter->Charge()==-1){
3517 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),3)))
continue;
3518 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),2)))
continue;
3524 AliExternalTrackParam DStarPionTrackParam;
3525 DStarPionTrackParam.CopyFromVTrack(trackFirstDaughter);
3526 AliExternalTrackParam D0TrackParam;
3527 D0TrackParam.CopyFromVTrack(trackSecondDaughter);
3532 tracksTestVertex.Add(&DStarPionTrackParam);
3533 tracksTestVertex.Add(&D0TrackParam);
3536 AliAODVertex *testVertex =
RecalculateVertex(primaryVertex,&tracksTestVertex,bz,dispersionTest);
3537 if(!testVertex) {
delete testVertex; testVertex =
nullptr;
continue;}
3539 Double_t d0z0Test[2],covd0z0Test[3];
3542 DStarPionTrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
3543 D0TrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
3544 delete testVertex; testVertex =
nullptr;
3546 Double_t pdgMassPion = TDatabasePDG::Instance()->GetParticle(211)->Mass();
3547 Double_t pdgMassD0 = TDatabasePDG::Instance()->GetParticle(421)->Mass();
3548 Double_t pdgMassDStar = TDatabasePDG::Instance()->GetParticle(413)->Mass();
3550 Double_t energyDStarPion = pdgMassPion*pdgMassPion + DStarPionTrackParam.Px()*DStarPionTrackParam.Px()+DStarPionTrackParam.Py()*DStarPionTrackParam.Py()+DStarPionTrackParam.Pz()*DStarPionTrackParam.Pz();
3551 Double_t energyD0 = pdgMassD0*pdgMassD0 + D0TrackParam.Px()*D0TrackParam.Px()+D0TrackParam.Py()*D0TrackParam.Py()+D0TrackParam.Pz()*D0TrackParam.Pz();
3552 Double_t energySum = TMath::Sqrt(energyDStarPion) + TMath::Sqrt(energyD0);
3554 Double_t pxDStarTest = DStarPionTrackParam.Px() + D0TrackParam.Px();
3555 Double_t pyDStarTest = DStarPionTrackParam.Py() + D0TrackParam.Py();
3556 Double_t pzDStarTest = DStarPionTrackParam.Pz() + D0TrackParam.Pz();
3557 Double_t p2DStarTest = pxDStarTest*pxDStarTest + pyDStarTest*pyDStarTest + pzDStarTest*pzDStarTest;
3559 Double_t invMassDStarTest = TMath::Sqrt(energySum*energySum-p2DStarTest);
3562 Int_t nCutIndex = 0;
3563 Bool_t bCutArrayTemp[29];
3564 Double_t cutVariableValue = TMath::Abs(invMassDStarTest-pdgMassDStar)/2.0;
3566 if(!bPassedCut)
continue;
3569 AliExternalTrackParam firstTrack;
3570 firstTrack.CopyFromVTrack(trackFirstDaughter);
3571 AliExternalTrackParam secondTrack;
3572 secondTrack.CopyFromVTrack(trackSecondDaughter);
3574 Double_t d0z0DStar[2],covd0z0DStar[3],d0DStar[2],d0errDStar[2];
3576 firstTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
3577 d0DStar[0] = d0z0DStar[0];
3578 d0errDStar[0] = TMath::Sqrt(covd0z0DStar[0]);
3579 secondTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
3580 d0DStar[1] = d0z0DStar[0];
3581 d0errDStar[1] = TMath::Sqrt(covd0z0DStar[0]);
3584 cutVariableValue = d0DStar[0] * d0DStar[1];
3586 if(!bPassedCut)
continue;
3592 AliAODTrack * trackB0Pion =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(
fB0PionTracks->at(k)));
3593 if(!trackB0Pion)
continue;
3596 AliAODTrack* twoProngdaughter0 = (AliAODTrack*)trackSecondDaughter->GetDaughter(0);
3597 AliAODTrack* twoProngdaughter1 = (AliAODTrack*)trackSecondDaughter->GetDaughter(1);
3598 UShort_t idProng0 = twoProngdaughter0->GetID();
3599 UShort_t idProng1 = twoProngdaughter1->GetID();
3601 if(trackB0Pion->GetID() == trackFirstDaughter->GetID() || trackB0Pion->GetID() == idProng0 || trackB0Pion->GetID() == idProng1)
continue;
3604 Bool_t bSameSign = kFALSE;
3605 if(trackB0Pion->Charge() == (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) && trackB0Pion->Charge() + (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) != 0) bSameSign = kTRUE;
3611 AliAODTrack * trackB0PionRotated =
new AliAODTrack(*trackB0Pion);
3618 trackB0PionRotated->SetPhi(dPhiRotated);
3629 AliExternalTrackParam thirdTrack;
3630 thirdTrack.CopyFromVTrack(trackB0PionRotated);
3633 TObjArray daughterTracksWithRecalculation;
3635 daughterTracksWithRecalculation.Add(&firstTrack);
3636 daughterTracksWithRecalculation.Add(&secondTrack);
3637 daughterTracksWithRecalculation.Add(&thirdTrack);
3640 AliAODVertex *vertexMother =
RecalculateVertex(primaryVertex,&daughterTracksWithRecalculation,bz,dispersion);
3642 delete vertexMother; vertexMother =
nullptr;
3643 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3647 if(vertexMother->GetNDaughters()!=2)
3649 std::cout <<
"bad reconstruction - number of daughters for vertex is incorrect" << std::endl;
3650 delete vertexMother; vertexMother =
nullptr;
3651 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3655 Double_t xdummyDStar=0.,ydummyDStar=0.,eDStar[2];
3659 firstTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
3660 secondTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
3662 Double_t pxDStar[2],pyDStar[2],pzDStar[2];
3663 pxDStar[0] = firstTrack.Px();
3664 pyDStar[0] = firstTrack.Py();
3665 pzDStar[0] = firstTrack.Pz();
3666 pxDStar[1] = secondTrack.Px();
3667 pyDStar[1] = secondTrack.Py();
3668 pzDStar[1] = secondTrack.Pz();
3671 xyz_track1[0] = firstTrack.GetX();
3672 firstTrack.GetYAt(xyz_track1[0],bz,xyz_track1[1]);
3673 firstTrack.GetZAt(xyz_track1[0],bz,xyz_track1[2]);
3676 xyz_track2[0] = secondTrack.GetX();
3677 secondTrack.GetYAt(xyz_track2[0],bz,xyz_track2[1]);
3678 secondTrack.GetZAt(xyz_track2[0],bz,xyz_track2[2]);
3680 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]));
3690 Double_t dcaDStarPionD0 = secondTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
3691 Double_t dcaDStarPionB0Pion = secondTrack.GetDCA(&thirdTrack,bz,xdummyDStar,ydummyDStar);
3692 Double_t dcaB0PionD0 = thirdTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
3696 delete vertexMother; vertexMother =
nullptr;
3697 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3702 delete vertexMother; vertexMother =
nullptr;
3703 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3708 delete vertexMother; vertexMother =
nullptr;
3709 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3713 Double_t dcaCombined = TMath::Sqrt(TMath::Abs(dcaDStarPionD0) + TMath::Abs(dcaDStarPionB0Pion) + TMath::Abs(dcaB0PionD0));
3716 delete vertexMother; vertexMother =
nullptr;
3717 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3721 Short_t chargeDStar = trackFirstDaughter->Charge() + trackSecondDaughter->Charge();
3722 AliAODVertex * vertexDStar =
new AliAODVertex(*vertexMother);
3725 std::cout <<
"no dstar vertex" << std::endl;
3726 delete vertexMother; vertexMother =
nullptr;
3727 delete vertexDStar; vertexDStar =
nullptr;
3728 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3733 Int_t nProngsDStar = 2;
3737 delete vertexMother; vertexMother =
nullptr;
3738 delete vertexDStar; vertexDStar =
nullptr;
3739 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3743 trackDStar.SetCharge(chargeDStar);
3746 idDStar[0]= trackFirstDaughter->GetID();
3750 prongsDStar[0] = 211;
3751 prongsDStar[1] = 421;
3754 if(vertexDStar->GetNDaughters()!=2)
3756 std::cout <<
"bad reconstruction 2 - number of daughters for vertex is incorrect" << std::endl;
3757 delete vertexMother; vertexMother =
nullptr;
3758 delete vertexDStar; vertexDStar =
nullptr;
3759 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3763 trackDStar.GetSecondaryVtx()->AddDaughter(trackFirstDaughter);
3764 trackDStar.GetSecondaryVtx()->AddDaughter(trackSecondDaughter);
3778 Double_t xdummy=0.,ydummy=0.,dca,e[2];
3779 Double_t d0z0[2],covd0z0[3],d0[2],d0err[2];
3781 AliExternalTrackParam fourthTrack;
3782 fourthTrack.CopyFromVTrack(&trackDStar);
3784 thirdTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
3785 fourthTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
3788 px[0] = thirdTrack.Px();
3789 py[0] = thirdTrack.Py();
3790 pz[0] = thirdTrack.Pz();
3791 px[1] = fourthTrack.Px();
3792 py[1] = fourthTrack.Py();
3793 pz[1] = fourthTrack.Pz();
3800 id[0]= thirdTrack.GetID();
3803 thirdTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3805 d0err[0] = TMath::Sqrt(covd0z0[0]);
3806 fourthTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3808 d0err[1] = TMath::Sqrt(covd0z0[0]);
3810 dca = fourthTrack.GetDCA(&thirdTrack,bz,xdummy,ydummy);
3813 Short_t chargeMother = trackFirstDaughter->Charge() + trackDStar.Charge();
3814 Int_t nProngsB0 = 2;
3818 delete vertexMother; vertexMother =
nullptr;
3819 delete vertexDStar; vertexDStar =
nullptr;
3820 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3824 trackB0.SetCharge(chargeMother);
3826 trackB0.GetSecondaryVtx()->AddDaughter(trackB0PionRotated);
3827 trackB0.GetSecondaryVtx()->AddDaughter(&trackDStar);
3832 if(TMath::Abs(trackB0.Y(511)) > 0.8) {
3833 delete vertexMother; vertexMother =
nullptr;
3834 delete vertexDStar; vertexDStar =
nullptr;
3835 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3846 Bool_t isDesiredCandidate = kFALSE;
3847 Int_t mcLabelB0 = -1;
3848 Int_t mcLabelDStar = -1;
3850 Int_t motherType, histType;
3858 if (mcLabelB0 >= 0 && mcLabelDStar >= 0 && trackB0PionRotated->GetLabel() >= 0 && iRot == 0)
3860 AliAODMCParticle *mcTrackDStarPion = (AliAODMCParticle*)mcTrackArray->At(trackB0PionRotated->GetLabel());
3861 AliAODMCParticle *mcTrackDStar = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStar);
3863 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()));
3866 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()));
3869 isDesiredCandidate = kTRUE;
3874 Bool_t bIsInjected = kFALSE;
3880 if(
fRemoveInjected == 1 && isDesiredCandidate == kFALSE && bIsInjected) {
3881 delete vertexMother; vertexMother =
nullptr;
3882 delete vertexDStar; vertexDStar =
nullptr;
3883 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3887 delete vertexMother; vertexMother =
nullptr;
3888 delete vertexDStar; vertexDStar =
nullptr;
3889 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3905 Bool_t cutDStar = kFALSE;
3907 Bool_t bCutArrayDStar[29] = {0};
3909 if(cutReturnValueDStar == -1) cutDStar = kTRUE;
3910 if(cutReturnValueDStar == 0) cutDStar = kTRUE;
3912 Bool_t bCutArrayD0[39] = {0};
3914 if(cutReturnValueD0 == -1) cutDStar = kTRUE;
3915 if(cutReturnValueD0 == 0) cutDStar = kTRUE;
3921 for (
Int_t n = 0; n < 29; ++n)
3923 if(bCutArrayDStar[n] == kTRUE){
3924 if(isDesiredCandidate){
3931 for (
Int_t n = 0; n < 39; ++n)
3933 if(bCutArrayD0[n] == kTRUE){
3934 if(isDesiredCandidate){
3946 if(isDesiredCandidate)
3950 delete vertexMother; vertexMother =
nullptr;
3951 delete vertexDStar; vertexDStar =
nullptr;
3952 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
3981 if(isDesiredCandidate)
3983 AliAODMCParticle *mcTrackFirstDaughter = (AliAODMCParticle*)mcTrackArray->At(trackB0PionRotated->GetLabel());
3984 AliAODMCParticle *mcTrackB0 = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0);
3986 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()));
3989 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()));
3999 if(isDesiredCandidate)
4008 Bool_t cutMother = kFALSE;
4010 Bool_t bCutArray[97] = {0};
4011 Int_t numberOfCuts = 97;
4013 if(cutReturnValue == -1) cutMother = kTRUE;
4014 if(cutReturnValue == 0) cutMother = kTRUE;
4019 Double_t invariantMassMother = trackB0.InvMass(2,prongs);
4020 Double_t pdgMassMother=TDatabasePDG::Instance()->GetParticle(511)->Mass();
4024 for (
Int_t n = 0; n < 97; ++n)
4026 if(bCutArray[n] == kTRUE){
4027 if(isDesiredCandidate){
4034 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow){
4035 for (
Int_t l = 0; l < numberOfCuts; ++l)
4037 if(bCutArray[l] == kFALSE)
continue;
4038 for (
Int_t j = 0; j < numberOfCuts; ++j)
4040 if(bCutArray[j] == kFALSE)
continue;
4041 if(isDesiredCandidate == kFALSE) histName =
"cutEffectBackground";
4042 if(isDesiredCandidate == kTRUE) histName =
"cutEffectSignal";
4043 ((TH2I*)(
fOutputB0MC->FindObject(histName)))->Fill(l,j);
4047 for (
Int_t l = 0; l < numberOfCuts; ++l)
4049 if(bCutArray[l] == kFALSE)
continue;
4051 for (
Int_t j = 0; j < numberOfCuts; ++j)
4054 if(bCutArray[j] == kTRUE)
4063 if(isDesiredCandidate == kFALSE) histName =
"cutEffectUniqueBackground";
4064 if(isDesiredCandidate == kTRUE) histName =
"cutEffectUniqueSignal";
4076 if(isDesiredCandidate)
4080 delete vertexMother; vertexMother =
nullptr;
4081 delete vertexDStar; vertexDStar =
nullptr;
4082 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4087 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
4088 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_DStarPion)))->Fill(dcaDStarPionD0);
4090 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
4091 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_B0Pion)))->Fill(dcaB0PionD0);
4093 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
4094 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
4096 TString name_dca_Combined =
"dca_Combined";
4097 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Combined)))->Fill(dcaCombined);
4101 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
4102 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_D0_DStarPion)))->Fill(dcaDStarPionD0);
4104 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
4105 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_D0_B0Pion)))->Fill(dcaB0PionD0);
4107 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
4108 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
4110 TString name_dca_Signal_Combined =
"dca_Signal_Combined";
4111 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_Combined)))->Fill(dcaCombined);
4116 Bool_t bIsCorrelatedBackground = kFALSE;
4117 Bool_t bIsCorrelatedBackground511 = kFALSE;
4120 Int_t mcLabelB0Pion = trackB0PionRotated->GetLabel();
4121 Int_t mcLabelDStarPion = trackFirstDaughter->GetLabel();
4122 Int_t mcLabelD0first = ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->GetLabel();
4123 Int_t mcLabelD0second = ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->GetLabel();
4125 if(mcLabelB0Pion >= 0 && mcLabelDStarPion >= 0 && mcLabelD0first >= 0 && mcLabelD0second >= 0)
4127 AliAODMCParticle * mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0Pion);
4128 AliAODMCParticle * mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStarPion);
4129 AliAODMCParticle * mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0first);
4130 AliAODMCParticle * mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0second);
4135 while(mcB0Pion->GetMother() >= 0)
4137 mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcB0Pion->GetMother());
4138 fillthis=
"particle_pdgB0Pion";
4139 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcB0Pion->GetPdgCode()),iterator++);
4146 while(mcDStarPion->GetMother() >= 0)
4148 mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcDStarPion->GetMother());
4149 fillthis=
"particle_pdgB0Pion";
4150 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcDStarPion->GetPdgCode()),iterator++);
4157 while(mcD0first->GetMother() >= 0)
4159 mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4160 fillthis=
"particle_pdgD0First";
4161 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcD0first->GetPdgCode()),iterator++);
4168 while(mcD0second->GetMother() >= 0)
4170 mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcD0second->GetMother());
4171 fillthis=
"particle_pdgD0Second";
4172 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcD0second->GetPdgCode()),iterator++);
4176 mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0Pion);
4177 mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStarPion);
4178 mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0first);
4179 mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0second);
4181 if(mcB0Pion && mcDStarPion && mcD0first && mcD0second)
4184 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4186 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4187 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4188 if(D0Mother->GetMother() == mcDStarPion->GetMother() && D0Mother->GetMother() >= 0 && D0GrandMother->GetMother() == mcB0Pion->GetMother() && D0GrandMother->GetMother() >= 0)
4190 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4191 fillthis=
"particle_pdgAll";
4192 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4193 fillthis=
"particle_pdgAllInvMass";
4194 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4195 if(TMath::Abs(finalMother->GetPdgCode())==511)
4197 bIsCorrelatedBackground = kTRUE;
4198 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4200 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4201 fillthis=
"particle_daughterPdgTwoStep511a";
4202 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4204 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4206 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4207 fillthis=
"particle_daughterPdgTwoStep511a";
4208 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4210 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4212 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4213 fillthis=
"particle_daughterPdgTwoStep511a";
4214 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4217 if(TMath::Abs(finalMother->GetPdgCode())==521)
4219 bIsCorrelatedBackground = kTRUE;
4220 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4222 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4223 fillthis=
"particle_daughterPdgTwoStep521a";
4224 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4226 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4228 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4229 fillthis=
"particle_daughterPdgTwoStep521a";
4230 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4232 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4234 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4235 fillthis=
"particle_daughterPdgTwoStep521a";
4236 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4243 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4245 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4246 if(D0Mother->GetMother() == mcB0Pion->GetMother() && D0Mother->GetMother() >= 0)
4248 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4249 fillthis=
"particle_pdgAllSecond";
4250 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4251 fillthis=
"particle_pdgAllInvMassSecond";
4252 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4253 if(TMath::Abs(finalMother->GetPdgCode())==511)
4255 bIsCorrelatedBackground = kTRUE;
4256 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4258 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4259 fillthis=
"particle_daughterPdgOneStep511a";
4260 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4262 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4264 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4265 fillthis=
"particle_daughterPdgOneStep511a";
4266 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4269 if(TMath::Abs(finalMother->GetPdgCode())==521)
4273 delete vertexMother; vertexMother =
nullptr;
4274 delete vertexDStar; vertexDStar =
nullptr;
4275 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4278 bIsCorrelatedBackground = kTRUE;
4279 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4281 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4282 fillthis=
"particle_daughterPdgOneStep521a";
4283 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4285 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4287 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4288 fillthis=
"particle_daughterPdgOneStep521a";
4289 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4296 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4298 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4299 if(D0Mother->GetMother() == mcDStarPion->GetMother() && D0Mother->GetMother() >= 0)
4301 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4302 fillthis=
"particle_pdgAllThird";
4303 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4304 fillthis=
"particle_pdgAllInvMassThird";
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_daughterPdgOneStep511b";
4313 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4315 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4317 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4318 fillthis=
"particle_daughterPdgOneStep511b";
4319 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4322 if(TMath::Abs(finalMother->GetPdgCode())==521)
4324 bIsCorrelatedBackground = kTRUE;
4325 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4327 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4328 fillthis=
"particle_daughterPdgOneStep521b";
4329 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4331 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4333 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4334 fillthis=
"particle_daughterPdgOneStep521b";
4335 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4342 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4344 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4345 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4346 if(D0GrandMother->GetMother() == mcB0Pion->GetMother() && D0GrandMother->GetMother() >= 0)
4348 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4349 fillthis=
"particle_pdgAllFourth";
4350 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4351 fillthis=
"particle_pdgAllInvMassFourth";
4352 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4353 if(TMath::Abs(finalMother->GetPdgCode())==511)
4357 delete vertexMother; vertexMother =
nullptr;
4358 delete vertexDStar; vertexDStar =
nullptr;
4359 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
4362 bIsCorrelatedBackground = kTRUE;
4363 bIsCorrelatedBackground511 = kTRUE;
4364 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4366 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4367 fillthis=
"particle_daughterPdgTwoStep511b";
4368 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4370 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4372 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4373 fillthis=
"particle_daughterPdgTwoStep511b";
4374 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4376 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4378 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4379 fillthis=
"particle_daughterPdgTwoStep511b";
4380 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4383 if(TMath::Abs(finalMother->GetPdgCode())==521)
4385 bIsCorrelatedBackground = kTRUE;
4386 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4388 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4389 fillthis=
"particle_daughterPdgTwoStep521b";
4390 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4392 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4394 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4395 fillthis=
"particle_daughterPdgTwoStep521b";
4396 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4398 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4400 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4401 fillthis=
"particle_daughterPdgTwoStep521b";
4402 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4409 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4411 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4412 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4413 if(D0GrandMother->GetMother() == mcDStarPion->GetMother() && D0GrandMother->GetMother() >= 0)
4415 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4416 fillthis=
"particle_pdgAllFifth";
4417 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4418 fillthis=
"particle_pdgAllInvMassFifth";
4419 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4420 if(TMath::Abs(finalMother->GetPdgCode())==511)
4422 bIsCorrelatedBackground = kTRUE;
4423 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4425 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4426 fillthis=
"particle_daughterPdgTwoStep511c";
4427 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4429 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4431 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4432 fillthis=
"particle_daughterPdgTwoStep511c";
4433 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4435 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4437 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4438 fillthis=
"particle_daughterPdgTwoStep511c";
4439 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4442 if(TMath::Abs(finalMother->GetPdgCode())==521)
4444 bIsCorrelatedBackground = kTRUE;
4445 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4447 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4448 fillthis=
"particle_daughterPdgTwoStep521c";
4449 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4451 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4453 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4454 fillthis=
"particle_daughterPdgTwoStep521c";
4455 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4457 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4459 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4460 fillthis=
"particle_daughterPdgTwoStep521c";
4461 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4487 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
4492 if(!isDesiredCandidate)
4494 motherType = 0; histType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4498 if(isDesiredCandidate)
4500 motherType = 0; histType = 5;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4510 ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[ptBin]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[ptBin+1];
4511 histType = 6 + 2 * ptBin;
4514 Int_t histTypeD0 = 2 * d0PtBin;
4517 Int_t histTypeD0DStar = 2 * d0DStarPtBin;
4520 Int_t histTypeDStar = 2 * dstarPtBin;
4523 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
4525 if(!bSameSign && histType > 5)
4527 if(!isDesiredCandidate)
4529 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4532 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0, pdgD0);
4533 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar, pdgD0);
4537 if(isDesiredCandidate)
4540 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4543 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0 + 1, pdgD0);
4544 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar + 1, pdgD0);
4551 if(bSameSign && iRot == 0)
4553 fillthis=
"invariantMassB0";
4554 fillthis +=
"_SameSign";
4555 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4556 fillthis=
"invariantMassB0";
4557 fillthis += ptBinMother +
"_SameSign";
4558 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4559 fillthis=
"invariantMassB0";
4560 fillthis +=
"_SignSum";
4561 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4562 fillthis=
"invariantMassB0";
4563 fillthis += ptBinMother +
"_SignSum";
4564 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4570 fillthis=
"invariantMassB0";
4571 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4572 fillthis=
"invariantMassB0";
4573 fillthis += ptBinMother;
4574 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4575 fillthis=
"invariantMassB0";
4576 fillthis +=
"_SignSum";
4577 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4578 fillthis=
"invariantMassB0";
4579 fillthis += ptBinMother +
"_SignSum";
4580 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4582 fillthis =
"invariantMassB0Signal_BA";
4583 if(isDesiredCandidate) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4585 fillthis =
"invariantMassB0Correlated_BA";
4586 if(bIsCorrelatedBackground) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4588 fillthis =
"invariantMassB0Background_BA";
4589 if(!isDesiredCandidate && !bIsCorrelatedBackground) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4591 if(bIsCorrelatedBackground511)
4593 fillthis=
"invariantMassB0_correlated511";
4594 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4595 fillthis=
"invariantMassB0";
4596 fillthis += ptBinMother +
"_correlated511";
4597 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4600 if(!isDesiredCandidate && !bIsInjected)
4602 TString signName =
"_HIJING_Background";
4603 fillthis=
"invariantMassB0";
4604 fillthis += signName;
4605 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4606 fillthis=
"invariantMassB0";
4607 fillthis += ptBinMother + signName;
4608 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4610 if(isDesiredCandidate && !bIsInjected)
4612 TString signName =
"_HIJING_Signal";
4613 fillthis=
"invariantMassB0";
4614 fillthis += signName;
4615 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4616 fillthis=
"invariantMassB0";
4617 fillthis += ptBinMother + signName;
4618 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4623 TString signName =
"_Background_rotation";
4624 fillthis=
"invariantMassB0";
4625 fillthis += signName;
4626 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4627 fillthis=
"invariantMassB0";
4628 fillthis += ptBinMother + signName;
4629 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4630 if(!isDesiredCandidate && !bIsInjected)
4632 signName =
"_HIJING_Background_rotation";
4633 fillthis=
"invariantMassB0";
4634 fillthis += signName;
4635 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4636 fillthis=
"invariantMassB0";
4637 fillthis += ptBinMother + signName;
4638 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4643 if(trackB0.Pt() > 6.0)
4645 TString broadptBinMother =
"_ptbin_6_to_inf";
4646 if(bSameSign && iRot == 0)
4648 fillthis=
"invariantMassB0";
4649 fillthis += broadptBinMother +
"_SameSign";
4650 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4651 fillthis=
"invariantMassB0";
4652 fillthis += broadptBinMother +
"_SignSum";
4653 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4659 fillthis=
"invariantMassB0";
4660 fillthis += broadptBinMother;
4661 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4662 fillthis=
"invariantMassB0";
4663 fillthis += broadptBinMother +
"_SignSum";
4664 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4665 if(!isDesiredCandidate && !bIsInjected)
4667 TString signName =
"_HIJING_Background";
4668 fillthis=
"invariantMassB0";
4669 fillthis += broadptBinMother + signName;
4670 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4672 if(isDesiredCandidate && !bIsInjected)
4674 TString signName =
"_HIJING_Signal";
4675 fillthis=
"invariantMassB0";
4676 fillthis += broadptBinMother + signName;
4677 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4682 TString signName =
"_Background_rotation";
4683 fillthis=
"invariantMassB0";
4684 fillthis += broadptBinMother + signName;
4685 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4686 if(!isDesiredCandidate && !bIsInjected)
4688 signName =
"_HIJING_Background_rotation";
4689 fillthis=
"invariantMassB0";
4690 fillthis += broadptBinMother + signName;
4691 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4697 if(trackB0.Pt() > 3.0)
4699 TString broadptBinMother =
"_ptbin_3_to_inf";
4700 if(bSameSign && iRot == 0)
4702 fillthis=
"invariantMassB0";
4703 fillthis += broadptBinMother +
"_SameSign";
4704 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4705 fillthis=
"invariantMassB0";
4706 fillthis += broadptBinMother +
"_SignSum";
4707 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4713 fillthis=
"invariantMassB0";
4714 fillthis += broadptBinMother;
4715 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4716 fillthis=
"invariantMassB0";
4717 fillthis += broadptBinMother +
"_SignSum";
4718 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4719 if(!isDesiredCandidate && !bIsInjected)
4721 TString signName =
"_HIJING_Background";
4722 fillthis=
"invariantMassB0";
4723 fillthis += broadptBinMother + signName;
4724 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4726 if(isDesiredCandidate && !bIsInjected)
4728 TString signName =
"_HIJING_Signal";
4729 fillthis=
"invariantMassB0";
4730 fillthis += broadptBinMother + signName;
4731 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4736 TString signName =
"_Background_rotation";
4737 fillthis=
"invariantMassB0";
4738 fillthis += broadptBinMother + signName;
4739 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4740 if(!isDesiredCandidate && !bIsInjected)
4742 signName =
"_HIJING_Background_rotation";
4743 fillthis=
"invariantMassB0";
4744 fillthis += broadptBinMother + signName;
4745 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4935 if(bSameSign && iRot == 0)
4937 fillthis=
"deltainvariantMassB0";
4938 fillthis +=
"_SameSign";
4939 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4940 fillthis=
"deltainvariantMassB0";
4941 fillthis += ptBinMother +
"_SameSign";
4942 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4943 fillthis=
"deltainvariantMassB0";
4944 fillthis +=
"_SignSum";
4945 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
4946 fillthis=
"deltainvariantMassB0";
4947 fillthis += ptBinMother +
"_SignSum";
4948 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
4954 fillthis=
"deltainvariantMassB0";
4955 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4956 fillthis=
"deltainvariantMassB0";
4957 fillthis += ptBinMother;
4958 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4959 fillthis=
"deltainvariantMassB0";
4960 fillthis +=
"_SignSum";
4961 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
4962 fillthis=
"deltainvariantMassB0";
4963 fillthis += ptBinMother +
"_SignSum";
4964 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
4966 if(bIsCorrelatedBackground511)
4968 fillthis=
"deltainvariantMassB0_correlated511";
4969 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4970 fillthis=
"deltainvariantMassB0";
4971 fillthis += ptBinMother +
"_correlated511" ;
4972 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4975 if(!isDesiredCandidate && !bIsInjected)
4977 TString signName =
"_HIJING_Background";
4978 fillthis=
"deltainvariantMassB0";
4979 fillthis += signName;
4980 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4981 fillthis=
"deltainvariantMassB0";
4982 fillthis += ptBinMother + signName;
4983 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4985 if(isDesiredCandidate && !bIsInjected)
4987 TString signName =
"_HIJING_Signal";
4988 fillthis=
"deltainvariantMassB0";
4989 fillthis += signName;
4990 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4991 fillthis=
"deltainvariantMassB0";
4992 fillthis += ptBinMother + signName;
4993 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4998 TString signName =
"_Background_rotation";
4999 fillthis=
"deltainvariantMassB0";
5000 fillthis += signName;
5001 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5002 fillthis=
"deltainvariantMassB0";
5003 fillthis += ptBinMother + signName;
5004 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5005 if(!isDesiredCandidate && !bIsInjected)
5007 signName =
"_HIJING_Background_rotation";
5008 fillthis=
"deltainvariantMassB0";
5009 fillthis += signName;
5010 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5011 fillthis=
"deltainvariantMassB0";
5012 fillthis += ptBinMother + signName;
5013 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5018 if(trackB0.Pt() > 6.0)
5020 TString broadptBinMother =
"_ptbin_6_to_inf";
5021 if(bSameSign && iRot == 0)
5023 fillthis=
"deltainvariantMassB0";
5024 fillthis += broadptBinMother +
"_SameSign";
5025 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5026 fillthis=
"deltainvariantMassB0";
5027 fillthis += broadptBinMother +
"_SignSum";
5028 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5034 fillthis=
"deltainvariantMassB0";
5035 fillthis += broadptBinMother;
5036 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5037 fillthis=
"deltainvariantMassB0";
5038 fillthis += broadptBinMother +
"_SignSum";
5039 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5040 if(!isDesiredCandidate && !bIsInjected)
5042 TString signName =
"_HIJING_Background";
5043 fillthis=
"deltainvariantMassB0";
5044 fillthis += broadptBinMother + signName;
5045 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5047 if(isDesiredCandidate && !bIsInjected)
5049 TString signName =
"_HIJING_Signal";
5050 fillthis=
"deltainvariantMassB0";
5051 fillthis += broadptBinMother + signName;
5052 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5057 TString signName =
"_Background_rotation";
5058 fillthis=
"deltainvariantMassB0";
5059 fillthis += broadptBinMother + signName;
5060 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5061 if(!isDesiredCandidate && !bIsInjected)
5063 signName =
"_HIJING_Background_rotation";
5064 fillthis=
"deltainvariantMassB0";
5065 fillthis += broadptBinMother + signName;
5066 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5072 if(trackB0.Pt() > 3.0)
5074 TString broadptBinMother =
"_ptbin_3_to_inf";
5075 if(bSameSign && iRot == 0)
5077 fillthis=
"deltainvariantMassB0";
5078 fillthis += broadptBinMother +
"_SameSign";
5079 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5080 fillthis=
"deltainvariantMassB0";
5081 fillthis += broadptBinMother +
"_SignSum";
5082 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5088 fillthis=
"deltainvariantMassB0";
5089 fillthis += broadptBinMother;
5090 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5091 fillthis=
"deltainvariantMassB0";
5092 fillthis += broadptBinMother +
"_SignSum";
5093 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5094 if(!isDesiredCandidate && !bIsInjected)
5096 TString signName =
"_HIJING_Background";
5097 fillthis=
"deltainvariantMassB0";
5098 fillthis += broadptBinMother + signName;
5099 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5101 if(isDesiredCandidate && !bIsInjected)
5103 TString signName =
"_HIJING_Signal";
5104 fillthis=
"deltainvariantMassB0";
5105 fillthis += broadptBinMother + signName;
5106 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5111 TString signName =
"_Background_rotation";
5112 fillthis=
"deltainvariantMassB0";
5113 fillthis += broadptBinMother + signName;
5114 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5115 if(!isDesiredCandidate && !bIsInjected)
5117 signName =
"_HIJING_Background_rotation";
5118 fillthis=
"deltainvariantMassB0";
5119 fillthis += broadptBinMother + signName;
5120 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5309 delete vertexMother; vertexMother =
nullptr;
5310 delete vertexDStar; vertexDStar =
nullptr;
5311 delete trackB0PionRotated; trackB0PionRotated =
nullptr;
5319 TProcessID::SetObjectCount(ObjectNumber);
5328 AliAODTrack* selectedB0Pion = (AliAODTrack*)selectedB0->GetDaughter(0);
5331 AliAODTrack* selectedDStarPion = (AliAODTrack*)selectedDStar->GetDaughter(0);
5334 AliAODTrack* selectedD0Pion;
5335 AliAODTrack* selectedD0Kaon;
5337 if(selectedDStarPion->Charge() == 1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(0);
5338 if(selectedDStarPion->Charge() == -1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(1);
5340 if(selectedDStarPion->Charge() == 1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(1);
5341 if(selectedDStarPion->Charge() == -1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(0);
5343 Double_t d0B0pion = TMath::Abs(selectedB0->Getd0Prong(0));
5344 Double_t d0DStarpion = TMath::Abs(selectedDStar->Getd0Prong(0));
5348 if(selectedDStarPion->Charge() == 1) d0D0pion = selectedD0->Getd0Prong(0);
5349 if(selectedDStarPion->Charge() == -1) d0D0pion = selectedD0->Getd0Prong(1);
5351 if(selectedDStarPion->Charge() == 1) d0D0kaon = selectedD0->Getd0Prong(1);
5352 if(selectedDStarPion->Charge() == -1) d0D0kaon = selectedD0->Getd0Prong(0);
5356 Int_t numberOfITS = 0;
5357 Int_t numberOfTPC = 0;
5358 Int_t daughterType, histType;
5359 Int_t totalNumberOfITS = 0;
5360 Int_t totalNumberOfTPC = 0;
5365 Int_t pionPIDnumber = 2;
5366 Int_t kaonPIDnumber = 3;
5373 pt_track = selectedD0Pion->Pt();
5374 momentum_track = selectedD0Pion->P();
5375 numberOfITS = selectedD0Pion->GetITSNcls();
5376 numberOfTPC = selectedD0Pion->GetTPCNcls();
5377 totalNumberOfITS += numberOfITS;
5378 totalNumberOfTPC += numberOfTPC;
5379 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Pion, pionPIDnumber, nSigmaTPC);
5380 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Pion, pionPIDnumber, nSigmaTOF);
5381 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5382 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5388 if(!isDesiredCandidate)
5395 for (
Int_t j = 0; j < 10; ++j)
5397 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5403 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5408 if(isDesiredCandidate)
5416 for (
Int_t j = 0; j < 10; ++j)
5418 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5424 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5433 Float_t pdgCodeParticleMother = -1;
5434 Int_t mcLabelParticle = -1;
5435 Int_t mcLabelParticleMother = -1;
5436 mcLabelParticle = selectedD0Pion->GetLabel();
5438 if(mcLabelParticle >= 0){
5440 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5441 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5443 mcLabelParticleMother = mcTrackParticle->GetMother();
5445 if(mcLabelParticleMother >= 0){
5446 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5447 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5448 ((TH1F*)fDaughterHistogramArrayExtra[0][3])->Fill(pdgCodeParticleMother);
5456 pt_track = selectedD0Kaon->Pt();
5457 momentum_track = selectedD0Kaon->P();
5458 numberOfITS = selectedD0Kaon->GetITSNcls();
5459 numberOfTPC = selectedD0Kaon->GetTPCNcls();
5460 totalNumberOfITS += numberOfITS;
5461 totalNumberOfTPC += numberOfTPC;
5462 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Kaon, kaonPIDnumber, nSigmaTPC);
5463 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Kaon, kaonPIDnumber, nSigmaTOF);
5464 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5465 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5469 if(!isDesiredCandidate)
5476 for (
Int_t j = 0; j < 10; ++j)
5478 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5484 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5489 if(isDesiredCandidate)
5497 for (
Int_t j = 0; j < 10; ++j)
5499 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5505 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5514 Float_t pdgCodeParticleMother = -1;
5515 Int_t mcLabelParticle = -1;
5516 Int_t mcLabelParticleMother = -1;
5517 mcLabelParticle = selectedD0Kaon->GetLabel();
5519 if(mcLabelParticle >= 0){
5521 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5522 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5524 mcLabelParticleMother = mcTrackParticle->GetMother();
5526 if(mcLabelParticleMother >= 0){
5527 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5528 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5529 ((TH1F*)fDaughterHistogramArrayExtra[1][3])->Fill(pdgCodeParticleMother);
5535 pt_track = selectedDStarPion->Pt();
5536 momentum_track = selectedDStarPion->P();
5537 numberOfITS = selectedDStarPion->GetITSNcls();
5538 numberOfTPC = selectedDStarPion->GetTPCNcls();
5539 totalNumberOfITS += numberOfITS;
5540 totalNumberOfTPC += numberOfTPC;
5541 TPCok = trackPIDHF->
GetnSigmaTPC(selectedDStarPion, pionPIDnumber, nSigmaTPC);
5542 TOFok = trackPIDHF->
GetnSigmaTOF(selectedDStarPion, pionPIDnumber, nSigmaTOF);
5543 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5547 if(!isDesiredCandidate)
5554 for (
Int_t j = 0; j < 10; ++j)
5556 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5562 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5567 if(isDesiredCandidate)
5575 for (
Int_t j = 0; j < 10; ++j)
5577 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5583 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5592 Float_t pdgCodeParticleMother = -1;
5593 Int_t mcLabelParticle = -1;
5594 Int_t mcLabelParticleMother = -1;
5595 mcLabelParticle = selectedDStarPion->GetLabel();
5597 if(mcLabelParticle >= 0){
5599 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5600 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5602 mcLabelParticleMother = mcTrackParticle->GetMother();
5604 if(mcLabelParticleMother >= 0){
5605 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5606 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5607 ((TH1F*)fDaughterHistogramArrayExtra[2][3])->Fill(pdgCodeParticleMother);
5613 pt_track = selectedB0Pion->Pt();
5614 momentum_track = selectedB0Pion->P();
5615 numberOfITS = selectedB0Pion->GetITSNcls();
5616 numberOfTPC = selectedB0Pion->GetTPCNcls();
5617 totalNumberOfITS += numberOfITS;
5618 totalNumberOfTPC += numberOfTPC;
5619 TPCok = trackPIDHF->
GetnSigmaTPC(selectedB0Pion, pionPIDnumber, nSigmaTPC);
5620 TOFok = trackPIDHF->
GetnSigmaTOF(selectedB0Pion, pionPIDnumber, nSigmaTOF);
5621 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5622 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5626 if(!isDesiredCandidate)
5633 for (
Int_t j = 0; j < 10; ++j)
5635 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5641 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5646 if(isDesiredCandidate)
5654 for (
Int_t j = 0; j < 10; ++j)
5656 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5662 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5671 Float_t pdgCodeParticleMother = -1;
5672 Int_t mcLabelParticle = -1;
5673 Int_t mcLabelParticleMother = -1;
5674 mcLabelParticle = selectedB0Pion->GetLabel();
5676 if(mcLabelParticle >= 0){
5678 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5679 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5681 mcLabelParticleMother = mcTrackParticle->GetMother();
5683 if(mcLabelParticleMother >= 0){
5684 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5685 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5686 ((TH1F*)fDaughterHistogramArrayExtra[3][3])->Fill(pdgCodeParticleMother);
5691 if(!isDesiredCandidate)
5693 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSBackground")))->Fill(totalNumberOfITS);
5694 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCBackground")))->Fill(totalNumberOfTPC);
5695 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDBackground")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
5697 if(isDesiredCandidate)
5699 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSSignal")))->Fill(totalNumberOfITS);
5700 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCSignal")))->Fill(totalNumberOfTPC);
5701 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDSignal")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
5713 Int_t chargeDStar = DStar->Charge();