35 #include <TParticle.h> 38 #include <TDatabasePDG.h> 39 #include <AliAnalysisDataSlot.h> 40 #include <AliAnalysisDataContainer.h> 43 #include "AliMCEvent.h" 44 #include "AliAnalysisManager.h" 45 #include "AliAODMCHeader.h" 46 #include "AliAODHandler.h" 48 #include "AliVertex.h" 49 #include "AliVVertex.h" 50 #include "AliESDVertex.h" 51 #include "AliAODVertex.h" 52 #include "AliVertexerTracks.h" 53 #include "AliExternalTrackParam.h" 54 #include "AliNeutralTrackParam.h" 55 #include "AliAODRecoDecay.h" 61 #include "AliESDtrack.h" 62 #include "AliAODMCParticle.h" 63 #include "AliAODEvent.h" 65 #include "AliAODInputHandler.h" 86 fQuickSignalAnalysis(0),
88 fHistMassWindow(0.125),
89 fDegreePerRotation(0),
90 fNumberOfRotations(0),
92 fPerformCutOptimization(0),
96 fOutputD0FirstDaughter(0),
97 fOutputD0SecondDaughter(0),
104 fBPlusPionTracks(0x0),
109 fnPtBinsD0forD0ptbin(0),
110 fnPtBinsD0forD0ptbinLimits(0),
111 fPtBinLimitsD0forD0ptbin(0x0),
112 fCutVariableValueArray(),
113 fDaughterHistogramArray(),
114 fDaughterHistogramArray2D(),
115 fDaughterHistogramArrayExtra(),
116 fMotherHistogramArray(),
117 fMotherHistogramArray2D(),
118 fMotherHistogramArrayExtra()
170 Info(
"AliAnalysisTaskSEBPlustoD0Pi",
"Calling Constructor");
174 DefineInput(0, TChain::Class());
175 DefineOutput(1, TList::Class());
176 DefineOutput(2, TList::Class());
177 DefineOutput(3, TList::Class());
178 DefineOutput(4, TList::Class());
179 DefineOutput(5, TList::Class());
180 DefineOutput(6, TList::Class());
181 DefineOutput(7, TList::Class());
182 DefineOutput(8, TList::Class());
183 DefineOutput(9, TList::Class());
191 Info(
"~AliAnalysisTaskSEBPlustoD0Pi",
"Calling Destructor");
208 for (
Int_t i = 0; i < 4; i++) {
209 for (
Int_t j = 0; j < 6; j++) {
210 for (
Int_t k = 0; k < 15; k++) {
215 for (
Int_t i = 0; i < 4; i++) {
216 for (
Int_t j = 0; j < 6; j++) {
220 for (
Int_t i = 0; i < 4; i++) {
221 for (
Int_t j = 0; j < 6; j++) {
225 for (
Int_t i = 0; i < 6; i++) {
226 for (
Int_t j = 0; j < 99; j++) {
227 for (
Int_t k = 0; k < 60; k++) {
232 for (
Int_t i = 0; i < 6; i++) {
233 for (
Int_t j = 0; j < 99; j++) {
234 for (
Int_t k = 0; k < 60; k++) {
239 for (
Int_t i = 0; i < 7; i++) {
240 for (
Int_t j = 0; j < 10; j++) {
251 if (fDebug > 1) printf(
"AliAnalysisTaskSEBPlustoD0Pi::Init() \n");
267 Error(
"UserExec",
"NO EVENT FOUND!");
272 std::cout <<
"\r" <<
"Analysing event number: " <<
fEvents << std::endl;
280 std::bitset<32> maskEV(((AliAODInputHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected());
281 std::cout <<
"Event mask: " << maskEV << std::endl;
292 TClonesArray * D0TracksFromFriendFile = 0;
295 if (!aodEvent && AODEvent() && IsStandardAOD()) {
298 aodEvent =
dynamic_cast<AliAODEvent*
> (AODEvent());
301 AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
302 if (aodHandler->GetExtensions()) {
303 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
305 D0TracksFromFriendFile = (TClonesArray*)aodFromExt->GetList()->FindObject(
"D0toKpi");
308 D0TracksFromFriendFile = (TClonesArray*)aodEvent->GetList()->FindObject(
"D0toKpi");
313 if (!aodEvent->GetPrimaryVertex() || TMath::Abs(aodEvent->GetMagneticField()) < 0.001)
return;
317 TString trigclass = aodEvent->GetFiredTriggerClasses();
318 if (trigclass.Contains(
"C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains(
"C0SMH-B-NOPF-ALL"))
fCEvents->Fill(5);
331 if (!isEvSel)
return;
338 AliAODVertex *primaryVertex = (AliAODVertex*)aodEvent->GetPrimaryVertex();
339 if (!primaryVertex)
return;
340 if (primaryVertex->GetNContributors() < 1)
return;
343 if (!D0TracksFromFriendFile)
345 AliInfo(
"Could not find array of HF vertices, skipping the event");
348 else AliDebug(2, Form(
"Found %d vertices", D0TracksFromFriendFile->GetEntriesFast()));
350 AliAODMCHeader *mcHeader = 0;
353 mcHeader = (AliAODMCHeader*)aodEvent->GetList()->FindObject(AliAODMCHeader::StdBranchName());
355 printf(
" MC header branch not found!\n");
367 TClonesArray *mcTrackArray =
nullptr;
368 if (
fUseMCInfo) mcTrackArray =
dynamic_cast<TClonesArray*
>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
372 TMatrix * BPlustoD0PiLabelMatrix =
new TMatrix(0, 5);
389 D0Selection(aodEvent, primaryVertex, bz, mcTrackArray, BPlustoD0PiLabelMatrix, D0TracksFromFriendFile, mcHeader);
391 BPlusPionSelection(aodEvent, primaryVertex, bz, mcTrackArray, BPlustoD0PiLabelMatrix, mcHeader);
392 BPlusSelection(aodEvent, primaryVertex, bz, mcTrackArray, BPlustoD0PiLabelMatrix, D0TracksFromFriendFile, mcHeader);
399 delete BPlustoD0PiLabelMatrix; BPlustoD0PiLabelMatrix = NULL;
427 AliAnalysisTaskSE::Terminate();
431 printf(
"ERROR: fOutput not available\n");
439 printf(
"ERROR: fListCuts not available\n");
444 printf(
"ERROR: fOutputD0FirstDaughter not available\n");
449 printf(
"ERROR: fOutputD0SecondDaughter not available\n");
454 printf(
"ERROR: fOutputBPlusPion not available\n");
459 printf(
"ERROR: fOutputD0 not available\n");
464 printf(
"ERROR: fOutputBPlus not available\n");
469 printf(
"ERROR: fOutputD0_D0Pt not available\n");
474 printf(
"ERROR: fOutputBPlusMC not available\n");
483 Info(
"UserCreateOutputObjects",
"CreateOutputObjects of task %s\n", GetName());
533 std::cout <<
"Nr. of BPlus meson bins: " <<
fCuts->
GetNPtBins() <<
" limits: " << std::endl;
538 std::cout << std::endl;
544 std::cout << std::endl;
574 fCEvents =
new TH1F(
"fCEvents",
"conter", 13, 0, 13);
576 fCEvents->GetXaxis()->SetTitle(
"1");
577 fCEvents->GetYaxis()->SetTitle(
"counts");
578 fCEvents->GetXaxis()->SetBinLabel(2,
"no. of events");
579 fCEvents->GetXaxis()->SetBinLabel(3,
"good prim vtx and B field");
580 fCEvents->GetXaxis()->SetBinLabel(4,
"no event selected");
581 fCEvents->GetXaxis()->SetBinLabel(5,
"no vtx contributors");
582 fCEvents->GetXaxis()->SetBinLabel(6,
"trigger for PbPb");
583 fCEvents->GetXaxis()->SetBinLabel(7,
"no z vtx");
584 fCEvents->GetXaxis()->SetBinLabel(8,
"...");
585 fCEvents->GetXaxis()->SetBinLabel(12,
"no. of D0 fail to be rec");
590 TString name_mc_BPlus_pt =
"mc_BPlus_pt";
591 TH1F* hist_mc_BPlus_pt =
new TH1F(name_mc_BPlus_pt.Data(),
"Pt monte carlo BPlus in BPlus->D*#pi; p_{T} [GeV/c]; Entries", 400, 0, 20);
592 hist_mc_BPlus_pt->Sumw2();
593 hist_mc_BPlus_pt->SetLineColor(6);
594 hist_mc_BPlus_pt->SetMarkerStyle(20);
595 hist_mc_BPlus_pt->SetMarkerSize(0.6);
596 hist_mc_BPlus_pt->SetMarkerColor(6);
597 TH1F* histogram_mc_BPlus_pt = (TH1F*)hist_mc_BPlus_pt->Clone();
600 TString name_mc_BPlus_pion_pt =
"mc_BPlus_pion_pt";
601 TH1F* hist_mc_BPlus_pion_pt =
new TH1F(name_mc_BPlus_pion_pt.Data(),
"Pt monte carlo pion of BPlus in BPlus->D*#pi; p_{T} [GeV/c]; Entries", 400, 0, 20);
602 hist_mc_BPlus_pion_pt->Sumw2();
603 hist_mc_BPlus_pion_pt->SetLineColor(6);
604 hist_mc_BPlus_pion_pt->SetMarkerStyle(20);
605 hist_mc_BPlus_pion_pt->SetMarkerSize(0.6);
606 hist_mc_BPlus_pion_pt->SetMarkerColor(6);
607 TH1F* histogram_mc_BPlus_pion_pt = (TH1F*)hist_mc_BPlus_pion_pt->Clone();
610 TString name_mc_D0_pt =
"mc_D0_pt";
611 TH1F* hist_mc_D0_pt =
new TH1F(name_mc_D0_pt.Data(),
"Pt monte carlo D0 in BPlus->D*#pi; p_{T} [GeV/c]; Entries", 400, 0, 20);
612 hist_mc_D0_pt->Sumw2();
613 hist_mc_D0_pt->SetLineColor(6);
614 hist_mc_D0_pt->SetMarkerStyle(20);
615 hist_mc_D0_pt->SetMarkerSize(0.6);
616 hist_mc_D0_pt->SetMarkerColor(6);
617 TH1F* histogram_mc_D0_pt = (TH1F*)hist_mc_D0_pt->Clone();
620 TString name_mc_D0_pion_pt =
"mc_D0_pion_pt";
621 TH1F* hist_mc_D0_pion_pt =
new TH1F(name_mc_D0_pion_pt.Data(),
"Pt monte carlo pion of D0 in BPlus->D*#pi; p_{T} [GeV/c]; Entries", 400, 0, 20);
622 hist_mc_D0_pion_pt->Sumw2();
623 hist_mc_D0_pion_pt->SetLineColor(6);
624 hist_mc_D0_pion_pt->SetMarkerStyle(20);
625 hist_mc_D0_pion_pt->SetMarkerSize(0.6);
626 hist_mc_D0_pion_pt->SetMarkerColor(6);
627 TH1F* histogram_mc_D0_pion_pt = (TH1F*)hist_mc_D0_pion_pt->Clone();
630 TString name_mc_D0_kaon_pt =
"mc_D0_kaon_pt";
631 TH1F* hist_mc_D0_kaon_pt =
new TH1F(name_mc_D0_kaon_pt.Data(),
"Pt monte carlo kaon of D0 in BPlus->D*#pi; p_{T} [GeV/c]; Entries", 400, 0, 20);
632 hist_mc_D0_kaon_pt->Sumw2();
633 hist_mc_D0_kaon_pt->SetLineColor(6);
634 hist_mc_D0_kaon_pt->SetMarkerStyle(20);
635 hist_mc_D0_kaon_pt->SetMarkerSize(0.6);
636 hist_mc_D0_kaon_pt->SetMarkerColor(6);
637 TH1F* histogram_mc_D0_kaon_pt = (TH1F*)hist_mc_D0_kaon_pt->Clone();
640 TString name_mc_BPlus_rapidity_true =
"mc_BPlus_rapidity_true";
641 TH1F* hist_mc_BPlus_rapidity_true =
new TH1F(name_mc_BPlus_rapidity_true.Data(),
"rapidity_true monte carlo BPlus in BPlus->D*#pi; Y; Entries", 5000, -20, 20);
642 hist_mc_BPlus_rapidity_true->Sumw2();
643 hist_mc_BPlus_rapidity_true->SetLineColor(6);
644 hist_mc_BPlus_rapidity_true->SetMarkerStyle(20);
645 hist_mc_BPlus_rapidity_true->SetMarkerSize(0.6);
646 hist_mc_BPlus_rapidity_true->SetMarkerColor(6);
647 TH1F* histogram_mc_BPlus_rapidity_true = (TH1F*)hist_mc_BPlus_rapidity_true->Clone();
650 TString name_mc_BPlus_pion_rapidity_true =
"mc_BPlus_pion_rapidity_true";
651 TH1F* hist_mc_BPlus_pion_rapidity_true =
new TH1F(name_mc_BPlus_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of BPlus in BPlus->D*#pi; Y; Entries", 5000, -20, 20);
652 hist_mc_BPlus_pion_rapidity_true->Sumw2();
653 hist_mc_BPlus_pion_rapidity_true->SetLineColor(6);
654 hist_mc_BPlus_pion_rapidity_true->SetMarkerStyle(20);
655 hist_mc_BPlus_pion_rapidity_true->SetMarkerSize(0.6);
656 hist_mc_BPlus_pion_rapidity_true->SetMarkerColor(6);
657 TH1F* histogram_mc_BPlus_pion_rapidity_true = (TH1F*)hist_mc_BPlus_pion_rapidity_true->Clone();
660 TString name_mc_D0_rapidity_true =
"mc_D0_rapidity_true";
661 TH1F* hist_mc_D0_rapidity_true =
new TH1F(name_mc_D0_rapidity_true.Data(),
"rapidity_true monte carlo D0 in BPlus->D*#pi; Y; Entries", 5000, -20, 20);
662 hist_mc_D0_rapidity_true->Sumw2();
663 hist_mc_D0_rapidity_true->SetLineColor(6);
664 hist_mc_D0_rapidity_true->SetMarkerStyle(20);
665 hist_mc_D0_rapidity_true->SetMarkerSize(0.6);
666 hist_mc_D0_rapidity_true->SetMarkerColor(6);
667 TH1F* histogram_mc_D0_rapidity_true = (TH1F*)hist_mc_D0_rapidity_true->Clone();
670 TString name_mc_D0_pion_rapidity_true =
"mc_D0_pion_rapidity_true";
671 TH1F* hist_mc_D0_pion_rapidity_true =
new TH1F(name_mc_D0_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of D0 in BPlus->D*#pi; Y; Entries", 5000, -20, 20);
672 hist_mc_D0_pion_rapidity_true->Sumw2();
673 hist_mc_D0_pion_rapidity_true->SetLineColor(6);
674 hist_mc_D0_pion_rapidity_true->SetMarkerStyle(20);
675 hist_mc_D0_pion_rapidity_true->SetMarkerSize(0.6);
676 hist_mc_D0_pion_rapidity_true->SetMarkerColor(6);
677 TH1F* histogram_mc_D0_pion_rapidity_true = (TH1F*)hist_mc_D0_pion_rapidity_true->Clone();
680 TString name_mc_D0_kaon_rapidity_true =
"mc_D0_kaon_rapidity_true";
681 TH1F* hist_mc_D0_kaon_rapidity_true =
new TH1F(name_mc_D0_kaon_rapidity_true.Data(),
"rapidity_true monte carlo kaon of D0 in BPlus->D*#pi; Y; Entries", 5000, -20, 20);
682 hist_mc_D0_kaon_rapidity_true->Sumw2();
683 hist_mc_D0_kaon_rapidity_true->SetLineColor(6);
684 hist_mc_D0_kaon_rapidity_true->SetMarkerStyle(20);
685 hist_mc_D0_kaon_rapidity_true->SetMarkerSize(0.6);
686 hist_mc_D0_kaon_rapidity_true->SetMarkerColor(6);
687 TH1F* histogram_mc_D0_kaon_rapidity_true = (TH1F*)hist_mc_D0_kaon_rapidity_true->Clone();
690 TString name_mc_BPlus_pseudorapidity_true =
"mc_BPlus_pseudorapidity_true";
691 TH1F* hist_mc_BPlus_pseudorapidity_true =
new TH1F(name_mc_BPlus_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo BPlus in BPlus->D*#pi; #eta; Entries", 5000, -20, 20);
692 hist_mc_BPlus_pseudorapidity_true->Sumw2();
693 hist_mc_BPlus_pseudorapidity_true->SetLineColor(6);
694 hist_mc_BPlus_pseudorapidity_true->SetMarkerStyle(20);
695 hist_mc_BPlus_pseudorapidity_true->SetMarkerSize(0.6);
696 hist_mc_BPlus_pseudorapidity_true->SetMarkerColor(6);
697 TH1F* histogram_mc_BPlus_pseudorapidity_true = (TH1F*)hist_mc_BPlus_pseudorapidity_true->Clone();
700 TString name_mc_BPlus_pion_pseudorapidity_true =
"mc_BPlus_pion_pseudorapidity_true";
701 TH1F* hist_mc_BPlus_pion_pseudorapidity_true =
new TH1F(name_mc_BPlus_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of BPlus in BPlus->D*#pi; #eta; Entries", 5000, -20, 20);
702 hist_mc_BPlus_pion_pseudorapidity_true->Sumw2();
703 hist_mc_BPlus_pion_pseudorapidity_true->SetLineColor(6);
704 hist_mc_BPlus_pion_pseudorapidity_true->SetMarkerStyle(20);
705 hist_mc_BPlus_pion_pseudorapidity_true->SetMarkerSize(0.6);
706 hist_mc_BPlus_pion_pseudorapidity_true->SetMarkerColor(6);
707 TH1F* histogram_mc_BPlus_pion_pseudorapidity_true = (TH1F*)hist_mc_BPlus_pion_pseudorapidity_true->Clone();
710 TString name_mc_D0_pseudorapidity_true =
"mc_D0_pseudorapidity_true";
711 TH1F* hist_mc_D0_pseudorapidity_true =
new TH1F(name_mc_D0_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo D0 in BPlus->D*#pi; #eta; Entries", 5000, -20, 20);
712 hist_mc_D0_pseudorapidity_true->Sumw2();
713 hist_mc_D0_pseudorapidity_true->SetLineColor(6);
714 hist_mc_D0_pseudorapidity_true->SetMarkerStyle(20);
715 hist_mc_D0_pseudorapidity_true->SetMarkerSize(0.6);
716 hist_mc_D0_pseudorapidity_true->SetMarkerColor(6);
717 TH1F* histogram_mc_D0_pseudorapidity_true = (TH1F*)hist_mc_D0_pseudorapidity_true->Clone();
720 TString name_mc_D0_pion_pseudorapidity_true =
"mc_D0_pion_pseudorapidity_true";
721 TH1F* hist_mc_D0_pion_pseudorapidity_true =
new TH1F(name_mc_D0_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of D0 in BPlus->D*#pi; #eta; Entries", 5000, -20, 20);
722 hist_mc_D0_pion_pseudorapidity_true->Sumw2();
723 hist_mc_D0_pion_pseudorapidity_true->SetLineColor(6);
724 hist_mc_D0_pion_pseudorapidity_true->SetMarkerStyle(20);
725 hist_mc_D0_pion_pseudorapidity_true->SetMarkerSize(0.6);
726 hist_mc_D0_pion_pseudorapidity_true->SetMarkerColor(6);
727 TH1F* histogram_mc_D0_pion_pseudorapidity_true = (TH1F*)hist_mc_D0_pion_pseudorapidity_true->Clone();
730 TString name_mc_D0_kaon_pseudorapidity_true =
"mc_D0_kaon_pseudorapidity_true";
731 TH1F* hist_mc_D0_kaon_pseudorapidity_true =
new TH1F(name_mc_D0_kaon_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo kaon of D0 in BPlus->D*#pi; #eta; Entries", 5000, -20, 20);
732 hist_mc_D0_kaon_pseudorapidity_true->Sumw2();
733 hist_mc_D0_kaon_pseudorapidity_true->SetLineColor(6);
734 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerStyle(20);
735 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerSize(0.6);
736 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerColor(6);
737 TH1F* histogram_mc_D0_kaon_pseudorapidity_true = (TH1F*)hist_mc_D0_kaon_pseudorapidity_true->Clone();
744 Int_t nCutOptimizationBins = TMath::Power(nCuts,nVariables);
749 ptBinMother +=
"_ptbin_";
751 ptBinMother +=
"_to_";
754 TString name_cut_optimization_signal =
"cut_optimization_signal";
755 name_cut_optimization_signal += ptBinMother;
756 TH1F* hist_cut_optimization_signal =
new TH1F(name_cut_optimization_signal.Data(),
"Total signal for different cuts; Cut number; Entries", nCutOptimizationBins, 0, nCutOptimizationBins);
757 hist_cut_optimization_signal->Sumw2();
758 hist_cut_optimization_signal->SetLineColor(6);
759 hist_cut_optimization_signal->SetMarkerStyle(20);
760 hist_cut_optimization_signal->SetMarkerSize(0.6);
761 hist_cut_optimization_signal->SetMarkerColor(6);
762 TH1F* histogram_cut_optimization_signal = (TH1F*)hist_cut_optimization_signal->Clone();
765 TString name_cut_optimization_background =
"cut_optimization_background";
766 name_cut_optimization_background += ptBinMother;
767 TH1F* hist_cut_optimization_background =
new TH1F(name_cut_optimization_background.Data(),
"Total background for different cuts; Cut number; Entries", nCutOptimizationBins, 0, nCutOptimizationBins);
768 hist_cut_optimization_background->Sumw2();
769 hist_cut_optimization_background->SetLineColor(6);
770 hist_cut_optimization_background->SetMarkerStyle(20);
771 hist_cut_optimization_background->SetMarkerSize(0.6);
772 hist_cut_optimization_background->SetMarkerColor(6);
773 TH1F* histogram_cut_optimization_background = (TH1F*)hist_cut_optimization_background->Clone();
781 TString name_BPluss_in_analysis =
"BPlus_in_analysis";
782 TH1F* hist_BPluss_in_analysis =
new TH1F(name_BPluss_in_analysis.Data(),
"Number of BPluss to kpipipi in the Analysis; Entries", 10, 0, 10);
783 hist_BPluss_in_analysis->Sumw2();
784 hist_BPluss_in_analysis->SetLineColor(6);
785 hist_BPluss_in_analysis->SetMarkerStyle(20);
786 hist_BPluss_in_analysis->SetMarkerSize(0.6);
787 hist_BPluss_in_analysis->SetMarkerColor(6);
788 hist_BPluss_in_analysis->SetStats(kTRUE);
789 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(1,
"no. of BPlus");
790 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(2,
"no. of BPlus to kpipi");
791 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(3,
"no. with all tracks in event");
792 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(4,
"no. ...");
793 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(5,
"no. ...");
794 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(6,
"no. ...");
795 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(7,
"no. ...");
796 hist_BPluss_in_analysis->GetXaxis()->SetBinLabel(8,
"no. ...");
797 TH1F* hist_BPluss_in_analysis_mc = (TH1F*)hist_BPluss_in_analysis->Clone();
800 TString name_BPlus_per_bin =
"BPlus_per_bin";
801 TH1F* hist_BPlus_per_bin =
new TH1F(name_BPlus_per_bin.Data(),
"Number of BPlus to kpipi in the Analysis per bin; Entries",
fnPtBins, 0,
fnPtBins);
808 hist_BPlus_per_bin->GetXaxis()->SetBinLabel(i + 1, bin_name);
810 TH1F* hist_BPlus_per_bin_mc = (TH1F*)hist_BPlus_per_bin->Clone();
813 TString name_BPlus_per_bin_in_Acc =
"BPlus_per_bin_in_Acc";
814 TH1F* hist_BPlus_per_bin_in_Acc =
new TH1F(name_BPlus_per_bin_in_Acc.Data(),
"Number of BPlus to kpipi in the Analysis per bin with all daughters in acceptance; Entries",
fnPtBins, 0,
fnPtBins);
821 hist_BPlus_per_bin_in_Acc->GetXaxis()->SetBinLabel(i + 1, bin_name);
823 TH1F* hist_BPlus_per_bin_in_Acc_mc = (TH1F*)hist_BPlus_per_bin_in_Acc->Clone();
829 for (
Int_t i = 0; i < 3; i++) {
832 TList * listout = 0x0;
837 for (
Int_t j = 0; j < 6; j++) {
838 if (j == 0) add_name =
"";
839 if (j == 1) add_name =
"Signal";
840 if (j == 2) add_name =
"Cut";
841 if (j == 3) add_name =
"SignalCut";
842 if (j == 4) add_name =
"Result";
843 if (j == 5) add_name =
"SignalResult";
846 TString discription_Histogram =
"";
847 Int_t numberOfBins = 0;
851 for (
Int_t k = 0; k < 10; ++k)
853 if (k == 0) {name_Histogram =
"ptTrack"; discription_Histogram =
"pt track; p_{T} [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
854 if (k == 1) {name_Histogram =
"momentumTrack"; discription_Histogram =
"momentum track; p [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
855 if (k == 2) {name_Histogram =
"numberOfITS"; discription_Histogram =
"Number of ITS clusters track; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
856 if (k == 3) {name_Histogram =
"numberOfTPC"; discription_Histogram =
"Number of TPC clusters track; [#]; Entries"; numberOfBins = 601; lowerBound = -0.5; upperBound = 600.5;}
857 if (k == 4) {name_Histogram =
"pointsOnITS"; discription_Histogram =
"Number of ITS clusters track per layer; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
858 if (k == 5) {name_Histogram =
"nSigmaTPC"; discription_Histogram =
"n sigma TPC for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
859 if (k == 6) {name_Histogram =
"nSigmaTOF"; discription_Histogram =
"n sigma TOF for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
860 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;}
861 if (k == 8) {name_Histogram =
"impactParameter"; discription_Histogram =
"Impact Parameter track; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
862 if (k == 9) {name_Histogram =
"EtaTrack"; discription_Histogram =
"Eta Track; Entries"; numberOfBins = 1000; lowerBound = -3; upperBound = 3;}
864 name_Histogram += add_name;
865 TH1F* histogram =
new TH1F(name_Histogram.Data(), discription_Histogram.Data(), numberOfBins, lowerBound, upperBound);
867 if (j % 2 == 0) histogram->SetLineColor(6);
868 if (j % 2 == 1) histogram->SetLineColor(4);
869 histogram->SetMarkerStyle(20);
870 histogram->SetMarkerSize(0.6);
871 if (j % 2 == 0) histogram->SetMarkerColor(6);
872 if (j % 2 == 1) histogram->SetMarkerColor(4);
873 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
874 listout->Add(histogram_Clone);
878 TString numberofparticlesperevent =
"numberofparticlesperevent";
879 numberofparticlesperevent += add_name;
880 TH1F* hist_numberofparticlesperevent =
new TH1F(numberofparticlesperevent.Data(),
"Number of particles per event; number of particles in one event; Entries", 100, 0, 100);
881 hist_numberofparticlesperevent->Sumw2();
882 hist_numberofparticlesperevent->SetLineColor(6);
883 hist_numberofparticlesperevent->SetMarkerStyle(20);
884 hist_numberofparticlesperevent->SetMarkerSize(0.6);
885 hist_numberofparticlesperevent->SetMarkerColor(6);
886 TH1F* histogram_numberofparticlesperevent = (TH1F*)hist_numberofparticlesperevent->Clone();
887 listout->Add(histogram_numberofparticlesperevent);
891 TH1F * effectOfCuts =
new TH1F(
"effectOfCuts",
"Removal counter", 18, 0, 18);
892 effectOfCuts->SetStats(kTRUE);
893 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
894 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
895 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
896 effectOfCuts->GetXaxis()->SetBinLabel(2,
"1");
897 effectOfCuts->GetXaxis()->SetBinLabel(3,
"2");
898 effectOfCuts->GetXaxis()->SetBinLabel(4,
"3");
899 effectOfCuts->GetXaxis()->SetBinLabel(5,
"4");
900 effectOfCuts->GetXaxis()->SetBinLabel(6,
"5");
901 effectOfCuts->GetXaxis()->SetBinLabel(7,
"6");
902 effectOfCuts->GetXaxis()->SetBinLabel(8,
"7");
903 effectOfCuts->GetXaxis()->SetBinLabel(9,
"8");
904 effectOfCuts->GetXaxis()->SetBinLabel(10,
"9");
905 effectOfCuts->GetXaxis()->SetBinLabel(11,
"10");
906 effectOfCuts->GetXaxis()->SetBinLabel(12,
"11");
907 effectOfCuts->GetXaxis()->SetBinLabel(13,
"12");
908 effectOfCuts->GetXaxis()->SetBinLabel(14,
"13");
909 effectOfCuts->GetXaxis()->SetBinLabel(15,
"14");
910 effectOfCuts->GetXaxis()->SetBinLabel(16,
"15");
911 effectOfCuts->GetXaxis()->SetBinLabel(17,
"16");
912 effectOfCuts->GetXaxis()->SetBinLabel(18,
"17");
913 listout->Add(effectOfCuts);
916 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsMC",
"Removal counter", 18, 0, 18);
917 effectOfCutsMC->SetStats(kTRUE);
918 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
919 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
920 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
921 effectOfCutsMC->GetXaxis()->SetBinLabel(2,
"1");
922 effectOfCutsMC->GetXaxis()->SetBinLabel(3,
"2");
923 effectOfCutsMC->GetXaxis()->SetBinLabel(4,
"3");
924 effectOfCutsMC->GetXaxis()->SetBinLabel(5,
"4");
925 effectOfCutsMC->GetXaxis()->SetBinLabel(6,
"5");
926 effectOfCutsMC->GetXaxis()->SetBinLabel(7,
"6");
927 effectOfCutsMC->GetXaxis()->SetBinLabel(8,
"7");
928 effectOfCutsMC->GetXaxis()->SetBinLabel(9,
"8");
929 effectOfCutsMC->GetXaxis()->SetBinLabel(10,
"9");
930 effectOfCutsMC->GetXaxis()->SetBinLabel(11,
"10");
931 effectOfCutsMC->GetXaxis()->SetBinLabel(12,
"11");
932 effectOfCutsMC->GetXaxis()->SetBinLabel(13,
"12");
933 effectOfCutsMC->GetXaxis()->SetBinLabel(14,
"13");
934 effectOfCutsMC->GetXaxis()->SetBinLabel(15,
"14");
935 effectOfCutsMC->GetXaxis()->SetBinLabel(16,
"15");
936 effectOfCutsMC->GetXaxis()->SetBinLabel(17,
"16");
937 effectOfCutsMC->GetXaxis()->SetBinLabel(18,
"17");
938 listout->Add(effectOfCutsMC);
941 TString name_particle_pdg =
"particle_pdg";
942 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries", 2000, -0.5, 1999.5);
943 hist_particle_pdg->Sumw2();
944 hist_particle_pdg->SetLineColor(6);
945 hist_particle_pdg->SetMarkerStyle(20);
946 hist_particle_pdg->SetMarkerSize(0.6);
947 hist_particle_pdg->SetMarkerColor(6);
948 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
949 listout->Add(histogram_particle_pdg);
952 TString name_particle_mother_pdg =
"particle_mother_pdg";
953 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries", 2000, -0.5, 1999.5);
954 hist_particle_mother_pdg->Sumw2();
955 hist_particle_mother_pdg->SetLineColor(6);
956 hist_particle_mother_pdg->SetMarkerStyle(20);
957 hist_particle_mother_pdg->SetMarkerSize(0.6);
958 hist_particle_mother_pdg->SetMarkerColor(6);
959 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
960 listout->Add(histogram_particle_mother_pdg);
963 TString name_ptBPlus_vs_ptTrack =
"ptBPlus_vs_ptTrackBackground";
964 TH2F* hist_ptBPlus_vs_ptTrack =
new TH2F(name_ptBPlus_vs_ptTrack.Data(),
"Pt BPlus vs Pt ; p_{T} BPlus [GeV/c]; p_{T} track [GeV/c]", 100, 0, 30, 100, 0, 30);
965 hist_ptBPlus_vs_ptTrack->Sumw2();
966 hist_ptBPlus_vs_ptTrack->SetLineColor(6);
967 hist_ptBPlus_vs_ptTrack->SetMarkerStyle(20);
968 hist_ptBPlus_vs_ptTrack->SetMarkerSize(0.6);
969 hist_ptBPlus_vs_ptTrack->SetMarkerColor(6);
970 TH2F* histogram_ptBPlus_vs_ptTrack = (
TH2F*)hist_ptBPlus_vs_ptTrack->Clone();
971 listout->Add(histogram_ptBPlus_vs_ptTrack);
974 TString name_ptBPlus_vs_ptTrackSignal =
"ptBPlus_vs_ptTrackSignal";
975 TH2F* hist_ptBPlus_vs_ptTrackSignal =
new TH2F(name_ptBPlus_vs_ptTrackSignal.Data(),
"Pt BPlus vs Pt ; p_{T} BPlus [GeV/c]; p_{T} track [GeV/c]", 100, 0, 30, 100, 0, 30);
976 hist_ptBPlus_vs_ptTrackSignal->Sumw2();
977 hist_ptBPlus_vs_ptTrackSignal->SetLineColor(4);
978 hist_ptBPlus_vs_ptTrackSignal->SetMarkerStyle(20);
979 hist_ptBPlus_vs_ptTrackSignal->SetMarkerSize(0.6);
980 hist_ptBPlus_vs_ptTrackSignal->SetMarkerColor(6);
981 TH2F* histogram_ptBPlus_vs_ptTrackSignal = (
TH2F*)hist_ptBPlus_vs_ptTrackSignal->Clone();
982 listout->Add(histogram_ptBPlus_vs_ptTrackSignal);
987 for (
Int_t i = 0; i < 3; i++) {
990 TList * listout = 0x0;
991 Int_t nHistogramSets = 0;
997 for (
Int_t j = 0; j < nHistogramSets; j++) {
1000 if (j == 0) add_name =
"";
1001 if (j == 1) add_name =
"Signal";
1002 if (j == 2) add_name =
"Cut";
1003 if (j == 3) add_name =
"SignalCut";
1004 if (j == 4) add_name =
"Result";
1005 if (j == 5) add_name =
"SignalResult";
1006 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];}
1007 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];}
1017 TString discription_Histogram =
"";
1018 Int_t numberOfBins = 0;
1021 Int_t numberOfBinsTwo = 0;
1025 for (
Int_t k = 0; k < 45; ++k)
1027 if (k == 0) {name_Histogram =
"ptMother"; discription_Histogram =
"pt mother; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1028 if (k == 1) {name_Histogram =
"ptFirstDaughter"; discription_Histogram =
"pt first daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1029 if (k == 2) {name_Histogram =
"ptSecondDaughter"; discription_Histogram =
"pt second daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1030 if (k == 3) {name_Histogram =
"etaMother"; discription_Histogram =
"eta mother; #eta; Entries"; numberOfBins = 100; lowerBound = -2; upperBound = 2;}
1031 if (k == 4) {name_Histogram =
"phiMother"; discription_Histogram =
"phi mother; #phi; Entries"; numberOfBins = 25; lowerBound = 0; upperBound = 2 * TMath::Pi();}
1032 if (k == 5) {name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1.0;}
1033 if (k == 6) {name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1035 if (k == 7) {name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1037 if (k == 8) {name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle; [Cos(#theta)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1038 if (k == 9) {name_Histogram =
"impactProduct"; discription_Histogram =
"impact product; [cm^{2}]; Entries"; numberOfBins = 500; lowerBound = -0.01; upperBound = 0.01;}
1039 if (k == 10) {name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY; [cm^{2}]; Entries"; numberOfBins = 200; lowerBound = 0; upperBound = 0.5;}
1040 if (k == 11) {name_Histogram =
"invariantMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1041 if (k == 12) {name_Histogram =
"deltaMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1042 if (k == 13) {name_Histogram =
"dcaMother"; discription_Histogram =
"dca mother; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 0.25;}
1043 if (k == 14) {name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex; distance [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 1;}
1044 if (k == 15) {name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1045 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;}
1046 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;}
1047 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;}
1048 if (k == 19) {name_Histogram =
"angleMotherFirstDaughter"; discription_Histogram =
"flight angle mother and first daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1049 if (k == 20) {name_Histogram =
"angleMotherSecondDaughter"; discription_Histogram =
"flight angle mother and second daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = 0.5; upperBound = 1;}
1050 if (k == 21) {name_Histogram =
"angleBetweenBothDaughters"; discription_Histogram =
"angle between both daughters; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1051 if (k == 22) {name_Histogram =
"cosThetaStar"; discription_Histogram =
"cosThetaStar; [Cos(#theta*)]; Entries"; numberOfBins = 200; lowerBound = -2; upperBound = 2;}
1052 if (k == 23) {name_Histogram =
"vertexX"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1053 if (k == 24) {name_Histogram =
"vertexY"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1054 if (k == 25) {name_Histogram =
"vertexZ"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -20; upperBound = 20;}
1058 if (i == 0) {name_Histogram =
"pointingAngleToBPlus"; discription_Histogram =
"Pointing angle w.r.t. BPlus decay vertex; [Cos(#theta)]; Entries"; numberOfBins = 200; lowerBound = -1; upperBound = 1;}
1062 if (i == 0) {name_Histogram =
"d0MotherToBPlus"; discription_Histogram =
"d0 Mother w.r.t. BPlus decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1066 if (i == 0) {name_Histogram =
"d0FirstDaughterToBPlus"; discription_Histogram =
"d0 first daughter w.r.t. BPlus decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1070 if (i == 0) {name_Histogram =
"d0SecondDaughterToBPlus"; discription_Histogram =
"d0 second daughter w.r.t. BPlus decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1074 if (i == 0) {name_Histogram =
"impactProductToBPlus"; discription_Histogram =
"impact product w.r.t. BPlus decay vertex; [cm]; Entries"; numberOfBins = 400; lowerBound = -0.02; upperBound = 0.02;}
1078 if (i == 0) {name_Histogram =
"impactProductXYToBPlus"; discription_Histogram =
"impact product XY w.r.t. BPlus decay vertex; [cm^{2}]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.5;}
1082 if (i == 0) {name_Histogram =
"normDecayLengthToBPlus"; discription_Histogram =
"Normalized decay length w.r.t. BPlus decay vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1086 if (i == 0) {name_Histogram =
"pseudoProperDecayTimeToBPlus"; discription_Histogram =
"Pseudo Proper Decay Time w.r.t BPlus vertex; [a.u.]; Entries"; numberOfBins = 1000; lowerBound = -1; upperBound = 1;}
1090 if (i == 0) {name_Histogram =
"DecayTimeToBPlus"; discription_Histogram =
"Decay Time w.r.t BPlus vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.00000001;}
1094 if (i == 0) {name_Histogram =
"normDecayTimeToBPlus"; discription_Histogram =
"Normalized Decay Time w.r.t BPlus vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.00000001;}
1098 if (k == 36) {name_Histogram =
"topomaticFirstDaughter"; discription_Histogram =
"topomatic d0 first daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1099 if (k == 37) {name_Histogram =
"topomaticSecondDaughter"; discription_Histogram =
"topomatic d0 second daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1100 if (k == 38) {name_Histogram =
"topomaticMax"; discription_Histogram =
"Max topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1101 if (k == 39) {name_Histogram =
"topomaticMin"; discription_Histogram =
"Min topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1102 if (k == 40) {name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY; [Cos(#theta)]; Entries"; numberOfBins = 1000; lowerBound = -1; upperBound = 1;}
1103 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;}
1104 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;}
1105 if (k == 43) {name_Histogram =
"vertexChi2"; discription_Histogram =
"#Chi^{2} Vertex; [#Chi^{2}]; Entries"; numberOfBins = 1000; lowerBound = 0; upperBound = 50;}
1106 if (k == 44) {name_Histogram =
"vertexChi2NDF"; discription_Histogram =
"#Chi^{2} per NDF Vertex; [#Chi^{2}/NDF]; Entries"; numberOfBins = 1000; lowerBound = 0; upperBound = 50;}
1108 name_Histogram += add_name;
1109 TH1F* histogram =
new TH1F(name_Histogram.Data(), discription_Histogram.Data(), numberOfBins, lowerBound, upperBound);
1111 if (j % 2 == 0) histogram->SetLineColor(6);
1112 if (j % 2 == 1) histogram->SetLineColor(4);
1113 histogram->SetMarkerStyle(20);
1114 histogram->SetMarkerSize(0.6);
1115 if (j % 2 == 0) histogram->SetMarkerColor(6);
1116 if (j % 2 == 1) histogram->SetMarkerColor(4);
1117 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1118 listout->Add(histogram_Clone);
1123 name_Histogram =
"";
1124 discription_Histogram =
"";
1128 numberOfBinsTwo = 0;
1129 lowerBoundTwo = 0.0;
1130 upperBoundTwo = 0.0;
1135 Int_t nVariables = 10;
1136 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
1140 TString name2D =
"2D_Histograms";
1142 list2D->SetName(name2D);
1143 listout->Add(list2D);
1145 for (
Int_t k = 0; k < nHistograms; ++k)
1147 numberOfBins = 50; numberOfBinsTwo = 50;
1148 if (nFirst == 0) {name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1149 if (nFirst == 1) {name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1150 if (nFirst == 2) {name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1151 if (nFirst == 3) {name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1152 if (nFirst == 4) {name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1153 if (nFirst == 5) {name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1154 if (nFirst == 6) {name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1155 if (nFirst == 7) {name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1156 if (nFirst == 8) {name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1157 if (nFirst == 9) {name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY [cm];"; lowerBound = 0; upperBound = 1;}
1158 if (nFirst == 10) {name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBound = 0; upperBound = 50;}
1160 if (nSecond == 0) {name_Histogram +=
"d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1161 if (nSecond == 1) {name_Histogram +=
"d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1162 if (nSecond == 2) {name_Histogram +=
"d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1163 if (nSecond == 3) {name_Histogram +=
"pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1164 if (nSecond == 4) {name_Histogram +=
"impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1165 if (nSecond == 5) {name_Histogram +=
"impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1166 if (nSecond == 6) {name_Histogram +=
"vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1167 if (nSecond == 7) {name_Histogram +=
"normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1168 if (nSecond == 8) {name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1169 if (nSecond == 9) {name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1170 if (nSecond == 10) {name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1172 name_Histogram += add_name;
1173 TH2F* histogram =
new TH2F(name_Histogram.Data(), discription_Histogram.Data(), numberOfBins, lowerBound, upperBound, numberOfBinsTwo, lowerBoundTwo, upperBoundTwo);
1175 if (j % 2 == 0) histogram->SetLineColor(6);
1176 if (j % 2 == 1) histogram->SetLineColor(4);
1177 histogram->SetMarkerStyle(20);
1178 histogram->SetMarkerSize(0.6);
1179 histogram->SetMarkerColor(6);
1180 TH2F* histogram_Clone = (
TH2F*)histogram->Clone();
1181 list2D->Add(histogram_Clone);
1185 if (nSecond > nVariables)
1188 nSecond = nFirst + 1;
1193 TH1F * effectOfCuts =
new TH1F(
"effectOfCuts",
"Removal counter", 100, 0, 100);
1194 effectOfCuts->SetStats(kTRUE);
1195 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1196 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1197 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1198 for (
Int_t i = 1; i < 100; ++i)
1202 effectOfCuts->GetXaxis()->SetBinLabel(i + 1, integerText);
1204 listout->Add(effectOfCuts);
1207 TH1F * effectOfCutsSignal =
new TH1F(
"effectOfCutsSignal",
"Removal counter", 100, 0, 100);
1208 effectOfCutsSignal->SetStats(kTRUE);
1209 effectOfCutsSignal->GetXaxis()->SetTitle(
"Cut number");
1210 effectOfCutsSignal->GetYaxis()->SetTitle(
"Particles cut");
1211 effectOfCutsSignal->GetXaxis()->SetBinLabel(1,
"total");
1212 for (
Int_t i = 1; i < 100; ++i)
1216 effectOfCutsSignal->GetXaxis()->SetBinLabel(i + 1, integerText);
1218 listout->Add(effectOfCutsSignal);
1221 TString name_particle_pdg =
"particle_pdg";
1222 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries", 2000, -0.5, 1999.5);
1223 hist_particle_pdg->Sumw2();
1224 hist_particle_pdg->SetLineColor(6);
1225 hist_particle_pdg->SetMarkerStyle(20);
1226 hist_particle_pdg->SetMarkerSize(0.6);
1227 hist_particle_pdg->SetMarkerColor(6);
1228 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1229 listout->Add(histogram_particle_pdg);
1232 TString name_particle_mother_pdg =
"particle_mother_pdg";
1233 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries", 2000, -0.5, 1999.5);
1234 hist_particle_mother_pdg->Sumw2();
1235 hist_particle_mother_pdg->SetLineColor(6);
1236 hist_particle_mother_pdg->SetMarkerStyle(20);
1237 hist_particle_mother_pdg->SetMarkerSize(0.6);
1238 hist_particle_mother_pdg->SetMarkerColor(6);
1239 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1240 listout->Add(histogram_particle_mother_pdg);
1243 TString name_distance_vertex_from_real =
"distance_vertex_from_real";
1244 TH1F* hist_distance_vertex_from_real =
new TH1F(name_distance_vertex_from_real.Data(),
"Distance reconstructed vertex from real vertex; distance [cm]; Entries", 500, 0, 0.5);
1245 hist_distance_vertex_from_real->Sumw2();
1246 hist_distance_vertex_from_real->SetLineColor(6);
1247 hist_distance_vertex_from_real->SetMarkerStyle(20);
1248 hist_distance_vertex_from_real->SetMarkerSize(0.6);
1249 hist_distance_vertex_from_real->SetMarkerColor(6);
1250 TH1F* histogram_distance_vertex_from_real = (TH1F*)hist_distance_vertex_from_real->Clone();
1251 listout->Add(histogram_distance_vertex_from_real);
1254 TString name_distance_vertex_from_real_new =
"distance_vertex_from_real_new";
1255 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", 500, 0, 0.5);
1256 hist_distance_vertex_from_real_new->Sumw2();
1257 hist_distance_vertex_from_real_new->SetLineColor(6);
1258 hist_distance_vertex_from_real_new->SetMarkerStyle(20);
1259 hist_distance_vertex_from_real_new->SetMarkerSize(0.6);
1260 hist_distance_vertex_from_real_new->SetMarkerColor(6);
1261 TH1F* histogram_distance_vertex_from_real_new = (TH1F*)hist_distance_vertex_from_real_new->Clone();
1262 listout->Add(histogram_distance_vertex_from_real_new);
1265 TString name_momentum_resolution =
"momentum_resolution";
1266 TH1F* hist_momentum_resolution =
new TH1F(name_momentum_resolution.Data(),
"Momentum resolution; difference between real and reconstructed momentum [GeV/c]; Entries", 1000, 0, 1);
1267 hist_momentum_resolution->Sumw2();
1268 hist_momentum_resolution->SetLineColor(6);
1269 hist_momentum_resolution->SetMarkerStyle(20);
1270 hist_momentum_resolution->SetMarkerSize(0.6);
1271 hist_momentum_resolution->SetMarkerColor(6);
1272 TH1F* histogram_momentum_resolution = (TH1F*)hist_momentum_resolution->Clone();
1273 listout->Add(histogram_momentum_resolution);
1278 for (
Int_t k = 0; k < fnPtBins + 3; ++k) {
1280 if (k == 0) ptBinMother =
"";
1281 if (k == 1) ptBinMother =
"_ptbin_6_to_inf";
1282 if (k == 2) ptBinMother =
"_ptbin_3_to_inf";
1283 if (k > 2) {ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[k - 3]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[k - 2];}
1285 for (
Int_t i = 0; i < 8; ++i) {
1287 if (i == 0) signName =
"";
1288 if (i == 1) signName =
"_SameSign";
1289 if (i == 2) signName =
"_SignSum";
1290 if (i == 3) signName =
"_HIJING_Background";
1291 if (i == 4) signName =
"_HIJING_Signal";
1292 if (i == 5) signName =
"_Background_rotation";
1293 if (i == 6) signName =
"_HIJING_Background_rotation";
1294 if (i == 7) signName =
"_correlated511";
1295 TString name_invariantMassMother =
"invariantMassBPlus";
1296 name_invariantMassMother += ptBinMother + signName;
1297 TH1F* hist_invariantMassMother =
new TH1F(name_invariantMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries", 2000, 0, 20);
1298 hist_invariantMassMother->Sumw2();
1299 hist_invariantMassMother->SetLineColor(6);
1300 hist_invariantMassMother->SetMarkerStyle(20);
1301 hist_invariantMassMother->SetMarkerSize(0.6);
1302 hist_invariantMassMother->SetMarkerColor(6);
1303 TH1F* histogram_invariantMassMother = (TH1F*)hist_invariantMassMother->Clone();
1306 TString name_deltainvariantMassMother =
"deltainvariantMassBPlus";
1307 name_deltainvariantMassMother += ptBinMother + signName;
1308 TH1F* hist_deltainvariantMassMother =
new TH1F(name_deltainvariantMassMother.Data(),
"delta mass mother candidate; m [GeV/c^2]; Entries", 2000, 0, 20);
1309 hist_deltainvariantMassMother->Sumw2();
1310 hist_deltainvariantMassMother->SetLineColor(6);
1311 hist_deltainvariantMassMother->SetMarkerStyle(20);
1312 hist_deltainvariantMassMother->SetMarkerSize(0.6);
1313 hist_deltainvariantMassMother->SetMarkerColor(6);
1314 TH1F* histogram_deltainvariantMassMother = (TH1F*)hist_deltainvariantMassMother->Clone();
1320 TString name_cutEffectBackground =
"cutEffectBackground";
1321 TH2I* hist_cutEffectBackground =
new TH2I(name_cutEffectBackground.Data(),
"Effect of Cuts on background; cut number; cut number", 99, 0, 99, 99, 0, 99);
1322 for (
int i = 0; i < 99; ++i)
1326 hist_cutEffectBackground->GetXaxis()->SetBinLabel(i + 1, integerText);
1327 hist_cutEffectBackground->GetYaxis()->SetBinLabel(i + 1, integerText);
1329 TH2I* histogram_cutEffectBackground = (TH2I*)hist_cutEffectBackground->Clone();
1332 TString name_cutEffectSignal =
"cutEffectSignal";
1333 TH2I* hist_cutEffectSignal =
new TH2I(name_cutEffectSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number", 99, 0, 99, 99, 0, 99);
1334 for (
Int_t i = 0; i < 99; ++i)
1338 hist_cutEffectSignal->GetXaxis()->SetBinLabel(i + 1, integerText);
1339 hist_cutEffectSignal->GetYaxis()->SetBinLabel(i + 1, integerText);
1341 TH2I* histogram_cutEffectSignal = (TH2I*)hist_cutEffectSignal->Clone();
1344 TString name_cutEffectUniqueBackground =
"cutEffectUniqueBackground";
1345 TH1I* hist_cutEffectUniqueBackground =
new TH1I(name_cutEffectUniqueBackground.Data(),
"Effect of Cuts on Signal; cut number; cut number", 99, 0, 99);
1346 for (
Int_t i = 0; i < 99; ++i)
1350 hist_cutEffectUniqueBackground->GetXaxis()->SetBinLabel(i + 1, integerText);
1352 TH1I* histogram_cutEffectUniqueBackground = (
TH1I*)hist_cutEffectUniqueBackground->Clone();
1355 TString name_cutEffectUniqueSignal =
"cutEffectUniqueSignal";
1356 TH1I* hist_cutEffectUniqueSignal =
new TH1I(name_cutEffectUniqueSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number", 99, 0, 99);
1357 for (
Int_t i = 0; i < 99; ++i)
1361 hist_cutEffectUniqueSignal->GetXaxis()->SetBinLabel(i + 1, integerText);
1363 TH1I* histogram_cutEffectUniqueSignal = (
TH1I*)hist_cutEffectUniqueSignal->Clone();
1366 TString name_totalITSBackground =
"totalITSBackground";
1367 TH1F* hist_totalITSBackground =
new TH1F(name_totalITSBackground.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries", 30, 0, 30);
1368 hist_totalITSBackground->Sumw2();
1369 hist_totalITSBackground->SetLineColor(6);
1370 hist_totalITSBackground->SetMarkerStyle(20);
1371 hist_totalITSBackground->SetMarkerSize(0.6);
1372 hist_totalITSBackground->SetMarkerColor(6);
1373 TH1F* histogram_totalITSBackground = (TH1F*)hist_totalITSBackground->Clone();
1376 TString name_totalITSSignal =
"totalITSSignal";
1377 TH1F* hist_totalITSSignal =
new TH1F(name_totalITSSignal.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries", 30, 0, 30);
1378 hist_totalITSSignal->Sumw2();
1379 hist_totalITSSignal->SetLineColor(6);
1380 hist_totalITSSignal->SetMarkerStyle(20);
1381 hist_totalITSSignal->SetMarkerSize(0.6);
1382 hist_totalITSSignal->SetMarkerColor(6);
1383 TH1F* histogram_totalITSSignal = (TH1F*)hist_totalITSSignal->Clone();
1386 TString name_totalTPCBackground =
"totalTPCBackground";
1387 TH1F* hist_totalTPCBackground =
new TH1F(name_totalTPCBackground.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries", 1000, 0, 1000);
1388 hist_totalTPCBackground->Sumw2();
1389 hist_totalTPCBackground->SetLineColor(6);
1390 hist_totalTPCBackground->SetMarkerStyle(20);
1391 hist_totalTPCBackground->SetMarkerSize(0.6);
1392 hist_totalTPCBackground->SetMarkerColor(6);
1393 TH1F* histogram_totalTPCBackground = (TH1F*)hist_totalTPCBackground->Clone();
1396 TString name_totalTPCSignal =
"totalTPCSignal";
1397 TH1F* hist_totalTPCSignal =
new TH1F(name_totalTPCSignal.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries", 1000, 0, 1000);
1398 hist_totalTPCSignal->Sumw2();
1399 hist_totalTPCSignal->SetLineColor(6);
1400 hist_totalTPCSignal->SetMarkerStyle(20);
1401 hist_totalTPCSignal->SetMarkerSize(0.6);
1402 hist_totalTPCSignal->SetMarkerColor(6);
1403 TH1F* histogram_totalTPCSignal = (TH1F*)hist_totalTPCSignal->Clone();
1406 TString name_totalSigmaPIDBackground =
"totalSigmaPIDBackground";
1407 TH1F* hist_totalSigmaPIDBackground =
new TH1F(name_totalSigmaPIDBackground.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries", 1000, 0, 100);
1408 hist_totalSigmaPIDBackground->Sumw2();
1409 hist_totalSigmaPIDBackground->SetLineColor(6);
1410 hist_totalSigmaPIDBackground->SetMarkerStyle(20);
1411 hist_totalSigmaPIDBackground->SetMarkerSize(0.6);
1412 hist_totalSigmaPIDBackground->SetMarkerColor(6);
1413 TH1F* histogram_totalSigmaPIDBackground = (TH1F*)hist_totalSigmaPIDBackground->Clone();
1416 TString name_totalSigmaPIDSignal =
"totalSigmaPIDSignal";
1417 TH1F* hist_totalSigmaPIDSignal =
new TH1F(name_totalSigmaPIDSignal.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries", 1000, 0, 100);
1418 hist_totalSigmaPIDSignal->Sumw2();
1419 hist_totalSigmaPIDSignal->SetLineColor(6);
1420 hist_totalSigmaPIDSignal->SetMarkerStyle(20);
1421 hist_totalSigmaPIDSignal->SetMarkerSize(0.6);
1422 hist_totalSigmaPIDSignal->SetMarkerColor(6);
1423 TH1F* histogram_totalSigmaPIDSignal = (TH1F*)hist_totalSigmaPIDSignal->Clone();
1426 TString name_BPlusLabelNumber =
"BPlusLabelNumber";
1427 TH1I* hist_BPlusLabelNumber =
new TH1I(name_BPlusLabelNumber.Data(),
"Number of BPlus mesons with same label; numer with same label; entries", 50, 0, 50);
1428 for (
Int_t i = 0; i < 50; ++i)
1432 hist_BPlusLabelNumber->GetXaxis()->SetBinLabel(i + 1, integerText);
1434 TH1I* histogram_BPlusLabelNumber = (
TH1I*)hist_BPlusLabelNumber->Clone();
1438 TString name_particle_pdgBPlusPion =
"particle_pdgBPlusPion";
1439 TH1F* hist_particle_pdgBPlusPion =
new TH1F(name_particle_pdgBPlusPion.Data(),
"Pdg code particle; pdg code; Entries", 5000, -0.5, 4999.5);
1440 hist_particle_pdgBPlusPion->Sumw2();
1441 hist_particle_pdgBPlusPion->SetLineColor(6);
1442 hist_particle_pdgBPlusPion->SetMarkerStyle(20);
1443 hist_particle_pdgBPlusPion->SetMarkerSize(0.6);
1444 hist_particle_pdgBPlusPion->SetMarkerColor(6);
1445 TH1F* histogram_particle_pdgBPlusPion = (TH1F*)hist_particle_pdgBPlusPion->Clone();
1448 TString name_particle_pdgD0First =
"particle_pdgD0First";
1449 TH1F* hist_particle_pdgD0First =
new TH1F(name_particle_pdgD0First.Data(),
"Pdg code particle; pdg code; Entries", 5000, -0.5, 4999.5);
1450 hist_particle_pdgD0First->Sumw2();
1451 hist_particle_pdgD0First->SetLineColor(6);
1452 hist_particle_pdgD0First->SetMarkerStyle(20);
1453 hist_particle_pdgD0First->SetMarkerSize(0.6);
1454 hist_particle_pdgD0First->SetMarkerColor(6);
1455 TH1F* histogram_particle_pdgD0First = (TH1F*)hist_particle_pdgD0First->Clone();
1458 TString name_particle_pdgD0Second =
"particle_pdgD0Second";
1459 TH1F* hist_particle_pdgD0Second =
new TH1F(name_particle_pdgD0Second.Data(),
"Pdg code particle; pdg code; Entries", 5000, -0.5, 4999.5);
1460 hist_particle_pdgD0Second->Sumw2();
1461 hist_particle_pdgD0Second->SetLineColor(6);
1462 hist_particle_pdgD0Second->SetMarkerStyle(20);
1463 hist_particle_pdgD0Second->SetMarkerSize(0.6);
1464 hist_particle_pdgD0Second->SetMarkerColor(6);
1465 TH1F* histogram_particle_pdgD0Second = (TH1F*)hist_particle_pdgD0Second->Clone();
1468 TString name_particle_pdgAll =
"particle_pdgAll";
1469 TH1F* hist_particle_pdgAll =
new TH1F(name_particle_pdgAll.Data(),
"Pdg code particle; pdg code; Entries", 5000, -0.5, 4999.5);
1470 hist_particle_pdgAll->Sumw2();
1471 hist_particle_pdgAll->SetLineColor(6);
1472 hist_particle_pdgAll->SetMarkerStyle(20);
1473 hist_particle_pdgAll->SetMarkerSize(0.6);
1474 hist_particle_pdgAll->SetMarkerColor(6);
1475 TH1F* histogram_particle_pdgAll = (TH1F*)hist_particle_pdgAll->Clone();
1478 TString name_particle_pdgAllSecond =
"particle_pdgAllSecond";
1479 TH1F* hist_particle_pdgAllSecond =
new TH1F(name_particle_pdgAllSecond.Data(),
"Pdg code particle; pdg code; Entries", 5000, -0.5, 4999.5);
1480 hist_particle_pdgAllSecond->Sumw2();
1481 hist_particle_pdgAllSecond->SetLineColor(6);
1482 hist_particle_pdgAllSecond->SetMarkerStyle(20);
1483 hist_particle_pdgAllSecond->SetMarkerSize(0.6);
1484 hist_particle_pdgAllSecond->SetMarkerColor(6);
1485 TH1F* histogram_particle_pdgAllSecond = (TH1F*)hist_particle_pdgAllSecond->Clone();
1488 TString name_particle_pdgAllInvMass =
"particle_pdgAllInvMass";
1489 TH2F* hist_particle_pdgAllInvMass =
new TH2F(name_particle_pdgAllInvMass.Data(),
"Pdg code particle; pdg code; BPlus Inv. Mass", 5000, -0.5, 4999.5, 500, 4.0, 6.0);
1490 hist_particle_pdgAllInvMass->Sumw2();
1491 hist_particle_pdgAllInvMass->SetLineColor(6);
1492 hist_particle_pdgAllInvMass->SetMarkerStyle(20);
1493 hist_particle_pdgAllInvMass->SetMarkerSize(0.6);
1494 hist_particle_pdgAllInvMass->SetMarkerColor(6);
1495 TH2F* histogram_particle_pdgAllInvMass = (
TH2F*)hist_particle_pdgAllInvMass->Clone();
1498 TString name_particle_pdgAllSecondInvMass =
"particle_pdgAllSecondInvMass";
1499 TH2F* hist_particle_pdgAllSecondInvMass =
new TH2F(name_particle_pdgAllSecondInvMass.Data(),
"Pdg code particle; pdg code; BPlus Inv. Mass", 5000, -0.5, 4999.5, 500, 4.0, 6.0);
1500 hist_particle_pdgAllSecondInvMass->Sumw2();
1501 hist_particle_pdgAllSecondInvMass->SetLineColor(6);
1502 hist_particle_pdgAllSecondInvMass->SetMarkerStyle(20);
1503 hist_particle_pdgAllSecondInvMass->SetMarkerSize(0.6);
1504 hist_particle_pdgAllSecondInvMass->SetMarkerColor(6);
1505 TH2F* histogram_particle_pdgAllSecondInvMass = (
TH2F*)hist_particle_pdgAllSecondInvMass->Clone();
1508 TString name_particle_daughterPdgOneStep511 =
"particle_daughterPdgOneStep511";
1509 TH2F* hist_particle_daughterPdgOneStep511 =
new TH2F(name_particle_daughterPdgOneStep511.Data(),
"Pdg daughters; n daughter; Pdg daughter", 50, -0.5, 49.5, 5000, -0.5, 4999.5);
1510 hist_particle_daughterPdgOneStep511->Sumw2();
1511 hist_particle_daughterPdgOneStep511->SetLineColor(6);
1512 hist_particle_daughterPdgOneStep511->SetMarkerStyle(20);
1513 hist_particle_daughterPdgOneStep511->SetMarkerSize(0.6);
1514 hist_particle_daughterPdgOneStep511->SetMarkerColor(6);
1515 TH2F* histogram_particle_daughterPdgOneStep511 = (
TH2F*)hist_particle_daughterPdgOneStep511->Clone();
1518 TString name_particle_daughterPdgOneStep521 =
"particle_daughterPdgOneStep521";
1519 TH2F* hist_particle_daughterPdgOneStep521 =
new TH2F(name_particle_daughterPdgOneStep521.Data(),
"Pdg daughters; n daughter; Pdg daughter", 50, -0.5, 49.5, 5000, -0.5, 4999.5);
1520 hist_particle_daughterPdgOneStep521->Sumw2();
1521 hist_particle_daughterPdgOneStep521->SetLineColor(6);
1522 hist_particle_daughterPdgOneStep521->SetMarkerStyle(20);
1523 hist_particle_daughterPdgOneStep521->SetMarkerSize(0.6);
1524 hist_particle_daughterPdgOneStep521->SetMarkerColor(6);
1525 TH2F* histogram_particle_daughterPdgOneStep521 = (
TH2F*)hist_particle_daughterPdgOneStep521->Clone();
1528 TString name_particle_daughterPdgTwoStep511 =
"particle_daughterPdgTwoStep511";
1529 TH2F* hist_particle_daughterPdgTwoStep511 =
new TH2F(name_particle_daughterPdgTwoStep511.Data(),
"Pdg daughters; n daughter; Pdg daughter", 50, -0.5, 49.5, 5000, -0.5, 4999.5);
1530 hist_particle_daughterPdgTwoStep511->Sumw2();
1531 hist_particle_daughterPdgTwoStep511->SetLineColor(6);
1532 hist_particle_daughterPdgTwoStep511->SetMarkerStyle(20);
1533 hist_particle_daughterPdgTwoStep511->SetMarkerSize(0.6);
1534 hist_particle_daughterPdgTwoStep511->SetMarkerColor(6);
1535 TH2F* histogram_particle_daughterPdgTwoStep511 = (
TH2F*)hist_particle_daughterPdgTwoStep511->Clone();
1538 TString name_particle_daughterPdgTwoStep521 =
"particle_daughterPdgTwoStep521";
1539 TH2F* hist_particle_daughterPdgTwoStep521 =
new TH2F(name_particle_daughterPdgTwoStep521.Data(),
"Pdg daughters; n daughter; Pdg daughter", 50, -0.5, 49.5, 5000, -0.5, 4999.5);
1540 hist_particle_daughterPdgTwoStep521->Sumw2();
1541 hist_particle_daughterPdgTwoStep521->SetLineColor(6);
1542 hist_particle_daughterPdgTwoStep521->SetMarkerStyle(20);
1543 hist_particle_daughterPdgTwoStep521->SetMarkerSize(0.6);
1544 hist_particle_daughterPdgTwoStep521->SetMarkerColor(6);
1545 TH2F* histogram_particle_daughterPdgTwoStep521 = (
TH2F*)hist_particle_daughterPdgTwoStep521->Clone();
1548 for (
int i = 0; i < 3; ++i)
1551 TString discription_Histogram;
1552 if (i == 0) {name_Histogram =
"invmassD0PionBPlusPion"; discription_Histogram =
"Invariant mass D0 Pion and BPlus Pion; inv. mass [GeV/c^{2}]; Entries";}
1553 if (i == 1) {name_Histogram =
"invmassD0KaonBPlusPion"; discription_Histogram =
"Invariant mass D0 Kaon and BPlus Pion; inv. mass [GeV/c^{2}]; Entries";}
1554 if (i == 2) {name_Histogram =
"invmassD0PionD0KaonBPlusPion"; discription_Histogram =
"Invariant mass D0 Pion, D0 Kaon, and BPlus Pion; inv. mass [GeV/c^{2}]; Entries";}
1556 for (
int j = 0; j < 2; ++j)
1559 if (j == 1) add_name =
"_MC";
1560 name_Histogram += add_name;
1561 TH1F* histogram =
new TH1F(name_Histogram.Data(), discription_Histogram.Data(), 1000, 0, 30);
1563 if (j % 2 == 0) histogram->SetLineColor(6);
1564 if (j % 2 == 1) histogram->SetLineColor(4);
1565 histogram->SetMarkerStyle(20);
1566 histogram->SetMarkerSize(0.6);
1567 if (j % 2 == 0) histogram->SetMarkerColor(6);
1568 if (j % 2 == 1) histogram->SetMarkerColor(4);
1569 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1584 AliESDVertex *vertexESD = 0;
1585 AliAODVertex *vertexAOD = 0;
1587 AliVertexerTracks vertexer;
1588 vertexer.SetFieldkG(bField);
1590 vertexer.SetVtxStart((AliESDVertex*)primary);
1591 vertexESD = (AliESDVertex*)vertexer.VertexForSelectedESDTracks(tracks);
1595 if (!vertexESD)
return vertexAOD;
1598 if (vertexESD->GetNContributors() != tracks->GetEntriesFast())
1600 delete vertexESD; vertexESD =
nullptr;
1605 Double_t pos[3], cov[6], chi2perNDF;
1606 for (
Int_t a = 0; a < 3; a++)pos[a] = 0.;
1607 for (
Int_t b = 0; b < 6; b++)cov[b] = 0.;
1610 vertexESD->GetXYZ(pos);
1611 vertexESD->GetCovMatrix(cov);
1614 Double_t vertRadius2 = pos[0] * pos[0] + pos[1] * pos[1];
1615 if (vertRadius2 > 8.)
1617 delete vertexESD; vertexESD =
nullptr;
1621 chi2perNDF = vertexESD->GetChi2toNDF();
1622 dispersion = vertexESD->GetDispersion();
1623 delete vertexESD; vertexESD =
nullptr;
1625 vertexAOD =
new AliAODVertex(pos, cov, chi2perNDF, 0x0, -1, AliAODVertex::kUndef, nprongs);
1632 TMatrix &particleMatrix = *BPlustoD0PiLabelMatrix;
1633 for (
Int_t i = 0; i < mcTrackArray->GetEntriesFast(); i++) {
1635 Int_t mcLabelPionBPlus = 0;
1636 Int_t mcLabelPionD0 = 0;
1637 Int_t mcLabelKaon = 0;
1638 Int_t mcLabelD0 = 0;
1639 Int_t mcLabelBPlus = 0;
1645 Bool_t mcPionBPlusPresent = kFALSE;
1646 Bool_t mcPionD0Present = kFALSE;
1647 Bool_t mcKaonPresent = kFALSE;
1650 AliAODMCParticle *mcTrackParticle =
dynamic_cast< AliAODMCParticle*
>(mcTrackArray->At(i));
1651 if (!mcTrackParticle) {std::cout <<
"no particle" << std::endl;
continue;}
1652 Int_t pdgCodeMC = TMath::Abs(mcTrackParticle->GetPdgCode());
1654 if (pdgCodeMC == 521)
1658 Int_t nDaughterBPlus = mcTrackParticle->GetNDaughters();
1659 ptMC[0] = mcTrackParticle->Pt();
1660 yMC[0] = mcTrackParticle->Y();
1661 pseudoYMC[0] = mcTrackParticle->Eta();
1663 TString fillthis =
"BPlus_in_analysis";
1664 ((TH1F*)(listout->FindObject(fillthis)))->Fill(0);
1666 if (nDaughterBPlus == 2)
1668 for (
Int_t iDaughterBPlus = 0; iDaughterBPlus < 2; iDaughterBPlus++)
1670 AliAODMCParticle* daughterBPlus = (AliAODMCParticle*)mcTrackArray->At(mcTrackParticle->GetDaughter(iDaughterBPlus));
1671 if (!daughterBPlus)
break;
1672 Int_t pdgCodeDaughterBPlus = TMath::Abs(daughterBPlus->GetPdgCode());
1674 if (pdgCodeDaughterBPlus == 211)
1676 mcLabelPionBPlus = mcTrackParticle->GetDaughter(iDaughterBPlus);
1677 mcPionBPlusPresent = kTRUE;
1678 ptMC[1] = daughterBPlus->Pt();
1679 yMC[1] = daughterBPlus->Y();
1680 pseudoYMC[1] = daughterBPlus->Eta();
1681 }
else if (pdgCodeDaughterBPlus == 421)
1683 mcLabelD0 = mcTrackParticle->GetDaughter(iDaughterBPlus);
1684 Int_t nDaughterD0 = daughterBPlus->GetNDaughters();
1685 ptMC[2] = daughterBPlus->Pt();
1686 yMC[2] = daughterBPlus->Y();
1687 pseudoYMC[2] = daughterBPlus->Eta();
1689 if (nDaughterD0 == 2)
1691 for (
Int_t iDaughterD0 = 0; iDaughterD0 < 2; iDaughterD0++)
1693 AliAODMCParticle* daughterD0 = (AliAODMCParticle*)mcTrackArray->At(daughterBPlus->GetDaughter(iDaughterD0));
1694 if (!daughterD0)
break;
1695 Int_t pdgCodeDaughterD0 = TMath::Abs(daughterD0->GetPdgCode());
1696 if (pdgCodeDaughterD0 == 211)
1698 mcLabelPionD0 = daughterBPlus->GetDaughter(iDaughterD0);
1699 ptMC[3] = daughterD0->Pt();
1700 yMC[3] = daughterD0->Y();
1701 pseudoYMC[3] = daughterD0->Eta();
1702 mcPionD0Present = kTRUE;
1703 }
else if (pdgCodeDaughterD0 == 321)
1705 mcLabelKaon = daughterBPlus->GetLabel();
1706 mcKaonPresent = kTRUE;
1707 ptMC[4] = daughterD0->Pt();
1708 yMC[4] = daughterD0->Y();
1709 pseudoYMC[4] = daughterD0->Eta();
1717 if (mcPionBPlusPresent && mcPionD0Present && mcKaonPresent) {
1719 TString fillthis =
"BPlus_in_analysis";
1720 ((TH1F*)(listout->FindObject(fillthis)))->Fill(1);
1722 fillthis =
"BPlus_per_bin";
1725 if (
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j + 1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
1729 fillthis =
"mc_BPlus_pt";
1730 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
1731 fillthis =
"mc_BPlus_pion_pt";
1732 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[1]);
1733 fillthis =
"mc_D0_pt";
1734 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[2]);
1735 fillthis =
"mc_D0_pion_pt";
1736 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[3]);
1737 fillthis =
"mc_D0_kaon_pt";
1738 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[4]);
1740 fillthis =
"mc_BPlus_rapidity_true";
1741 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[0]);
1742 fillthis =
"mc_BPlus_pion_rapidity_true";
1743 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[1]);
1744 fillthis =
"mc_D0_rapidity_true";
1745 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[2]);
1746 fillthis =
"mc_D0_pion_rapidity_true";
1747 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[3]);
1748 fillthis =
"mc_D0_kaon_rapidity_true";
1749 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[4]);
1751 fillthis =
"mc_BPlus_pseudorapidity_true";
1752 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[0]);
1753 fillthis =
"mc_BPlus_pion_pseudorapidity_true";
1754 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[1]);
1755 fillthis =
"mc_D0_pseudorapidity_true";
1756 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[2]);
1757 fillthis =
"mc_D0_pion_pseudorapidity_true";
1758 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[3]);
1759 fillthis =
"mc_D0_kaon_pseudorapidity_true";
1760 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[4]);
1763 if (ptMC[1] < 0.1 || TMath::Abs(pseudoYMC[1]) > 0.8 )
continue;
1764 if (ptMC[3] < 0.1 || TMath::Abs(pseudoYMC[3]) > 0.8 )
continue;
1765 if (ptMC[4] < 0.1 || TMath::Abs(pseudoYMC[4]) > 0.8 )
continue;
1768 if (TMath::Abs(yMC[0]) > 0.8)
continue;
1770 Int_t rows = BPlustoD0PiLabelMatrix->GetNrows();
1772 BPlustoD0PiLabelMatrix->ResizeTo(rows + 1, 5);
1773 particleMatrix(rows, 0) = mcLabelPionBPlus;
1774 particleMatrix(rows, 1) = mcLabelPionD0;
1775 particleMatrix(rows, 2) = mcLabelKaon;
1776 particleMatrix(rows, 3) = mcLabelD0;
1777 particleMatrix(rows, 4) = mcLabelBPlus;
1779 fillthis =
"BPlus_in_analysis";
1780 ((TH1F*)(listout->FindObject(fillthis)))->Fill(2);
1783 fillthis =
"BPlus_per_bin_in_Acc";
1786 if (
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j + 1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
1798 if (!aodTrack) AliFatal(
"Not a standard AOD");
1801 if (aodTrack->GetITSNcls() < 1)
return kFALSE;
1802 if (aodTrack->GetTPCNcls() < 1)
return kFALSE;
1803 if (aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
1804 if (!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
1805 if (aodTrack->GetID() < 0)
return kFALSE;
1807 if (!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
1809 Int_t mcLabelParticle = -1;
1810 mcLabelParticle = aodTrack->GetLabel();
1813 Double_t pt_track = aodTrack->Pt();
1814 Double_t momentum_track = aodTrack->P();
1815 Int_t numberOfITS = aodTrack->GetITSNcls();
1816 Int_t numberOfTPC = aodTrack->GetTPCNcls();
1818 AliExternalTrackParam particleTrack;
1819 particleTrack.CopyFromVTrack(aodTrack);
1821 particleTrack.PropagateToDCA(primaryVertex, bz, 100., d0, covd0);
1824 Bool_t isDesiredCandidate = kFALSE;
1826 TMatrix &particleMatrix = *BPlustoD0PiLabelMatrix;
1827 for (
Int_t k = 0; k < BPlustoD0PiLabelMatrix->GetNrows(); ++k) {
1828 if (mcLabelParticle == (
Int_t)particleMatrix(k, 1) || mcLabelParticle == (
Int_t)particleMatrix(k, 2)) {
1829 isDesiredCandidate = kTRUE;
1839 Int_t daughterType = 0;
1848 for (
Int_t j = 0; j < 10; ++j)
1855 if (isDesiredCandidate)
1863 for (
Int_t j = 0; j < 10; ++j)
1877 if (isDesiredCandidate) {
1884 if (isDesiredCandidate) {
1891 if (!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
1892 if (isDesiredCandidate) {
1900 if ((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
1901 if (isDesiredCandidate) {
1910 if (isDesiredCandidate) {
1918 if (isDesiredCandidate) {
1925 if (isDesiredCandidate) {
1932 if (isDesiredCandidate) {
1938 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
1940 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
1943 Bool_t bHardITSPass = kTRUE;
1944 for (
Int_t j = 0; j < 7; ++j)
1946 if (bHardSelectionArrayITS[j])
1948 if (!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
1952 Int_t nCounterSoftSelection = 0;
1953 Bool_t bSoftITSPass = kTRUE;
1954 for (
Int_t j = 0; j < 7; ++j)
1956 if (bSoftSelectionArrayITS[j])
1958 if (aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
1961 if (nCounterSoftSelection < fCuts->GetNSoftITSCutD0FirstDaughter()) bSoftITSPass = kFALSE;
1963 if (!bHardITSPass) {
1964 if (isDesiredCandidate) {
1970 if (!bSoftITSPass) {
1971 if (isDesiredCandidate) {
1980 if (isDesiredCandidate) {
1993 for (
Int_t j = 0; j < 10; ++j)
2000 if (isDesiredCandidate)
2008 for (
Int_t j = 0; j < 10; ++j)
2022 if (!aodTrack) AliFatal(
"Not a standard AOD");
2025 if (aodTrack->GetITSNcls() < 1)
return kFALSE;
2026 if (aodTrack->GetTPCNcls() < 1)
return kFALSE;
2027 if (aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
2028 if (!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
2029 if (aodTrack->GetID() < 0)
return kFALSE;
2031 if (!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
2033 Int_t mcLabelParticle = -1;
2034 mcLabelParticle = aodTrack->GetLabel();
2037 Double_t pt_track = aodTrack->Pt();
2038 Double_t momentum_track = aodTrack->P();
2039 Int_t numberOfITS = aodTrack->GetITSNcls();
2040 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2042 AliExternalTrackParam particleTrack;
2043 particleTrack.CopyFromVTrack(aodTrack);
2045 particleTrack.PropagateToDCA(primaryVertex, bz, 100., d0, covd0);
2048 Bool_t isDesiredCandidate = kFALSE;
2050 TMatrix &particleMatrix = *BPlustoD0PiLabelMatrix;
2051 for (
Int_t k = 0; k < BPlustoD0PiLabelMatrix->GetNrows(); ++k) {
2052 if (mcLabelParticle == (
Int_t)particleMatrix(k, 1) || mcLabelParticle == (
Int_t)particleMatrix(k, 2)) {
2053 isDesiredCandidate = kTRUE;
2063 Int_t daughterType = 1;
2072 for (
Int_t j = 0; j < 10; ++j)
2079 if (isDesiredCandidate)
2087 for (
Int_t j = 0; j < 10; ++j)
2100 if (isDesiredCandidate) {
2107 if (isDesiredCandidate) {
2114 if (!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2115 if (isDesiredCandidate) {
2123 if ((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2124 if (isDesiredCandidate) {
2133 if (isDesiredCandidate) {
2141 if (isDesiredCandidate) {
2148 if (isDesiredCandidate) {
2155 if (isDesiredCandidate) {
2161 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2163 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2166 Bool_t bHardITSPass = kTRUE;
2167 for (
Int_t j = 0; j < 7; ++j)
2169 if (bHardSelectionArrayITS[j])
2171 if (!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2175 Int_t nCounterSoftSelection = 0;
2176 Bool_t bSoftITSPass = kTRUE;
2177 for (
Int_t j = 0; j < 7; ++j)
2179 if (bSoftSelectionArrayITS[j])
2181 if (aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2184 if (nCounterSoftSelection < fCuts->GetNSoftITSCutD0SecondDaughter()) bSoftITSPass = kFALSE;
2186 if (!bHardITSPass) {
2187 if (isDesiredCandidate) {
2193 if (!bSoftITSPass) {
2194 if (isDesiredCandidate) {
2203 if (isDesiredCandidate) {
2216 for (
Int_t j = 0; j < 10; ++j)
2223 if (isDesiredCandidate)
2231 for (
Int_t j = 0; j < 10; ++j)
2245 Int_t numberofparticles = 0;
2246 Int_t numberofparticlesused = 0;
2251 for (
Int_t i = 0; i < aodEvent->GetNumberOfTracks(); i++) {
2252 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
2253 if (!aodTrack) AliFatal(
"Not a standard AOD");
2256 if (aodTrack->GetITSNcls() < 1)
continue;
2257 if (aodTrack->GetTPCNcls() < 1)
continue;
2258 if (aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
2259 if (!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
2260 if (aodTrack->GetID() < 0)
continue;
2262 if (!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
2265 primaryVertex->GetXYZ(pos);
2266 primaryVertex->GetCovarianceMatrix(cov);
2267 const AliESDVertex vESD(pos,cov,100.,100);
2270 Int_t mcLabelParticle = -1;
2271 mcLabelParticle = aodTrack->GetLabel();
2273 numberofparticles++;
2276 Double_t pt_track = aodTrack->Pt();
2277 Double_t momentum_track = aodTrack->P();
2278 Int_t numberOfITS = aodTrack->GetITSNcls();
2279 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2282 Int_t pionPIDnumber = 2;
2287 if(trackPIDHF) TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
2288 if(trackPIDHF) TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
2290 AliExternalTrackParam particleTrack;
2291 particleTrack.CopyFromVTrack(aodTrack);
2293 particleTrack.PropagateToDCA(primaryVertex, bz, 100., d0, covd0);
2297 Bool_t isDesiredCandidate = kFALSE;
2299 TMatrix &particleMatrix = *BPlustoD0PiLabelMatrix;
2300 for (
Int_t k = 0; k < BPlustoD0PiLabelMatrix->GetNrows(); ++k) {
2301 if (mcLabelParticle == (
Int_t)particleMatrix(k, 0)) {
2302 isDesiredCandidate = kTRUE;
2312 Int_t daughterType = 2;
2320 for (
Int_t j = 0; j < 10; ++j)
2328 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
2331 if (isDesiredCandidate)
2339 for (
Int_t j = 0; j < 10; ++j)
2347 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
2358 if (isDesiredCandidate) {
2365 if (isDesiredCandidate) {
2372 if (isDesiredCandidate) {
2379 if (!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2380 if (isDesiredCandidate) {
2388 if ((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2389 if (isDesiredCandidate) {
2398 if (isDesiredCandidate) {
2407 if (isDesiredCandidate) {
2415 if (isDesiredCandidate) {
2422 if (isDesiredCandidate) {
2428 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2430 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2433 Bool_t bHardITSPass = kTRUE;
2434 for (
Int_t j = 0; j < 7; ++j)
2436 if (bHardSelectionArrayITS[j])
2438 if (!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2442 Int_t nCounterSoftSelection = 0;
2443 Bool_t bSoftITSPass = kTRUE;
2444 for (
Int_t j = 0; j < 7; ++j)
2446 if (bSoftSelectionArrayITS[j])
2448 if (aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2451 if (nCounterSoftSelection < fCuts->GetNSoftITSCutBPlusPion()) bSoftITSPass = kFALSE;
2453 if (!bHardITSPass) {
2454 if (isDesiredCandidate) {
2460 if (!bSoftITSPass) {
2461 if (isDesiredCandidate) {
2471 if (isDesiredCandidate) {
2484 for (
Int_t j = 0; j < 10; ++j)
2492 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
2495 if (isDesiredCandidate)
2503 for (
Int_t j = 0; j < 10; ++j)
2511 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
2516 numberofparticlesused++;
2533 for (
Int_t j = 0; j < D0TracksFromFriendFile->GetEntriesFast(); j++)
2538 if (!trackD0) {std::cout <<
"found none" << std::endl;
continue;}
2539 if (trackD0 ==
nullptr) {std::cout <<
"found nullptr" << std::endl;
continue;}
2547 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(trackD0->GetDaughter(0));
2548 AliAODTrack * trackSecondDaughter = (AliAODTrack*)(trackD0->GetDaughter(1));
2549 if (!
D0FirstDaughterSelection(trackFirstDaughter, primaryVertex, bz, mcTrackArray, BPlustoD0PiLabelMatrix, header))
continue;
2550 if (!
D0SecondDaughterSelection(trackSecondDaughter, primaryVertex, bz, mcTrackArray, BPlustoD0PiLabelMatrix, header))
continue;
2553 AliAODVertex *vertexMother = (AliAODVertex*)trackD0->GetSecondaryVtx();
2556 Int_t pdgCodeMother = -1;
2557 Bool_t isDesiredCandidate = kFALSE;
2558 Int_t motherType, histType;
2560 Int_t mcLabelD0 = -1;
2568 isDesiredCandidate = kTRUE;
2570 Int_t mcLabelFirstTrack = -1;
2571 mcLabelFirstTrack = trackFirstDaughter->GetLabel();
2573 if (mcLabelFirstTrack >= 0)
2575 AliAODMCParticle *mcParticleFirstTrack = (AliAODMCParticle*)mcTrackArray->At(mcLabelFirstTrack);
2576 AliAODMCParticle *mcMotherParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0);
2578 if (mcParticleFirstTrack && mcMotherParticle)
2580 pdgCodeMother = mcMotherParticle->GetPdgCode();
2582 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()));
2585 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()));
2597 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType, pdgCodeMother);
2601 Bool_t cutMother = kFALSE;
2603 Bool_t bCutArray[29] = {0};
2605 if (cutReturnValue == -1) cutMother = kTRUE;
2606 if (cutReturnValue == 0) cutMother = kTRUE;
2611 for (
Int_t k = 0; k < 29; ++k)
2613 if (bCutArray[k] == kTRUE) {
2614 if (isDesiredCandidate) {
2627 if (isDesiredCandidate) {
2640 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType, pdgCodeMother);
2647 delete vHF; vHF =
nullptr;
2660 Int_t ObjectNumber = TProcessID::GetObjectCount();
2664 if (!trackD0) {std::cout <<
"found none" << std::endl;
continue;}
2665 if (trackD0 ==
nullptr) {std::cout <<
"found nullptr" << std::endl;
continue;}
2672 AliAODTrack * trackBPlusPion =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(
fBPlusPionTracks->at(i)));
2673 if (!trackBPlusPion)
continue;
2676 AliAODTrack* twoProngdaughter0 = (AliAODTrack*)trackD0->GetDaughter(0);
2677 AliAODTrack* twoProngdaughter1 = (AliAODTrack*)trackD0->GetDaughter(1);
2678 UShort_t idProng0 = twoProngdaughter0->GetID();
2679 UShort_t idProng1 = twoProngdaughter1->GetID();
2681 if (trackBPlusPion->GetID() == idProng0 || trackBPlusPion->GetID() == idProng1)
continue;
2693 Double_t invariantMassD0 = trackD0->InvMass(2, prongsD0);
2694 Double_t invariantMassD02 = trackD0->InvMass(2, prongsD02);
2696 Double_t pdgMassD0 = TDatabasePDG::Instance()->GetParticle(421)->Mass();
2701 Bool_t bWrongSign = kFALSE;
2702 if (trackBPlusPion->Charge() == -1)
2704 if ((
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(0)), 2)) && (
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(1)), 3))) bWrongSign = kFALSE;
2705 else if ((
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(0)), 3)) && (
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(1)), 2))) bWrongSign = kTRUE;
2707 if (TMath::Abs(invariantMassD0 - pdgMassD0) > massWindowD0)
continue;
2709 }
else if (trackBPlusPion->Charge() == 1) {
2711 if ((
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(0)), 3)) && (
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(1)), 2))) bWrongSign = kFALSE;
2712 else if ((
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(0)), 2)) && (
fCuts->
SelectPID(((AliAODTrack*)trackD0->GetDaughter(1)), 3))) bWrongSign = kTRUE;
2714 if (TMath::Abs(invariantMassD02 - pdgMassD0) > massWindowD0)
continue;
2718 for (
Int_t iRot = 0; iRot < 1; ++iRot)
2721 AliAODTrack * trackBPlusPionRotated =
new AliAODTrack(*trackBPlusPion);
2728 trackBPlusPionRotated->SetPhi(dPhiRotated);
2733 AliExternalTrackParam firstTrack;
2734 firstTrack.CopyFromVTrack(trackBPlusPionRotated);
2735 AliExternalTrackParam secondTrack;
2736 secondTrack.CopyFromVTrack(trackD0);
2745 daughterTracks.Add(&firstTrack);
2746 daughterTracks.Add(&secondTrack);
2748 AliAODVertex *vertexMother =
RecalculateVertex(primaryVertex, &daughterTracks, bz, dispersion);
2751 delete vertexMother; vertexMother =
nullptr;
2752 delete trackBPlusPionRotated; trackBPlusPionRotated =
nullptr;
2758 Double_t xdummy = 0., ydummy = 0., dca;
2759 Double_t d0z0[2], covd0z0[3], d0[2], d0err[2];
2762 firstTrack.PropagateToDCA(vertexMother, bz, 100., d0z0, covd0z0);
2763 secondTrack.PropagateToDCA(vertexMother, bz, 100., d0z0, covd0z0);
2767 px[0] = firstTrack.Px();
2768 py[0] = firstTrack.Py();
2769 pz[0] = firstTrack.Pz();
2770 px[1] = secondTrack.Px();
2771 py[1] = secondTrack.Py();
2772 pz[1] = secondTrack.Pz();
2775 id[0] = firstTrack.GetID();
2776 id[1] = secondTrack.GetID();
2778 firstTrack.PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
2780 d0err[0] = TMath::Sqrt(covd0z0[0]);
2781 secondTrack.PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
2783 d0err[1] = TMath::Sqrt(covd0z0[0]);
2786 dca = secondTrack.GetDCA(&firstTrack, bz, xdummy, ydummy);
2789 Short_t chargeMother = trackD0->Charge() + trackBPlusPionRotated->Charge();
2793 trackBPlus.SetCharge(chargeMother);
2794 trackBPlus.GetSecondaryVtx()->AddDaughter(trackBPlusPionRotated);
2795 trackBPlus.GetSecondaryVtx()->AddDaughter(trackD0);
2800 if (TMath::Abs(trackBPlus.Y(521)) > 0.8) {
2801 delete vertexMother; vertexMother =
nullptr;
2802 delete trackBPlusPionRotated; trackBPlusPionRotated =
nullptr;
2807 Bool_t fCheckInjected = kTRUE;
2808 Bool_t fRemoveInjected = kFALSE;
2809 Bool_t bIsInjected = kFALSE;
2812 if (fCheckInjected && fRemoveInjected && bIsInjected) {
2813 delete vertexMother; vertexMother =
nullptr;
2814 delete trackBPlusPionRotated; trackBPlusPionRotated =
nullptr;
2820 Bool_t isDesiredCandidate = kFALSE;
2821 Int_t mcLabelBPlus = -1;
2823 Int_t motherType, histType;
2829 if (mcLabelBPlus >= 0 && trackBPlusPionRotated->GetLabel() >= 0 && iRot == 0)
2831 isDesiredCandidate = kTRUE;
2837 if (isDesiredCandidate)
2839 AliAODMCParticle *mcTrackBPlusPion = (AliAODMCParticle*)mcTrackArray->At(trackBPlusPion->GetLabel());
2840 AliAODMCParticle *mcTrackBPlus = (AliAODMCParticle*)mcTrackArray->At(mcLabelBPlus);
2842 Double_t vertex_distance = TMath::Sqrt((primaryVertex->GetX() - mcTrackBPlusPion->Xv()) * (primaryVertex->GetX() - mcTrackBPlus->Xv()) + (primaryVertex->GetY() - mcTrackBPlus->Yv()) * (primaryVertex->GetY() - mcTrackBPlus->Yv()) + (primaryVertex->GetZ() - mcTrackBPlus->Zv()) * (primaryVertex->GetZ() - mcTrackBPlus->Zv()));
2845 Double_t momentum_resolution = TMath::Sqrt((trackBPlus.Px() - mcTrackBPlus->Px()) * (trackBPlus.Px() - mcTrackBPlus->Px()) + (trackBPlus.Py() - mcTrackBPlus->Py()) * (trackBPlus.Py() - mcTrackBPlus->Py()) + (trackBPlus.Pz() - mcTrackBPlus->Pz()) * (trackBPlus.Pz() - mcTrackBPlus->Pz()));
2856 if (isDesiredCandidate)
2865 Bool_t cutMother = kFALSE;
2867 Bool_t bCutArray[68] = {0};
2868 Int_t numberOfCuts = 68;
2870 if (cutReturnValue == -1) cutMother = kTRUE;
2871 if (cutReturnValue == 0) cutMother = kTRUE;
2876 Double_t invariantMassMother = trackBPlus.InvMass(2, prongs);
2877 Double_t pdgMassMother = TDatabasePDG::Instance()->GetParticle(521)->Mass();
2881 for (
Int_t n = 0; n < 68; ++n)
2883 if (bCutArray[n] == kTRUE) {
2884 if (isDesiredCandidate) {
2891 if (TMath::Abs(invariantMassMother - pdgMassMother) < massWindow) {
2892 for (
Int_t l = 0; l < numberOfCuts; ++l)
2894 if (bCutArray[l] == kFALSE)
continue;
2895 for (
Int_t j = 0; j < numberOfCuts; ++j)
2897 if (bCutArray[j] == kFALSE)
continue;
2898 if (isDesiredCandidate == kFALSE) histName =
"cutEffectBackground";
2899 if (isDesiredCandidate == kTRUE) histName =
"cutEffectSignal";
2904 for (
Int_t l = 0; l < numberOfCuts; ++l)
2906 if (bCutArray[l] == kFALSE)
continue;
2908 for (
Int_t j = 0; j < numberOfCuts; ++j)
2910 if (l == j)
continue;
2911 if (bCutArray[j] == kTRUE)
2920 if (isDesiredCandidate == kFALSE) histName =
"cutEffectUniqueBackground";
2921 if (isDesiredCandidate == kTRUE) histName =
"cutEffectUniqueSignal";
2933 if (isDesiredCandidate)
2937 delete vertexMother; vertexMother =
nullptr;
2938 delete trackBPlusPionRotated; trackBPlusPionRotated =
nullptr;
3116 if (TMath::Abs(invariantMassMother - pdgMassMother) < massWindow)
3121 if (!isDesiredCandidate)
3123 motherType = 0; histType = 4;
FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType, pdgD0);
3124 motherType = 1; histType = 4;
FillBPlusHistograms(&trackBPlus, primaryVertex, bz, motherType, histType);
3126 if (isDesiredCandidate)
3128 motherType = 0; histType = 5;
FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType, pdgD0);
3129 motherType = 1; histType = 5;
FillBPlusHistograms(&trackBPlus, primaryVertex, bz, motherType, histType);
3138 ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[ptBin]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[ptBin + 1];
3139 histType = 6 + 2 * ptBin;
3142 Int_t histTypeD0 = 2 * d0PtBin;
3145 if (TMath::Abs(invariantMassMother - pdgMassMother) < massWindow)
3147 if (!bWrongSign && histType > 5)
3149 if (!isDesiredCandidate)
3151 motherType = 0;
FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType, pdgD0);
3152 motherType = 1;
FillBPlusHistograms(&trackBPlus, primaryVertex, bz, motherType, histType);
3153 motherType = 2;
FillD0Histograms(trackD0, primaryVertex, bz, motherType, histTypeD0, pdgD0);
3156 if (isDesiredCandidate)
3159 motherType = 0;
FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType, pdgD0);
3160 motherType = 1;
FillBPlusHistograms(&trackBPlus, primaryVertex, bz, motherType, histType);
3161 motherType = 2;
FillD0Histograms(trackD0, primaryVertex, bz, motherType, histTypeD0 + 1, pdgD0);
3170 if(TMath::Abs(invariantMassMother - pdgMassMother) < massWindowForCutOptimization)
3172 Int_t nStartVariable = 0;
3173 Int_t nStartFillNumber = 0;
3177 CutOptimizationLoop(nStartVariable, nVariables, nCuts, ptBin, nStartFillNumber, isDesiredCandidate);
3183 if (bWrongSign && iRot == 0)
3185 fillthis =
"invariantMassBPlus";
3186 fillthis +=
"_SameSign";
3187 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3188 fillthis =
"invariantMassBPlus";
3189 fillthis += ptBinMother +
"_SameSign";
3190 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3191 fillthis =
"invariantMassBPlus";
3192 fillthis +=
"_SignSum";
3193 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, -1);
3194 fillthis =
"invariantMassBPlus";
3195 fillthis += ptBinMother +
"_SignSum";
3196 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, -1);
3202 fillthis =
"invariantMassBPlus";
3203 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3204 fillthis =
"invariantMassBPlus";
3205 fillthis += ptBinMother;
3206 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3207 fillthis =
"invariantMassBPlus";
3208 fillthis +=
"_SignSum";
3209 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, 1);
3210 fillthis =
"invariantMassBPlus";
3211 fillthis += ptBinMother +
"_SignSum";
3212 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, 1);
3232 if (!isDesiredCandidate && !bIsInjected)
3234 TString signName =
"_HIJING_Background";
3235 fillthis =
"invariantMassBPlus";
3236 fillthis += signName;
3237 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3238 fillthis =
"invariantMassBPlus";
3239 fillthis += ptBinMother + signName;
3240 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3242 if (isDesiredCandidate && !bIsInjected)
3244 TString signName =
"_HIJING_Signal";
3245 fillthis =
"invariantMassBPlus";
3246 fillthis += signName;
3247 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3248 fillthis =
"invariantMassBPlus";
3249 fillthis += ptBinMother + signName;
3250 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3255 TString signName =
"_Background_rotation";
3256 fillthis =
"invariantMassBPlus";
3257 fillthis += signName;
3258 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3259 fillthis =
"invariantMassBPlus";
3260 fillthis += ptBinMother + signName;
3261 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3262 if (!isDesiredCandidate && !bIsInjected)
3264 signName =
"_HIJING_Background_rotation";
3265 fillthis =
"invariantMassBPlus";
3266 fillthis += signName;
3267 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3268 fillthis =
"invariantMassBPlus";
3269 fillthis += ptBinMother + signName;
3270 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3275 if (trackBPlus.Pt() > 6.0)
3277 TString broadptBinMother =
"_ptbin_6_to_inf";
3278 if (bWrongSign && iRot == 0)
3280 fillthis =
"invariantMassBPlus";
3281 fillthis += broadptBinMother +
"_SameSign";
3282 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3283 fillthis =
"invariantMassBPlus";
3284 fillthis += broadptBinMother +
"_SignSum";
3285 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, -1);
3291 fillthis =
"invariantMassBPlus";
3292 fillthis += broadptBinMother;
3293 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3294 fillthis =
"invariantMassBPlus";
3295 fillthis += broadptBinMother +
"_SignSum";
3296 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, 1);
3297 if (!isDesiredCandidate && !bIsInjected)
3299 TString signName =
"_HIJING_Background";
3300 fillthis =
"invariantMassBPlus";
3301 fillthis += broadptBinMother + signName;
3302 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3304 if (isDesiredCandidate && !bIsInjected)
3306 TString signName =
"_HIJING_Signal";
3307 fillthis =
"invariantMassBPlus";
3308 fillthis += broadptBinMother + signName;
3309 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3314 TString signName =
"_Background_rotation";
3315 fillthis =
"invariantMassBPlus";
3316 fillthis += broadptBinMother + signName;
3317 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3318 if (!isDesiredCandidate && !bIsInjected)
3320 signName =
"_HIJING_Background_rotation";
3321 fillthis =
"invariantMassBPlus";
3322 fillthis += broadptBinMother + signName;
3323 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3329 if (trackBPlus.Pt() > 3.0)
3331 TString broadptBinMother =
"_ptbin_3_to_inf";
3332 if (bWrongSign && iRot == 0)
3334 fillthis =
"invariantMassBPlus";
3335 fillthis += broadptBinMother +
"_SameSign";
3336 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3337 fillthis =
"invariantMassBPlus";
3338 fillthis += broadptBinMother +
"_SignSum";
3339 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, -1);
3345 fillthis =
"invariantMassBPlus";
3346 fillthis += broadptBinMother;
3347 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3348 fillthis =
"invariantMassBPlus";
3349 fillthis += broadptBinMother +
"_SignSum";
3350 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother, 1);
3351 if (!isDesiredCandidate && !bIsInjected)
3353 TString signName =
"_HIJING_Background";
3354 fillthis =
"invariantMassBPlus";
3355 fillthis += broadptBinMother + signName;
3356 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3358 if (isDesiredCandidate && !bIsInjected)
3360 TString signName =
"_HIJING_Signal";
3361 fillthis =
"invariantMassBPlus";
3362 fillthis += broadptBinMother + signName;
3363 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3368 TString signName =
"_Background_rotation";
3369 fillthis =
"invariantMassBPlus";
3370 fillthis += broadptBinMother + signName;
3371 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3372 if (!isDesiredCandidate && !bIsInjected)
3374 signName =
"_HIJING_Background_rotation";
3375 fillthis =
"invariantMassBPlus";
3376 fillthis += broadptBinMother + signName;
3377 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invariantMassMother);
3385 if (bWrongSign && iRot == 0)
3387 fillthis =
"deltainvariantMassBPlus";
3388 fillthis +=
"_SameSign";
3389 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3390 fillthis =
"deltainvariantMassBPlus";
3391 fillthis += ptBinMother +
"_SameSign";
3392 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3393 fillthis =
"deltainvariantMassBPlus";
3394 fillthis +=
"_SignSum";
3395 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, -1);
3396 fillthis =
"deltainvariantMassBPlus";
3397 fillthis += ptBinMother +
"_SignSum";
3398 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, -1);
3404 fillthis =
"deltainvariantMassBPlus";
3405 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3406 fillthis =
"deltainvariantMassBPlus";
3407 fillthis += ptBinMother;
3408 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3409 fillthis =
"deltainvariantMassBPlus";
3410 fillthis +=
"_SignSum";
3411 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, 1);
3412 fillthis =
"deltainvariantMassBPlus";
3413 fillthis += ptBinMother +
"_SignSum";
3414 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, 1);
3425 if (!isDesiredCandidate && !bIsInjected)
3427 TString signName =
"_HIJING_Background";
3428 fillthis =
"deltainvariantMassBPlus";
3429 fillthis += signName;
3430 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3431 fillthis =
"deltainvariantMassBPlus";
3432 fillthis += ptBinMother + signName;
3433 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3435 if (isDesiredCandidate && !bIsInjected)
3437 TString signName =
"_HIJING_Signal";
3438 fillthis =
"deltainvariantMassBPlus";
3439 fillthis += signName;
3440 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3441 fillthis =
"deltainvariantMassBPlus";
3442 fillthis += ptBinMother + signName;
3443 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3448 TString signName =
"_Background_rotation";
3449 fillthis =
"deltainvariantMassBPlus";
3450 fillthis += signName;
3451 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3452 fillthis =
"deltainvariantMassBPlus";
3453 fillthis += ptBinMother + signName;
3454 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3455 if (!isDesiredCandidate && !bIsInjected)
3457 signName =
"_HIJING_Background_rotation";
3458 fillthis =
"deltainvariantMassBPlus";
3459 fillthis += signName;
3460 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3461 fillthis =
"deltainvariantMassBPlus";
3462 fillthis += ptBinMother + signName;
3463 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3468 if (trackBPlus.Pt() > 6.0)
3470 TString broadptBinMother =
"_ptbin_6_to_inf";
3471 if (bWrongSign && iRot == 0)
3473 fillthis =
"deltainvariantMassBPlus";
3474 fillthis += broadptBinMother +
"_SameSign";
3475 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3476 fillthis =
"deltainvariantMassBPlus";
3477 fillthis += broadptBinMother +
"_SignSum";
3478 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, -1);
3484 fillthis =
"deltainvariantMassBPlus";
3485 fillthis += broadptBinMother;
3486 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3487 fillthis =
"deltainvariantMassBPlus";
3488 fillthis += broadptBinMother +
"_SignSum";
3489 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, 1);
3490 if (!isDesiredCandidate && !bIsInjected)
3492 TString signName =
"_HIJING_Background";
3493 fillthis =
"deltainvariantMassBPlus";
3494 fillthis += broadptBinMother + signName;
3495 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3497 if (isDesiredCandidate && !bIsInjected)
3499 TString signName =
"_HIJING_Signal";
3500 fillthis =
"deltainvariantMassBPlus";
3501 fillthis += broadptBinMother + signName;
3502 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3507 TString signName =
"_Background_rotation";
3508 fillthis =
"deltainvariantMassBPlus";
3509 fillthis += broadptBinMother + signName;
3510 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3511 if (!isDesiredCandidate && !bIsInjected)
3513 signName =
"_HIJING_Background_rotation";
3514 fillthis =
"deltainvariantMassBPlus";
3515 fillthis += broadptBinMother + signName;
3516 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3522 if (trackBPlus.Pt() > 3.0)
3524 TString broadptBinMother =
"_ptbin_3_to_inf";
3525 if (bWrongSign && iRot == 0)
3527 fillthis =
"deltainvariantMassBPlus";
3528 fillthis += broadptBinMother +
"_SameSign";
3529 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3530 fillthis =
"deltainvariantMassBPlus";
3531 fillthis += broadptBinMother +
"_SignSum";
3532 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, -1);
3538 fillthis =
"deltainvariantMassBPlus";
3539 fillthis += broadptBinMother;
3540 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3541 fillthis =
"deltainvariantMassBPlus";
3542 fillthis += broadptBinMother +
"_SignSum";
3543 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta, 1);
3544 if (!isDesiredCandidate && !bIsInjected)
3546 TString signName =
"_HIJING_Background";
3547 fillthis =
"deltainvariantMassBPlus";
3548 fillthis += broadptBinMother + signName;
3549 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3551 if (isDesiredCandidate && !bIsInjected)
3553 TString signName =
"_HIJING_Signal";
3554 fillthis =
"deltainvariantMassBPlus";
3555 fillthis += broadptBinMother + signName;
3556 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3561 TString signName =
"_Background_rotation";
3562 fillthis =
"deltainvariantMassBPlus";
3563 fillthis += broadptBinMother + signName;
3564 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3565 if (!isDesiredCandidate && !bIsInjected)
3567 signName =
"_HIJING_Background_rotation";
3568 fillthis =
"deltainvariantMassBPlus";
3569 fillthis += broadptBinMother + signName;
3570 ((TH1F*)(
fOutputBPlusMC->FindObject(fillthis)))->Fill(invmassDelta);
3578 delete vertexMother; vertexMother = NULL;
3579 delete trackBPlusPionRotated; trackBPlusPionRotated =
nullptr;
3586 TProcessID::SetObjectCount(ObjectNumber);
3595 AliAODTrack* selectedBPlusPion = (AliAODTrack*)selectedBPlus->GetDaughter(0);
3598 AliAODTrack* selectedD0Pion = 0x0;
3599 AliAODTrack* selectedD0Kaon = 0x0;
3601 if (selectedBPlus->Charge() == 1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(0);
3602 if (selectedBPlus->Charge() == -1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(1);
3604 if (selectedBPlus->Charge() == 1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(1);
3605 if (selectedBPlus->Charge() == -1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(0);
3607 Double_t d0BPluspion = TMath::Abs(selectedBPlus->Getd0Prong(0));
3611 if (selectedBPlus->Charge() == 1) d0D0pion = selectedD0->Getd0Prong(0);
3612 if (selectedBPlus->Charge() == -1) d0D0pion = selectedD0->Getd0Prong(1);
3614 if (selectedBPlus->Charge() == 1) d0D0kaon = selectedD0->Getd0Prong(1);
3615 if (selectedBPlus->Charge() == -1) d0D0kaon = selectedD0->Getd0Prong(0);
3619 Int_t numberOfITS = 0;
3620 Int_t numberOfTPC = 0;
3621 Int_t daughterType, histType;
3622 Int_t totalNumberOfITS = 0;
3623 Int_t totalNumberOfTPC = 0;
3628 Int_t pionPIDnumber = 2;
3629 Int_t kaonPIDnumber = 3;
3636 pt_track = selectedD0Pion->Pt();
3637 momentum_track = selectedD0Pion->P();
3638 numberOfITS = selectedD0Pion->GetITSNcls();
3639 numberOfTPC = selectedD0Pion->GetTPCNcls();
3640 totalNumberOfITS += numberOfITS;
3641 totalNumberOfTPC += numberOfTPC;
3642 if(trackPIDHF) TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Pion, pionPIDnumber, nSigmaTPC);
3643 if(trackPIDHF) TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Pion, pionPIDnumber, nSigmaTOF);
3644 if (TPCok != -1) nSigmaTPCtotal += nSigmaTPC * nSigmaTPC;
3645 if (TOFok != -1) nSigmaTOFtotal += nSigmaTOF * nSigmaTOF;
3647 Double_t ptBPlus = selectedBPlus->Pt();
3651 if (!isDesiredCandidate)
3658 for (
Int_t j = 0; j < 10; ++j)
3660 if (selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3666 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
3672 if (isDesiredCandidate)
3680 for (
Int_t j = 0; j < 10; ++j)
3682 if (selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3688 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
3698 Float_t pdgCodeParticleMother = -1;
3699 Int_t mcLabelParticle = -1;
3700 Int_t mcLabelParticleMother = -1;
3701 mcLabelParticle = selectedD0Pion->GetLabel();
3703 if (mcLabelParticle >= 0) {
3705 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3706 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3708 mcLabelParticleMother = mcTrackParticle->GetMother();
3710 if (mcLabelParticleMother >= 0) {
3711 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3712 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3713 ((TH1F*)fDaughterHistogramArrayExtra[0][3])->Fill(pdgCodeParticleMother);
3719 pt_track = selectedD0Kaon->Pt();
3720 momentum_track = selectedD0Kaon->P();
3721 numberOfITS = selectedD0Kaon->GetITSNcls();
3722 numberOfTPC = selectedD0Kaon->GetTPCNcls();
3723 totalNumberOfITS += numberOfITS;
3724 totalNumberOfTPC += numberOfTPC;
3725 if(trackPIDHF) TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Kaon, kaonPIDnumber, nSigmaTPC);
3726 if(trackPIDHF) TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Kaon, kaonPIDnumber, nSigmaTOF);
3727 if (TPCok != -1) nSigmaTPCtotal += nSigmaTPC * nSigmaTPC;
3728 if (TOFok != -1) nSigmaTOFtotal += nSigmaTOF * nSigmaTOF;
3732 if (!isDesiredCandidate)
3739 for (
Int_t j = 0; j < 10; ++j)
3741 if (selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3747 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
3753 if (isDesiredCandidate)
3761 for (
Int_t j = 0; j < 10; ++j)
3763 if (selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3769 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
3779 Float_t pdgCodeParticleMother = -1;
3780 Int_t mcLabelParticle = -1;
3781 Int_t mcLabelParticleMother = -1;
3782 mcLabelParticle = selectedD0Kaon->GetLabel();
3784 if (mcLabelParticle >= 0) {
3786 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3787 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3789 mcLabelParticleMother = mcTrackParticle->GetMother();
3791 if (mcLabelParticleMother >= 0) {
3792 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3793 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3794 ((TH1F*)fDaughterHistogramArrayExtra[1][3])->Fill(pdgCodeParticleMother);
3800 pt_track = selectedBPlusPion->Pt();
3801 momentum_track = selectedBPlusPion->P();
3802 numberOfITS = selectedBPlusPion->GetITSNcls();
3803 numberOfTPC = selectedBPlusPion->GetTPCNcls();
3804 totalNumberOfITS += numberOfITS;
3805 totalNumberOfTPC += numberOfTPC;
3806 if(trackPIDHF) TPCok = trackPIDHF->
GetnSigmaTPC(selectedBPlusPion, pionPIDnumber, nSigmaTPC);
3807 if(trackPIDHF) TOFok = trackPIDHF->
GetnSigmaTOF(selectedBPlusPion, pionPIDnumber, nSigmaTOF);
3808 if (TPCok != -1) nSigmaTPCtotal += nSigmaTPC * nSigmaTPC;
3809 if (TOFok != -1) nSigmaTOFtotal += nSigmaTOF * nSigmaTOF;
3813 if (!isDesiredCandidate)
3820 for (
Int_t j = 0; j < 10; ++j)
3822 if (selectedBPlusPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3828 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
3834 if (isDesiredCandidate)
3842 for (
Int_t j = 0; j < 10; ++j)
3844 if (selectedBPlusPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3850 if (TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC * nSigmaTPC + nSigmaTOF * nSigmaTOF));
3860 Float_t pdgCodeParticleMother = -1;
3861 Int_t mcLabelParticle = -1;
3862 Int_t mcLabelParticleMother = -1;
3863 mcLabelParticle = selectedBPlusPion->GetLabel();
3865 if (mcLabelParticle >= 0) {
3867 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3868 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3870 mcLabelParticleMother = mcTrackParticle->GetMother();
3872 if (mcLabelParticleMother >= 0) {
3873 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3874 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3880 if (!isDesiredCandidate)
3882 ((TH1F*)(
fOutputBPlusMC->FindObject(
"totalITSBackground")))->Fill(totalNumberOfITS);
3883 ((TH1F*)(
fOutputBPlusMC->FindObject(
"totalTPCBackground")))->Fill(totalNumberOfTPC);
3884 ((TH1F*)(
fOutputBPlusMC->FindObject(
"totalSigmaPIDBackground")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
3886 if (isDesiredCandidate)
3888 ((TH1F*)(
fOutputBPlusMC->FindObject(
"totalITSSignal")))->Fill(totalNumberOfITS);
3889 ((TH1F*)(
fOutputBPlusMC->FindObject(
"totalTPCSignal")))->Fill(totalNumberOfTPC);
3890 ((TH1F*)(
fOutputBPlusMC->FindObject(
"totalSigmaPIDSignal")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
3894 AliExternalTrackParam trackBPlusPion;
3895 trackBPlusPion.CopyFromVTrack(selectedBPlusPion);
3896 AliExternalTrackParam trackD0Pion;
3897 trackD0Pion.CopyFromVTrack(selectedD0Pion);
3898 AliExternalTrackParam trackD0Kaon;
3899 trackD0Kaon.CopyFromVTrack(selectedD0Kaon);
3904 prongs2[0] = 211; prongs2[1] = 211;
3905 TwoTrackCombinationInfo(&trackD0Pion, &trackBPlusPion, primaryVertex, bz, isDesiredCandidate,
"invmassD0PionBPlusPion", prongs2);
3906 prongs2[0] = 321; prongs2[1] = 211;
3907 TwoTrackCombinationInfo(&trackD0Kaon, &trackBPlusPion, primaryVertex, bz, isDesiredCandidate,
"invmassD0KaonBPlusPion", prongs2);
3908 prongs3[0] = 211; prongs3[1] = 321; prongs3[2] = 211;
3909 ThreeTrackCombinationInfo(&trackD0Pion, &trackD0Kaon, &trackBPlusPion, primaryVertex, bz, isDesiredCandidate,
"invmassD0PionD0KaonBPlusPion", prongs3);
3923 if (BPlus->Charge() == -1)
3925 e[0] = D0->EProng(0, 211);
3926 e[1] = D0->EProng(1, 321);
3927 }
else if (BPlus->Charge() == 1) {
3928 e[0] = D0->EProng(0, 321);
3929 e[1] = D0->EProng(1, 211);
3931 e[2] = BPlus->EProng(0, 211);
3933 Double_t esum = e[0] + e[1] + e[2];
3934 Double_t invMassBPlus = TMath::Sqrt(esum * esum - BPlus->P2());
3938 if (BPlus->Charge() == -1) {invMassD0 = D0->
InvMassD0();}
3940 if (invMassD0 == -1) {std::cout <<
"wrong invmass delta D0 BPlus" << std::endl;}
3942 return invMassBPlus - invMassD0;
3947 if (histType < 0)
return;
3960 Double_t invariantMassMother = 0.0;
3963 AliAODVertex * vertexMother = 0x0;
3966 Double_t angleMotherFirstDaughter = 0.0;
3967 Double_t angleMotherSecondDaughter = 0.0;
3970 UInt_t prongs[2], prongs2[2];
3971 Double_t angleBetweenBothDaughters = 0;
3974 Double_t pdgMassMother = TDatabasePDG::Instance()->GetParticle(421)->Mass();
3977 prongs[0] = 211; prongs[1] = 321;
3978 prongs2[0] = 321; prongs2[1] = 211;
3979 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
3980 AliAODTrack * secondDaughter = (AliAODTrack*)selectedMother->GetDaughter(1);
3981 vertexMother = selectedMother->GetSecondaryVtx();
3982 ptFirstDaughter = firstDaughter->Pt();
3983 ptSecondDaughter = secondDaughter->Pt();
3990 for (
Int_t ipr = 0; ipr < 2; ipr++)
3995 if (errdiffIP > 0.) normdd0 = diffIP / errdiffIP;
3996 if (ipr == 0) dd0pr1 = normdd0;
3997 if (ipr == 1) dd0pr2 = normdd0;
4000 if (TMath::Abs(dd0pr1) > TMath::Abs(dd0pr2)) {dd0max = dd0pr1; dd0min = dd0pr2;}
4001 else {dd0max = dd0pr2; dd0min = dd0pr1;}
4003 AliExternalTrackParam motherTrack;
4004 motherTrack.CopyFromVTrack(selectedMother);
4005 Double_t d0z0[2], covd0z0[3], d0[2];
4006 motherTrack.PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
4009 ptMother = selectedMother->Pt();
4010 momentumMother = selectedMother->P();
4011 etaMother = selectedMother->Eta();
4012 phiMother = selectedMother->Phi();
4014 d0Mother = TMath::Abs(d0[0]);
4015 d0firstTrack = TMath::Abs(selectedMother->Getd0Prong(0));
4016 d0secondTrack = TMath::Abs(selectedMother->Getd0Prong(1));
4018 impactProduct = selectedMother->
Prodd0d0();
4019 impactProductXY = TMath::Abs(selectedMother->
ImpParXY());
4020 invariantMassMother = selectedMother->InvMass(2, prongs);
4021 if (pdgCodeMother == -421) invariantMassMother = selectedMother->InvMass(2, prongs2);
4023 dcaMother = selectedMother->GetDCA();
4024 vertexDistance = vertexMother->DistanceToVertex(primaryVertex);
4025 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) / (selectedMother->P() * firstDaughter->P());
4026 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) / (selectedMother->P() * secondDaughter->P());
4027 cosThetaStar = selectedMother->CosThetaStar(0, 421, 211, 321);
4028 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) / (firstDaughter->P() * secondDaughter->P());
4031 Double_t pseudoProperDecayLength = ((vertexMother->GetX() - primaryVertex->GetX()) * selectedMother->Px() / TMath::Abs(selectedMother->Pt())) + ((vertexMother->GetY() - primaryVertex->GetY()) * selectedMother->Py() / TMath::Abs(selectedMother->Pt()));
4032 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother / ptMother;
4033 decayTime = vertexDistance / (299792458 * TMath::Sqrt(1 / ((pdgMassMother * pdgMassMother / (momentumMother * momentumMother)) + 1)));
4035 Double_t phi = selectedMother->Phi();
4036 Double_t theta = selectedMother->Theta();
4038 selectedMother->GetCovarianceXYZPxPyPz(covMatrix);
4045 Double_t errorMomentum = covMatrix[9] * cp * cp * ct * ct
4046 + covMatrix[13] * 2.*cp * sp * ct * ct
4047 + covMatrix[18] * 2.*cp * ct * st
4048 + covMatrix[14] * sp * sp * ct * ct
4049 + covMatrix[19] * 2.*sp * ct * st
4050 + covMatrix[20] * st * st;
4051 Double_t normalizedDecayTime = selectedMother->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1 / ((pdgMassMother * pdgMassMother * errorMomentum * errorMomentum / (momentumMother * momentumMother)) + 1)));
4053 Double_t eKaon = selectedMother->EProng(1, 321);
4054 Double_t invMassKaon = TMath::Sqrt(eKaon * eKaon - secondDaughter->P() * secondDaughter->P());
4056 invmassDelta = invMassD0 - invMassKaon;
4058 Double_t vertexMotherX = vertexMother->GetX();
4059 Double_t vertexMotherY = vertexMother->GetY();
4060 Double_t vertexMotherZ = vertexMother->GetZ();
4063 Double_t distanceXYToVertex = vertexMother->DistanceXYToVertex(primaryVertex);
4109 Int_t nVariables = 10;
4110 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
4111 for (
Int_t k = 0; k < nHistograms; ++k)
4116 if (nFirst == 0) firstVariable = d0firstTrack;
4117 if (nFirst == 1) firstVariable = d0secondTrack;
4118 if (nFirst == 2) firstVariable = d0Mother;
4119 if (nFirst == 3) firstVariable = pointingAngle;
4120 if (nFirst == 4) firstVariable = impactProduct;
4121 if (nFirst == 5) firstVariable = impactProductXY;
4122 if (nFirst == 6) firstVariable = vertexDistance;
4123 if (nFirst == 7) firstVariable = normDecayLength;
4124 if (nFirst == 8) firstVariable = cosPointingAngleXY;
4125 if (nFirst == 9) firstVariable = distanceXYToVertex;
4126 if (nFirst == 10) firstVariable = normalizedDecayLengthXY;
4128 if (nSecond == 0) secondVariable = d0firstTrack;
4129 if (nSecond == 1) secondVariable = d0secondTrack;
4130 if (nSecond == 2) secondVariable = d0Mother;
4131 if (nSecond == 3) secondVariable = pointingAngle;
4132 if (nSecond == 4) secondVariable = impactProduct;
4133 if (nSecond == 5) secondVariable = impactProductXY;
4134 if (nSecond == 6) secondVariable = vertexDistance;
4135 if (nSecond == 7) secondVariable = normDecayLength;
4136 if (nSecond == 8) secondVariable = cosPointingAngleXY;
4137 if (nSecond == 9) secondVariable = distanceXYToVertex;
4138 if (nSecond == 10) secondVariable = normalizedDecayLengthXY;
4143 if (nSecond > nVariables)
4146 nSecond = nFirst + 1;
4166 Double_t invariantMassMother = 0.0;
4169 AliAODVertex * vertexMother = 0x0;
4173 Double_t angleMotherFirstDaughter = 0.0;
4174 Double_t angleMotherSecondDaughter = 0.0;
4179 Double_t angleBetweenBothDaughters = 0;
4184 AliExternalTrackParam motherTrack;
4185 motherTrack.CopyFromVTrack(selectedMother);
4186 Double_t d0z0[2], covd0z0[3], d0[2];
4187 motherTrack.PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
4191 prongs[1] = 421; prongs[0] = 211;
4193 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
4196 ptFirstDaughter = firstDaughter->Pt();
4197 ptSecondDaughter = secondDaughter->Pt();
4198 vertexMother = selectedMother->GetSecondaryVtx();
4199 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) / (selectedMother->P() * firstDaughter->P());
4200 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) / (selectedMother->P() * secondDaughter->P());
4201 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) / (firstDaughter->P() * secondDaughter->P());
4202 cosThetaStar = selectedMother->CosThetaStar(0, 521, 421, 211);
4203 pdgMassMother = TDatabasePDG::Instance()->GetParticle(521)->Mass();
4211 for (
Int_t ipr = 0; ipr < 2; ipr++)
4216 if (errdiffIP > 0.) normdd0 = diffIP / errdiffIP;
4217 if (ipr == 0) dd0pr1 = normdd0;
4218 if (ipr == 1) dd0pr2 = normdd0;
4222 if (TMath::Abs(dd0pr1) > TMath::Abs(dd0pr2)) {dd0max = dd0pr1; dd0min = dd0pr2;}
4223 else {dd0max = dd0pr2; dd0min = dd0pr1;}
4227 ptMother = selectedMother->Pt();
4228 momentumMother = selectedMother->P();
4229 etaMother = selectedMother->Eta();
4230 phiMother = selectedMother->Phi();
4231 d0Mother = TMath::Abs(d0[0]);
4234 impactProduct = selectedMother->
Prodd0d0();
4235 impactProductXY = TMath::Abs(selectedMother->
ImpParXY());
4236 invariantMassMother = selectedMother->InvMass(2, prongs);
4237 dcaMother = selectedMother->GetDCA();
4238 vertexDistance = vertexMother->DistanceToVertex(primaryVertex);
4239 d0firstTrack = TMath::Abs(selectedMother->Getd0Prong(0));
4240 d0secondTrack = TMath::Abs(selectedMother->Getd0Prong(1));
4243 Double_t pseudoProperDecayLength = ((vertexMother->GetX() - primaryVertex->GetX()) * selectedMother->Px() / TMath::Abs(selectedMother->Pt())) + ((vertexMother->GetY() - primaryVertex->GetY()) * selectedMother->Py() / TMath::Abs(selectedMother->Pt()));
4244 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother / ptMother;
4245 decayTime = vertexDistance / (299792458 * TMath::Sqrt(1 / ((pdgMassMother * pdgMassMother / (momentumMother * momentumMother)) + 1)));
4247 Double_t phi = selectedMother->Phi();
4248 Double_t theta = selectedMother->Theta();
4250 selectedMother->GetCovarianceXYZPxPyPz(covMatrix);
4257 Double_t errorMomentum = covMatrix[9] * cp * cp * ct * ct
4258 + covMatrix[13] * 2.*cp * sp * ct * ct
4259 + covMatrix[18] * 2.*cp * ct * st
4260 + covMatrix[14] * sp * sp * ct * ct
4261 + covMatrix[19] * 2.*sp * ct * st
4262 + covMatrix[20] * st * st;
4263 Double_t normalizedDecayTime = selectedMother->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1 / ((pdgMassMother * pdgMassMother * errorMomentum * errorMomentum / (momentumMother * momentumMother)) + 1)));
4265 Double_t vertexMotherX = vertexMother->GetX();
4266 Double_t vertexMotherY = vertexMother->GetY();
4267 Double_t vertexMotherZ = vertexMother->GetZ();
4270 Double_t distanceXYToVertex = vertexMother->DistanceXYToVertex(primaryVertex);
4316 Int_t nVariables = 10;
4317 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
4318 for (
Int_t k = 0; k < nHistograms; ++k)
4323 if (nFirst == 0) firstVariable = d0firstTrack;
4324 if (nFirst == 1) firstVariable = d0secondTrack;
4325 if (nFirst == 2) firstVariable = d0Mother;
4326 if (nFirst == 3) firstVariable = pointingAngle;
4327 if (nFirst == 4) firstVariable = impactProduct;
4328 if (nFirst == 5) firstVariable = impactProductXY;
4329 if (nFirst == 6) firstVariable = vertexDistance;
4330 if (nFirst == 7) firstVariable = normDecayLength;
4331 if (nFirst == 8) firstVariable = cosPointingAngleXY;
4332 if (nFirst == 9) firstVariable = distanceXYToVertex;
4333 if (nFirst == 10) firstVariable = normalizedDecayLengthXY;
4335 if (nSecond == 0) secondVariable = d0firstTrack;
4336 if (nSecond == 1) secondVariable = d0secondTrack;
4337 if (nSecond == 2) secondVariable = d0Mother;
4338 if (nSecond == 3) secondVariable = pointingAngle;
4339 if (nSecond == 4) secondVariable = impactProduct;
4340 if (nSecond == 5) secondVariable = impactProductXY;
4341 if (nSecond == 6) secondVariable = vertexDistance;
4342 if (nSecond == 7) secondVariable = normDecayLength;
4343 if (nSecond == 8) secondVariable = cosPointingAngleXY;
4344 if (nSecond == 9) secondVariable = distanceXYToVertex;
4345 if (nSecond == 10) secondVariable = normalizedDecayLengthXY;
4350 if (nSecond > nVariables)
4353 nSecond = nFirst + 1;
4358 if (motherType == 1) {
4359 motherType = motherType - 1;
4361 AliAODRecoDecay* trackD0 = (AliAODRecoDecay*)selectedMother->GetDaughter(1);
4362 AliAODTrack * firstDaughterD0 = (AliAODTrack*)trackD0->GetDaughter(0);
4363 AliAODTrack * secondDaughterD0 = (AliAODTrack*)trackD0->GetDaughter(1);
4365 AliAODVertex * vertexBPlus = vertexMother;
4366 AliAODVertex * vertexD0 = trackD0->GetSecondaryVtx();
4367 vertexDistance = TMath::Abs(vertexBPlus->DistanceToVertex(vertexD0));
4368 pdgMassMother = TDatabasePDG::Instance()->GetParticle(421)->Mass();
4370 AliExternalTrackParam firstDaughterD0Track;
4371 AliExternalTrackParam secondDaughterD0Track;
4373 Double_t d0z0[2], covd0z0[3], d0[2];
4375 firstDaughterD0Track.CopyFromVTrack(firstDaughterD0);
4376 firstDaughterD0Track.PropagateToDCA(vertexBPlus, bz, 100., d0z0, covd0z0);
4379 secondDaughterD0Track.CopyFromVTrack(secondDaughterD0);
4380 secondDaughterD0Track.PropagateToDCA(vertexBPlus, bz, 100., d0z0, covd0z0);
4383 AliExternalTrackParam D0Track;
4384 D0Track.CopyFromVTrack(trackD0);
4385 Double_t d0z0D0[2], covd0z0D0[3], d0D0;
4386 D0Track.PropagateToDCA(vertexBPlus, bz, 100., d0z0D0, covd0z0D0);
4389 Double_t impactProductToBPlus = d0[0] * d0[1];
4392 Double_t momentumMother = trackD0->P();
4393 Double_t pointingAngleToBPlus = trackD0->CosPointingAngle(vertexBPlus);
4394 Double_t d0FirstDaughterToBPlus = TMath::Abs(d0[0]);
4395 Double_t d0trackD0ToBPlus = TMath::Abs(d0[1]);
4396 Double_t normDecayLengthToBPlus = trackD0->NormalizedDecayLength(vertexBPlus);
4398 Double_t pseudoProperDecayLength = ((vertexD0->GetX() - vertexBPlus->GetX()) * trackD0->Px() / TMath::Abs(trackD0->Pt())) + ((vertexD0->GetY() - vertexBPlus->GetY()) * trackD0->Py() / TMath::Abs(trackD0->Pt()));
4399 Double_t pseudoProperDecayTimeToBPlus = pseudoProperDecayLength * pdgMassMother / ptMother;
4400 Double_t DecayTimeToBPlus = vertexDistance / (299792458 * TMath::Sqrt(1 / ((pdgMassMother * pdgMassMother / (momentumMother * momentumMother)) + 1)));
4405 trackD0->GetCovarianceXYZPxPyPz(covMatrix);
4412 Double_t errorMomentum = covMatrix[9] * cp * cp * ct * ct
4413 + covMatrix[13] * 2.*cp * sp * ct * ct
4414 + covMatrix[18] * 2.*cp * ct * st
4415 + covMatrix[14] * sp * sp * ct * ct
4416 + covMatrix[19] * 2.*sp * ct * st
4417 + covMatrix[20] * st * st;
4418 Double_t normDecayTimeToBPlus = trackD0->NormalizedDecayLength(vertexBPlus) / (299792458 * TMath::Sqrt(1 / ((pdgMassMother * pdgMassMother * errorMomentum * errorMomentum / (momentumMother * momentumMother)) + 1)));
4442 daughterTracks.Add(firstTrack);
4443 daughterTracks.Add(secondTrack);
4446 AliAODVertex *vertex =
RecalculateVertex(primaryVertex, &daughterTracks, bz, dispersion);
4447 if (!vertex) {
delete vertex; vertex = NULL;
return;}
4449 Double_t xdummy = 0., ydummy = 0., dca;
4450 Double_t d0z0[2], covd0z0[3], d0[2], d0err[2];
4452 firstTrack->PropagateToDCA(vertex, bz, 100., d0z0, covd0z0);
4453 secondTrack->PropagateToDCA(vertex, bz, 100., d0z0, covd0z0);
4454 dca = secondTrack->GetDCA(firstTrack, bz, xdummy, ydummy);
4457 px[0] = firstTrack->Px();
4458 py[0] = firstTrack->Py();
4459 pz[0] = firstTrack->Pz();
4460 px[1] = secondTrack->Px();
4461 py[1] = secondTrack->Py();
4462 pz[1] = secondTrack->Pz();
4464 firstTrack->PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
4466 d0err[0] = TMath::Sqrt(covd0z0[0]);
4467 secondTrack->PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
4469 d0err[1] = TMath::Sqrt(covd0z0[0]);
4474 delete vertex; vertex = NULL;
4475 delete track; track = NULL;
4479 Double_t invariantMass = track->InvMass(2, prongs);
4481 TString fill = histogram_name;
4482 if (isDesiredCandidate) fill +=
"_MC";
4483 ((TH1F*)(
fOutputBPlusMC->FindObject(fill)))->Fill(invariantMass);
4485 delete vertex; vertex = NULL;
4486 delete track; track = NULL;
4495 daughterTracks.Add(firstTrack);
4496 daughterTracks.Add(secondTrack);
4497 daughterTracks.Add(thirdTrack);
4500 AliAODVertex *vertex =
RecalculateVertex(primaryVertex, &daughterTracks, bz, dispersion);
4501 if (!vertex) {
delete vertex; vertex = NULL;
return;}
4503 Double_t xdummy = 0., ydummy = 0., dca[3];
4504 Double_t d0z0[2], covd0z0[3], d0[3], d0err[3];
4506 firstTrack->PropagateToDCA(vertex, bz, 100., d0z0, covd0z0);
4507 secondTrack->PropagateToDCA(vertex, bz, 100., d0z0, covd0z0);
4508 thirdTrack->PropagateToDCA(vertex, bz, 100., d0z0, covd0z0);
4510 dca[0] = firstTrack->GetDCA(secondTrack, bz, xdummy, ydummy);
4511 dca[1] = firstTrack->GetDCA(thirdTrack, bz, xdummy, ydummy);
4512 dca[2] = secondTrack->GetDCA(thirdTrack, bz, xdummy, ydummy);
4515 px[0] = firstTrack->Px();
4516 py[0] = firstTrack->Py();
4517 pz[0] = firstTrack->Pz();
4518 px[1] = secondTrack->Px();
4519 py[1] = secondTrack->Py();
4520 pz[1] = secondTrack->Pz();
4521 px[2] = thirdTrack->Px();
4522 py[2] = thirdTrack->Py();
4523 pz[2] = thirdTrack->Pz();
4525 firstTrack->PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
4527 d0err[0] = TMath::Sqrt(covd0z0[0]);
4528 secondTrack->PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
4530 d0err[1] = TMath::Sqrt(covd0z0[0]);
4531 thirdTrack->PropagateToDCA(primaryVertex, bz, 100., d0z0, covd0z0);
4533 d0err[2] = TMath::Sqrt(covd0z0[0]);
4538 Short_t charge = (
Short_t)(firstTrack->Charge() + secondTrack->Charge() + thirdTrack->Charge());
4540 AliAODRecoDecayHF3Prong * track =
new AliAODRecoDecayHF3Prong(vertex, px, py, pz, d0, d0err, dca, dispersion, 0.0, 0.0, charge);
4543 delete vertex; vertex = NULL;
4544 delete track; track = NULL;
4548 Double_t invariantMass = track->InvMass(3, prongs);
4550 TString fill = histogram_name;
4551 if (isDesiredCandidate) fill +=
"_MC";
4552 ((TH1F*)(
fOutputBPlusMC->FindObject(fill)))->Fill(invariantMass);
4554 delete vertex; vertex = NULL;
4555 delete track; track = NULL;
4568 Int_t ndg = candidate->GetNDaughters();
4569 if (!ndg) { AliError(
"No daughters available");
return -1;}
4570 if (ndg != 2)
return -1;
4573 Int_t dgLabels[2] = { -1};
4574 Int_t pdgDg[2] = {0};
4578 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
4579 dgLabels[0] = trk0->GetLabel();
4580 AliAODTrack *trk1 = (AliAODTrack*)candidate->GetDaughter(1);
4581 dgLabels[1] = trk1->GetLabel();
4582 pdgDg[0] = 211; pdgDg[1] = 321;
4585 else if (pdgabs == 521)
4587 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
4588 dgLabels[0] = trk0->GetLabel();
4590 pdgDg[0] = 211; pdgDg[1] = 421;
4595 std::cout <<
"Wrong pdg supplied for function to match candidate to monte carlo signal." << std::endl;
4598 if (dgLabels[0] == -1)
return -1;
4599 if (dgLabels[1] == -1)
return -1;
4602 Int_t labMom[2] = {0, 0};
4603 Int_t i, j, lab, labMother, pdgMother, pdgPart;
4604 AliAODMCParticle *part = 0;
4605 AliAODMCParticle *mother = 0;
4606 Double_t pxSumDgs = 0., pySumDgs = 0., pzSumDgs = 0.;
4607 Bool_t pdgUsed[2] = {kFALSE, kFALSE};
4610 for (i = 0; i < ndg; i++)
4613 lab = TMath::Abs(dgLabels[i]);
4616 printf(
"daughter with negative label %d\n", lab);
4619 part = (AliAODMCParticle*)mcArray->At(lab);
4622 printf(
"no MC particle\n");
4627 pdgPart = TMath::Abs(part->GetPdgCode());
4628 for (j = 0; j < ndg; j++)
4630 if (!pdgUsed[j] && pdgPart == pdgDg[j])
4639 while (mother->GetMother() >= 0)
4641 labMother = mother->GetMother();
4642 mother = (AliAODMCParticle*)mcArray->At(labMother);
4645 printf(
"no MC mother particle\n");
4648 pdgMother = TMath::Abs(mother->GetPdgCode());
4649 if (pdgMother == pdgabs)
4651 labMom[i] = labMother;
4653 pxSumDgs += part->Px();
4654 pySumDgs += part->Py();
4655 pzSumDgs += part->Pz();
4660 if (labMom[i] == -1)
return -1;
4664 labMother = labMom[0];
4666 for (i = 0; i < ndg; i++)
4668 if (labMom[i] == -1)
return -1;
4669 if (labMom[i] != labMother)
return -1;
4673 for (i = 0; i < ndg; i++)
4675 if (pdgUsed[i] == kFALSE)
return -1;
4679 mother = (AliAODMCParticle*)mcArray->At(labMother);
4686 if(mother->GetNDaughters() != 2)
return -1;
4689 if ((TMath::Abs(pxMother - pxSumDgs) / (TMath::Abs(pxMother) + 1.e-13)) > 0.005 ||
4690 (TMath::Abs(pyMother - pySumDgs) / (TMath::Abs(pyMother) + 1.e-13)) > 0.005 ||
4691 (TMath::Abs(pzMother - pzSumDgs) / (TMath::Abs(pzMother) + 1.e-13)) > 0.005)
4693 std::cout << std::endl <<
" Momentum difference for decay pdgabs = " << pdgabs <<
"daughters = " << mother->GetNDaughters() << std::endl;
4694 std::cout <<
"pxMother = " << pxMother <<
"pyMother = " << pyMother <<
"pzMother = " << pzMother << std::endl;
4695 std::cout <<
"pxSumDgs = " << pxSumDgs <<
"pySumDgs = " << pySumDgs <<
"pzSumDgs = " << pzSumDgs << std::endl;
4718 Int_t lab = part->GetLabel();
4719 if (lab < 0) {
delete ggg; ggg =
nullptr;
return 1;}
4722 Int_t countControl = 0;
4723 while (nameGen.IsWhitespace()) {
4724 AliAODMCParticle *mcpart = (AliAODMCParticle*)arrayMC->At(lab);
4726 printf(
"AliVertexingHFUtils::IsTrackInjected - BREAK: No valid AliAODMCParticle at label %i\n", lab);
4729 Int_t mother = mcpart->GetMother();
4737 if (countControl >= 10) {
4738 printf(
"AliVertexingHFUtils::IsTrackInjected - BREAK: Protection from infinite loop active\n");
4742 if (nameGen.IsWhitespace() || nameGen.Contains(
"ijing")) {
delete ggg; ggg =
nullptr;
return 0;}
4744 delete ggg; ggg =
nullptr;
4750 AliAODTrack* selectedBPlusPion = (AliAODTrack*)selectedBPlus->GetDaughter(0);
4753 AliAODTrack* selectedD0FirstDaughter = (AliAODTrack*)selectedD0->GetDaughter(0);
4754 AliAODTrack* selectedD0SecondDaughter = (AliAODTrack*)selectedD0->GetDaughter(1);
4756 if (
IsTrackInjected(selectedBPlusPion, header, arrayMC))
return kTRUE;
4757 if (
IsTrackInjected(selectedD0FirstDaughter, header, arrayMC))
return kTRUE;
4758 if (
IsTrackInjected(selectedD0SecondDaughter, header, arrayMC))
return kTRUE;
4765 for (
Int_t iCut = 0; iCut < nCuts; ++iCut)
4773 Int_t fill = iCut * TMath::Power(nCuts,variable) + fillNumber;
4774 if( (variable + 1) == nVariables)
4777 ptBinMother +=
"_ptbin_";
4779 ptBinMother +=
"_to_";
4782 TString name_cut_optimization_signal =
"cut_optimization_signal";
4783 name_cut_optimization_signal += ptBinMother;
4785 TString name_cut_optimization_background =
"cut_optimization_background";
4786 name_cut_optimization_background += ptBinMother;
4788 if(isDesiredCandidate) ((TH1F*)(
fOutputBPlusMC->FindObject(name_cut_optimization_signal)))->Fill(fill);
4789 if(!isDesiredCandidate) ((TH1F*)(
fOutputBPlusMC->FindObject(name_cut_optimization_background)))->Fill(fill);
4791 else{
CutOptimizationLoop(variable + 1, nVariables, nCuts, ptBin, fill, isDesiredCandidate);}
4798 if(!candidateBPlus){
4799 std::cout<<
"candidateBPlus null"<<std::endl;
4805 std::cout<<
"candidateD0 null"<<std::endl;
4809 AliAODTrack *candidatePion = (AliAODTrack*)candidateBPlus->GetDaughter(0);
4811 std::cout<<
"candidatePion null 1"<<std::endl;
4815 AliAODTrack *candidateFirstDaughter = (AliAODTrack*)candidateD0->GetDaughter(0);
4816 if(!candidateFirstDaughter){
4817 std::cout<<
"candidatePion null 2"<<std::endl;
4821 AliAODTrack *candidateSecondDaughter = (AliAODTrack*)candidateD0->GetDaughter(1);
4822 if(!candidateSecondDaughter){
4823 std::cout<<
"candidateKaon null"<<std::endl;
4827 AliAODVertex * vertexBPlus = candidateBPlus->GetSecondaryVtx();
4829 std::cout<<
"vertexBPlus null"<<std::endl;
4833 AliAODVertex * vertexD0 = candidateD0->GetSecondaryVtx();
4835 std::cout<<
"vertexD0 null"<<std::endl;
4840 AliAODVertex * primaryVertex = aod->GetPrimaryVertex();
4842 std::cout<<
"primaryVertex null"<<std::endl;
4854 Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
4857 Int_t chargeBPlus = candidateBPlus->Charge();
4864 else if (chargeBPlus==-1)
4871 std::cout <<
"Wrong charge BPlus." << std::endl;
4874 Double_t invMassD0 = candidateD0->InvMass(2,prongs);
4875 Double_t invMassDifference = TMath::Abs(mD0PDG - invMassD0);
4878 Double_t dcaMother = candidateD0->GetDCA();
4879 Double_t ptMother = candidateD0->Pt();
4880 Double_t momentumMother = candidateD0->P();
4881 Double_t ptPion = candidateFirstDaughter->Pt();
4882 Double_t ptKaon = candidateSecondDaughter->Pt();
4884 AliExternalTrackParam motherTrack;
4885 motherTrack.CopyFromVTrack(candidateD0);
4887 motherTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
4889 Double_t d0Mother = TMath::Abs(d0[0]);
4890 Double_t d0firstTrack = TMath::Abs(candidateD0->Getd0Prong(0));
4891 Double_t d0secondTrack = TMath::Abs(candidateD0->Getd0Prong(1));
4896 Double_t angleBetweenBothDaughters = (candidateSecondDaughter->Px() * candidateFirstDaughter->Px() + candidateSecondDaughter->Py() * candidateFirstDaughter->Py() + candidateSecondDaughter->Pz() * candidateFirstDaughter->Pz()) /(candidateSecondDaughter->P() * candidateFirstDaughter->P());
4897 Double_t angleMotherFirstDaughter = (candidateD0->Px() * candidateFirstDaughter->Px() + candidateD0->Py() * candidateFirstDaughter->Py() + candidateD0->Pz() * candidateFirstDaughter->Pz()) /(candidateD0->P() * candidateFirstDaughter->P());
4898 Double_t angleMotherSecondDaughter = (candidateD0->Px() * candidateSecondDaughter->Px() + candidateD0->Py() * candidateSecondDaughter->Py() + candidateD0->Pz() * candidateSecondDaughter->Pz()) /(candidateD0->P() * candidateSecondDaughter->P());
4900 Double_t cosThetaStar = candidateD0->CosThetaStar(0,421,211,321);
4901 Double_t vertexDistance = vertexD0->DistanceToVertex(primaryVertex);
4903 Double_t pdgMassMother = TDatabasePDG::Instance()->GetParticle(421)->Mass();
4904 Double_t pseudoProperDecayLength = ((vertexD0->GetX() - primaryVertex->GetX()) * candidateD0->Px() / TMath::Abs(candidateD0->Pt())) + ((vertexD0->GetY() - primaryVertex->GetY()) * candidateD0->Py() / TMath::Abs(candidateD0->Pt()));
4905 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother/ptMother;
4906 Double_t decayTime = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
4909 Double_t theta = candidateD0->Theta();
4911 candidateD0->GetCovarianceXYZPxPyPz(covMatrix);
4918 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
4919 +covMatrix[13]*2.*cp*sp*ct*ct
4920 +covMatrix[18]*2.*cp*ct*st
4921 +covMatrix[14]*sp*sp*ct*ct
4922 +covMatrix[19]*2.*sp*ct*st
4923 +covMatrix[20]*st*st;
4924 Double_t normalizedDecayTime = candidateD0->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
4927 Double_t distanceXYToVertex = vertexD0->DistanceXYToVertex(primaryVertex);
4929 Double_t chi2Vertex = vertexD0->GetChi2perNDF();
4937 for(
Int_t ipr=0; ipr<2; ipr++)
4942 if(errdiffIP>0.) normdd0=diffIP/errdiffIP;
4943 if(ipr==0) dd0pr1=normdd0;
4944 if(ipr==1) dd0pr2=normdd0;
4946 if(TMath::Abs(dd0pr1)>TMath::Abs(dd0pr2)) {dd0max=dd0pr1; dd0min=dd0pr2;}
4947 else {dd0max=dd0pr2; dd0min=dd0pr1;}
4951 Int_t nCutIndex = 0;
5100 AliAODRecoDecay* candidateD0toBPlus = (AliAODRecoDecay*)candidateD0;
5101 AliExternalTrackParam firstDaughterD0Track;
5102 AliExternalTrackParam secondDaughterD0Track;
5104 Double_t d0z0DSVert[2],covd0z0DSVert[3],d0DSVert[2];
5106 firstDaughterD0Track.CopyFromVTrack(candidateFirstDaughter);
5107 firstDaughterD0Track.PropagateToDCA(vertexBPlus,bz,100.,d0z0DSVert,covd0z0DSVert);
5108 d0DSVert[0] = d0z0DSVert[0];
5110 secondDaughterD0Track.CopyFromVTrack(candidateSecondDaughter);
5111 secondDaughterD0Track.PropagateToDCA(vertexBPlus,bz,100.,d0z0DSVert,covd0z0DSVert);
5112 d0DSVert[1] = d0z0DSVert[0];
5114 AliExternalTrackParam D0Track;
5115 D0Track.CopyFromVTrack(candidateD0);
5116 Double_t d0z0D0DSVert[2],covd0z0D0DSVert[3],d0D0DSVert;
5117 motherTrack.PropagateToDCA(vertexBPlus,bz,100.,d0z0D0DSVert,covd0z0D0DSVert);
5118 d0D0DSVert = TMath::Abs(d0z0D0DSVert[0]);
5120 Double_t impactProductToBPlus = d0DSVert[0]*d0DSVert[1];
5121 Double_t impactProductXYToBPlus = candidateD0toBPlus->ImpParXY(vertexBPlus);
5123 Double_t pointingAngleToBPlus = candidateD0toBPlus->CosPointingAngle(vertexBPlus);
5124 Double_t d0FirstDaughterToBPlus = TMath::Abs(d0DSVert[0]);
5125 Double_t d0SecondDaughterToBPlus = TMath::Abs(d0DSVert[1]);
5126 Double_t normDecayLengthToBPlus = candidateD0toBPlus->NormalizedDecayLength(vertexBPlus);
5128 Double_t pseudoProperDecayLengthDSVert = ((vertexD0->GetX() - vertexBPlus->GetX()) * candidateD0->Px() / TMath::Abs(candidateD0->Pt())) + ((vertexD0->GetY() - vertexBPlus->GetY()) * candidateD0->Py() / TMath::Abs(candidateD0->Pt()));
5129 Double_t pseudoProperDecayTimeToBPlus = pseudoProperDecayLengthDSVert * pdgMassMother/ptMother;
5130 Double_t DecayTimeToBPlus = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
5132 Double_t phiDSVert = candidateD0->Phi();
5133 Double_t thetaDSVert = candidateD0->Theta();
5135 candidateD0->GetCovarianceXYZPxPyPz(covMatrixDSVert);
5137 cp = TMath::Cos(phiDSVert);
5138 sp = TMath::Sin(phiDSVert);
5139 ct = TMath::Cos(thetaDSVert);
5140 st = TMath::Sin(thetaDSVert);
5142 errorMomentum = covMatrix[9]*cp*cp*ct*ct
5143 +covMatrix[13]*2.*cp*sp*ct*ct
5144 +covMatrix[18]*2.*cp*ct*st
5145 +covMatrix[14]*sp*sp*ct*ct
5146 +covMatrix[19]*2.*sp*ct*st
5147 +covMatrix[20]*st*st;
5148 Double_t normalizedDecayTimeToBPlus = candidateD0toBPlus->NormalizedDecayLength(vertexBPlus) / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
5206 Double_t mD0PDG = TDatabasePDG::Instance()->GetParticle(421)->Mass();
5207 Double_t mBPlusPDG = TDatabasePDG::Instance()->GetParticle(521)->Mass();
5210 Double_t deltaPDG = mBPlusPDG - mD0PDG;
5214 prongs[0] = 211; prongs[1] = 421;
5215 Double_t invMassBPlus = candidateBPlus->InvMass(2,prongs);
5216 Double_t invMassDifference = TMath::Abs(mBPlusPDG - invMassBPlus);
5220 Double_t dcaMother = candidateBPlus->GetDCA();
5221 Double_t ptMother = candidateBPlus->Pt();
5222 Double_t momentumMother = candidateBPlus->P();
5224 Double_t ptPion = candidatePion->Pt();
5226 AliExternalTrackParam motherTrack;
5227 motherTrack.CopyFromVTrack(candidateBPlus);
5229 motherTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
5231 Double_t d0Mother = TMath::Abs(d0[0]);
5232 Double_t d0firstTrack = TMath::Abs(candidateBPlus->Getd0Prong(0));
5233 Double_t d0secondTrack = TMath::Abs(candidateBPlus->Getd0Prong(1));
5238 Double_t angleBetweenBothDaughters = (candidateD0->Px() * candidatePion->Px() + candidateD0->Py() * candidatePion->Py() + candidateD0->Pz() * candidatePion->Pz()) /(candidateD0->P() * candidatePion->P());
5239 Double_t angleMotherFirstDaughter = (candidateBPlus->Px() * candidatePion->Px() + candidateBPlus->Py() * candidatePion->Py() + candidateBPlus->Pz() * candidatePion->Pz()) /(candidateBPlus->P() * candidatePion->P());
5240 Double_t angleMotherSecondDaughter = (candidateBPlus->Px() * candidateD0->Px() + candidateBPlus->Py() * candidateD0->Py() + candidateBPlus->Pz() * candidateD0->Pz()) /(candidateBPlus->P() * candidateD0->P());
5242 Double_t cosThetaStar = candidateBPlus->CosThetaStar(0,521,211,421);
5243 Double_t vertexDistance = vertexBPlus->DistanceToVertex(primaryVertex);
5245 Double_t pdgMassMother = TDatabasePDG::Instance()->GetParticle(521)->Mass();
5246 Double_t pseudoProperDecayLength = ((vertexBPlus->GetX() - primaryVertex->GetX()) * candidateBPlus->Px() / TMath::Abs(candidateBPlus->Pt())) + ((vertexBPlus->GetY() - primaryVertex->GetY()) * candidateBPlus->Py() / TMath::Abs(candidateBPlus->Pt()));
5247 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother/ptMother;
5248 Double_t decayTime = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
5250 Double_t phi = candidateBPlus->Phi();
5251 Double_t theta = candidateBPlus->Theta();
5253 candidateBPlus->GetCovarianceXYZPxPyPz(covMatrix);
5260 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
5261 +covMatrix[13]*2.*cp*sp*ct*ct
5262 +covMatrix[18]*2.*cp*ct*st
5263 +covMatrix[14]*sp*sp*ct*ct
5264 +covMatrix[19]*2.*sp*ct*st
5265 +covMatrix[20]*st*st;
5266 Double_t normalizedDecayTime = candidateBPlus->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
5269 Double_t distanceXYToVertex = vertexBPlus->DistanceXYToVertex(primaryVertex);
5271 Double_t chi2Vertex = vertexBPlus->GetChi2perNDF();
5278 for(
Int_t ipr=0; ipr<2; ipr++)
5283 if(errdiffIP>0.) normdd0=diffIP/errdiffIP;
5284 if(ipr==0) dd0pr1=normdd0;
5285 if(ipr==1) dd0pr2=normdd0;
5287 if(TMath::Abs(dd0pr1)>TMath::Abs(dd0pr2)) {dd0max=dd0pr1; dd0min=dd0pr2;}
5288 else {dd0max=dd0pr2; dd0min=dd0pr1;}
5292 Int_t nCutIndex = 0;
Double_t NormalizedDecayLengthXY() const
Double_t NormalizedDecayLength() const
Int_t IsTrackInjected(AliAODTrack *part, AliAODMCHeader *header, TClonesArray *arrayMC)
Int_t GetnCutsForOptimization()
ULong64_t GetTriggerMask()
TList * fOutputD0FirstDaughter
! User output
Double_t DeltaInvMassBPlusKpipi(AliAODRecoDecayHF2Prong *BPlus) const
Float_t * GetPtBinLimitsD0forD0ptbin() const
void Getd0MeasMinusExpProng(Int_t ip, Double_t magf, Double_t &d0diff, Double_t &errd0diff) const
Int_t GetnSigmaTOF(AliAODTrack *track, Int_t species, Double_t &sigma) const
void GetSoftSelectionArrayITSD0SecondDaughter(Bool_t array[7]=0)
TH1F * fMotherHistogramArrayExtra[7][10]
Bool_t D0FirstDaughterSelection(AliAODTrack *aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, AliAODMCHeader *header)
Int_t GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const
Double_t ImpParXY() const
Int_t GetFilterBitD0SecondDaughter()
void DefineHistograms()
histos
Float_t * fPtBinLimitsD0forD0ptbin
static TString GetGenerator(Int_t label, AliAODMCHeader *header)
Int_t GetWhyRejection() const
Double_t CosPointingAngleXY() const
Bool_t FillRecoCand(AliVEvent *event, AliAODRecoDecayHF3Prong *rd3)
void BPlustoD0PiSignalTracksInMC(TClonesArray *mcTrackArray, AliAODEvent *aodevent, TMatrix *BPlustoD0PiLabelMatrix, TList *listout)
Double_t InvMassD0() const
Int_t IsD0forD0ptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
Double_t Prodd0d0() const
Int_t GetnVariablesForCutOptimization()
Int_t GetMinTPCNclsBPlusPion()
Double_t GetMinPtD0SecondDaughter()
Int_t GetMinITSNclsD0FirstDaughter()
Int_t GetFilterBitBPlusPion()
Bool_t UseTPCRefitD0SecondDaughter()
AliAODPidHF * GetPidHF() const
virtual void Terminate(Option_t *option)
AliAODVertex * RecalculateVertex(const AliVVertex *primary, TObjArray *tracks, Double_t bField, Double_t dispersion)
TH2F * fMotherHistogramArray2D[6][99][60]
TList * fListCuts
! User output
std::vector< Int_t > * fBPlusPionTracks
Int_t GetMinTPCNclsD0FirstDaughter()
void BPlusPionSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *BPlustoD0PiLabelMatrix, AliAODMCHeader *header)
Bool_t D0SecondDaughterSelection(AliAODTrack *aodTrack, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, AliAODMCHeader *header)
Bool_t UseFilterBitD0FirstDaughter()
TH1F * fMotherHistogramArray[6][99][60]
void TwoTrackCombinationInfo(AliExternalTrackParam *firstTrack, AliExternalTrackParam *secondTrack, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TString histogram_name, UInt_t prongs[2])
Int_t GetMinITSNclsD0SecondDaughter()
Int_t PtBinD0forD0ptbin(Double_t pt) const
Bool_t GetIsUpperCutForCutOptimization(Int_t nVariable) const
Bool_t UseITSRefitD0FirstDaughter()
Double_t GetMaxAbsEtaBPlusPion()
Double_t GetMaxAbsEtaD0FirstDaughter()
Bool_t UseFilterBitBPlusPion()
Int_t fQuickSignalAnalysis
AliAnalysisTaskSEBPlustoD0Pi()
TList * fOutputD0SecondDaughter
! User output
void GetHardSelectionArrayITSD0FirstDaughter(Bool_t array[7]=0)
Bool_t UseTPCRefitBPlusPion()
Double_t GetMind0D0SecondDaughter()
TList * fOutputBPlusMC
! User output
virtual Int_t SelectPID(AliAODTrack *track, Int_t type)
AliESDtrackCuts * GetTrackCuts() const
Int_t MatchCandidateToMonteCarlo(Int_t pdgabs, AliAODRecoDecayHF2Prong *candidate, TClonesArray *mcArray, TMatrix *B0toDStarPiLabelMatrix) const
Bool_t UseFilterBitD0SecondDaughter()
void SetProngIDs(Int_t nIDs, UShort_t *id)
void GetHardSelectionArrayITSD0SecondDaughter(Bool_t array[7]=0)
Int_t fnPtBinsD0forD0ptbin
[fnPtBinLimits]
Double_t InvMassD0bar() const
void ThreeTrackCombinationInfo(AliExternalTrackParam *firstTrack, AliExternalTrackParam *secondTrack, AliExternalTrackParam *thirdTrack, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TString histogram_name, UInt_t prongs[3])
TList * fOutputD0_D0Pt
! User output
void CutOptimizationLoop(Int_t variable, Int_t nVariables, Int_t nCuts, Int_t ptBin, Int_t fillNumber, Bool_t isDesiredCandidate)
Double_t GetMaxAbsEtaD0SecondDaughter()
TH2F * fDaughterHistogramArray2D[4][6]
Float_t GetCutForCutOptimization(Int_t nCutIndex, Int_t nVariable, Int_t ptBin)
void SetPrimaryVtxRef(TObject *vtx)
primary vertex
std::vector< Int_t > * fD0Tracks
Float_t fCutVariableValueArray[99]
[fnPtBinsD0forD0ptbinLimits]
Double_t GetMind0D0FirstDaughter()
void GetSoftSelectionArrayITSD0FirstDaughter(Bool_t array[7]=0)
TList * fOutputD0
! User output
virtual void UserCreateOutputObjects()
Implementation of interface methods.
TH1F * fDaughterHistogramArrayExtra[4][6]
Bool_t AreDaughtersSelected(AliAODRecoDecayHF *rd, const AliAODEvent *aod=0x0) const
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod)
Bool_t IsEventSelected(AliVEvent *event)
void FillBPlusHistograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType)
void CutOptimizationVariableValues(AliAODRecoDecayHF2Prong *candidateBPlus, AliAODEvent *aod)
TList * fOutputBPlus
! User output
void FillD0Histograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType, Int_t pdgCodeMother=-1)
Double_t GetMinPtD0FirstDaughter()
void FillFinalTrackHistograms(AliAODRecoDecayHF2Prong *selectedBPlus, AliAODVertex *primaryVertex, Double_t bz, Bool_t isDesiredCandidate, TClonesArray *mcTrackArray)
void GetSoftSelectionArrayITSBPlusPion(Bool_t array[7]=0)
Float_t * GetPtBinLimits() const
Bool_t IsCandidateInjected(AliAODRecoDecayHF2Prong *part, AliAODMCHeader *header, TClonesArray *arrayMC)
void GetHardSelectionArrayITSBPlusPion(Bool_t array[7]=0)
Int_t fnPtBinsD0forD0ptbinLimits
Double_t GetSigmaForCutOptimization(Int_t iPtBin) const