37 #include <TParticle.h> 40 #include <TDatabasePDG.h> 41 #include <AliAnalysisDataSlot.h> 42 #include <AliAnalysisDataContainer.h> 45 #include "AliMCEvent.h" 46 #include "AliAnalysisManager.h" 47 #include "AliAODMCHeader.h" 48 #include "AliAODHandler.h" 50 #include "AliVertex.h" 51 #include "AliVVertex.h" 52 #include "AliESDVertex.h" 53 #include "AliAODVertex.h" 54 #include "AliVertexerTracks.h" 55 #include "AliExternalTrackParam.h" 56 #include "AliNeutralTrackParam.h" 57 #include "AliAODRecoDecay.h" 62 #include "AliESDtrack.h" 63 #include "AliAODMCParticle.h" 64 #include "AliAODEvent.h" 66 #include "AliAODInputHandler.h" 87 fOutputD0FirstDaughter(0),
88 fOutputD0SecondDaughter(0),
96 fOutputDStar_DStarPt(0),
99 fQuickSignalAnalysis(0),
102 fDStarPionTracks(0x0),
108 fnPtBinsD0forD0ptbin(0),
109 fnPtBinsD0forDStarptbin(0),
110 fnPtBinsDStarforDStarptbin(0),
112 fnPtBinsD0forD0ptbinLimits(0),
113 fnPtBinsD0forDStarptbinLimits(0),
114 fnPtBinsDStarforDStarptbinLimits(0),
116 fPtBinLimitsD0forD0ptbin(0x0),
117 fPtBinLimitsD0forDStarptbin(0x0),
118 fPtBinLimitsDStarforDStarptbin(0x0),
119 fDaughterHistogramArray(),
120 fDaughterHistogramArray2D(),
121 fDaughterHistogramArrayExtra(),
122 fMotherHistogramArray(),
123 fMotherHistogramArray2D(),
124 fMotherHistogramArrayExtra(),
125 fMotherHistogramArray3D(),
128 fHistMassWindow(0.125),
129 fDegreePerRotation(0),
130 fNumberOfRotations(0),
195 Info(
"AliAnalysisTaskSEB0toDStarPi",
"Calling Constructor");
199 DefineInput(0,TChain::Class());
200 DefineOutput(1,TList::Class());
201 DefineOutput(2,TList::Class());
202 DefineOutput(3,TList::Class());
203 DefineOutput(4,TList::Class());
204 DefineOutput(5,TList::Class());
205 DefineOutput(6,TList::Class());
206 DefineOutput(7,TList::Class());
207 DefineOutput(8,TList::Class());
208 DefineOutput(9,TList::Class());
209 DefineOutput(10,TList::Class());
210 DefineOutput(11,TList::Class());
211 DefineOutput(12,TList::Class());
212 DefineOutput(13,TList::Class());
221 Info(
"~AliAnalysisTaskSEB0toDStarPi",
"Calling Destructor");
248 if(fDebug > 1) printf(
"AliAnalysisTaskSEB0toDStarPi::Init() \n");
264 Error(
"UserExec",
"NO EVENT FOUND!");
269 std::cout <<
"\r" <<
"Analysing event number: " <<
fEvents << std::endl;
277 std::bitset<32> maskEV(((AliAODInputHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected());
278 std::cout <<
"Event mask: " << maskEV << std::endl;
288 TClonesArray * D0TracksFromFriendFile = 0;
291 if(!aodEvent && AODEvent() && IsStandardAOD())
295 aodEvent =
dynamic_cast<AliAODEvent*
> (AODEvent());
298 AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
299 if(aodHandler->GetExtensions())
301 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
303 D0TracksFromFriendFile=(TClonesArray*)aodFromExt->GetList()->FindObject(
"D0toKpi");
308 D0TracksFromFriendFile=(TClonesArray*)aodEvent->GetList()->FindObject(
"D0toKpi");
313 if(!aodEvent->GetPrimaryVertex() || TMath::Abs(aodEvent->GetMagneticField())<0.001)
return;
318 TString trigclass=aodEvent->GetFiredTriggerClasses();
319 if(trigclass.Contains(
"C0SMH-B-NOPF-ALLNOTRD")||trigclass.Contains(
"C0SMH-B-NOPF-ALL"))
fCEvents->Fill(5);
339 AliAODVertex *primaryVertex = (AliAODVertex*)aodEvent->GetPrimaryVertex();
340 if(!primaryVertex)
return;
341 if(primaryVertex->GetNContributors()<1)
return;
344 if(!D0TracksFromFriendFile)
346 AliInfo(
"Could not find array of HF vertices, skipping the event");
349 else AliDebug(2, Form(
"Found %d vertices",D0TracksFromFriendFile->GetEntriesFast()));
351 AliAODMCHeader *mcHeader = 0;
354 mcHeader = (AliAODMCHeader*)aodEvent->GetList()->FindObject(AliAODMCHeader::StdBranchName());
356 printf(
" MC header branch not found!\n");
369 TClonesArray *mcTrackArray =
nullptr;
370 if(
fUseMCInfo) mcTrackArray =
dynamic_cast<TClonesArray*
>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
374 TMatrix * B0toDStarPiLabelMatrix =
new TMatrix(0,7);
390 DStarPionSelection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,mcHeader);
391 B0PionSelection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,mcHeader);
392 D0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile,mcHeader);
394 DStarAndB0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile,mcHeader);
401 delete B0toDStarPiLabelMatrix; B0toDStarPiLabelMatrix = NULL;
433 AliAnalysisTaskSE::Terminate();
436 printf(
"ERROR: fOutput not available\n");
444 printf(
"ERROR: fListCuts not available\n");
449 printf(
"ERROR: fOutputD0FirstDaughter not available\n");
454 printf(
"ERROR: fOutputD0SecondDaughter not available\n");
459 printf(
"ERROR: fOutputDStarPion not available\n");
464 printf(
"ERROR: fOutputB0Pion not available\n");
469 printf(
"ERROR: fOutputD0 not available\n");
474 printf(
"ERROR: fOutputDStar not available\n");
479 printf(
"ERROR: fOutputB0 not available\n");
484 printf(
"ERROR: fOutputD0_D0Pt not available\n");
489 printf(
"ERROR: fOutputD0_DStarPt not available\n");
494 printf(
"ERROR: fOutputDStar_DStarPt not available\n");
499 printf(
"ERROR: fOutputB0MC not available\n");
508 Info(
"UserCreateOutputObjects",
"CreateOutputObjects of task %s\n", GetName());
581 std::cout <<
"Nr. of B0 meson bins: " <<
fCuts->
GetNPtBins() <<
" limits: " << std::endl;
586 std::cout << std::endl;
592 std::cout << std::endl;
598 std::cout << std::endl;
604 std::cout << std::endl;
661 fCEvents =
new TH1F(
"fCEvents",
"conter",13,0,13);
663 fCEvents->GetXaxis()->SetTitle(
"1");
664 fCEvents->GetYaxis()->SetTitle(
"counts");
665 fCEvents->GetXaxis()->SetBinLabel(2,
"no. of events");
666 fCEvents->GetXaxis()->SetBinLabel(3,
"good prim vtx and B field");
667 fCEvents->GetXaxis()->SetBinLabel(4,
"no event selected");
668 fCEvents->GetXaxis()->SetBinLabel(5,
"no vtx contributors");
669 fCEvents->GetXaxis()->SetBinLabel(6,
"trigger for PbPb");
670 fCEvents->GetXaxis()->SetBinLabel(7,
"no z vtx");
671 fCEvents->GetXaxis()->SetBinLabel(12,
"no. of D0 fail to be rec");
676 TString name_mc_B0_pt =
"mc_B0_pt";
677 TH1F* hist_mc_B0_pt =
new TH1F(name_mc_B0_pt.Data(),
"Pt monte carlo B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
678 hist_mc_B0_pt->Sumw2();
679 hist_mc_B0_pt->SetLineColor(6);
680 hist_mc_B0_pt->SetMarkerStyle(20);
681 hist_mc_B0_pt->SetMarkerSize(0.6);
682 hist_mc_B0_pt->SetMarkerColor(6);
683 TH1F* histogram_mc_B0_pt = (TH1F*)hist_mc_B0_pt->Clone();
686 TString name_mc_B0_pion_pt =
"mc_B0_pion_pt";
687 TH1F* hist_mc_B0_pion_pt =
new TH1F(name_mc_B0_pion_pt.Data(),
"Pt monte carlo pion of B0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
688 hist_mc_B0_pion_pt->Sumw2();
689 hist_mc_B0_pion_pt->SetLineColor(6);
690 hist_mc_B0_pion_pt->SetMarkerStyle(20);
691 hist_mc_B0_pion_pt->SetMarkerSize(0.6);
692 hist_mc_B0_pion_pt->SetMarkerColor(6);
693 TH1F* histogram_mc_B0_pion_pt = (TH1F*)hist_mc_B0_pion_pt->Clone();
696 TString name_mc_DStar_pt =
"mc_DStar_pt";
697 TH1F* hist_mc_DStar_pt =
new TH1F(name_mc_DStar_pt.Data(),
"Pt monte carlo DStar in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
698 hist_mc_DStar_pt->Sumw2();
699 hist_mc_DStar_pt->SetLineColor(6);
700 hist_mc_DStar_pt->SetMarkerStyle(20);
701 hist_mc_DStar_pt->SetMarkerSize(0.6);
702 hist_mc_DStar_pt->SetMarkerColor(6);
703 TH1F* histogram_mc_DStar_pt = (TH1F*)hist_mc_DStar_pt->Clone();
706 TString name_mc_DStar_pion_pt =
"mc_DStar_pion_pt";
707 TH1F* hist_mc_DStar_pion_pt =
new TH1F(name_mc_DStar_pion_pt.Data(),
"Pt monte carlo pion of DStar in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
708 hist_mc_DStar_pion_pt->Sumw2();
709 hist_mc_DStar_pion_pt->SetLineColor(6);
710 hist_mc_DStar_pion_pt->SetMarkerStyle(20);
711 hist_mc_DStar_pion_pt->SetMarkerSize(0.6);
712 hist_mc_DStar_pion_pt->SetMarkerColor(6);
713 TH1F* histogram_mc_DStar_pion_pt = (TH1F*)hist_mc_DStar_pion_pt->Clone();
716 TString name_mc_D0_pt =
"mc_D0_pt";
717 TH1F* hist_mc_D0_pt =
new TH1F(name_mc_D0_pt.Data(),
"Pt monte carlo D0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
718 hist_mc_D0_pt->Sumw2();
719 hist_mc_D0_pt->SetLineColor(6);
720 hist_mc_D0_pt->SetMarkerStyle(20);
721 hist_mc_D0_pt->SetMarkerSize(0.6);
722 hist_mc_D0_pt->SetMarkerColor(6);
723 TH1F* histogram_mc_D0_pt = (TH1F*)hist_mc_D0_pt->Clone();
726 TString name_mc_D0_pion_pt =
"mc_D0_pion_pt";
727 TH1F* hist_mc_D0_pion_pt =
new TH1F(name_mc_D0_pion_pt.Data(),
"Pt monte carlo pion of D0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
728 hist_mc_D0_pion_pt->Sumw2();
729 hist_mc_D0_pion_pt->SetLineColor(6);
730 hist_mc_D0_pion_pt->SetMarkerStyle(20);
731 hist_mc_D0_pion_pt->SetMarkerSize(0.6);
732 hist_mc_D0_pion_pt->SetMarkerColor(6);
733 TH1F* histogram_mc_D0_pion_pt = (TH1F*)hist_mc_D0_pion_pt->Clone();
736 TString name_mc_D0_kaon_pt =
"mc_D0_kaon_pt";
737 TH1F* hist_mc_D0_kaon_pt =
new TH1F(name_mc_D0_kaon_pt.Data(),
"Pt monte carlo kaon of D0 in B0->D*#pi; p_{T} [GeV/c]; Entries",400,0,20);
738 hist_mc_D0_kaon_pt->Sumw2();
739 hist_mc_D0_kaon_pt->SetLineColor(6);
740 hist_mc_D0_kaon_pt->SetMarkerStyle(20);
741 hist_mc_D0_kaon_pt->SetMarkerSize(0.6);
742 hist_mc_D0_kaon_pt->SetMarkerColor(6);
743 TH1F* histogram_mc_D0_kaon_pt = (TH1F*)hist_mc_D0_kaon_pt->Clone();
746 TString name_mc_B0_rapidity_true =
"mc_B0_rapidity_true";
747 TH1F* hist_mc_B0_rapidity_true =
new TH1F(name_mc_B0_rapidity_true.Data(),
"rapidity_true monte carlo B0 in B0->D*#pi; Y; Entries",5000,-20,20);
748 hist_mc_B0_rapidity_true->Sumw2();
749 hist_mc_B0_rapidity_true->SetLineColor(6);
750 hist_mc_B0_rapidity_true->SetMarkerStyle(20);
751 hist_mc_B0_rapidity_true->SetMarkerSize(0.6);
752 hist_mc_B0_rapidity_true->SetMarkerColor(6);
753 TH1F* histogram_mc_B0_rapidity_true = (TH1F*)hist_mc_B0_rapidity_true->Clone();
756 TString name_mc_B0_pion_rapidity_true =
"mc_B0_pion_rapidity_true";
757 TH1F* hist_mc_B0_pion_rapidity_true =
new TH1F(name_mc_B0_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of B0 in B0->D*#pi; Y; Entries",5000,-20,20);
758 hist_mc_B0_pion_rapidity_true->Sumw2();
759 hist_mc_B0_pion_rapidity_true->SetLineColor(6);
760 hist_mc_B0_pion_rapidity_true->SetMarkerStyle(20);
761 hist_mc_B0_pion_rapidity_true->SetMarkerSize(0.6);
762 hist_mc_B0_pion_rapidity_true->SetMarkerColor(6);
763 TH1F* histogram_mc_B0_pion_rapidity_true = (TH1F*)hist_mc_B0_pion_rapidity_true->Clone();
764 fOutputB0MC->Add(histogram_mc_B0_pion_rapidity_true);
766 TString name_mc_DStar_rapidity_true =
"mc_DStar_rapidity_true";
767 TH1F* hist_mc_DStar_rapidity_true =
new TH1F(name_mc_DStar_rapidity_true.Data(),
"rapidity_true monte carlo DStar in B0->D*#pi; Y; Entries",5000,-20,20);
768 hist_mc_DStar_rapidity_true->Sumw2();
769 hist_mc_DStar_rapidity_true->SetLineColor(6);
770 hist_mc_DStar_rapidity_true->SetMarkerStyle(20);
771 hist_mc_DStar_rapidity_true->SetMarkerSize(0.6);
772 hist_mc_DStar_rapidity_true->SetMarkerColor(6);
773 TH1F* histogram_mc_DStar_rapidity_true = (TH1F*)hist_mc_DStar_rapidity_true->Clone();
774 fOutputB0MC->Add(histogram_mc_DStar_rapidity_true);
776 TString name_mc_DStar_pion_rapidity_true =
"mc_DStar_pion_rapidity_true";
777 TH1F* hist_mc_DStar_pion_rapidity_true =
new TH1F(name_mc_DStar_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of DStar in B0->D*#pi; Y; Entries",5000,-20,20);
778 hist_mc_DStar_pion_rapidity_true->Sumw2();
779 hist_mc_DStar_pion_rapidity_true->SetLineColor(6);
780 hist_mc_DStar_pion_rapidity_true->SetMarkerStyle(20);
781 hist_mc_DStar_pion_rapidity_true->SetMarkerSize(0.6);
782 hist_mc_DStar_pion_rapidity_true->SetMarkerColor(6);
783 TH1F* histogram_mc_DStar_pion_rapidity_true = (TH1F*)hist_mc_DStar_pion_rapidity_true->Clone();
784 fOutputB0MC->Add(histogram_mc_DStar_pion_rapidity_true);
786 TString name_mc_D0_rapidity_true =
"mc_D0_rapidity_true";
787 TH1F* hist_mc_D0_rapidity_true =
new TH1F(name_mc_D0_rapidity_true.Data(),
"rapidity_true monte carlo D0 in B0->D*#pi; Y; Entries",5000,-20,20);
788 hist_mc_D0_rapidity_true->Sumw2();
789 hist_mc_D0_rapidity_true->SetLineColor(6);
790 hist_mc_D0_rapidity_true->SetMarkerStyle(20);
791 hist_mc_D0_rapidity_true->SetMarkerSize(0.6);
792 hist_mc_D0_rapidity_true->SetMarkerColor(6);
793 TH1F* histogram_mc_D0_rapidity_true = (TH1F*)hist_mc_D0_rapidity_true->Clone();
796 TString name_mc_D0_pion_rapidity_true =
"mc_D0_pion_rapidity_true";
797 TH1F* hist_mc_D0_pion_rapidity_true =
new TH1F(name_mc_D0_pion_rapidity_true.Data(),
"rapidity_true monte carlo pion of D0 in B0->D*#pi; Y; Entries",5000,-20,20);
798 hist_mc_D0_pion_rapidity_true->Sumw2();
799 hist_mc_D0_pion_rapidity_true->SetLineColor(6);
800 hist_mc_D0_pion_rapidity_true->SetMarkerStyle(20);
801 hist_mc_D0_pion_rapidity_true->SetMarkerSize(0.6);
802 hist_mc_D0_pion_rapidity_true->SetMarkerColor(6);
803 TH1F* histogram_mc_D0_pion_rapidity_true = (TH1F*)hist_mc_D0_pion_rapidity_true->Clone();
804 fOutputB0MC->Add(histogram_mc_D0_pion_rapidity_true);
806 TString name_mc_D0_kaon_rapidity_true =
"mc_D0_kaon_rapidity_true";
807 TH1F* hist_mc_D0_kaon_rapidity_true =
new TH1F(name_mc_D0_kaon_rapidity_true.Data(),
"rapidity_true monte carlo kaon of D0 in B0->D*#pi; Y; Entries",5000,-20,20);
808 hist_mc_D0_kaon_rapidity_true->Sumw2();
809 hist_mc_D0_kaon_rapidity_true->SetLineColor(6);
810 hist_mc_D0_kaon_rapidity_true->SetMarkerStyle(20);
811 hist_mc_D0_kaon_rapidity_true->SetMarkerSize(0.6);
812 hist_mc_D0_kaon_rapidity_true->SetMarkerColor(6);
813 TH1F* histogram_mc_D0_kaon_rapidity_true = (TH1F*)hist_mc_D0_kaon_rapidity_true->Clone();
814 fOutputB0MC->Add(histogram_mc_D0_kaon_rapidity_true);
816 TString name_mc_B0_pseudorapidity_true =
"mc_B0_pseudorapidity_true";
817 TH1F* hist_mc_B0_pseudorapidity_true =
new TH1F(name_mc_B0_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo B0 in B0->D*#pi; #eta; Entries",5000,-20,20);
818 hist_mc_B0_pseudorapidity_true->Sumw2();
819 hist_mc_B0_pseudorapidity_true->SetLineColor(6);
820 hist_mc_B0_pseudorapidity_true->SetMarkerStyle(20);
821 hist_mc_B0_pseudorapidity_true->SetMarkerSize(0.6);
822 hist_mc_B0_pseudorapidity_true->SetMarkerColor(6);
823 TH1F* histogram_mc_B0_pseudorapidity_true = (TH1F*)hist_mc_B0_pseudorapidity_true->Clone();
824 fOutputB0MC->Add(histogram_mc_B0_pseudorapidity_true);
826 TString name_mc_B0_pion_pseudorapidity_true =
"mc_B0_pion_pseudorapidity_true";
827 TH1F* hist_mc_B0_pion_pseudorapidity_true =
new TH1F(name_mc_B0_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of B0 in B0->D*#pi; #eta; Entries",5000,-20,20);
828 hist_mc_B0_pion_pseudorapidity_true->Sumw2();
829 hist_mc_B0_pion_pseudorapidity_true->SetLineColor(6);
830 hist_mc_B0_pion_pseudorapidity_true->SetMarkerStyle(20);
831 hist_mc_B0_pion_pseudorapidity_true->SetMarkerSize(0.6);
832 hist_mc_B0_pion_pseudorapidity_true->SetMarkerColor(6);
833 TH1F* histogram_mc_B0_pion_pseudorapidity_true = (TH1F*)hist_mc_B0_pion_pseudorapidity_true->Clone();
834 fOutputB0MC->Add(histogram_mc_B0_pion_pseudorapidity_true);
836 TString name_mc_DStar_pseudorapidity_true =
"mc_DStar_pseudorapidity_true";
837 TH1F* hist_mc_DStar_pseudorapidity_true =
new TH1F(name_mc_DStar_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo DStar in B0->D*#pi; #eta; Entries",5000,-20,20);
838 hist_mc_DStar_pseudorapidity_true->Sumw2();
839 hist_mc_DStar_pseudorapidity_true->SetLineColor(6);
840 hist_mc_DStar_pseudorapidity_true->SetMarkerStyle(20);
841 hist_mc_DStar_pseudorapidity_true->SetMarkerSize(0.6);
842 hist_mc_DStar_pseudorapidity_true->SetMarkerColor(6);
843 TH1F* histogram_mc_DStar_pseudorapidity_true = (TH1F*)hist_mc_DStar_pseudorapidity_true->Clone();
844 fOutputB0MC->Add(histogram_mc_DStar_pseudorapidity_true);
846 TString name_mc_DStar_pion_pseudorapidity_true =
"mc_DStar_pion_pseudorapidity_true";
847 TH1F* hist_mc_DStar_pion_pseudorapidity_true =
new TH1F(name_mc_DStar_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of DStar in B0->D*#pi; #eta; Entries",5000,-20,20);
848 hist_mc_DStar_pion_pseudorapidity_true->Sumw2();
849 hist_mc_DStar_pion_pseudorapidity_true->SetLineColor(6);
850 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerStyle(20);
851 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerSize(0.6);
852 hist_mc_DStar_pion_pseudorapidity_true->SetMarkerColor(6);
853 TH1F* histogram_mc_DStar_pion_pseudorapidity_true = (TH1F*)hist_mc_DStar_pion_pseudorapidity_true->Clone();
854 fOutputB0MC->Add(histogram_mc_DStar_pion_pseudorapidity_true);
856 TString name_mc_D0_pseudorapidity_true =
"mc_D0_pseudorapidity_true";
857 TH1F* hist_mc_D0_pseudorapidity_true =
new TH1F(name_mc_D0_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo D0 in B0->D*#pi; #eta; Entries",5000,-20,20);
858 hist_mc_D0_pseudorapidity_true->Sumw2();
859 hist_mc_D0_pseudorapidity_true->SetLineColor(6);
860 hist_mc_D0_pseudorapidity_true->SetMarkerStyle(20);
861 hist_mc_D0_pseudorapidity_true->SetMarkerSize(0.6);
862 hist_mc_D0_pseudorapidity_true->SetMarkerColor(6);
863 TH1F* histogram_mc_D0_pseudorapidity_true = (TH1F*)hist_mc_D0_pseudorapidity_true->Clone();
864 fOutputB0MC->Add(histogram_mc_D0_pseudorapidity_true);
866 TString name_mc_D0_pion_pseudorapidity_true =
"mc_D0_pion_pseudorapidity_true";
867 TH1F* hist_mc_D0_pion_pseudorapidity_true =
new TH1F(name_mc_D0_pion_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo pion of D0 in B0->D*#pi; #eta; Entries",5000,-20,20);
868 hist_mc_D0_pion_pseudorapidity_true->Sumw2();
869 hist_mc_D0_pion_pseudorapidity_true->SetLineColor(6);
870 hist_mc_D0_pion_pseudorapidity_true->SetMarkerStyle(20);
871 hist_mc_D0_pion_pseudorapidity_true->SetMarkerSize(0.6);
872 hist_mc_D0_pion_pseudorapidity_true->SetMarkerColor(6);
873 TH1F* histogram_mc_D0_pion_pseudorapidity_true = (TH1F*)hist_mc_D0_pion_pseudorapidity_true->Clone();
874 fOutputB0MC->Add(histogram_mc_D0_pion_pseudorapidity_true);
876 TString name_mc_D0_kaon_pseudorapidity_true =
"mc_D0_kaon_pseudorapidity_true";
877 TH1F* hist_mc_D0_kaon_pseudorapidity_true =
new TH1F(name_mc_D0_kaon_pseudorapidity_true.Data(),
"pseudorapidity_true monte carlo kaon of D0 in B0->D*#pi; #eta; Entries",5000,-20,20);
878 hist_mc_D0_kaon_pseudorapidity_true->Sumw2();
879 hist_mc_D0_kaon_pseudorapidity_true->SetLineColor(6);
880 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerStyle(20);
881 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerSize(0.6);
882 hist_mc_D0_kaon_pseudorapidity_true->SetMarkerColor(6);
883 TH1F* histogram_mc_D0_kaon_pseudorapidity_true = (TH1F*)hist_mc_D0_kaon_pseudorapidity_true->Clone();
884 fOutputB0MC->Add(histogram_mc_D0_kaon_pseudorapidity_true);
888 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
889 TH1F* hist_dca_D0_DStarPion =
new TH1F(name_dca_D0_DStarPion.Data(),
"dca_D0_DStarPion; DCA [cm]; Entries",1000,0,0.2);
890 hist_dca_D0_DStarPion->Sumw2();
891 hist_dca_D0_DStarPion->SetLineColor(6);
892 hist_dca_D0_DStarPion->SetMarkerStyle(20);
893 hist_dca_D0_DStarPion->SetMarkerSize(0.6);
894 hist_dca_D0_DStarPion->SetMarkerColor(6);
895 TH1F* histogram_dca_D0_DStarPion = (TH1F*)hist_dca_D0_DStarPion->Clone();
898 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
899 TH1F* hist_dca_D0_B0Pion =
new TH1F(name_dca_D0_B0Pion.Data(),
"dca_D0_B0Pion; DCA [cm]; Entries",1000,0,0.2);
900 hist_dca_D0_B0Pion->Sumw2();
901 hist_dca_D0_B0Pion->SetLineColor(6);
902 hist_dca_D0_B0Pion->SetMarkerStyle(20);
903 hist_dca_D0_B0Pion->SetMarkerSize(0.6);
904 hist_dca_D0_B0Pion->SetMarkerColor(6);
905 TH1F* histogram_dca_D0_B0Pion = (TH1F*)hist_dca_D0_B0Pion->Clone();
908 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
909 TH1F* hist_dca_DStarPion_B0Pion =
new TH1F(name_dca_DStarPion_B0Pion.Data(),
"dca_DStarPion_B0Pion; DCA [cm]; Entries",1000,0,0.2);
910 hist_dca_DStarPion_B0Pion->Sumw2();
911 hist_dca_DStarPion_B0Pion->SetLineColor(6);
912 hist_dca_DStarPion_B0Pion->SetMarkerStyle(20);
913 hist_dca_DStarPion_B0Pion->SetMarkerSize(0.6);
914 hist_dca_DStarPion_B0Pion->SetMarkerColor(6);
915 TH1F* histogram_dca_DStarPion_B0Pion = (TH1F*)hist_dca_DStarPion_B0Pion->Clone();
918 TString name_dca_Combined =
"dca_Combined";
919 TH1F* hist_dca_Combined =
new TH1F(name_dca_Combined.Data(),
"dca_Combined; DCA [cm]; Entries",1000,0,1.0);
920 hist_dca_Combined->Sumw2();
921 hist_dca_Combined->SetLineColor(6);
922 hist_dca_Combined->SetMarkerStyle(20);
923 hist_dca_Combined->SetMarkerSize(0.6);
924 hist_dca_Combined->SetMarkerColor(6);
925 TH1F* histogram_dca_Combined = (TH1F*)hist_dca_Combined->Clone();
928 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
929 TH1F* hist_dca_Signal_D0_DStarPion =
new TH1F(name_dca_Signal_D0_DStarPion.Data(),
"dca_Signal_D0_DStarPion; DCA [cm]; Entries",1000,0,0.2);
930 hist_dca_Signal_D0_DStarPion->Sumw2();
931 hist_dca_Signal_D0_DStarPion->SetLineColor(4);
932 hist_dca_Signal_D0_DStarPion->SetMarkerStyle(20);
933 hist_dca_Signal_D0_DStarPion->SetMarkerSize(0.6);
934 hist_dca_Signal_D0_DStarPion->SetMarkerColor(4);
935 TH1F* histogram_dca_Signal_D0_DStarPion = (TH1F*)hist_dca_Signal_D0_DStarPion->Clone();
936 fOutputB0MC->Add(histogram_dca_Signal_D0_DStarPion);
938 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
939 TH1F* hist_dca_Signal_D0_B0Pion =
new TH1F(name_dca_Signal_D0_B0Pion.Data(),
"dca_Signal_D0_B0Pion; DCA [cm]; Entries",1000,0,0.2);
940 hist_dca_Signal_D0_B0Pion->Sumw2();
941 hist_dca_Signal_D0_B0Pion->SetLineColor(4);
942 hist_dca_Signal_D0_B0Pion->SetMarkerStyle(20);
943 hist_dca_Signal_D0_B0Pion->SetMarkerSize(0.6);
944 hist_dca_Signal_D0_B0Pion->SetMarkerColor(4);
945 TH1F* histogram_dca_Signal_D0_B0Pion = (TH1F*)hist_dca_Signal_D0_B0Pion->Clone();
948 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
949 TH1F* hist_dca_Signal_DStarPion_B0Pion =
new TH1F(name_dca_Signal_DStarPion_B0Pion.Data(),
"dca_Signal_DStarPion_B0Pion; DCA [cm]; Entries",1000,0,0.2);
950 hist_dca_Signal_DStarPion_B0Pion->Sumw2();
951 hist_dca_Signal_DStarPion_B0Pion->SetLineColor(4);
952 hist_dca_Signal_DStarPion_B0Pion->SetMarkerStyle(20);
953 hist_dca_Signal_DStarPion_B0Pion->SetMarkerSize(0.6);
954 hist_dca_Signal_DStarPion_B0Pion->SetMarkerColor(4);
955 TH1F* histogram_dca_Signal_DStarPion_B0Pion = (TH1F*)hist_dca_Signal_DStarPion_B0Pion->Clone();
956 fOutputB0MC->Add(histogram_dca_Signal_DStarPion_B0Pion);
958 TString name_dca_Signal_Combined =
"dca_Signal_Combined";
959 TH1F* hist_dca_Signal_Combined =
new TH1F(name_dca_Signal_Combined.Data(),
"dca_Signal_Combined; DCA [cm]; Entries",1000,0,1.0);
960 hist_dca_Signal_Combined->Sumw2();
961 hist_dca_Signal_Combined->SetLineColor(4);
962 hist_dca_Signal_Combined->SetMarkerStyle(20);
963 hist_dca_Signal_Combined->SetMarkerSize(0.6);
964 hist_dca_Signal_Combined->SetMarkerColor(4);
965 TH1F* histogram_dca_Signal_Combined = (TH1F*)hist_dca_Signal_Combined->Clone();
970 TString name_B0s_in_analysis =
"B0s_in_analysis";
971 TH1F* hist_B0s_in_analysis =
new TH1F(name_B0s_in_analysis.Data(),
"Number of B0 to kpipipi in the Analysis; Entries",10,0,10);
972 hist_B0s_in_analysis->Sumw2();
973 hist_B0s_in_analysis->SetLineColor(6);
974 hist_B0s_in_analysis->SetMarkerStyle(20);
975 hist_B0s_in_analysis->SetMarkerSize(0.6);
976 hist_B0s_in_analysis->SetMarkerColor(6);
977 hist_B0s_in_analysis->SetStats(kTRUE);
978 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(1,
"no. of B0s");
979 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(2,
"no. of B0s to kpipipi");
980 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(3,
"no. with all tracks in event");
981 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(4,
"no. ...");
982 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(5,
"no. ...");
983 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(6,
"no. ...");
984 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(7,
"no. ...");
985 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(8,
"no. ...");
986 TH1F* hist_B0s_in_analysis_mc = (TH1F*)hist_B0s_in_analysis->Clone();
989 TString name_B0s_per_bin =
"B0s_per_bin";
990 TH1F* hist_B0s_per_bin =
new TH1F(name_B0s_per_bin.Data(),
"Number of B0 to kpipipi in the Analysis per bin; Entries",
fnPtBins,0,
fnPtBins);
997 hist_B0s_per_bin->GetXaxis()->SetBinLabel(i+1,bin_name);
999 TH1F* hist_B0s_per_bin_mc = (TH1F*)hist_B0s_per_bin->Clone();
1002 TString name_B0s_per_bin_in_Acc =
"B0s_per_bin_in_Acc";
1003 TH1F* hist_B0s_per_bin_in_Acc =
new TH1F(name_B0s_per_bin_in_Acc.Data(),
"Number of B0 to kpipipi in the Analysis per bin with all daughters in acceptance; Entries",
fnPtBins,0,
fnPtBins);
1010 hist_B0s_per_bin_in_Acc->GetXaxis()->SetBinLabel(i+1,bin_name);
1012 TH1F* hist_B0s_per_bin_in_Acc_mc = (TH1F*)hist_B0s_per_bin_in_Acc->Clone();
1018 for (
Int_t i = 0; i < 4; i++){
1027 for (
Int_t j = 0; j < 6; j++){
1028 if(j==0) add_name =
"";
1029 if(j==1) add_name =
"Signal";
1030 if(j==2) add_name =
"Cut";
1031 if(j==3) add_name =
"SignalCut";
1032 if(j==4) add_name =
"Result";
1033 if(j==5) add_name =
"SignalResult";
1036 TString discription_Histogram =
"";
1037 Int_t numberOfBins = 0;
1041 for (
Int_t k = 0; k < 9; ++k)
1043 if(k==0){name_Histogram =
"ptTrack"; discription_Histogram =
"pt track; p_{T} [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
1044 if(k==1){name_Histogram =
"momentumTrack"; discription_Histogram =
"momentum track; p [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
1045 if(k==2){name_Histogram =
"numberOfITS"; discription_Histogram =
"Number of ITS clusters track; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
1046 if(k==3){name_Histogram =
"numberOfTPC"; discription_Histogram =
"Number of TPC clusters track; [#]; Entries"; numberOfBins = 601; lowerBound = -0.5; upperBound = 600.5;}
1047 if(k==4){name_Histogram =
"pointsOnITS"; discription_Histogram =
"Number of ITS clusters track per layer; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
1048 if(k==5){name_Histogram =
"nSigmaTPC"; discription_Histogram =
"n sigma TPC for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1049 if(k==6){name_Histogram =
"nSigmaTOF"; discription_Histogram =
"n sigma TOF for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1050 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;}
1051 if(k==8){name_Histogram =
"impactParameter"; discription_Histogram =
"Impact Parameter track; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1053 name_Histogram += add_name;
1054 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1056 if(j%2==0) histogram->SetLineColor(6);
1057 if(j%2==1) histogram->SetLineColor(4);
1058 histogram->SetMarkerStyle(20);
1059 histogram->SetMarkerSize(0.6);
1060 if(j%2==0) histogram->SetMarkerColor(6);
1061 if(j%2==1) histogram->SetMarkerColor(4);
1062 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1063 listout->Add(histogram_Clone);
1067 TString numberofparticlesperevent=
"numberofparticlesperevent";
1068 numberofparticlesperevent += add_name;
1069 TH1F* hist_numberofparticlesperevent =
new TH1F(numberofparticlesperevent.Data(),
"Number of particles per event; number of particles in one event; Entries",100,0,100);
1070 hist_numberofparticlesperevent->Sumw2();
1071 hist_numberofparticlesperevent->SetLineColor(6);
1072 hist_numberofparticlesperevent->SetMarkerStyle(20);
1073 hist_numberofparticlesperevent->SetMarkerSize(0.6);
1074 hist_numberofparticlesperevent->SetMarkerColor(6);
1075 TH1F* histogram_numberofparticlesperevent = (TH1F*)hist_numberofparticlesperevent->Clone();
1076 listout->Add(histogram_numberofparticlesperevent);
1080 TH1F * effectOfCuts =
new TH1F(
"effectOfCutsOnBackground",
"Removal counter",18,0,18);
1081 effectOfCuts->SetStats(kTRUE);
1082 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1083 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1084 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1085 effectOfCuts->GetXaxis()->SetBinLabel(2,
"1");
1086 effectOfCuts->GetXaxis()->SetBinLabel(3,
"2");
1087 effectOfCuts->GetXaxis()->SetBinLabel(4,
"3");
1088 effectOfCuts->GetXaxis()->SetBinLabel(5,
"4");
1089 effectOfCuts->GetXaxis()->SetBinLabel(6,
"5");
1090 effectOfCuts->GetXaxis()->SetBinLabel(7,
"6");
1091 effectOfCuts->GetXaxis()->SetBinLabel(8,
"7");
1092 effectOfCuts->GetXaxis()->SetBinLabel(9,
"8");
1093 effectOfCuts->GetXaxis()->SetBinLabel(10,
"9");
1094 effectOfCuts->GetXaxis()->SetBinLabel(11,
"10");
1095 effectOfCuts->GetXaxis()->SetBinLabel(12,
"11");
1096 effectOfCuts->GetXaxis()->SetBinLabel(13,
"12");
1097 effectOfCuts->GetXaxis()->SetBinLabel(14,
"13");
1098 effectOfCuts->GetXaxis()->SetBinLabel(15,
"14");
1099 effectOfCuts->GetXaxis()->SetBinLabel(16,
"15");
1100 effectOfCuts->GetXaxis()->SetBinLabel(17,
"16");
1101 effectOfCuts->GetXaxis()->SetBinLabel(18,
"17");
1102 listout->Add(effectOfCuts);
1105 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsOnSignal",
"Removal counter",18,0,18);
1106 effectOfCutsMC->SetStats(kTRUE);
1107 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1108 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1109 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1110 effectOfCutsMC->GetXaxis()->SetBinLabel(2,
"1");
1111 effectOfCutsMC->GetXaxis()->SetBinLabel(3,
"2");
1112 effectOfCutsMC->GetXaxis()->SetBinLabel(4,
"3");
1113 effectOfCutsMC->GetXaxis()->SetBinLabel(5,
"4");
1114 effectOfCutsMC->GetXaxis()->SetBinLabel(6,
"5");
1115 effectOfCutsMC->GetXaxis()->SetBinLabel(7,
"6");
1116 effectOfCutsMC->GetXaxis()->SetBinLabel(8,
"7");
1117 effectOfCutsMC->GetXaxis()->SetBinLabel(9,
"8");
1118 effectOfCutsMC->GetXaxis()->SetBinLabel(10,
"9");
1119 effectOfCutsMC->GetXaxis()->SetBinLabel(11,
"10");
1120 effectOfCutsMC->GetXaxis()->SetBinLabel(12,
"11");
1121 effectOfCutsMC->GetXaxis()->SetBinLabel(13,
"12");
1122 effectOfCutsMC->GetXaxis()->SetBinLabel(14,
"13");
1123 effectOfCutsMC->GetXaxis()->SetBinLabel(15,
"14");
1124 effectOfCutsMC->GetXaxis()->SetBinLabel(16,
"15");
1125 effectOfCutsMC->GetXaxis()->SetBinLabel(17,
"16");
1126 effectOfCutsMC->GetXaxis()->SetBinLabel(18,
"17");
1127 listout->Add(effectOfCutsMC);
1130 TString name_particle_pdg =
"particle_pdg";
1131 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1132 hist_particle_pdg->Sumw2();
1133 hist_particle_pdg->SetLineColor(6);
1134 hist_particle_pdg->SetMarkerStyle(20);
1135 hist_particle_pdg->SetMarkerSize(0.6);
1136 hist_particle_pdg->SetMarkerColor(6);
1137 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1138 listout->Add(histogram_particle_pdg);
1141 TString name_particle_mother_pdg =
"particle_mother_pdg";
1142 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1143 hist_particle_mother_pdg->Sumw2();
1144 hist_particle_mother_pdg->SetLineColor(6);
1145 hist_particle_mother_pdg->SetMarkerStyle(20);
1146 hist_particle_mother_pdg->SetMarkerSize(0.6);
1147 hist_particle_mother_pdg->SetMarkerColor(6);
1148 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1149 listout->Add(histogram_particle_mother_pdg);
1152 TString name_ptB0_vs_ptTrack =
"ptB0_vs_ptTrackBackground";
1153 TH2F* hist_ptB0_vs_ptTrack =
new TH2F(name_ptB0_vs_ptTrack.Data(),
"Pt B0 vs Pt ; p_{T} B0 [GeV/c]; p_{T} track [GeV/c]",100,0,30,100,0,30);
1154 hist_ptB0_vs_ptTrack->Sumw2();
1155 hist_ptB0_vs_ptTrack->SetLineColor(6);
1156 hist_ptB0_vs_ptTrack->SetMarkerStyle(20);
1157 hist_ptB0_vs_ptTrack->SetMarkerSize(0.6);
1158 hist_ptB0_vs_ptTrack->SetMarkerColor(6);
1159 TH2F* histogram_ptB0_vs_ptTrack = (
TH2F*)hist_ptB0_vs_ptTrack->Clone();
1160 listout->Add(histogram_ptB0_vs_ptTrack);
1163 TString name_ptB0_vs_ptTrackMC =
"ptB0_vs_ptTrackSignal";
1164 TH2F* hist_ptB0_vs_ptTrackMC =
new TH2F(name_ptB0_vs_ptTrackMC.Data(),
"Pt B0 vs Pt ; p_{T} B0 [GeV/c]; p_{T} track [GeV/c]",100,0,30,100,0,30);
1165 hist_ptB0_vs_ptTrackMC->Sumw2();
1166 hist_ptB0_vs_ptTrackMC->SetLineColor(4);
1167 hist_ptB0_vs_ptTrackMC->SetMarkerStyle(20);
1168 hist_ptB0_vs_ptTrackMC->SetMarkerSize(0.6);
1169 hist_ptB0_vs_ptTrackMC->SetMarkerColor(6);
1170 TH2F* histogram_ptB0_vs_ptTrackMC = (
TH2F*)hist_ptB0_vs_ptTrackMC->Clone();
1171 listout->Add(histogram_ptB0_vs_ptTrackMC);
1176 for (
Int_t i = 0; i < 6; i++){
1180 Int_t nHistogramSets = 0;
1188 for (
Int_t j = 0; j < nHistogramSets; j++){
1191 if(j==0) add_name =
"";
1192 if(j==1) add_name =
"Signal";
1193 if(j==2) add_name =
"Cut";
1194 if(j==3) add_name =
"SignalCut";
1195 if(j==4) add_name =
"Result";
1196 if(j==5) add_name =
"SignalResult";
1197 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];}
1198 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];}
1218 TString discription_Histogram =
"";
1219 Int_t numberOfBins = 0;
1222 Int_t numberOfBinsTwo = 0;
1226 for (
Int_t k = 0; k < 43; ++k)
1228 if(k==0){name_Histogram =
"ptMother"; discription_Histogram =
"pt mother; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1229 if(k==1){name_Histogram =
"ptFirstDaughter"; discription_Histogram =
"pt first daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1230 if(k==2){name_Histogram =
"ptSecondDaughter"; discription_Histogram =
"pt second daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1231 if(k==3){name_Histogram =
"etaMother"; discription_Histogram =
"eta mother; #eta; Entries"; numberOfBins = 100; lowerBound = -2; upperBound = 2;}
1232 if(k==4){name_Histogram =
"phiMother"; discription_Histogram =
"phi mother; #phi; Entries"; numberOfBins = 25; lowerBound = 0; upperBound = 2*TMath::Pi();}
1233 if(k==5){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1234 if(k==6){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1236 if(k==7){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1238 if(k==8){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle; [Cos(#theta)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1239 if(k==9){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product; [cm^{2}]; Entries"; numberOfBins = 500; lowerBound = -0.01; upperBound = 0.01;}
1240 if(k==10){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY; [cm^{2}]; Entries"; numberOfBins = 400; lowerBound = 0; upperBound = 0.1;}
1241 if(k==11){name_Histogram =
"invariantMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 20000; lowerBound = 0; upperBound = 10;}
1242 if(k==12){name_Histogram =
"deltaMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1243 if(k==13){name_Histogram =
"dcaMother"; discription_Histogram =
"dca mother; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 0.25;}
1244 if(k==14){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1245 if(k==15){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1246 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;}
1247 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;}
1248 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;}
1249 if(k==19){name_Histogram =
"angleMotherFirstDaughter"; discription_Histogram =
"flight angle mother and first daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1250 if(k==20){name_Histogram =
"angleMotherSecondDaughter"; discription_Histogram =
"flight angle mother and second daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = 0.5; upperBound = 1;}
1251 if(k==21){name_Histogram =
"angleBetweenBothDaughters"; discription_Histogram =
"angle between both daughters; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1252 if(k==22){name_Histogram =
"cosThetaStar"; discription_Histogram =
"cosThetaStar; [Cos(#theta*)]; Entries"; numberOfBins = 200; lowerBound = -2; upperBound = 2;}
1253 if(k==23){name_Histogram =
"vertexX"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1254 if(k==24){name_Histogram =
"vertexY"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1255 if(k==25){name_Histogram =
"vertexZ"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -20; upperBound = 20;}
1258 if(k==26){
if(i==0 || i==3 || i==4){name_Histogram =
"pointingAngleToDStar"; discription_Histogram =
"Pointing angle w.r.t. DStar decay vertex; [Cos(#theta)]; Entries"; numberOfBins = 200; lowerBound = -1; upperBound = 1;}
1260 if(k==27){
if(i==0 || i==3 || i==4){name_Histogram =
"d0MotherToDStar"; discription_Histogram =
"d0 Mother w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1262 if(k==28){
if(i==0 || i==3 || i==4){name_Histogram =
"d0FirstDaughterToDStar"; discription_Histogram =
"d0 first daughter w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1264 if(k==29){
if(i==0 || i==3 || i==4){name_Histogram =
"d0SecondDaughterToDStar"; discription_Histogram =
"d0 second daughter w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1266 if(k==30){
if(i==0 || i==3 || i==4){name_Histogram =
"impactProductToDStar"; discription_Histogram =
"impact product w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = -0.02; upperBound = 0.02;}
1268 if(k==31){
if(i==0 || i==3 || i==4){name_Histogram =
"impactProductXYToDStar"; discription_Histogram =
"impact product XY w.r.t. DStar decay vertex; [cm^{2}]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.5;}
1270 if(k==32){
if(i==0 || i==3 || i==4){name_Histogram =
"normDecayLengthToDStar"; discription_Histogram =
"Normalized decay length w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1272 if(k==33){
if(i==0 || i==3 || i==4){name_Histogram =
"pseudoProperDecayTimeToDStar"; discription_Histogram =
"Pseudo Proper Decay Time w.r.t DStar vertex; [a.u.]; Entries"; numberOfBins = 1000; lowerBound = -1; upperBound = 1;}
1274 if(k==34){
if(i==0 || i==3 || i==4){name_Histogram =
"DecayTimeToDStar"; discription_Histogram =
"Decay Time w.r.t DStar vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.00000001;}
1276 if(k==35){
if(i==0 || i==3 || i==4){name_Histogram =
"normDecayTimeToDStar"; discription_Histogram =
"Normalized Decay Time w.r.t DStar vertex; [a.u.]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 0.00001;}
1279 if(k==36){name_Histogram =
"topomaticFirstDaughter"; discription_Histogram =
"topomatic d0 first daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1280 if(k==37){name_Histogram =
"topomaticSecondDaughter"; discription_Histogram =
"topomatic d0 second daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1281 if(k==38){name_Histogram =
"topomaticMax"; discription_Histogram =
"Max topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1282 if(k==39){name_Histogram =
"topomaticMin"; discription_Histogram =
"Min topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1283 if(k==40){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY; [Cos(#theta)]; Entries"; numberOfBins = 1000; lowerBound = -1; upperBound = 1;}
1284 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;}
1285 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;}
1288 name_Histogram += add_name;
1289 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1291 if(j%2==0) histogram->SetLineColor(6);
1292 if(j%2==1) histogram->SetLineColor(4);
1293 histogram->SetMarkerStyle(20);
1294 histogram->SetMarkerSize(0.6);
1295 if(j%2==0) histogram->SetMarkerColor(6);
1296 if(j%2==1) histogram->SetMarkerColor(4);
1297 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1298 listout->Add(histogram_Clone);
1303 name_Histogram =
"";
1304 discription_Histogram =
"";
1308 numberOfBinsTwo = 0;
1309 lowerBoundTwo = 0.0;
1310 upperBoundTwo = 0.0;
1315 Int_t nVariables = 10;
1316 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
1320 TString name2D =
"2D_Histograms";
1322 list2D->SetName(name2D.Data());
1323 listout->Add(list2D);
1325 for (
Int_t k = 0; k < nHistograms; ++k)
1327 numberOfBins = 50; numberOfBinsTwo = 50;
1328 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1329 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1330 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1331 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1332 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1333 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1334 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1335 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1336 if(nFirst==8){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1337 if(nFirst==9){name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY [cm];"; lowerBound = 0; upperBound = 1;}
1338 if(nFirst==10){name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBound = 0; upperBound = 50;}
1340 if(nSecond==0){name_Histogram +=
"d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1341 if(nSecond==1){name_Histogram +=
"d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1342 if(nSecond==2){name_Histogram +=
"d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1343 if(nSecond==3){name_Histogram +=
"pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1344 if(nSecond==4){name_Histogram +=
"impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1345 if(nSecond==5){name_Histogram +=
"impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1346 if(nSecond==6){name_Histogram +=
"vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1347 if(nSecond==7){name_Histogram +=
"normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1348 if(nSecond==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1349 if(nSecond==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1350 if(nSecond==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1352 name_Histogram += add_name;
1353 TH2F* histogram =
new TH2F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo);
1355 if(j%2==0) histogram->SetLineColor(6);
1356 if(j%2==1) histogram->SetLineColor(4);
1357 histogram->SetMarkerStyle(20);
1358 histogram->SetMarkerSize(0.6);
1359 histogram->SetMarkerColor(6);
1360 TH2F* histogram_Clone = (
TH2F*)histogram->Clone();
1361 list2D->Add(histogram_Clone);
1365 if(nSecond>nVariables)
1368 nSecond = nFirst + 1;
1374 name_Histogram =
"";
1375 discription_Histogram =
"";
1379 numberOfBinsTwo = 0;
1380 lowerBoundTwo = 0.0;
1381 upperBoundTwo = 0.0;
1382 Int_t numberOfBinsThree = 0;
1383 Int_t lowerBoundThree = 0.0;
1384 Int_t upperBoundThree = 0.0;
1391 nHistograms = nVariables * (nVariables - 1) * (nVariables - 2) / 6;
1395 TString name3D =
"3D_Histograms";
1397 list3D->SetName(name2D.Data());
1398 listout->Add(list3D);
1400 for (
Int_t k = 0; k < nHistograms; ++k)
1402 numberOfBins = 50; numberOfBinsTwo = 50;
1403 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1404 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1405 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1406 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1407 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1408 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1409 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1410 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1411 if(nFirst==8){name_Histogram =
"pointingAngleMotherXY"; discription_Histogram =
"pointing angle XY [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1412 if(nFirst==9){name_Histogram =
"vertexDistanceXY"; discription_Histogram =
"vertex distance between mother and primary vertex XY [cm];"; lowerBound = 0; upperBound = 1;}
1413 if(nFirst==10){name_Histogram =
"normDecayLengthXY"; discription_Histogram =
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBound = 0; upperBound = 50;}
1415 if(nSecond==0){name_Histogram +=
"_d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1416 if(nSecond==1){name_Histogram +=
"_d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1417 if(nSecond==2){name_Histogram +=
"_d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1418 if(nSecond==3){name_Histogram +=
"_pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1419 if(nSecond==4){name_Histogram +=
"_impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1420 if(nSecond==5){name_Histogram +=
"_impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1421 if(nSecond==6){name_Histogram +=
"_vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1422 if(nSecond==7){name_Histogram +=
"_normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1423 if(nSecond==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1424 if(nSecond==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1425 if(nSecond==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1427 if(nThird==0){name_Histogram +=
"_d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1428 if(nThird==1){name_Histogram +=
"_d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1429 if(nThird==2){name_Histogram +=
"_d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1430 if(nThird==3){name_Histogram +=
"_pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundThree = -1; upperBoundThree = 1;}
1431 if(nThird==4){name_Histogram +=
"_impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundThree = -0.01; upperBoundThree = 0.01;}
1432 if(nThird==5){name_Histogram +=
"_impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundThree = 0; upperBoundThree = 0.5;}
1433 if(nThird==6){name_Histogram +=
"_vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1434 if(nThird==7){name_Histogram +=
"_normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundThree = 0; upperBoundThree = 50;}
1435 if(nThird==8){name_Histogram +=
"_pointingAngleMotherXY"; discription_Histogram +=
"pointing angle XY [Cos(#theta)];"; lowerBoundThree = -1; upperBoundThree = 1;}
1436 if(nThird==9){name_Histogram +=
"_vertexDistanceXY"; discription_Histogram +=
"vertex distance between mother and primary vertex XY [cm];"; lowerBoundThree = 0; upperBoundThree = 1;}
1437 if(nThird==10){name_Histogram +=
"_normDecayLengthXY"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex XY [cm];"; lowerBoundThree = 0; upperBoundThree = 50;}
1440 name_Histogram += add_name;
1441 TH3F* histogram3D =
new TH3F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo,numberOfBinsThree,lowerBoundThree,upperBoundThree);
1442 histogram3D->Sumw2();
1443 if(j%2==0) histogram3D->SetLineColor(6);
1444 if(j%2==1) histogram3D->SetLineColor(4);
1445 histogram3D->SetMarkerStyle(20);
1446 histogram3D->SetMarkerSize(0.6);
1447 histogram3D->SetMarkerColor(6);
1448 TH3F* histogram_Clone3D = (
TH3F*)histogram3D->Clone();
1449 list3D->Add(histogram_Clone3D);
1454 if(nThird>nVariables)
1457 nThird = nSecond + 1;
1458 if(nSecond>nVariables)
1461 nSecond = nFirst + 1;
1462 nThird = nFirst + 2;
1470 TH1F * effectOfCuts =
new TH1F(
"effectOfCuts",
"Removal counter",100,0,100);
1471 effectOfCuts->SetStats(kTRUE);
1472 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1473 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1474 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1475 for (
Int_t i = 1; i < 100; ++i)
1479 effectOfCuts->GetXaxis()->SetBinLabel(i+1,integerText);
1481 listout->Add(effectOfCuts);
1484 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsMC",
"Removal counter",100,0,100);
1485 effectOfCutsMC->SetStats(kTRUE);
1486 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1487 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1488 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1489 for (
Int_t i = 1; i < 100; ++i)
1493 effectOfCutsMC->GetXaxis()->SetBinLabel(i+1,integerText);
1495 listout->Add(effectOfCutsMC);
1498 TString name_particle_pdg =
"particle_pdg";
1499 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1500 hist_particle_pdg->Sumw2();
1501 hist_particle_pdg->SetLineColor(6);
1502 hist_particle_pdg->SetMarkerStyle(20);
1503 hist_particle_pdg->SetMarkerSize(0.6);
1504 hist_particle_pdg->SetMarkerColor(6);
1505 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1506 listout->Add(histogram_particle_pdg);
1509 TString name_particle_mother_pdg =
"particle_mother_pdg";
1510 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1511 hist_particle_mother_pdg->Sumw2();
1512 hist_particle_mother_pdg->SetLineColor(6);
1513 hist_particle_mother_pdg->SetMarkerStyle(20);
1514 hist_particle_mother_pdg->SetMarkerSize(0.6);
1515 hist_particle_mother_pdg->SetMarkerColor(6);
1516 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1517 listout->Add(histogram_particle_mother_pdg);
1520 TString name_distance_vertex_from_real =
"distance_vertex_from_real";
1521 TH1F* hist_distance_vertex_from_real =
new TH1F(name_distance_vertex_from_real.Data(),
"Distance reconstructed vertex from real vertex; distance [cm]; Entries",100,0,1);
1522 hist_distance_vertex_from_real->Sumw2();
1523 hist_distance_vertex_from_real->SetLineColor(6);
1524 hist_distance_vertex_from_real->SetMarkerStyle(20);
1525 hist_distance_vertex_from_real->SetMarkerSize(0.6);
1526 hist_distance_vertex_from_real->SetMarkerColor(6);
1527 TH1F* histogram_distance_vertex_from_real = (TH1F*)hist_distance_vertex_from_real->Clone();
1528 listout->Add(histogram_distance_vertex_from_real);
1531 TString name_distance_vertex_from_real_new =
"distance_vertex_from_real_new";
1532 TH1F* hist_distance_vertex_from_real_new =
new TH1F(name_distance_vertex_from_real_new.Data(),
"Distance reconstructed vertex from real vertex; distance [cm]; Entries",100,0,1);
1533 hist_distance_vertex_from_real_new->Sumw2();
1534 hist_distance_vertex_from_real_new->SetLineColor(6);
1535 hist_distance_vertex_from_real_new->SetMarkerStyle(20);
1536 hist_distance_vertex_from_real_new->SetMarkerSize(0.6);
1537 hist_distance_vertex_from_real_new->SetMarkerColor(6);
1538 TH1F* histogram_distance_vertex_from_real_new = (TH1F*)hist_distance_vertex_from_real_new->Clone();
1539 listout->Add(histogram_distance_vertex_from_real_new);
1542 TString name_momentum_resolution =
"momentum_resolution";
1543 TH1F* hist_momentum_resolution =
new TH1F(name_momentum_resolution.Data(),
"Momentum resolution; difference between real and reconstructed momentum [GeV/c]; Entries",1000,0,1);
1544 hist_momentum_resolution->Sumw2();
1545 hist_momentum_resolution->SetLineColor(6);
1546 hist_momentum_resolution->SetMarkerStyle(20);
1547 hist_momentum_resolution->SetMarkerSize(0.6);
1548 hist_momentum_resolution->SetMarkerColor(6);
1549 TH1F* histogram_momentum_resolution = (TH1F*)hist_momentum_resolution->Clone();
1550 listout->Add(histogram_momentum_resolution);
1555 for (
Int_t k = 0; k < fnPtBins+3; ++k){
1557 if(k==0) ptBinMother =
"";
1558 if(k==1) ptBinMother =
"_ptbin_6_to_inf";
1559 if(k==2) ptBinMother =
"_ptbin_3_to_inf";
1560 if(k>2) {ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[k-3]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[k-2];}
1562 for (
Int_t i = 0; i < 8; ++i){
1564 if(i==0) signName =
"";
1565 if(i==1) signName =
"_SameSign";
1566 if(i==2) signName =
"_SignSum";
1567 if(i==3) signName =
"_HIJING_Background";
1568 if(i==4) signName =
"_HIJING_Signal";
1569 if(i==5) signName =
"_Background_rotation";
1570 if(i==6) signName =
"_HIJING_Background_rotation";
1571 if(i==7) signName =
"_correlated511";
1572 TString name_invariantMassMother =
"invariantMassB0";
1573 name_invariantMassMother += ptBinMother + signName;
1574 TH1F* hist_invariantMassMother =
new TH1F(name_invariantMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1575 hist_invariantMassMother->Sumw2();
1576 hist_invariantMassMother->SetLineColor(6);
1577 hist_invariantMassMother->SetMarkerStyle(20);
1578 hist_invariantMassMother->SetMarkerSize(0.6);
1579 hist_invariantMassMother->SetMarkerColor(6);
1580 TH1F* histogram_invariantMassMother = (TH1F*)hist_invariantMassMother->Clone();
1583 TString name_deltainvariantMassMother =
"deltainvariantMassB0";
1584 name_deltainvariantMassMother += ptBinMother + signName;
1585 TH1F* hist_deltainvariantMassMother =
new TH1F(name_deltainvariantMassMother.Data(),
"delta mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1586 hist_deltainvariantMassMother->Sumw2();
1587 hist_deltainvariantMassMother->SetLineColor(6);
1588 hist_deltainvariantMassMother->SetMarkerStyle(20);
1589 hist_deltainvariantMassMother->SetMarkerSize(0.6);
1590 hist_deltainvariantMassMother->SetMarkerColor(6);
1591 TH1F* histogram_deltainvariantMassMother = (TH1F*)hist_deltainvariantMassMother->Clone();
1592 fOutputB0MC->Add(histogram_deltainvariantMassMother);
1596 for (
Int_t k = 0; k < fnPtBins+3; ++k){
1598 if(k==0) ptBinMother =
"";
1599 if(k==1) ptBinMother =
"_ptbin_6_to_inf";
1600 if(k==2) ptBinMother =
"_ptbin_3_to_inf";
1601 if(k>2) {ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[k-3]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[k-2];}
1603 for (
Int_t i = 0; i < 7; ++i){
1605 if(i==0) signName =
"";
1606 if(i==1) signName =
"_SameSign";
1607 if(i==2) signName =
"_SignSum";
1608 if(i==3) signName =
"_HIJING_Background";
1609 if(i==4) signName =
"_HIJING_Signal";
1610 if(i==5) signName =
"_Background_rotation";
1611 if(i==6) signName =
"_HIJING_Background_rotation";
1613 TString name_invariantMassMother =
"fineBin_invariantMassB0";
1614 name_invariantMassMother += ptBinMother + signName;
1615 TH1F* hist_invariantMassMother =
new TH1F(name_invariantMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",10000,2.5,7.5);
1616 hist_invariantMassMother->Sumw2();
1617 hist_invariantMassMother->SetLineColor(6);
1618 hist_invariantMassMother->SetMarkerStyle(20);
1619 hist_invariantMassMother->SetMarkerSize(0.6);
1620 hist_invariantMassMother->SetMarkerColor(6);
1621 TH1F* histogram_invariantMassMother = (TH1F*)hist_invariantMassMother->Clone();
1624 TString name_deltainvariantMassMother =
"fineBin_deltainvariantMassB0";
1625 name_deltainvariantMassMother += ptBinMother + signName;
1626 TH1F* hist_deltainvariantMassMother =
new TH1F(name_deltainvariantMassMother.Data(),
"delta mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1627 hist_deltainvariantMassMother->Sumw2();
1628 hist_deltainvariantMassMother->SetLineColor(6);
1629 hist_deltainvariantMassMother->SetMarkerStyle(20);
1630 hist_deltainvariantMassMother->SetMarkerSize(0.6);
1631 hist_deltainvariantMassMother->SetMarkerColor(6);
1632 TH1F* histogram_deltainvariantMassMother = (TH1F*)hist_deltainvariantMassMother->Clone();
1633 fOutputB0MC->Add(histogram_deltainvariantMassMother);
1637 TString name_cutEffectBackground =
"cutEffectBackground";
1638 TH2I* hist_cutEffectBackground =
new TH2I(name_cutEffectBackground.Data(),
"Effect of Cuts on background; cut number; cut number",99,0,99,99,0,99);
1639 for (
int i = 0; i < 99; ++i)
1643 hist_cutEffectBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1644 hist_cutEffectBackground->GetYaxis()->SetBinLabel(i+1,integerText);
1646 TH2I* histogram_cutEffectBackground = (TH2I*)hist_cutEffectBackground->Clone();
1649 TString name_cutEffectSignal =
"cutEffectSignal";
1650 TH2I* hist_cutEffectSignal =
new TH2I(name_cutEffectSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99,99,0,99);
1651 for (
Int_t i = 0; i < 99; ++i)
1655 hist_cutEffectSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1656 hist_cutEffectSignal->GetYaxis()->SetBinLabel(i+1,integerText);
1658 TH2I* histogram_cutEffectSignal = (TH2I*)hist_cutEffectSignal->Clone();
1661 TString name_cutEffectUniqueBackground =
"cutEffectUniqueBackground";
1662 TH1I* hist_cutEffectUniqueBackground =
new TH1I(name_cutEffectUniqueBackground.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1663 for (
Int_t i = 0; i < 99; ++i)
1667 hist_cutEffectUniqueBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1669 TH1I* histogram_cutEffectUniqueBackground = (
TH1I*)hist_cutEffectUniqueBackground->Clone();
1670 fOutputB0MC->Add(histogram_cutEffectUniqueBackground);
1672 TString name_cutEffectUniqueSignal =
"cutEffectUniqueSignal";
1673 TH1I* hist_cutEffectUniqueSignal =
new TH1I(name_cutEffectUniqueSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1674 for (
Int_t i = 0; i < 99; ++i)
1678 hist_cutEffectUniqueSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1680 TH1I* histogram_cutEffectUniqueSignal = (
TH1I*)hist_cutEffectUniqueSignal->Clone();
1681 fOutputB0MC->Add(histogram_cutEffectUniqueSignal);
1683 TString name_totalITSBackground =
"totalITSBackground";
1684 TH1F* hist_totalITSBackground =
new TH1F(name_totalITSBackground.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1685 hist_totalITSBackground->Sumw2();
1686 hist_totalITSBackground->SetLineColor(6);
1687 hist_totalITSBackground->SetMarkerStyle(20);
1688 hist_totalITSBackground->SetMarkerSize(0.6);
1689 hist_totalITSBackground->SetMarkerColor(6);
1690 TH1F* histogram_totalITSBackground = (TH1F*)hist_totalITSBackground->Clone();
1693 TString name_totalITSSignal =
"totalITSSignal";
1694 TH1F* hist_totalITSSignal =
new TH1F(name_totalITSSignal.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1695 hist_totalITSSignal->Sumw2();
1696 hist_totalITSSignal->SetLineColor(6);
1697 hist_totalITSSignal->SetMarkerStyle(20);
1698 hist_totalITSSignal->SetMarkerSize(0.6);
1699 hist_totalITSSignal->SetMarkerColor(6);
1700 TH1F* histogram_totalITSSignal = (TH1F*)hist_totalITSSignal->Clone();
1703 TString name_totalTPCBackground =
"totalTPCBackground";
1704 TH1F* hist_totalTPCBackground =
new TH1F(name_totalTPCBackground.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1705 hist_totalTPCBackground->Sumw2();
1706 hist_totalTPCBackground->SetLineColor(6);
1707 hist_totalTPCBackground->SetMarkerStyle(20);
1708 hist_totalTPCBackground->SetMarkerSize(0.6);
1709 hist_totalTPCBackground->SetMarkerColor(6);
1710 TH1F* histogram_totalTPCBackground = (TH1F*)hist_totalTPCBackground->Clone();
1713 TString name_totalTPCSignal =
"totalTPCSignal";
1714 TH1F* hist_totalTPCSignal =
new TH1F(name_totalTPCSignal.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1715 hist_totalTPCSignal->Sumw2();
1716 hist_totalTPCSignal->SetLineColor(6);
1717 hist_totalTPCSignal->SetMarkerStyle(20);
1718 hist_totalTPCSignal->SetMarkerSize(0.6);
1719 hist_totalTPCSignal->SetMarkerColor(6);
1720 TH1F* histogram_totalTPCSignal = (TH1F*)hist_totalTPCSignal->Clone();
1723 TString name_totalSigmaPIDBackground =
"totalSigmaPIDBackground";
1724 TH1F* hist_totalSigmaPIDBackground =
new TH1F(name_totalSigmaPIDBackground.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1725 hist_totalSigmaPIDBackground->Sumw2();
1726 hist_totalSigmaPIDBackground->SetLineColor(6);
1727 hist_totalSigmaPIDBackground->SetMarkerStyle(20);
1728 hist_totalSigmaPIDBackground->SetMarkerSize(0.6);
1729 hist_totalSigmaPIDBackground->SetMarkerColor(6);
1730 TH1F* histogram_totalSigmaPIDBackground = (TH1F*)hist_totalSigmaPIDBackground->Clone();
1731 fOutputB0MC->Add(histogram_totalSigmaPIDBackground);
1733 TString name_totalSigmaPIDSignal =
"totalSigmaPIDSignal";
1734 TH1F* hist_totalSigmaPIDSignal =
new TH1F(name_totalSigmaPIDSignal.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1735 hist_totalSigmaPIDSignal->Sumw2();
1736 hist_totalSigmaPIDSignal->SetLineColor(6);
1737 hist_totalSigmaPIDSignal->SetMarkerStyle(20);
1738 hist_totalSigmaPIDSignal->SetMarkerSize(0.6);
1739 hist_totalSigmaPIDSignal->SetMarkerColor(6);
1740 TH1F* histogram_totalSigmaPIDSignal = (TH1F*)hist_totalSigmaPIDSignal->Clone();
1743 TString name_particle_pdgB0Pion =
"particle_pdgB0Pion";
1744 TH2F* hist_particle_pdgB0Pion =
new TH2F(name_particle_pdgB0Pion.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1745 hist_particle_pdgB0Pion->Sumw2();
1746 hist_particle_pdgB0Pion->SetLineColor(6);
1747 hist_particle_pdgB0Pion->SetMarkerStyle(20);
1748 hist_particle_pdgB0Pion->SetMarkerSize(0.6);
1749 hist_particle_pdgB0Pion->SetMarkerColor(6);
1750 TH2F* histogram_particle_pdgB0Pion = (
TH2F*)hist_particle_pdgB0Pion->Clone();
1753 TString name_particle_pdgDStarPion =
"particle_pdgDStarPion";
1754 TH2F* hist_particle_pdgDStarPion =
new TH2F(name_particle_pdgDStarPion.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1755 hist_particle_pdgDStarPion->Sumw2();
1756 hist_particle_pdgDStarPion->SetLineColor(6);
1757 hist_particle_pdgDStarPion->SetMarkerStyle(20);
1758 hist_particle_pdgDStarPion->SetMarkerSize(0.6);
1759 hist_particle_pdgDStarPion->SetMarkerColor(6);
1760 TH2F* histogram_particle_pdgDStarPion = (
TH2F*)hist_particle_pdgDStarPion->Clone();
1761 fOutputB0MC->Add(histogram_particle_pdgDStarPion);
1763 TString name_particle_pdgD0First =
"particle_pdgD0First";
1764 TH2F* hist_particle_pdgD0First =
new TH2F(name_particle_pdgD0First.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1765 hist_particle_pdgD0First->Sumw2();
1766 hist_particle_pdgD0First->SetLineColor(6);
1767 hist_particle_pdgD0First->SetMarkerStyle(20);
1768 hist_particle_pdgD0First->SetMarkerSize(0.6);
1769 hist_particle_pdgD0First->SetMarkerColor(6);
1770 TH2F* histogram_particle_pdgD0First = (
TH2F*)hist_particle_pdgD0First->Clone();
1773 TString name_particle_pdgD0Second =
"particle_pdgD0Second";
1774 TH2F* hist_particle_pdgD0Second =
new TH2F(name_particle_pdgD0Second.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5,10,0,10);
1775 hist_particle_pdgD0Second->Sumw2();
1776 hist_particle_pdgD0Second->SetLineColor(6);
1777 hist_particle_pdgD0Second->SetMarkerStyle(20);
1778 hist_particle_pdgD0Second->SetMarkerSize(0.6);
1779 hist_particle_pdgD0Second->SetMarkerColor(6);
1780 TH2F* histogram_particle_pdgD0Second = (
TH2F*)hist_particle_pdgD0Second->Clone();
1783 TString name_particle_pdgAll =
"particle_pdgAll";
1784 TH1F* hist_particle_pdgAll =
new TH1F(name_particle_pdgAll.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1785 hist_particle_pdgAll->Sumw2();
1786 hist_particle_pdgAll->SetLineColor(6);
1787 hist_particle_pdgAll->SetMarkerStyle(20);
1788 hist_particle_pdgAll->SetMarkerSize(0.6);
1789 hist_particle_pdgAll->SetMarkerColor(6);
1790 TH1F* histogram_particle_pdgAll = (TH1F*)hist_particle_pdgAll->Clone();
1793 TString name_particle_pdgAllSecond =
"particle_pdgAllSecond";
1794 TH1F* hist_particle_pdgAllSecond =
new TH1F(name_particle_pdgAllSecond.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1795 hist_particle_pdgAllSecond->Sumw2();
1796 hist_particle_pdgAllSecond->SetLineColor(6);
1797 hist_particle_pdgAllSecond->SetMarkerStyle(20);
1798 hist_particle_pdgAllSecond->SetMarkerSize(0.6);
1799 hist_particle_pdgAllSecond->SetMarkerColor(6);
1800 TH1F* histogram_particle_pdgAllSecond = (TH1F*)hist_particle_pdgAllSecond->Clone();
1801 fOutputB0MC->Add(histogram_particle_pdgAllSecond);
1803 TString name_particle_pdgAllThird =
"particle_pdgAllThird";
1804 TH1F* hist_particle_pdgAllThird =
new TH1F(name_particle_pdgAllThird.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1805 hist_particle_pdgAllThird->Sumw2();
1806 hist_particle_pdgAllThird->SetLineColor(6);
1807 hist_particle_pdgAllThird->SetMarkerStyle(20);
1808 hist_particle_pdgAllThird->SetMarkerSize(0.6);
1809 hist_particle_pdgAllThird->SetMarkerColor(6);
1810 TH1F* histogram_particle_pdgAllThird = (TH1F*)hist_particle_pdgAllThird->Clone();
1813 TString name_particle_pdgAllFourth =
"particle_pdgAllFourth";
1814 TH1F* hist_particle_pdgAllFourth =
new TH1F(name_particle_pdgAllFourth.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1815 hist_particle_pdgAllFourth->Sumw2();
1816 hist_particle_pdgAllFourth->SetLineColor(6);
1817 hist_particle_pdgAllFourth->SetMarkerStyle(20);
1818 hist_particle_pdgAllFourth->SetMarkerSize(0.6);
1819 hist_particle_pdgAllFourth->SetMarkerColor(6);
1820 TH1F* histogram_particle_pdgAllFourth = (TH1F*)hist_particle_pdgAllFourth->Clone();
1821 fOutputB0MC->Add(histogram_particle_pdgAllFourth);
1823 TString name_particle_pdgAllFifth =
"particle_pdgAllFifth";
1824 TH1F* hist_particle_pdgAllFifth =
new TH1F(name_particle_pdgAllFifth.Data(),
"Pdg code particle; pdg code; Entries",5000,-0.5,4999.5);
1825 hist_particle_pdgAllFifth->Sumw2();
1826 hist_particle_pdgAllFifth->SetLineColor(6);
1827 hist_particle_pdgAllFifth->SetMarkerStyle(20);
1828 hist_particle_pdgAllFifth->SetMarkerSize(0.6);
1829 hist_particle_pdgAllFifth->SetMarkerColor(6);
1830 TH1F* histogram_particle_pdgAllFifth = (TH1F*)hist_particle_pdgAllFifth->Clone();
1833 TString name_particle_pdgAllInvMass =
"particle_pdgAllInvMass";
1834 TH2F* hist_particle_pdgAllInvMass =
new TH2F(name_particle_pdgAllInvMass.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1835 hist_particle_pdgAllInvMass->Sumw2();
1836 hist_particle_pdgAllInvMass->SetLineColor(6);
1837 hist_particle_pdgAllInvMass->SetMarkerStyle(20);
1838 hist_particle_pdgAllInvMass->SetMarkerSize(0.6);
1839 hist_particle_pdgAllInvMass->SetMarkerColor(6);
1840 TH2F* histogram_particle_pdgAllInvMass = (
TH2F*)hist_particle_pdgAllInvMass->Clone();
1841 fOutputB0MC->Add(histogram_particle_pdgAllInvMass);
1843 TString name_particle_pdgAllInvMassSecond =
"particle_pdgAllInvMassSecond";
1844 TH2F* hist_particle_pdgAllInvMassSecond =
new TH2F(name_particle_pdgAllInvMassSecond.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1845 hist_particle_pdgAllInvMassSecond->Sumw2();
1846 hist_particle_pdgAllInvMassSecond->SetLineColor(6);
1847 hist_particle_pdgAllInvMassSecond->SetMarkerStyle(20);
1848 hist_particle_pdgAllInvMassSecond->SetMarkerSize(0.6);
1849 hist_particle_pdgAllInvMassSecond->SetMarkerColor(6);
1850 TH2F* histogram_particle_pdgAllInvMassSecond = (
TH2F*)hist_particle_pdgAllInvMassSecond->Clone();
1851 fOutputB0MC->Add(histogram_particle_pdgAllInvMassSecond);
1853 TString name_particle_pdgAllInvMassThird =
"particle_pdgAllInvMassThird";
1854 TH2F* hist_particle_pdgAllInvMassThird =
new TH2F(name_particle_pdgAllInvMassThird.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1855 hist_particle_pdgAllInvMassThird->Sumw2();
1856 hist_particle_pdgAllInvMassThird->SetLineColor(6);
1857 hist_particle_pdgAllInvMassThird->SetMarkerStyle(20);
1858 hist_particle_pdgAllInvMassThird->SetMarkerSize(0.6);
1859 hist_particle_pdgAllInvMassThird->SetMarkerColor(6);
1860 TH2F* histogram_particle_pdgAllInvMassThird = (
TH2F*)hist_particle_pdgAllInvMassThird->Clone();
1861 fOutputB0MC->Add(histogram_particle_pdgAllInvMassThird);
1863 TString name_particle_pdgAllInvMassFourth =
"particle_pdgAllInvMassFourth";
1864 TH2F* hist_particle_pdgAllInvMassFourth =
new TH2F(name_particle_pdgAllInvMassFourth.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1865 hist_particle_pdgAllInvMassFourth->Sumw2();
1866 hist_particle_pdgAllInvMassFourth->SetLineColor(6);
1867 hist_particle_pdgAllInvMassFourth->SetMarkerStyle(20);
1868 hist_particle_pdgAllInvMassFourth->SetMarkerSize(0.6);
1869 hist_particle_pdgAllInvMassFourth->SetMarkerColor(6);
1870 TH2F* histogram_particle_pdgAllInvMassFourth = (
TH2F*)hist_particle_pdgAllInvMassFourth->Clone();
1871 fOutputB0MC->Add(histogram_particle_pdgAllInvMassFourth);
1873 TString name_particle_pdgAllInvMassFifth =
"particle_pdgAllInvMassFifth";
1874 TH2F* hist_particle_pdgAllInvMassFifth =
new TH2F(name_particle_pdgAllInvMassFifth.Data(),
"Pdg code particle; pdg code; B0 candidate Inv. Mass",5000,-0.5,4999.5,500,4.0,6.0);
1875 hist_particle_pdgAllInvMassFifth->Sumw2();
1876 hist_particle_pdgAllInvMassFifth->SetLineColor(6);
1877 hist_particle_pdgAllInvMassFifth->SetMarkerStyle(20);
1878 hist_particle_pdgAllInvMassFifth->SetMarkerSize(0.6);
1879 hist_particle_pdgAllInvMassFifth->SetMarkerColor(6);
1880 TH2F* histogram_particle_pdgAllInvMassFifth = (
TH2F*)hist_particle_pdgAllInvMassFifth->Clone();
1881 fOutputB0MC->Add(histogram_particle_pdgAllInvMassFifth);
1883 TString name_particle_daughterPdgOneStep511a =
"particle_daughterPdgOneStep511a";
1884 TH2F* hist_particle_daughterPdgOneStep511a =
new TH2F(name_particle_daughterPdgOneStep511a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1885 hist_particle_daughterPdgOneStep511a->Sumw2();
1886 hist_particle_daughterPdgOneStep511a->SetLineColor(6);
1887 hist_particle_daughterPdgOneStep511a->SetMarkerStyle(20);
1888 hist_particle_daughterPdgOneStep511a->SetMarkerSize(0.6);
1889 hist_particle_daughterPdgOneStep511a->SetMarkerColor(6);
1890 TH2F* histogram_particle_daughterPdgOneStep511a = (
TH2F*)hist_particle_daughterPdgOneStep511a->Clone();
1891 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep511a);
1893 TString name_particle_daughterPdgOneStep521a =
"particle_daughterPdgOneStep521a";
1894 TH2F* hist_particle_daughterPdgOneStep521a =
new TH2F(name_particle_daughterPdgOneStep521a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1895 hist_particle_daughterPdgOneStep521a->Sumw2();
1896 hist_particle_daughterPdgOneStep521a->SetLineColor(6);
1897 hist_particle_daughterPdgOneStep521a->SetMarkerStyle(20);
1898 hist_particle_daughterPdgOneStep521a->SetMarkerSize(0.6);
1899 hist_particle_daughterPdgOneStep521a->SetMarkerColor(6);
1900 TH2F* histogram_particle_daughterPdgOneStep521a = (
TH2F*)hist_particle_daughterPdgOneStep521a->Clone();
1901 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep521a);
1903 TString name_particle_daughterPdgOneStep511b =
"particle_daughterPdgOneStep511b";
1904 TH2F* hist_particle_daughterPdgOneStep511b =
new TH2F(name_particle_daughterPdgOneStep511b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1905 hist_particle_daughterPdgOneStep511b->Sumw2();
1906 hist_particle_daughterPdgOneStep511b->SetLineColor(6);
1907 hist_particle_daughterPdgOneStep511b->SetMarkerStyle(20);
1908 hist_particle_daughterPdgOneStep511b->SetMarkerSize(0.6);
1909 hist_particle_daughterPdgOneStep511b->SetMarkerColor(6);
1910 TH2F* histogram_particle_daughterPdgOneStep511b = (
TH2F*)hist_particle_daughterPdgOneStep511b->Clone();
1911 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep511b);
1913 TString name_particle_daughterPdgOneStep521b =
"particle_daughterPdgOneStep521b";
1914 TH2F* hist_particle_daughterPdgOneStep521b =
new TH2F(name_particle_daughterPdgOneStep521b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1915 hist_particle_daughterPdgOneStep521b->Sumw2();
1916 hist_particle_daughterPdgOneStep521b->SetLineColor(6);
1917 hist_particle_daughterPdgOneStep521b->SetMarkerStyle(20);
1918 hist_particle_daughterPdgOneStep521b->SetMarkerSize(0.6);
1919 hist_particle_daughterPdgOneStep521b->SetMarkerColor(6);
1920 TH2F* histogram_particle_daughterPdgOneStep521b = (
TH2F*)hist_particle_daughterPdgOneStep521b->Clone();
1921 fOutputB0MC->Add(histogram_particle_daughterPdgOneStep521b);
1923 TString name_particle_daughterPdgTwoStep511a =
"particle_daughterPdgTwoStep511a";
1924 TH2F* hist_particle_daughterPdgTwoStep511a =
new TH2F(name_particle_daughterPdgTwoStep511a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1925 hist_particle_daughterPdgTwoStep511a->Sumw2();
1926 hist_particle_daughterPdgTwoStep511a->SetLineColor(6);
1927 hist_particle_daughterPdgTwoStep511a->SetMarkerStyle(20);
1928 hist_particle_daughterPdgTwoStep511a->SetMarkerSize(0.6);
1929 hist_particle_daughterPdgTwoStep511a->SetMarkerColor(6);
1930 TH2F* histogram_particle_daughterPdgTwoStep511a = (
TH2F*)hist_particle_daughterPdgTwoStep511a->Clone();
1931 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511a);
1933 TString name_particle_daughterPdgTwoStep521a =
"particle_daughterPdgTwoStep521a";
1934 TH2F* hist_particle_daughterPdgTwoStep521a =
new TH2F(name_particle_daughterPdgTwoStep521a.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1935 hist_particle_daughterPdgTwoStep521a->Sumw2();
1936 hist_particle_daughterPdgTwoStep521a->SetLineColor(6);
1937 hist_particle_daughterPdgTwoStep521a->SetMarkerStyle(20);
1938 hist_particle_daughterPdgTwoStep521a->SetMarkerSize(0.6);
1939 hist_particle_daughterPdgTwoStep521a->SetMarkerColor(6);
1940 TH2F* histogram_particle_daughterPdgTwoStep521a = (
TH2F*)hist_particle_daughterPdgTwoStep521a->Clone();
1941 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521a);
1943 TString name_particle_daughterPdgTwoStep511b =
"particle_daughterPdgTwoStep511b";
1944 TH2F* hist_particle_daughterPdgTwoStep511b =
new TH2F(name_particle_daughterPdgTwoStep511b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1945 hist_particle_daughterPdgTwoStep511b->Sumw2();
1946 hist_particle_daughterPdgTwoStep511b->SetLineColor(6);
1947 hist_particle_daughterPdgTwoStep511b->SetMarkerStyle(20);
1948 hist_particle_daughterPdgTwoStep511b->SetMarkerSize(0.6);
1949 hist_particle_daughterPdgTwoStep511b->SetMarkerColor(6);
1950 TH2F* histogram_particle_daughterPdgTwoStep511b = (
TH2F*)hist_particle_daughterPdgTwoStep511b->Clone();
1951 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511b);
1953 TString name_particle_daughterPdgTwoStep521b =
"particle_daughterPdgTwoStep521b";
1954 TH2F* hist_particle_daughterPdgTwoStep521b =
new TH2F(name_particle_daughterPdgTwoStep521b.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1955 hist_particle_daughterPdgTwoStep521b->Sumw2();
1956 hist_particle_daughterPdgTwoStep521b->SetLineColor(6);
1957 hist_particle_daughterPdgTwoStep521b->SetMarkerStyle(20);
1958 hist_particle_daughterPdgTwoStep521b->SetMarkerSize(0.6);
1959 hist_particle_daughterPdgTwoStep521b->SetMarkerColor(6);
1960 TH2F* histogram_particle_daughterPdgTwoStep521b = (
TH2F*)hist_particle_daughterPdgTwoStep521b->Clone();
1961 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521b);
1963 TString name_particle_daughterPdgTwoStep511c =
"particle_daughterPdgTwoStep511c";
1964 TH2F* hist_particle_daughterPdgTwoStep511c =
new TH2F(name_particle_daughterPdgTwoStep511c.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1965 hist_particle_daughterPdgTwoStep511c->Sumw2();
1966 hist_particle_daughterPdgTwoStep511c->SetLineColor(6);
1967 hist_particle_daughterPdgTwoStep511c->SetMarkerStyle(20);
1968 hist_particle_daughterPdgTwoStep511c->SetMarkerSize(0.6);
1969 hist_particle_daughterPdgTwoStep511c->SetMarkerColor(6);
1970 TH2F* histogram_particle_daughterPdgTwoStep511c = (
TH2F*)hist_particle_daughterPdgTwoStep511c->Clone();
1971 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep511c);
1973 TString name_particle_daughterPdgTwoStep521c =
"particle_daughterPdgTwoStep521c";
1974 TH2F* hist_particle_daughterPdgTwoStep521c =
new TH2F(name_particle_daughterPdgTwoStep521c.Data(),
"Pdg daughters; n daughter; Pdg daughter",50,-0.5,49.5,5000,-0.5,4999.5);
1975 hist_particle_daughterPdgTwoStep521c->Sumw2();
1976 hist_particle_daughterPdgTwoStep521c->SetLineColor(6);
1977 hist_particle_daughterPdgTwoStep521c->SetMarkerStyle(20);
1978 hist_particle_daughterPdgTwoStep521c->SetMarkerSize(0.6);
1979 hist_particle_daughterPdgTwoStep521c->SetMarkerColor(6);
1980 TH2F* histogram_particle_daughterPdgTwoStep521c = (
TH2F*)hist_particle_daughterPdgTwoStep521c->Clone();
1981 fOutputB0MC->Add(histogram_particle_daughterPdgTwoStep521c);
1983 TString name_invariantMassB0Signal_BA =
"invariantMassB0Signal_BA";
1984 TH1F* hist_invariantMassB0Signal_BA =
new TH1F(name_invariantMassB0Signal_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1985 hist_invariantMassB0Signal_BA->Sumw2();
1986 hist_invariantMassB0Signal_BA->SetLineColor(6);
1987 hist_invariantMassB0Signal_BA->SetMarkerStyle(20);
1988 hist_invariantMassB0Signal_BA->SetMarkerSize(0.6);
1989 hist_invariantMassB0Signal_BA->SetMarkerColor(6);
1990 TH1F* histogram_invariantMassB0Signal_BA = (TH1F*)hist_invariantMassB0Signal_BA->Clone();
1991 fOutputB0MC->Add(histogram_invariantMassB0Signal_BA);
1993 TString name_invariantMassB0Correlated_BA =
"invariantMassB0Correlated_BA";
1994 TH1F* hist_invariantMassB0Correlated_BA =
new TH1F(name_invariantMassB0Correlated_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1995 hist_invariantMassB0Correlated_BA->Sumw2();
1996 hist_invariantMassB0Correlated_BA->SetLineColor(6);
1997 hist_invariantMassB0Correlated_BA->SetMarkerStyle(20);
1998 hist_invariantMassB0Correlated_BA->SetMarkerSize(0.6);
1999 hist_invariantMassB0Correlated_BA->SetMarkerColor(6);
2000 TH1F* histogram_invariantMassB0Correlated_BA = (TH1F*)hist_invariantMassB0Correlated_BA->Clone();
2001 fOutputB0MC->Add(histogram_invariantMassB0Correlated_BA);
2003 TString name_invariantMassB0Background_BA =
"invariantMassB0Background_BA";
2004 TH1F* hist_invariantMassB0Background_BA =
new TH1F(name_invariantMassB0Background_BA.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
2005 hist_invariantMassB0Background_BA->Sumw2();
2006 hist_invariantMassB0Background_BA->SetLineColor(6);
2007 hist_invariantMassB0Background_BA->SetMarkerStyle(20);
2008 hist_invariantMassB0Background_BA->SetMarkerSize(0.6);
2009 hist_invariantMassB0Background_BA->SetMarkerColor(6);
2010 TH1F* histogram_invariantMassB0Background_BA = (TH1F*)hist_invariantMassB0Background_BA->Clone();
2011 fOutputB0MC->Add(histogram_invariantMassB0Background_BA);
2021 AliESDVertex *vertexESD = 0;
2022 AliAODVertex *vertexAOD = 0;
2024 AliVertexerTracks vertexer;
2025 vertexer.SetFieldkG(bField);
2027 vertexer.SetVtxStart((AliESDVertex*)primary);
2028 vertexESD = (AliESDVertex*)vertexer.VertexForSelectedESDTracks(tracks);
2032 if(!vertexESD)
return vertexAOD;
2035 if(vertexESD->GetNContributors()!=tracks->GetEntriesFast())
2037 delete vertexESD; vertexESD=NULL;
2043 for(
Int_t a=0;a<3;a++)pos[a]=0.;
2044 for(
Int_t b=0;b<6;b++)cov[b]=0.;
2047 vertexESD->GetXYZ(pos);
2048 vertexESD->GetCovMatrix(cov);
2051 Double_t vertRadius2=pos[0]*pos[0]+pos[1]*pos[1];
2054 delete vertexESD; vertexESD=NULL;
2058 chi2perNDF = vertexESD->GetChi2toNDF();
2059 dispersion = vertexESD->GetDispersion();
2060 delete vertexESD; vertexESD=NULL;
2062 vertexAOD =
new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs);
2069 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2070 for (
Int_t i=0; i<mcTrackArray->GetEntriesFast(); i++){
2072 Int_t mcLabelPionB0 = 0;
2073 Int_t mcLabelPionDStar = 0;
2074 Int_t mcLabelPionD0 = 0;
2075 Int_t mcLabelKaon = 0;
2076 Int_t mcLabelD0 = 0;
2077 Int_t mcLabelDStar = 0;
2078 Int_t mcLabelB0 = 0;
2085 Bool_t mcPionB0Present = kFALSE;
2086 Bool_t mcPionDStarPresent = kFALSE;
2087 Bool_t mcPionD0Present = kFALSE;
2088 Bool_t mcKaonPresent = kFALSE;
2091 AliAODMCParticle *mcTrackParticle =
dynamic_cast< AliAODMCParticle*
>(mcTrackArray->At(i));
2092 if(!mcTrackParticle) {std::cout <<
"no particle" << std::endl;
continue;}
2093 Int_t pdgCodeMC=TMath::Abs(mcTrackParticle->GetPdgCode());
2095 if (pdgCodeMC==511){
2098 Int_t nDaughterB0 = mcTrackParticle->GetNDaughters();
2099 ptMC[0] = mcTrackParticle->Pt();
2100 yMC[0] = mcTrackParticle->Y();
2101 pseudoYMC[0] = mcTrackParticle->Eta();
2103 TString fillthis=
"B0s_in_analysis";
2104 ((TH1F*)(listout->FindObject(fillthis)))->Fill(0);
2107 for(
Int_t iDaughterB0=0; iDaughterB0<2; iDaughterB0++){
2109 AliAODMCParticle* daughterB0 = (AliAODMCParticle*)mcTrackArray->At(mcTrackParticle->GetDaughter(iDaughterB0));
2110 if(!daughterB0)
break;
2111 Int_t pdgCodeDaughterB0=TMath::Abs(daughterB0->GetPdgCode());
2113 if (pdgCodeDaughterB0==211){
2114 mcLabelPionB0 = mcTrackParticle->GetDaughter(iDaughterB0);
2115 mcPionB0Present = kTRUE;
2116 ptMC[1] = daughterB0->Pt();
2117 yMC[1] = daughterB0->Y();
2118 pseudoYMC[1] = daughterB0->Eta();
2120 }
else if (pdgCodeDaughterB0==413){
2121 mcLabelDStar = mcTrackParticle->GetDaughter(iDaughterB0);
2122 Int_t nDaughterDStar = daughterB0->GetNDaughters();
2123 ptMC[2] = daughterB0->Pt();
2124 yMC[2] = daughterB0->Y();
2125 pseudoYMC[2] = daughterB0->Eta();
2127 if(nDaughterDStar==2){
2128 for(
Int_t iDaughterDStar=0; iDaughterDStar<2; iDaughterDStar++){
2130 AliAODMCParticle* daughterDStar = (AliAODMCParticle*)mcTrackArray->At(daughterB0->GetDaughter(iDaughterDStar));
2131 if(!daughterDStar)
break;
2132 Int_t pdgCodeDaughterDStar=TMath::Abs(daughterDStar->GetPdgCode());
2134 if (pdgCodeDaughterDStar==211){
2135 mcLabelPionDStar = daughterB0->GetDaughter(iDaughterDStar);
2136 mcPionDStarPresent = kTRUE;
2137 ptMC[3] = daughterDStar->Pt();
2138 yMC[3] = daughterDStar->Y();
2139 pseudoYMC[3] = daughterDStar->Eta();
2141 }
else if (pdgCodeDaughterDStar==421){
2142 mcLabelD0 = daughterB0->GetDaughter(iDaughterDStar);
2143 Int_t nDaughterD0 = daughterDStar->GetNDaughters();
2144 ptMC[4] = daughterDStar->Pt();
2145 yMC[4] = daughterDStar->Y();
2146 pseudoYMC[4] = daughterDStar->Eta();
2149 for(
Int_t iDaughterD0=0; iDaughterD0<2; iDaughterD0++){
2151 AliAODMCParticle* daughterD0 = (AliAODMCParticle*)mcTrackArray->At(daughterDStar->GetDaughter(iDaughterD0));
2152 if(!daughterD0)
break;
2153 Int_t pdgCodeDaughterD0=TMath::Abs(daughterD0->GetPdgCode());
2155 if (pdgCodeDaughterD0==211){
2156 mcLabelPionD0 = daughterDStar->GetDaughter(iDaughterD0);
2157 ptMC[5] = daughterD0->Pt();
2158 yMC[5] = daughterD0->Y();
2159 pseudoYMC[5] = daughterD0->Eta();
2160 mcPionD0Present = kTRUE;
2162 }
else if (pdgCodeDaughterD0==321){
2163 mcLabelKaon = daughterDStar->GetDaughter(iDaughterD0);;
2164 mcKaonPresent = kTRUE;
2165 ptMC[6] = daughterD0->Pt();
2166 yMC[6] = daughterD0->Y();
2167 pseudoYMC[6] = daughterD0->Eta();
2181 if(mcPionB0Present && mcPionDStarPresent && mcPionD0Present && mcKaonPresent){
2182 Int_t rows = B0toDStarPiLabelMatrix->GetNrows();
2184 B0toDStarPiLabelMatrix->ResizeTo(rows+1,7);
2185 particleMatrix(rows,0) = mcLabelPionB0;
2186 particleMatrix(rows,1) = mcLabelPionDStar;
2187 particleMatrix(rows,2) = mcLabelPionD0;
2188 particleMatrix(rows,3) = mcLabelKaon;
2189 particleMatrix(rows,4) = mcLabelD0;
2190 particleMatrix(rows,5) = mcLabelDStar;
2191 particleMatrix(rows,6) = mcLabelB0;
2194 TString fillthis=
"B0s_in_analysis";
2195 ((TH1F*)(listout->FindObject(fillthis)))->Fill(1);
2197 fillthis=
"B0s_per_bin";
2200 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
2203 fillthis=
"mc_B0_pt";
2204 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
2205 fillthis=
"mc_B0_pion_pt";
2206 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[1]);
2207 fillthis=
"mc_DStar_pt";
2208 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[2]);
2209 fillthis=
"mc_DStar_pion_pt";
2210 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[3]);
2211 fillthis=
"mc_D0_pt";
2212 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[4]);
2213 fillthis=
"mc_D0_pion_pt";
2214 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[5]);
2215 fillthis=
"mc_D0_kaon_pt";
2216 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[6]);
2218 fillthis=
"mc_B0_rapidity_true";
2219 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[0]);
2220 fillthis=
"mc_B0_pion_rapidity_true";
2221 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[1]);
2222 fillthis=
"mc_DStar_rapidity_true";
2223 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[2]);
2224 fillthis=
"mc_DStar_pion_rapidity_true";
2225 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[3]);
2226 fillthis=
"mc_D0_rapidity_true";
2227 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[4]);
2228 fillthis=
"mc_D0_pion_rapidity_true";
2229 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[5]);
2230 fillthis=
"mc_D0_kaon_rapidity_true";
2231 ((TH1F*)(listout->FindObject(fillthis)))->Fill(yMC[6]);
2233 fillthis=
"mc_B0_pseudorapidity_true";
2234 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[0]);
2235 fillthis=
"mc_B0_pion_pseudorapidity_true";
2236 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[1]);
2237 fillthis=
"mc_DStar_pseudorapidity_true";
2238 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[2]);
2239 fillthis=
"mc_DStar_pion_pseudorapidity_true";
2240 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[3]);
2241 fillthis=
"mc_D0_pseudorapidity_true";
2242 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[4]);
2243 fillthis=
"mc_D0_pion_pseudorapidity_true";
2244 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[5]);
2245 fillthis=
"mc_D0_kaon_pseudorapidity_true";
2246 ((TH1F*)(listout->FindObject(fillthis)))->Fill(pseudoYMC[6]);
2253 Int_t numberOfB0s = 0;
2255 for (
Int_t i = 0; i < B0toDStarPiLabelMatrix->GetNrows(); i++)
2257 Int_t particleCounter = 0;
2258 for (
Int_t j = 0; j < 4; j++)
2260 Int_t labelParticleInList = (
Int_t)particleMatrix(i,j);
2261 for (
Int_t k=0; k<aodevent->GetNumberOfTracks(); k++)
2263 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodevent->GetTrack(k));
2264 if(!aodTrack) AliFatal(
"Not a standard AOD");
2265 if(TMath::Abs(aodTrack->Eta())>0.8)
continue;
2266 if(aodTrack->GetLabel() == labelParticleInList)
2274 if (particleCounter==4)
2276 TString fillthis=
"B0s_in_analysis";
2277 ((TH1F*)(listout->FindObject(fillthis)))->Fill(2);
2279 correctLabelArray.Set(numberOfB0s);
2280 correctLabelArray.AddAt(i,numberOfB0s-1);
2282 Int_t labelParticle = (
Int_t)particleMatrix(i,0);
2283 AliAODMCParticle * B0track =
dynamic_cast< AliAODMCParticle*
>(mcTrackArray->At(labelParticle));
2285 fillthis=
"B0s_per_bin_in_Acc";
2288 if(
fPtBinLimits[j] < B0track->Pt() && B0track->Pt() <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
2293 for (
Int_t i = 0; i < correctLabelArray.GetSize(); i++)
2295 particleMatrix(i,0) = (
Int_t)particleMatrix(correctLabelArray[i],0);
2296 particleMatrix(i,1) = (
Int_t)particleMatrix(correctLabelArray[i],1);
2297 particleMatrix(i,2) = (
Int_t)particleMatrix(correctLabelArray[i],2);
2298 particleMatrix(i,3) = (
Int_t)particleMatrix(correctLabelArray[i],3);
2299 particleMatrix(i,4) = (
Int_t)particleMatrix(correctLabelArray[i],4);
2300 particleMatrix(i,5) = (
Int_t)particleMatrix(correctLabelArray[i],5);
2301 particleMatrix(i,6) = (
Int_t)particleMatrix(correctLabelArray[i],6);
2303 B0toDStarPiLabelMatrix->ResizeTo(correctLabelArray.GetSize(),7);
2310 if(!aodTrack) AliFatal(
"Not a standard AOD");
2313 if(aodTrack->GetITSNcls() < 1)
return kFALSE;
2314 if(aodTrack->GetTPCNcls() < 1)
return kFALSE;
2315 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
2316 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
2317 if(aodTrack->GetID() < 0)
return kFALSE;
2319 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
2321 Int_t mcLabelParticle = -1;
2322 Int_t pdgParticle = -1;
2323 mcLabelParticle = aodTrack->GetLabel();
2326 Double_t pt_track = aodTrack->Pt();
2327 Double_t momentum_track = aodTrack->P();
2328 Int_t numberOfITS = aodTrack->GetITSNcls();
2329 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2331 AliExternalTrackParam particleTrack;
2332 particleTrack.CopyFromVTrack(aodTrack);
2334 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2337 Bool_t isDesiredCandidate = kFALSE;
2339 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2340 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2341 if(mcLabelParticle == (
Int_t)particleMatrix(k,2) || mcLabelParticle == (
Int_t)particleMatrix(k,3)){
2342 isDesiredCandidate = kTRUE;
2350 Int_t daughterType = 0;
2359 for (
Int_t j = 0; j < 10; ++j)
2366 if(isDesiredCandidate)
2374 for (
Int_t j = 0; j < 10; ++j)
2388 if(isDesiredCandidate) {
2395 if(isDesiredCandidate) {
2402 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2403 if(isDesiredCandidate) {
2411 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2412 if(isDesiredCandidate) {
2421 if(isDesiredCandidate) {
2429 if(isDesiredCandidate) {
2436 if(isDesiredCandidate) {
2443 if(isDesiredCandidate) {
2449 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2451 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2454 Bool_t bHardITSPass = kTRUE;
2455 for (
Int_t j = 0; j < 7; ++j)
2457 if(bHardSelectionArrayITS[j])
2459 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2463 Int_t nCounterSoftSelection = 0;
2464 Bool_t bSoftITSPass = kTRUE;
2465 for (
Int_t j = 0; j < 7; ++j)
2467 if(bSoftSelectionArrayITS[j])
2469 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2472 if(nCounterSoftSelection < fCuts->GetNSoftITSCutD0FirstDaughter()) bSoftITSPass = kFALSE;
2475 if(isDesiredCandidate) {
2482 if(isDesiredCandidate) {
2488 if(!isDesiredCandidate && fQuickSignalAnalysis == 1) bCut = kTRUE;
2491 if(isDesiredCandidate) {
2504 for (
Int_t j = 0; j < 10; ++j)
2511 if(isDesiredCandidate)
2519 for (
Int_t j = 0; j < 10; ++j)
2533 if(!aodTrack) AliFatal(
"Not a standard AOD");
2536 if(aodTrack->GetITSNcls() < 1)
return kFALSE;
2537 if(aodTrack->GetTPCNcls() < 1)
return kFALSE;
2538 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
return kFALSE;
2539 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
return kFALSE;
2540 if(aodTrack->GetID() < 0)
return kFALSE;
2542 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
return kFALSE;
2544 Int_t mcLabelParticle = -1;
2545 Int_t pdgParticle = -1;
2546 mcLabelParticle = aodTrack->GetLabel();
2549 Double_t pt_track = aodTrack->Pt();
2550 Double_t momentum_track = aodTrack->P();
2551 Int_t numberOfITS = aodTrack->GetITSNcls();
2552 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2554 AliExternalTrackParam particleTrack;
2555 particleTrack.CopyFromVTrack(aodTrack);
2557 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2560 Bool_t isDesiredCandidate = kFALSE;
2562 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2563 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2564 if(mcLabelParticle == (
Int_t)particleMatrix(k,2) || mcLabelParticle == (
Int_t)particleMatrix(k,3)){
2565 isDesiredCandidate = kTRUE;
2573 Int_t daughterType = 1;
2582 for (
Int_t j = 0; j < 10; ++j)
2589 if(isDesiredCandidate)
2597 for (
Int_t j = 0; j < 10; ++j)
2611 if(isDesiredCandidate) {
2618 if(isDesiredCandidate) {
2625 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2626 if(isDesiredCandidate) {
2634 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2635 if(isDesiredCandidate) {
2644 if(isDesiredCandidate) {
2652 if(isDesiredCandidate) {
2659 if(isDesiredCandidate) {
2666 if(isDesiredCandidate) {
2672 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2674 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2677 Bool_t bHardITSPass = kTRUE;
2678 for (
Int_t j = 0; j < 7; ++j)
2680 if(bHardSelectionArrayITS[j])
2682 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2686 Int_t nCounterSoftSelection = 0;
2687 Bool_t bSoftITSPass = kTRUE;
2688 for (
Int_t j = 0; j < 7; ++j)
2690 if(bSoftSelectionArrayITS[j])
2692 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2695 if(nCounterSoftSelection < fCuts->GetNSoftITSCutD0SecondDaughter()) bSoftITSPass = kFALSE;
2698 if(isDesiredCandidate) {
2705 if(isDesiredCandidate) {
2711 if(!isDesiredCandidate && fQuickSignalAnalysis == 1) bCut = kTRUE;
2714 if(isDesiredCandidate) {
2727 for (
Int_t j = 0; j < 10; ++j)
2734 if(isDesiredCandidate)
2742 for (
Int_t j = 0; j < 10; ++j)
2756 Int_t numberofparticles = 0;
2757 Int_t numberofparticlesused = 0;
2758 Int_t iClonesArray = 0;
2763 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
2764 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
2765 if(!aodTrack) AliFatal(
"Not a standard AOD");
2768 if(aodTrack->GetITSNcls() < 1)
continue;
2769 if(aodTrack->GetTPCNcls() < 1)
continue;
2770 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
2771 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
2772 if(aodTrack->GetID() < 0)
continue;
2774 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
2776 Int_t mcLabelParticle = -1;
2777 Int_t pdgParticle = -1;
2778 mcLabelParticle = aodTrack->GetLabel();
2780 numberofparticles++;
2783 Double_t pt_track = aodTrack->Pt();
2784 Double_t momentum_track = aodTrack->P();
2785 Int_t numberOfITS = aodTrack->GetITSNcls();
2786 Int_t numberOfTPC = aodTrack->GetTPCNcls();
2789 Int_t pionPIDnumber = 2;
2790 Int_t kaonPIDnumber = 3;
2795 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
2796 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
2798 AliExternalTrackParam particleTrack;
2799 particleTrack.CopyFromVTrack(aodTrack);
2801 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
2804 Bool_t isDesiredCandidate = kFALSE;
2806 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
2807 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
2808 if(mcLabelParticle == (
Int_t)particleMatrix(k,1)){
2809 isDesiredCandidate = kTRUE;
2817 Int_t daughterType = 2;
2826 for (
Int_t j = 0; j < 10; ++j)
2834 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2837 if(isDesiredCandidate)
2845 for (
Int_t j = 0; j < 10; ++j)
2853 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2862 if(isDesiredCandidate) {
2869 if(isDesiredCandidate) {
2876 if(isDesiredCandidate) {
2883 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
2884 if(isDesiredCandidate) {
2892 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
2893 if(isDesiredCandidate) {
2902 if(isDesiredCandidate) {
2910 if(isDesiredCandidate) {
2917 if(isDesiredCandidate) {
2925 if(isDesiredCandidate) {
2933 if(isDesiredCandidate) {
2939 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
2941 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
2944 Bool_t bHardITSPass = kTRUE;
2945 for (
Int_t j = 0; j < 7; ++j)
2947 if(bHardSelectionArrayITS[j])
2949 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
2953 Int_t nCounterSoftSelection = 0;
2954 Bool_t bSoftITSPass = kTRUE;
2955 for (
Int_t j = 0; j < 7; ++j)
2957 if(bSoftSelectionArrayITS[j])
2959 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
2962 if(nCounterSoftSelection < fCuts->GetNSoftITSCutDStarPion()) bSoftITSPass = kFALSE;
2965 if(isDesiredCandidate) {
2972 if(isDesiredCandidate) {
2978 if(!isDesiredCandidate && fQuickSignalAnalysis == 1) bCut = kTRUE;
2981 if(isDesiredCandidate) {
2994 for (
Int_t j = 0; j < 10; ++j)
3002 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3005 if(isDesiredCandidate)
3013 for (
Int_t j = 0; j < 10; ++j)
3021 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3026 numberofparticlesused++;
3037 Int_t numberofparticles = 0;
3038 Int_t numberofparticlesused = 0;
3039 Int_t iClonesArray = 0;
3044 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
3045 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
3046 if(!aodTrack) AliFatal(
"Not a standard AOD");
3049 if(aodTrack->GetITSNcls() < 1)
continue;
3050 if(aodTrack->GetTPCNcls() < 1)
continue;
3051 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
3052 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
3053 if(aodTrack->GetID() < 0)
continue;
3055 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
3058 Int_t mcLabelParticle = -1;
3059 Int_t pdgParticle = -1;
3060 mcLabelParticle = aodTrack->GetLabel();
3062 numberofparticles++;
3065 Double_t pt_track = aodTrack->Pt();
3066 Double_t momentum_track = aodTrack->P();
3067 Int_t numberOfITS = aodTrack->GetITSNcls();
3068 Int_t numberOfTPC = aodTrack->GetTPCNcls();
3071 Int_t pionPIDnumber = 2;
3072 Int_t kaonPIDnumber = 3;
3077 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
3078 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
3080 AliExternalTrackParam particleTrack;
3081 particleTrack.CopyFromVTrack(aodTrack);
3083 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
3087 Bool_t isDesiredCandidate = kFALSE;
3089 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
3090 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
3091 if(mcLabelParticle == (
Int_t)particleMatrix(k,0)){
3092 isDesiredCandidate = kTRUE;
3100 Int_t daughterType = 3;
3108 for (
Int_t j = 0; j < 10; ++j)
3116 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3119 if(isDesiredCandidate)
3127 for (
Int_t j = 0; j < 10; ++j)
3135 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3144 if(isDesiredCandidate) {
3151 if(isDesiredCandidate) {
3158 if(isDesiredCandidate) {
3165 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
3166 if(isDesiredCandidate) {
3174 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
3175 if(isDesiredCandidate) {
3184 if(isDesiredCandidate) {
3193 if(isDesiredCandidate) {
3201 if(isDesiredCandidate) {
3208 if(isDesiredCandidate) {
3214 Bool_t bHardSelectionArrayITS[7] = {kFALSE};
3216 Bool_t bSoftSelectionArrayITS[7] = {kFALSE};
3219 Bool_t bHardITSPass = kTRUE;
3220 for (
Int_t j = 0; j < 7; ++j)
3222 if(bHardSelectionArrayITS[j])
3224 if(!aodTrack->HasPointOnITSLayer(j)) bHardITSPass = kFALSE;
3228 Int_t nCounterSoftSelection = 0;
3229 Bool_t bSoftITSPass = kTRUE;
3230 for (
Int_t j = 0; j < 7; ++j)
3232 if(bSoftSelectionArrayITS[j])
3234 if(aodTrack->HasPointOnITSLayer(j)) nCounterSoftSelection++;
3237 if(nCounterSoftSelection < fCuts->GetNSoftITSCutB0Pion()) bSoftITSPass = kFALSE;
3240 if(isDesiredCandidate) {
3247 if(isDesiredCandidate) {
3254 if(!isDesiredCandidate && fQuickSignalAnalysis == 1) bCut = kTRUE;
3257 if(isDesiredCandidate) {
3270 for (
Int_t j = 0; j < 10; ++j)
3278 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3281 if(isDesiredCandidate)
3289 for (
Int_t j = 0; j < 10; ++j)
3297 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3303 numberofparticlesused++;
3318 for (
Int_t j = 0; j < D0TracksFromFriendFile->GetEntriesFast(); j++)
3323 if(!trackD0) {std::cout <<
"found none" << std::endl;
continue;}
3324 if(trackD0 == NULL) {std::cout <<
"found NULL" << std::endl;
continue;}
3332 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(trackD0->GetDaughter(0));
3333 AliAODTrack * trackSecondDaughter = (AliAODTrack*)(trackD0->GetDaughter(1));
3334 if(!
D0FirstDaughterSelection(trackFirstDaughter, primaryVertex, bz, mcTrackArray, B0toDStarPiLabelMatrix,header))
continue;
3335 if(!
D0SecondDaughterSelection(trackSecondDaughter, primaryVertex, bz, mcTrackArray, B0toDStarPiLabelMatrix,header))
continue;
3338 AliAODVertex *vertexMother = (AliAODVertex*)trackD0->GetSecondaryVtx();
3341 Int_t pdgCodeMother = -1;
3342 Float_t pdgCodeGrandMother = -1;
3343 Bool_t isDesiredCandidate = kFALSE;
3344 Int_t motherType, histType;
3346 Int_t mcLabelD0 = -1;
3354 isDesiredCandidate = kTRUE;
3356 Int_t mcLabelFirstTrack = -1;
3357 mcLabelFirstTrack = trackFirstDaughter->GetLabel();
3359 if(mcLabelFirstTrack >= 0)
3361 AliAODMCParticle *mcParticleFirstTrack = (AliAODMCParticle*)mcTrackArray->At(mcLabelFirstTrack);
3362 AliAODMCParticle *mcMotherParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0);
3364 if(mcParticleFirstTrack && mcMotherParticle)
3366 pdgCodeMother = mcMotherParticle->GetPdgCode();
3368 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()));
3371 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()));
3383 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
3387 Bool_t cutMother = kFALSE;
3389 Bool_t bCutArray[29] = {0};
3391 if(cutReturnValue == -1) cutMother = kTRUE;
3392 if(cutReturnValue == 0) cutMother = kTRUE;
3397 for (
Int_t k = 0; k < 29; ++k)
3399 if (bCutArray[k] == kTRUE){
3400 if(isDesiredCandidate){
3412 if(isDesiredCandidate){
3425 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
3444 Int_t ObjectNumber = TProcessID::GetObjectCount();
3447 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(aodEvent->GetTrack(
fDStarPionTracks->at(i)));
3448 if(!trackFirstDaughter)
continue;
3451 if(trackFirstDaughter->Charge() == -1) pdgD0 = -421;
3458 if(!trackSecondDaughter) {std::cout <<
"found none" << std::endl;
continue;}
3459 if(trackSecondDaughter == NULL) {std::cout <<
"found NULL" << std::endl;
continue;}
3462 if(trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(0) || trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(1))
continue;
3465 if(trackFirstDaughter->Charge() == trackSecondDaughter->Charge() || TMath::Abs(trackFirstDaughter->Charge() + trackSecondDaughter->Charge()) != 1)
continue;
3469 if(trackFirstDaughter->Charge() == -1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->Charge() != -1)
continue;
3470 if(trackFirstDaughter->Charge() == 1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->Charge() != 1)
continue;
3474 if(trackFirstDaughter->Charge()==1)
3476 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),2)))
continue;
3477 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),3)))
continue;
3478 }
else if (trackFirstDaughter->Charge()==-1){
3479 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),3)))
continue;
3480 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),2)))
continue;
3486 AliExternalTrackParam DStarPionTrackParam;
3487 DStarPionTrackParam.CopyFromVTrack(trackFirstDaughter);
3488 AliExternalTrackParam D0TrackParam;
3489 D0TrackParam.CopyFromVTrack(trackSecondDaughter);
3494 tracksTestVertex.Add(&DStarPionTrackParam);
3495 tracksTestVertex.Add(&D0TrackParam);
3498 AliAODVertex *testVertex =
RecalculateVertex(primaryVertex,&tracksTestVertex,bz,dispersionTest);
3499 if(!testVertex) {
delete testVertex; testVertex = NULL;
continue;}
3501 Double_t d0z0Test[2],covd0z0Test[3];
3504 DStarPionTrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
3505 D0TrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
3506 delete testVertex; testVertex = NULL;
3508 Double_t pdgMassPion = TDatabasePDG::Instance()->GetParticle(211)->Mass();
3509 Double_t pdgMassD0 = TDatabasePDG::Instance()->GetParticle(421)->Mass();
3510 Double_t pdgMassDStar = TDatabasePDG::Instance()->GetParticle(413)->Mass();
3512 Double_t energyDStarPion = pdgMassPion*pdgMassPion + DStarPionTrackParam.Px()*DStarPionTrackParam.Px()+DStarPionTrackParam.Py()*DStarPionTrackParam.Py()+DStarPionTrackParam.Pz()*DStarPionTrackParam.Pz();
3513 Double_t energyD0 = pdgMassD0*pdgMassD0 + D0TrackParam.Px()*D0TrackParam.Px()+D0TrackParam.Py()*D0TrackParam.Py()+D0TrackParam.Pz()*D0TrackParam.Pz();
3514 Double_t energySum = TMath::Sqrt(energyDStarPion) + TMath::Sqrt(energyD0);
3516 Double_t pxDStarTest = DStarPionTrackParam.Px() + D0TrackParam.Px();
3517 Double_t pyDStarTest = DStarPionTrackParam.Py() + D0TrackParam.Py();
3518 Double_t pzDStarTest = DStarPionTrackParam.Pz() + D0TrackParam.Pz();
3519 Double_t p2DStarTest = pxDStarTest*pxDStarTest + pyDStarTest*pyDStarTest + pzDStarTest*pzDStarTest;
3521 Double_t invMassDStarTest = TMath::Sqrt(energySum*energySum-p2DStarTest);
3524 Int_t nCutIndex = 0;
3525 Bool_t bCutArrayTemp[29];
3526 Double_t cutVariableValue = TMath::Abs(invMassDStarTest-pdgMassDStar)/2.0;
3528 if(!bPassedCut)
continue;
3531 AliExternalTrackParam firstTrack;
3532 firstTrack.CopyFromVTrack(trackFirstDaughter);
3533 AliExternalTrackParam secondTrack;
3534 secondTrack.CopyFromVTrack(trackSecondDaughter);
3536 Double_t d0z0DStar[2],covd0z0DStar[3],d0DStar[2],d0errDStar[2];
3538 firstTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
3539 d0DStar[0] = d0z0DStar[0];
3540 d0errDStar[0] = TMath::Sqrt(covd0z0DStar[0]);
3541 secondTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
3542 d0DStar[1] = d0z0DStar[0];
3543 d0errDStar[1] = TMath::Sqrt(covd0z0DStar[0]);
3546 cutVariableValue = d0DStar[0] * d0DStar[1];
3548 if(!bPassedCut)
continue;
3554 AliAODTrack * trackB0Pion =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(
fB0PionTracks->at(k)));
3555 if(!trackB0Pion)
continue;
3558 AliAODTrack* twoProngdaughter0 = (AliAODTrack*)trackSecondDaughter->GetDaughter(0);
3559 AliAODTrack* twoProngdaughter1 = (AliAODTrack*)trackSecondDaughter->GetDaughter(1);
3560 UShort_t idProng0 = twoProngdaughter0->GetID();
3561 UShort_t idProng1 = twoProngdaughter1->GetID();
3563 if(trackB0Pion->GetID() == trackFirstDaughter->GetID() || trackB0Pion->GetID() == idProng0 || trackB0Pion->GetID() == idProng1)
continue;
3568 Bool_t bSameSign = kFALSE;
3569 if(trackB0Pion->Charge() == (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) && trackB0Pion->Charge() + (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) != 0) bSameSign = kTRUE;
3575 AliAODTrack * trackB0PionRotated =
new AliAODTrack(*trackB0Pion);
3582 trackB0PionRotated->SetPhi(dPhiRotated);
3583 trackB0PionRotated->SetLabel(-1);
3594 AliExternalTrackParam thirdTrack;
3595 thirdTrack.CopyFromVTrack(trackB0PionRotated);
3598 TObjArray daughterTracksWithRecalculation;
3600 daughterTracksWithRecalculation.Add(&firstTrack);
3601 daughterTracksWithRecalculation.Add(&secondTrack);
3602 daughterTracksWithRecalculation.Add(&thirdTrack);
3605 AliAODVertex *vertexMother =
RecalculateVertex(primaryVertex,&daughterTracksWithRecalculation,bz,dispersion);
3607 delete vertexMother; vertexMother = NULL;
3608 delete trackB0PionRotated; trackB0PionRotated = NULL;
3612 if(vertexMother->GetNDaughters()!=2)
3614 std::cout <<
"bad reconstruction - number of daughters for vertex is incorrect" << std::endl;
3615 delete vertexMother; vertexMother = NULL;
3616 delete trackB0PionRotated; trackB0PionRotated = NULL;
3620 Double_t xdummyDStar=0.,ydummyDStar=0.,eDStar[2];
3624 firstTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
3625 secondTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
3627 Double_t pxDStar[2],pyDStar[2],pzDStar[2];
3628 pxDStar[0] = firstTrack.Px();
3629 pyDStar[0] = firstTrack.Py();
3630 pzDStar[0] = firstTrack.Pz();
3631 pxDStar[1] = secondTrack.Px();
3632 pyDStar[1] = secondTrack.Py();
3633 pzDStar[1] = secondTrack.Pz();
3636 xyz_track1[0] = firstTrack.GetX();
3637 firstTrack.GetYAt(xyz_track1[0],bz,xyz_track1[1]);
3638 firstTrack.GetZAt(xyz_track1[0],bz,xyz_track1[2]);
3641 xyz_track2[0] = secondTrack.GetX();
3642 secondTrack.GetYAt(xyz_track2[0],bz,xyz_track2[1]);
3643 secondTrack.GetZAt(xyz_track2[0],bz,xyz_track2[2]);
3645 Double_t distanceAtVertex = TMath::Sqrt((xyz_track1[0]-xyz_track2[0])*(xyz_track1[0]-xyz_track2[0]) + (xyz_track1[1]-xyz_track2[1])*(xyz_track1[1]-xyz_track2[1]) + (xyz_track1[2]-xyz_track2[2])*(xyz_track1[2]-xyz_track2[2]));
3655 Double_t dcaDStarPionD0 = secondTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
3656 Double_t dcaDStarPionB0Pion = secondTrack.GetDCA(&thirdTrack,bz,xdummyDStar,ydummyDStar);
3657 Double_t dcaB0PionD0 = thirdTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
3661 delete vertexMother; vertexMother = NULL;
3662 delete trackB0PionRotated; trackB0PionRotated = NULL;
3667 delete vertexMother; vertexMother = NULL;
3668 delete trackB0PionRotated; trackB0PionRotated = NULL;
3673 delete vertexMother; vertexMother = NULL;
3674 delete trackB0PionRotated; trackB0PionRotated = NULL;
3678 Double_t dcaCombined = TMath::Sqrt(TMath::Abs(dcaDStarPionD0) + TMath::Abs(dcaDStarPionB0Pion) + TMath::Abs(dcaB0PionD0));
3681 delete vertexMother; vertexMother = NULL;
3682 delete trackB0PionRotated; trackB0PionRotated = NULL;
3686 Short_t chargeDStar = trackFirstDaughter->Charge() + trackSecondDaughter->Charge();
3687 AliAODVertex * vertexDStar =
new AliAODVertex(*vertexMother);
3690 std::cout <<
"no dstar vertex" << std::endl;
3691 delete vertexMother; vertexMother = NULL;
3692 delete vertexDStar; vertexDStar = NULL;
3693 delete trackB0PionRotated; trackB0PionRotated = NULL;
3698 Int_t nProngsDStar = 2;
3702 delete vertexMother; vertexMother = NULL;
3703 delete vertexDStar; vertexDStar = NULL;
3704 delete trackB0PionRotated; trackB0PionRotated = NULL;
3708 trackDStar.SetCharge(chargeDStar);
3711 idDStar[0]= trackFirstDaughter->GetID();
3715 prongsDStar[0] = 211;
3716 prongsDStar[1] = 421;
3719 if(vertexDStar->GetNDaughters()!=2)
3721 std::cout <<
"bad reconstruction 2 - number of daughters for vertex is incorrect" << std::endl;
3722 delete vertexMother; vertexMother = NULL;
3723 delete vertexDStar; vertexDStar = NULL;
3724 delete trackB0PionRotated; trackB0PionRotated = NULL;
3728 trackDStar.GetSecondaryVtx()->AddDaughter(trackFirstDaughter);
3729 trackDStar.GetSecondaryVtx()->AddDaughter(trackSecondDaughter);
3743 Double_t xdummy=0.,ydummy=0.,dca,e[2];
3744 Double_t d0z0[2],covd0z0[3],d0[2],d0err[2];
3746 AliExternalTrackParam fourthTrack;
3747 fourthTrack.CopyFromVTrack(&trackDStar);
3749 thirdTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
3750 fourthTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
3753 px[0] = thirdTrack.Px();
3754 py[0] = thirdTrack.Py();
3755 pz[0] = thirdTrack.Pz();
3756 px[1] = fourthTrack.Px();
3757 py[1] = fourthTrack.Py();
3758 pz[1] = fourthTrack.Pz();
3765 id[0]= thirdTrack.GetID();
3768 thirdTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3770 d0err[0] = TMath::Sqrt(covd0z0[0]);
3771 fourthTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3773 d0err[1] = TMath::Sqrt(covd0z0[0]);
3775 dca = fourthTrack.GetDCA(&thirdTrack,bz,xdummy,ydummy);
3778 Short_t chargeMother = trackFirstDaughter->Charge() + trackDStar.Charge();
3779 Int_t nProngsB0 = 2;
3783 delete vertexMother; vertexMother = NULL;
3784 delete vertexDStar; vertexDStar = NULL;
3785 delete trackB0PionRotated; trackB0PionRotated = NULL;
3789 trackB0.SetCharge(chargeMother);
3791 trackB0.GetSecondaryVtx()->AddDaughter(trackB0PionRotated);
3792 trackB0.GetSecondaryVtx()->AddDaughter(&trackDStar);
3803 Bool_t fCheckInjected = kTRUE;
3804 Bool_t fRemoveInjected = kFALSE;
3805 Bool_t bIsInjected = kFALSE;
3807 if(fCheckInjected && fRemoveInjected && bIsInjected) {
3808 delete vertexMother; vertexMother = NULL;
3809 delete vertexDStar; vertexDStar = NULL;
3810 delete trackB0PionRotated; trackB0PionRotated = NULL;
3815 Bool_t isDesiredCandidate = kFALSE;
3816 Int_t mcLabelB0 = -1;
3817 Int_t mcLabelDStar = -1;
3819 Int_t motherType, histType;
3827 if (mcLabelB0 >= 0 && mcLabelDStar >= 0 && trackB0PionRotated->GetLabel() >= 0)
3829 AliAODMCParticle *mcTrackDStarPion = (AliAODMCParticle*)mcTrackArray->At(trackB0PionRotated->GetLabel());
3830 AliAODMCParticle *mcTrackDStar = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStar);
3832 Double_t vertex_distance = TMath::Sqrt((vertexMother->GetX() - mcTrackDStarPion->Xv())*(vertexMother->GetX() - mcTrackDStarPion->Xv()) + (vertexMother->GetY() - mcTrackDStarPion->Yv())*(vertexMother->GetY() - mcTrackDStarPion->Yv()) + (vertexMother->GetZ() - mcTrackDStarPion->Zv())*(vertexMother->GetZ() - mcTrackDStarPion->Zv()));
3835 Double_t momentum_resolution = TMath::Sqrt((trackDStar.Px() - mcTrackDStar->Px())*(trackDStar.Px() - mcTrackDStar->Px()) + (trackDStar.Py() - mcTrackDStar->Py())*(trackDStar.Py() - mcTrackDStar->Py()) + (trackDStar.Pz() - mcTrackDStar->Pz())*(trackDStar.Pz() - mcTrackDStar->Pz()));
3838 isDesiredCandidate = kTRUE;
3853 Bool_t cutDStar = kFALSE;
3855 Bool_t bCutArrayDStar[29] = {0};
3857 if(cutReturnValueDStar == -1) cutDStar = kTRUE;
3858 if(cutReturnValueDStar == 0) cutDStar = kTRUE;
3860 Bool_t bCutArrayD0[39] = {0};
3862 if(cutReturnValueD0 == -1) cutDStar = kTRUE;
3863 if(cutReturnValueD0 == 0) cutDStar = kTRUE;
3869 for (
Int_t n = 0; n < 29; ++n)
3871 if(bCutArrayDStar[n] == kTRUE){
3872 if(isDesiredCandidate){
3879 for (
Int_t n = 0; n < 39; ++n)
3881 if(bCutArrayD0[n] == kTRUE){
3882 if(isDesiredCandidate){
3894 if(isDesiredCandidate)
3898 delete vertexMother; vertexMother = NULL;
3899 delete vertexDStar; vertexDStar = NULL;
3900 delete trackB0PionRotated; trackB0PionRotated = NULL;
3929 if(isDesiredCandidate)
3931 AliAODMCParticle *mcTrackFirstDaughter = (AliAODMCParticle*)mcTrackArray->At(trackB0PionRotated->GetLabel());
3932 AliAODMCParticle *mcTrackB0 = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0);
3934 Double_t vertex_distance = TMath::Sqrt((vertexMother->GetX() - mcTrackFirstDaughter->Xv())*(vertexMother->GetX() - mcTrackFirstDaughter->Xv()) + (vertexMother->GetY() - mcTrackFirstDaughter->Yv())*(vertexMother->GetY() - mcTrackFirstDaughter->Yv()) + (vertexMother->GetZ() - mcTrackFirstDaughter->Zv())*(vertexMother->GetZ() - mcTrackFirstDaughter->Zv()));
3937 Double_t momentum_resolution = TMath::Sqrt((trackB0.Px() - mcTrackB0->Px())*(trackB0.Px() - mcTrackB0->Px()) + (trackB0.Py() - mcTrackB0->Py())*(trackB0.Py() - mcTrackB0->Py()) + (trackB0.Pz() - mcTrackB0->Pz())*(trackB0.Pz() - mcTrackB0->Pz()));
3947 if(isDesiredCandidate)
3956 Bool_t cutMother = kFALSE;
3958 Bool_t bCutArray[97] = {0};
3959 Int_t numberOfCuts = 97;
3961 if(cutReturnValue == -1) cutMother = kTRUE;
3962 if(cutReturnValue == 0) cutMother = kTRUE;
3967 Double_t invariantMassMother = trackB0.InvMass(2,prongs);
3968 Double_t pdgMassMother=TDatabasePDG::Instance()->GetParticle(511)->Mass();
3972 for (
Int_t n = 0; n < 97; ++n)
3974 if(bCutArray[n] == kTRUE){
3975 if(isDesiredCandidate){
3982 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow){
3983 for (
Int_t l = 0; l < numberOfCuts; ++l)
3985 if(bCutArray[l] == kFALSE)
continue;
3986 for (
Int_t j = 0; j < numberOfCuts; ++j)
3988 if(bCutArray[j] == kFALSE)
continue;
3989 if(isDesiredCandidate == kFALSE) histName =
"cutEffectBackground";
3990 if(isDesiredCandidate == kTRUE) histName =
"cutEffectSignal";
3991 ((TH2I*)(
fOutputB0MC->FindObject(histName)))->Fill(l,j);
3995 for (
Int_t l = 0; l < numberOfCuts; ++l)
3997 if(bCutArray[l] == kFALSE)
continue;
3999 for (
Int_t j = 0; j < numberOfCuts; ++j)
4002 if(bCutArray[j] == kTRUE)
4011 if(isDesiredCandidate == kFALSE) histName =
"cutEffectUniqueBackground";
4012 if(isDesiredCandidate == kTRUE) histName =
"cutEffectUniqueSignal";
4024 if(isDesiredCandidate)
4028 delete vertexMother; vertexMother = NULL;
4029 delete vertexDStar; vertexDStar = NULL;
4030 delete trackB0PionRotated; trackB0PionRotated = NULL;
4035 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
4036 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_DStarPion)))->Fill(dcaDStarPionD0);
4038 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
4039 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_B0Pion)))->Fill(dcaB0PionD0);
4041 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
4042 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
4044 TString name_dca_Combined =
"dca_Combined";
4045 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Combined)))->Fill(dcaCombined);
4049 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
4050 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_D0_DStarPion)))->Fill(dcaDStarPionD0);
4052 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
4053 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_D0_B0Pion)))->Fill(dcaB0PionD0);
4055 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
4056 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
4058 TString name_dca_Signal_Combined =
"dca_Signal_Combined";
4059 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_Signal_Combined)))->Fill(dcaCombined);
4064 Bool_t bIsCorrelatedBackground = kFALSE;
4065 Bool_t bIsCorrelatedBackground511 = kFALSE;
4068 Int_t mcLabelB0Pion = trackB0PionRotated->GetLabel();
4069 Int_t mcLabelDStarPion = trackFirstDaughter->GetLabel();
4070 Int_t mcLabelD0first = ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->GetLabel();
4071 Int_t mcLabelD0second = ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->GetLabel();
4073 if(mcLabelB0Pion >= 0 && mcLabelDStarPion >= 0 && mcLabelD0first >= 0 && mcLabelD0second >= 0)
4075 AliAODMCParticle * mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0Pion);
4076 AliAODMCParticle * mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStarPion);
4077 AliAODMCParticle * mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0first);
4078 AliAODMCParticle * mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0second);
4083 while(mcB0Pion->GetMother() >= 0)
4085 mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcB0Pion->GetMother());
4086 fillthis=
"particle_pdgB0Pion";
4087 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcB0Pion->GetPdgCode()),iterator++);
4094 while(mcDStarPion->GetMother() >= 0)
4096 mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcDStarPion->GetMother());
4097 fillthis=
"particle_pdgB0Pion";
4098 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcDStarPion->GetPdgCode()),iterator++);
4105 while(mcD0first->GetMother() >= 0)
4107 mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4108 fillthis=
"particle_pdgD0First";
4109 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcD0first->GetPdgCode()),iterator++);
4116 while(mcD0second->GetMother() >= 0)
4118 mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcD0second->GetMother());
4119 fillthis=
"particle_pdgD0Second";
4120 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(mcD0second->GetPdgCode()),iterator++);
4124 mcB0Pion = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0Pion);
4125 mcDStarPion = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStarPion);
4126 mcD0first = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0first);
4127 mcD0second = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0second);
4129 if(mcB0Pion && mcDStarPion && mcD0first && mcD0second)
4132 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4134 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4135 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4136 if(D0Mother->GetMother() == mcDStarPion->GetMother() && D0Mother->GetMother() >= 0 && D0GrandMother->GetMother() == mcB0Pion->GetMother() && D0GrandMother->GetMother() >= 0)
4138 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4139 fillthis=
"particle_pdgAll";
4140 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4141 fillthis=
"particle_pdgAllInvMass";
4142 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4143 if(TMath::Abs(finalMother->GetPdgCode())==511)
4145 bIsCorrelatedBackground = kTRUE;
4146 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4148 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4149 fillthis=
"particle_daughterPdgTwoStep511a";
4150 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4152 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4154 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4155 fillthis=
"particle_daughterPdgTwoStep511a";
4156 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4158 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4160 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4161 fillthis=
"particle_daughterPdgTwoStep511a";
4162 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4165 if(TMath::Abs(finalMother->GetPdgCode())==521)
4167 bIsCorrelatedBackground = kTRUE;
4168 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4170 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4171 fillthis=
"particle_daughterPdgTwoStep521a";
4172 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4174 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4176 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4177 fillthis=
"particle_daughterPdgTwoStep521a";
4178 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4180 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4182 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4183 fillthis=
"particle_daughterPdgTwoStep521a";
4184 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4191 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4193 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4194 if(D0Mother->GetMother() == mcB0Pion->GetMother() && D0Mother->GetMother() >= 0)
4196 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4197 fillthis=
"particle_pdgAllSecond";
4198 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4199 fillthis=
"particle_pdgAllInvMassSecond";
4200 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4201 if(TMath::Abs(finalMother->GetPdgCode())==511)
4203 bIsCorrelatedBackground = kTRUE;
4204 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4206 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4207 fillthis=
"particle_daughterPdgOneStep511a";
4208 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4210 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4212 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4213 fillthis=
"particle_daughterPdgOneStep511a";
4214 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4217 if(TMath::Abs(finalMother->GetPdgCode())==521)
4221 delete vertexMother; vertexMother = NULL;
4222 delete vertexDStar; vertexDStar = NULL;
4223 delete trackB0PionRotated; trackB0PionRotated = NULL;
4226 bIsCorrelatedBackground = kTRUE;
4227 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4229 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4230 fillthis=
"particle_daughterPdgOneStep521a";
4231 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4233 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4235 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4236 fillthis=
"particle_daughterPdgOneStep521a";
4237 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4244 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4246 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4247 if(D0Mother->GetMother() == mcDStarPion->GetMother() && D0Mother->GetMother() >= 0)
4249 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4250 fillthis=
"particle_pdgAllThird";
4251 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4252 fillthis=
"particle_pdgAllInvMassThird";
4253 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4254 if(TMath::Abs(finalMother->GetPdgCode())==511)
4256 bIsCorrelatedBackground = kTRUE;
4257 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4259 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4260 fillthis=
"particle_daughterPdgOneStep511b";
4261 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4263 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4265 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4266 fillthis=
"particle_daughterPdgOneStep511b";
4267 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4270 if(TMath::Abs(finalMother->GetPdgCode())==521)
4272 bIsCorrelatedBackground = kTRUE;
4273 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4275 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4276 fillthis=
"particle_daughterPdgOneStep521b";
4277 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4279 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4281 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4282 fillthis=
"particle_daughterPdgOneStep521b";
4283 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0Mother->GetPdgCode()));
4290 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4292 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4293 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4294 if(D0GrandMother->GetMother() == mcB0Pion->GetMother() && D0GrandMother->GetMother() >= 0)
4296 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4297 fillthis=
"particle_pdgAllFourth";
4298 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4299 fillthis=
"particle_pdgAllInvMassFourth";
4300 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4301 if(TMath::Abs(finalMother->GetPdgCode())==511)
4305 delete vertexMother; vertexMother = NULL;
4306 delete vertexDStar; vertexDStar = NULL;
4307 delete trackB0PionRotated; trackB0PionRotated = NULL;
4310 bIsCorrelatedBackground = kTRUE;
4311 bIsCorrelatedBackground511 = kTRUE;
4312 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4314 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4315 fillthis=
"particle_daughterPdgTwoStep511b";
4316 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4318 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4320 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4321 fillthis=
"particle_daughterPdgTwoStep511b";
4322 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4324 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4326 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4327 fillthis=
"particle_daughterPdgTwoStep511b";
4328 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4331 if(TMath::Abs(finalMother->GetPdgCode())==521)
4333 bIsCorrelatedBackground = kTRUE;
4334 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4336 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4337 fillthis=
"particle_daughterPdgTwoStep521b";
4338 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4340 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4342 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4343 fillthis=
"particle_daughterPdgTwoStep521b";
4344 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4346 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4348 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4349 fillthis=
"particle_daughterPdgTwoStep521b";
4350 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4357 if(mcD0first->GetMother() == mcD0second->GetMother() && mcD0first->GetMother() >= 0)
4359 AliAODMCParticle * D0Mother = (AliAODMCParticle*)mcTrackArray->At(mcD0first->GetMother());
4360 AliAODMCParticle * D0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetMother());
4361 if(D0GrandMother->GetMother() == mcDStarPion->GetMother() && D0GrandMother->GetMother() >= 0)
4363 AliAODMCParticle * finalMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetMother());
4364 fillthis=
"particle_pdgAllFifth";
4365 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()));
4366 fillthis=
"particle_pdgAllInvMassFifth";
4367 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(TMath::Abs(finalMother->GetPdgCode()),invariantMassMother);
4368 if(TMath::Abs(finalMother->GetPdgCode())==511)
4370 bIsCorrelatedBackground = kTRUE;
4371 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4373 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4374 fillthis=
"particle_daughterPdgTwoStep511c";
4375 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4377 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4379 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4380 fillthis=
"particle_daughterPdgTwoStep511c";
4381 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4383 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4385 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4386 fillthis=
"particle_daughterPdgTwoStep511c";
4387 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4390 if(TMath::Abs(finalMother->GetPdgCode())==521)
4392 bIsCorrelatedBackground = kTRUE;
4393 for (
Int_t iDaughter = 0; iDaughter < finalMother->GetNDaughters(); ++iDaughter)
4395 AliAODMCParticle* daughterfinalMother = (AliAODMCParticle*)mcTrackArray->At(finalMother->GetDaughter(0)+iDaughter);
4396 fillthis=
"particle_daughterPdgTwoStep521c";
4397 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter,TMath::Abs(daughterfinalMother->GetPdgCode()));
4399 for (
Int_t iDaughter = 0; iDaughter < D0GrandMother->GetNDaughters(); ++iDaughter)
4401 AliAODMCParticle* daughterD0GrandMother = (AliAODMCParticle*)mcTrackArray->At(D0GrandMother->GetDaughter(0)+iDaughter);
4402 fillthis=
"particle_daughterPdgTwoStep521c";
4403 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+10,TMath::Abs(daughterD0GrandMother->GetPdgCode()));
4405 for (
Int_t iDaughter = 0; iDaughter < D0Mother->GetNDaughters(); ++iDaughter)
4407 AliAODMCParticle* daughterD0Mother = (AliAODMCParticle*)mcTrackArray->At(D0Mother->GetDaughter(0)+iDaughter);
4408 fillthis=
"particle_daughterPdgTwoStep521c";
4409 ((
TH2F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(iDaughter+20,TMath::Abs(daughterD0Mother->GetPdgCode()));
4435 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
4440 if(!isDesiredCandidate)
4442 motherType = 0; histType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4446 if(isDesiredCandidate)
4448 motherType = 0; histType = 5;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4458 ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[ptBin]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[ptBin+1];
4459 histType = 6 + 2 * ptBin;
4462 Int_t histTypeD0 = 2 * d0PtBin;
4465 Int_t histTypeD0DStar = 2 * d0DStarPtBin;
4468 Int_t histTypeDStar = 2 * dstarPtBin;
4471 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
4473 if(!bSameSign && histType > 5)
4475 if(!isDesiredCandidate)
4477 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4480 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0, pdgD0);
4481 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar, pdgD0);
4485 if(isDesiredCandidate)
4488 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
4491 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0 + 1, pdgD0);
4492 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar + 1, pdgD0);
4499 if(bSameSign && iRot == 0)
4501 fillthis=
"invariantMassB0";
4502 fillthis +=
"_SameSign";
4503 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4504 fillthis=
"invariantMassB0";
4505 fillthis += ptBinMother +
"_SameSign";
4506 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4507 fillthis=
"invariantMassB0";
4508 fillthis +=
"_SignSum";
4509 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4510 fillthis=
"invariantMassB0";
4511 fillthis += ptBinMother +
"_SignSum";
4512 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4518 fillthis=
"invariantMassB0";
4519 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4520 fillthis=
"invariantMassB0";
4521 fillthis += ptBinMother;
4522 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4523 fillthis=
"invariantMassB0";
4524 fillthis +=
"_SignSum";
4525 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4526 fillthis=
"invariantMassB0";
4527 fillthis += ptBinMother +
"_SignSum";
4528 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4530 fillthis =
"invariantMassB0Signal_BA";
4531 if(isDesiredCandidate) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4533 fillthis =
"invariantMassB0Correlated_BA";
4534 if(bIsCorrelatedBackground) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4536 fillthis =
"invariantMassB0Background_BA";
4537 if(!isDesiredCandidate && !bIsCorrelatedBackground) ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4539 if(bIsCorrelatedBackground511)
4541 fillthis=
"invariantMassB0_correlated511";
4542 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4543 fillthis=
"invariantMassB0";
4544 fillthis += ptBinMother +
"_correlated511";
4545 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4548 if(!isDesiredCandidate && !bIsInjected)
4550 TString signName =
"_HIJING_Background";
4551 fillthis=
"invariantMassB0";
4552 fillthis += signName;
4553 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4554 fillthis=
"invariantMassB0";
4555 fillthis += ptBinMother + signName;
4556 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4558 if(isDesiredCandidate && !bIsInjected)
4560 TString signName =
"_HIJING_Signal";
4561 fillthis=
"invariantMassB0";
4562 fillthis += signName;
4563 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4564 fillthis=
"invariantMassB0";
4565 fillthis += ptBinMother + signName;
4566 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4571 TString signName =
"_Background_rotation";
4572 fillthis=
"invariantMassB0";
4573 fillthis += signName;
4574 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4575 fillthis=
"invariantMassB0";
4576 fillthis += ptBinMother + signName;
4577 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4578 if(!isDesiredCandidate && !bIsInjected)
4580 signName =
"_HIJING_Background_rotation";
4581 fillthis=
"invariantMassB0";
4582 fillthis += signName;
4583 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4584 fillthis=
"invariantMassB0";
4585 fillthis += ptBinMother + signName;
4586 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4591 if(trackB0.Pt() > 6.0)
4593 TString broadptBinMother =
"_ptbin_6_to_inf";
4594 if(bSameSign && iRot == 0)
4596 fillthis=
"invariantMassB0";
4597 fillthis += broadptBinMother +
"_SameSign";
4598 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4599 fillthis=
"invariantMassB0";
4600 fillthis += broadptBinMother +
"_SignSum";
4601 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4607 fillthis=
"invariantMassB0";
4608 fillthis += broadptBinMother;
4609 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4610 fillthis=
"invariantMassB0";
4611 fillthis += broadptBinMother +
"_SignSum";
4612 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4613 if(!isDesiredCandidate && !bIsInjected)
4615 TString signName =
"_HIJING_Background";
4616 fillthis=
"invariantMassB0";
4617 fillthis += broadptBinMother + signName;
4618 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4620 if(isDesiredCandidate && !bIsInjected)
4622 TString signName =
"_HIJING_Signal";
4623 fillthis=
"invariantMassB0";
4624 fillthis += broadptBinMother + signName;
4625 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4630 TString signName =
"_Background_rotation";
4631 fillthis=
"invariantMassB0";
4632 fillthis += broadptBinMother + signName;
4633 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4634 if(!isDesiredCandidate && !bIsInjected)
4636 signName =
"_HIJING_Background_rotation";
4637 fillthis=
"invariantMassB0";
4638 fillthis += broadptBinMother + signName;
4639 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4645 if(trackB0.Pt() > 3.0)
4647 TString broadptBinMother =
"_ptbin_3_to_inf";
4648 if(bSameSign && iRot == 0)
4650 fillthis=
"invariantMassB0";
4651 fillthis += broadptBinMother +
"_SameSign";
4652 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4653 fillthis=
"invariantMassB0";
4654 fillthis += broadptBinMother +
"_SignSum";
4655 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4661 fillthis=
"invariantMassB0";
4662 fillthis += broadptBinMother;
4663 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4664 fillthis=
"invariantMassB0";
4665 fillthis += broadptBinMother +
"_SignSum";
4666 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4667 if(!isDesiredCandidate && !bIsInjected)
4669 TString signName =
"_HIJING_Background";
4670 fillthis=
"invariantMassB0";
4671 fillthis += broadptBinMother + signName;
4672 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4674 if(isDesiredCandidate && !bIsInjected)
4676 TString signName =
"_HIJING_Signal";
4677 fillthis=
"invariantMassB0";
4678 fillthis += broadptBinMother + signName;
4679 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4684 TString signName =
"_Background_rotation";
4685 fillthis=
"invariantMassB0";
4686 fillthis += broadptBinMother + signName;
4687 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4688 if(!isDesiredCandidate && !bIsInjected)
4690 signName =
"_HIJING_Background_rotation";
4691 fillthis=
"invariantMassB0";
4692 fillthis += broadptBinMother + signName;
4693 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4700 if(bSameSign && iRot == 0)
4702 fillthis=
"fineBin_invariantMassB0";
4703 fillthis +=
"_SameSign";
4704 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4705 fillthis=
"fineBin_invariantMassB0";
4706 fillthis += ptBinMother +
"_SameSign";
4707 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4708 fillthis=
"fineBin_invariantMassB0";
4709 fillthis +=
"_SignSum";
4710 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4711 fillthis=
"fineBin_invariantMassB0";
4712 fillthis += ptBinMother +
"_SignSum";
4713 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4719 fillthis=
"fineBin_invariantMassB0";
4720 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4721 fillthis=
"fineBin_invariantMassB0";
4722 fillthis += ptBinMother;
4723 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4724 fillthis=
"fineBin_invariantMassB0";
4725 fillthis +=
"_SignSum";
4726 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4727 fillthis=
"fineBin_invariantMassB0";
4728 fillthis += ptBinMother +
"_SignSum";
4729 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4731 if(!isDesiredCandidate && !bIsInjected)
4733 TString signName =
"_HIJING_Background";
4734 fillthis=
"fineBin_invariantMassB0";
4735 fillthis += signName;
4736 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4737 fillthis=
"fineBin_invariantMassB0";
4738 fillthis += ptBinMother + signName;
4739 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4741 if(isDesiredCandidate && !bIsInjected)
4743 TString signName =
"_HIJING_Signal";
4744 fillthis=
"fineBin_invariantMassB0";
4745 fillthis += signName;
4746 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4747 fillthis=
"fineBin_invariantMassB0";
4748 fillthis += ptBinMother + signName;
4749 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4754 TString signName =
"_Background_rotation";
4755 fillthis=
"fineBin_invariantMassB0";
4756 fillthis += signName;
4757 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4758 fillthis=
"fineBin_invariantMassB0";
4759 fillthis += ptBinMother + signName;
4760 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4761 if(!isDesiredCandidate && !bIsInjected)
4763 signName =
"_HIJING_Background_rotation";
4764 fillthis=
"fineBin_invariantMassB0";
4765 fillthis += signName;
4766 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4767 fillthis=
"fineBin_invariantMassB0";
4768 fillthis += ptBinMother + signName;
4769 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4774 if(trackB0.Pt() > 6.0)
4776 TString broadptBinMother =
"_ptbin_6_to_inf";
4777 if(bSameSign && iRot == 0)
4779 fillthis=
"fineBin_invariantMassB0";
4780 fillthis += broadptBinMother +
"_SameSign";
4781 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4782 fillthis=
"fineBin_invariantMassB0";
4783 fillthis += broadptBinMother +
"_SignSum";
4784 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4790 fillthis=
"fineBin_invariantMassB0";
4791 fillthis += broadptBinMother;
4792 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4793 fillthis=
"fineBin_invariantMassB0";
4794 fillthis += broadptBinMother +
"_SignSum";
4795 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4796 if(!isDesiredCandidate && !bIsInjected)
4798 TString signName =
"_HIJING_Background";
4799 fillthis=
"fineBin_invariantMassB0";
4800 fillthis += broadptBinMother + signName;
4801 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4803 if(isDesiredCandidate && !bIsInjected)
4805 TString signName =
"_HIJING_Signal";
4806 fillthis=
"fineBin_invariantMassB0";
4807 fillthis += broadptBinMother + signName;
4808 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4813 TString signName =
"_Background_rotation";
4814 fillthis=
"fineBin_invariantMassB0";
4815 fillthis += broadptBinMother + signName;
4816 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4817 if(!isDesiredCandidate && !bIsInjected)
4819 signName =
"_HIJING_Background_rotation";
4820 fillthis=
"fineBin_invariantMassB0";
4821 fillthis += broadptBinMother + signName;
4822 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4828 if(trackB0.Pt() > 3.0)
4830 TString broadptBinMother =
"_ptbin_3_to_inf";
4831 if(bSameSign && iRot == 0)
4833 fillthis=
"fineBin_invariantMassB0";
4834 fillthis += broadptBinMother +
"_SameSign";
4835 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4836 fillthis=
"fineBin_invariantMassB0";
4837 fillthis += broadptBinMother +
"_SignSum";
4838 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
4844 fillthis=
"fineBin_invariantMassB0";
4845 fillthis += broadptBinMother;
4846 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4847 fillthis=
"fineBin_invariantMassB0";
4848 fillthis += broadptBinMother +
"_SignSum";
4849 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
4850 if(!isDesiredCandidate && !bIsInjected)
4852 TString signName =
"_HIJING_Background";
4853 fillthis=
"fineBin_invariantMassB0";
4854 fillthis += broadptBinMother + signName;
4855 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4857 if(isDesiredCandidate && !bIsInjected)
4859 TString signName =
"_HIJING_Signal";
4860 fillthis=
"fineBin_invariantMassB0";
4861 fillthis += broadptBinMother + signName;
4862 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4867 TString signName =
"_Background_rotation";
4868 fillthis=
"fineBin_invariantMassB0";
4869 fillthis += broadptBinMother + signName;
4870 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4871 if(!isDesiredCandidate && !bIsInjected)
4873 signName =
"_HIJING_Background_rotation";
4874 fillthis=
"fineBin_invariantMassB0";
4875 fillthis += broadptBinMother + signName;
4876 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
4883 if(bSameSign && iRot == 0)
4885 fillthis=
"deltainvariantMassB0";
4886 fillthis +=
"_SameSign";
4887 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4888 fillthis=
"deltainvariantMassB0";
4889 fillthis += ptBinMother +
"_SameSign";
4890 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4891 fillthis=
"deltainvariantMassB0";
4892 fillthis +=
"_SignSum";
4893 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
4894 fillthis=
"deltainvariantMassB0";
4895 fillthis += ptBinMother +
"_SignSum";
4896 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
4902 fillthis=
"deltainvariantMassB0";
4903 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4904 fillthis=
"deltainvariantMassB0";
4905 fillthis += ptBinMother;
4906 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4907 fillthis=
"deltainvariantMassB0";
4908 fillthis +=
"_SignSum";
4909 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
4910 fillthis=
"deltainvariantMassB0";
4911 fillthis += ptBinMother +
"_SignSum";
4912 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
4914 if(bIsCorrelatedBackground511)
4916 fillthis=
"deltainvariantMassB0_correlated511";
4917 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4918 fillthis=
"deltainvariantMassB0";
4919 fillthis += ptBinMother +
"_correlated511" ;
4920 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4923 if(!isDesiredCandidate && !bIsInjected)
4925 TString signName =
"_HIJING_Background";
4926 fillthis=
"deltainvariantMassB0";
4927 fillthis += signName;
4928 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4929 fillthis=
"deltainvariantMassB0";
4930 fillthis += ptBinMother + signName;
4931 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4933 if(isDesiredCandidate && !bIsInjected)
4935 TString signName =
"_HIJING_Signal";
4936 fillthis=
"deltainvariantMassB0";
4937 fillthis += signName;
4938 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4939 fillthis=
"deltainvariantMassB0";
4940 fillthis += ptBinMother + signName;
4941 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4946 TString signName =
"_Background_rotation";
4947 fillthis=
"deltainvariantMassB0";
4948 fillthis += signName;
4949 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4950 fillthis=
"deltainvariantMassB0";
4951 fillthis += ptBinMother + signName;
4952 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4953 if(!isDesiredCandidate && !bIsInjected)
4955 signName =
"_HIJING_Background_rotation";
4956 fillthis=
"deltainvariantMassB0";
4957 fillthis += signName;
4958 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4959 fillthis=
"deltainvariantMassB0";
4960 fillthis += ptBinMother + signName;
4961 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4966 if(trackB0.Pt() > 6.0)
4968 TString broadptBinMother =
"_ptbin_6_to_inf";
4969 if(bSameSign && iRot == 0)
4971 fillthis=
"deltainvariantMassB0";
4972 fillthis += broadptBinMother +
"_SameSign";
4973 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4974 fillthis=
"deltainvariantMassB0";
4975 fillthis += broadptBinMother +
"_SignSum";
4976 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
4982 fillthis=
"deltainvariantMassB0";
4983 fillthis += broadptBinMother;
4984 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4985 fillthis=
"deltainvariantMassB0";
4986 fillthis += broadptBinMother +
"_SignSum";
4987 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
4988 if(!isDesiredCandidate && !bIsInjected)
4990 TString signName =
"_HIJING_Background";
4991 fillthis=
"deltainvariantMassB0";
4992 fillthis += broadptBinMother + signName;
4993 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
4995 if(isDesiredCandidate && !bIsInjected)
4997 TString signName =
"_HIJING_Signal";
4998 fillthis=
"deltainvariantMassB0";
4999 fillthis += broadptBinMother + signName;
5000 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5005 TString signName =
"_Background_rotation";
5006 fillthis=
"deltainvariantMassB0";
5007 fillthis += broadptBinMother + signName;
5008 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5009 if(!isDesiredCandidate && !bIsInjected)
5011 signName =
"_HIJING_Background_rotation";
5012 fillthis=
"deltainvariantMassB0";
5013 fillthis += broadptBinMother + signName;
5014 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5020 if(trackB0.Pt() > 3.0)
5022 TString broadptBinMother =
"_ptbin_3_to_inf";
5023 if(bSameSign && iRot == 0)
5025 fillthis=
"deltainvariantMassB0";
5026 fillthis += broadptBinMother +
"_SameSign";
5027 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5028 fillthis=
"deltainvariantMassB0";
5029 fillthis += broadptBinMother +
"_SignSum";
5030 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5036 fillthis=
"deltainvariantMassB0";
5037 fillthis += broadptBinMother;
5038 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5039 fillthis=
"deltainvariantMassB0";
5040 fillthis += broadptBinMother +
"_SignSum";
5041 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5042 if(!isDesiredCandidate && !bIsInjected)
5044 TString signName =
"_HIJING_Background";
5045 fillthis=
"deltainvariantMassB0";
5046 fillthis += broadptBinMother + signName;
5047 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5049 if(isDesiredCandidate && !bIsInjected)
5051 TString signName =
"_HIJING_Signal";
5052 fillthis=
"deltainvariantMassB0";
5053 fillthis += broadptBinMother + signName;
5054 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5059 TString signName =
"_Background_rotation";
5060 fillthis=
"deltainvariantMassB0";
5061 fillthis += broadptBinMother + signName;
5062 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5063 if(!isDesiredCandidate && !bIsInjected)
5065 signName =
"_HIJING_Background_rotation";
5066 fillthis=
"deltainvariantMassB0";
5067 fillthis += broadptBinMother + signName;
5068 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5075 if(bSameSign && iRot == 0)
5077 fillthis=
"fineBin_deltainvariantMassB0";
5078 fillthis +=
"_SameSign";
5079 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5080 fillthis=
"fineBin_deltainvariantMassB0";
5081 fillthis += ptBinMother +
"_SameSign";
5082 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5083 fillthis=
"fineBin_deltainvariantMassB0";
5084 fillthis +=
"_SignSum";
5085 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5086 fillthis=
"fineBin_deltainvariantMassB0";
5087 fillthis += ptBinMother +
"_SignSum";
5088 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5094 fillthis=
"fineBin_deltainvariantMassB0";
5095 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5096 fillthis=
"fineBin_deltainvariantMassB0";
5097 fillthis += ptBinMother;
5098 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5099 fillthis=
"fineBin_deltainvariantMassB0";
5100 fillthis +=
"_SignSum";
5101 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5102 fillthis=
"fineBin_deltainvariantMassB0";
5103 fillthis += ptBinMother +
"_SignSum";
5104 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5106 if(!isDesiredCandidate && !bIsInjected)
5108 TString signName =
"_HIJING_Background";
5109 fillthis=
"fineBin_deltainvariantMassB0";
5110 fillthis += signName;
5111 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5112 fillthis=
"fineBin_deltainvariantMassB0";
5113 fillthis += ptBinMother + signName;
5114 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5116 if(isDesiredCandidate && !bIsInjected)
5118 TString signName =
"_HIJING_Signal";
5119 fillthis=
"fineBin_deltainvariantMassB0";
5120 fillthis += signName;
5121 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5122 fillthis=
"fineBin_deltainvariantMassB0";
5123 fillthis += ptBinMother + signName;
5124 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5129 TString signName =
"_Background_rotation";
5130 fillthis=
"fineBin_deltainvariantMassB0";
5131 fillthis += signName;
5132 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5133 fillthis=
"fineBin_deltainvariantMassB0";
5134 fillthis += ptBinMother + signName;
5135 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5136 if(!isDesiredCandidate && !bIsInjected)
5138 signName =
"_HIJING_Background_rotation";
5139 fillthis=
"fineBin_deltainvariantMassB0";
5140 fillthis += signName;
5141 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5142 fillthis=
"fineBin_deltainvariantMassB0";
5143 fillthis += ptBinMother + signName;
5144 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5149 if(trackB0.Pt() > 6.0)
5151 TString broadptBinMother =
"_ptbin_6_to_inf";
5152 if(bSameSign && iRot == 0)
5154 fillthis=
"fineBin_deltainvariantMassB0";
5155 fillthis += broadptBinMother +
"_SameSign";
5156 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5157 fillthis=
"fineBin_deltainvariantMassB0";
5158 fillthis += broadptBinMother +
"_SignSum";
5159 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5165 fillthis=
"fineBin_deltainvariantMassB0";
5166 fillthis += broadptBinMother;
5167 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5168 fillthis=
"fineBin_deltainvariantMassB0";
5169 fillthis += broadptBinMother +
"_SignSum";
5170 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5171 if(!isDesiredCandidate && !bIsInjected)
5173 TString signName =
"_HIJING_Background";
5174 fillthis=
"fineBin_deltainvariantMassB0";
5175 fillthis += broadptBinMother + signName;
5176 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5178 if(isDesiredCandidate && !bIsInjected)
5180 TString signName =
"_HIJING_Signal";
5181 fillthis=
"fineBin_deltainvariantMassB0";
5182 fillthis += broadptBinMother + signName;
5183 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5188 TString signName =
"_Background_rotation";
5189 fillthis=
"fineBin_deltainvariantMassB0";
5190 fillthis += broadptBinMother + signName;
5191 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5192 if(!isDesiredCandidate && !bIsInjected)
5194 signName =
"_HIJING_Background_rotation";
5195 fillthis=
"fineBin_deltainvariantMassB0";
5196 fillthis += broadptBinMother + signName;
5197 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5203 if(trackB0.Pt() > 3.0)
5205 TString broadptBinMother =
"_ptbin_3_to_inf";
5206 if(bSameSign && iRot == 0)
5208 fillthis=
"fineBin_deltainvariantMassB0";
5209 fillthis += broadptBinMother +
"_SameSign";
5210 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5211 fillthis=
"fineBin_deltainvariantMassB0";
5212 fillthis += broadptBinMother +
"_SignSum";
5213 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,-1);
5219 fillthis=
"fineBin_deltainvariantMassB0";
5220 fillthis += broadptBinMother;
5221 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5222 fillthis=
"fineBin_deltainvariantMassB0";
5223 fillthis += broadptBinMother +
"_SignSum";
5224 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta,1);
5225 if(!isDesiredCandidate && !bIsInjected)
5227 TString signName =
"_HIJING_Background";
5228 fillthis=
"fineBin_deltainvariantMassB0";
5229 fillthis += broadptBinMother + signName;
5230 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5232 if(isDesiredCandidate && !bIsInjected)
5234 TString signName =
"_HIJING_Signal";
5235 fillthis=
"fineBin_deltainvariantMassB0";
5236 fillthis += broadptBinMother + signName;
5237 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5242 TString signName =
"_Background_rotation";
5243 fillthis=
"fineBin_deltainvariantMassB0";
5244 fillthis += broadptBinMother + signName;
5245 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5246 if(!isDesiredCandidate && !bIsInjected)
5248 signName =
"_HIJING_Background_rotation";
5249 fillthis=
"fineBin_deltainvariantMassB0";
5250 fillthis += broadptBinMother + signName;
5251 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
5257 delete vertexMother; vertexMother = NULL;
5258 delete vertexDStar; vertexDStar = NULL;
5259 delete trackB0PionRotated; trackB0PionRotated = NULL;
5267 TProcessID::SetObjectCount(ObjectNumber);
5276 AliAODTrack* selectedB0Pion = (AliAODTrack*)selectedB0->GetDaughter(0);
5279 AliAODTrack* selectedDStarPion = (AliAODTrack*)selectedDStar->GetDaughter(0);
5282 AliAODTrack* selectedD0Pion;
5283 AliAODTrack* selectedD0Kaon;
5285 if(selectedDStarPion->Charge() == 1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(0);
5286 if(selectedDStarPion->Charge() == -1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(1);
5288 if(selectedDStarPion->Charge() == 1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(1);
5289 if(selectedDStarPion->Charge() == -1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(0);
5291 Double_t d0B0pion = TMath::Abs(selectedB0->Getd0Prong(0));
5292 Double_t d0DStarpion = TMath::Abs(selectedDStar->Getd0Prong(0));
5296 if(selectedDStarPion->Charge() == 1) d0D0pion = selectedD0->Getd0Prong(0);
5297 if(selectedDStarPion->Charge() == -1) d0D0pion = selectedD0->Getd0Prong(1);
5299 if(selectedDStarPion->Charge() == 1) d0D0kaon = selectedD0->Getd0Prong(1);
5300 if(selectedDStarPion->Charge() == -1) d0D0kaon = selectedD0->Getd0Prong(0);
5304 Int_t numberOfITS = 0;
5305 Int_t numberOfTPC = 0;
5306 Int_t daughterType, histType;
5307 Int_t totalNumberOfITS = 0;
5308 Int_t totalNumberOfTPC = 0;
5313 Int_t pionPIDnumber = 2;
5314 Int_t kaonPIDnumber = 3;
5321 pt_track = selectedD0Pion->Pt();
5322 momentum_track = selectedD0Pion->P();
5323 numberOfITS = selectedD0Pion->GetITSNcls();
5324 numberOfTPC = selectedD0Pion->GetTPCNcls();
5325 totalNumberOfITS += numberOfITS;
5326 totalNumberOfTPC += numberOfTPC;
5327 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Pion, pionPIDnumber, nSigmaTPC);
5328 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Pion, pionPIDnumber, nSigmaTOF);
5329 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5330 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5336 if(!isDesiredCandidate)
5343 for (
Int_t j = 0; j < 10; ++j)
5345 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5351 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5356 if(isDesiredCandidate)
5364 for (
Int_t j = 0; j < 10; ++j)
5366 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5372 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5381 Float_t pdgCodeParticleMother = -1;
5382 Int_t mcLabelParticle = -1;
5383 Int_t mcLabelParticleMother = -1;
5384 mcLabelParticle = selectedD0Pion->GetLabel();
5386 if(mcLabelParticle >= 0){
5388 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5389 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5391 mcLabelParticleMother = mcTrackParticle->GetMother();
5393 if(mcLabelParticleMother >= 0){
5394 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5395 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5396 ((TH1F*)fDaughterHistogramArrayExtra[0][3])->Fill(pdgCodeParticleMother);
5404 pt_track = selectedD0Kaon->Pt();
5405 momentum_track = selectedD0Kaon->P();
5406 numberOfITS = selectedD0Kaon->GetITSNcls();
5407 numberOfTPC = selectedD0Kaon->GetTPCNcls();
5408 totalNumberOfITS += numberOfITS;
5409 totalNumberOfTPC += numberOfTPC;
5410 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Kaon, kaonPIDnumber, nSigmaTPC);
5411 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Kaon, kaonPIDnumber, nSigmaTOF);
5412 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5413 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5417 if(!isDesiredCandidate)
5424 for (
Int_t j = 0; j < 10; ++j)
5426 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5432 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5437 if(isDesiredCandidate)
5445 for (
Int_t j = 0; j < 10; ++j)
5447 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5453 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5462 Float_t pdgCodeParticleMother = -1;
5463 Int_t mcLabelParticle = -1;
5464 Int_t mcLabelParticleMother = -1;
5465 mcLabelParticle = selectedD0Kaon->GetLabel();
5467 if(mcLabelParticle >= 0){
5469 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5470 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5472 mcLabelParticleMother = mcTrackParticle->GetMother();
5474 if(mcLabelParticleMother >= 0){
5475 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5476 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5477 ((TH1F*)fDaughterHistogramArrayExtra[1][3])->Fill(pdgCodeParticleMother);
5483 pt_track = selectedDStarPion->Pt();
5484 momentum_track = selectedDStarPion->P();
5485 numberOfITS = selectedDStarPion->GetITSNcls();
5486 numberOfTPC = selectedDStarPion->GetTPCNcls();
5487 totalNumberOfITS += numberOfITS;
5488 totalNumberOfTPC += numberOfTPC;
5489 TPCok = trackPIDHF->
GetnSigmaTPC(selectedDStarPion, pionPIDnumber, nSigmaTPC);
5490 TOFok = trackPIDHF->
GetnSigmaTOF(selectedDStarPion, pionPIDnumber, nSigmaTOF);
5491 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5495 if(!isDesiredCandidate)
5502 for (
Int_t j = 0; j < 10; ++j)
5504 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5510 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5515 if(isDesiredCandidate)
5523 for (
Int_t j = 0; j < 10; ++j)
5525 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5531 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5540 Float_t pdgCodeParticleMother = -1;
5541 Int_t mcLabelParticle = -1;
5542 Int_t mcLabelParticleMother = -1;
5543 mcLabelParticle = selectedDStarPion->GetLabel();
5545 if(mcLabelParticle >= 0){
5547 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5548 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5550 mcLabelParticleMother = mcTrackParticle->GetMother();
5552 if(mcLabelParticleMother >= 0){
5553 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5554 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5555 ((TH1F*)fDaughterHistogramArrayExtra[2][3])->Fill(pdgCodeParticleMother);
5561 pt_track = selectedB0Pion->Pt();
5562 momentum_track = selectedB0Pion->P();
5563 numberOfITS = selectedB0Pion->GetITSNcls();
5564 numberOfTPC = selectedB0Pion->GetTPCNcls();
5565 totalNumberOfITS += numberOfITS;
5566 totalNumberOfTPC += numberOfTPC;
5567 TPCok = trackPIDHF->
GetnSigmaTPC(selectedB0Pion, pionPIDnumber, nSigmaTPC);
5568 TOFok = trackPIDHF->
GetnSigmaTOF(selectedB0Pion, pionPIDnumber, nSigmaTOF);
5569 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
5570 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
5574 if(!isDesiredCandidate)
5581 for (
Int_t j = 0; j < 10; ++j)
5583 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5589 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5594 if(isDesiredCandidate)
5602 for (
Int_t j = 0; j < 10; ++j)
5604 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
5610 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
5619 Float_t pdgCodeParticleMother = -1;
5620 Int_t mcLabelParticle = -1;
5621 Int_t mcLabelParticleMother = -1;
5622 mcLabelParticle = selectedB0Pion->GetLabel();
5624 if(mcLabelParticle >= 0){
5626 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
5627 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
5629 mcLabelParticleMother = mcTrackParticle->GetMother();
5631 if(mcLabelParticleMother >= 0){
5632 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
5633 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
5634 ((TH1F*)fDaughterHistogramArrayExtra[3][3])->Fill(pdgCodeParticleMother);
5639 if(!isDesiredCandidate)
5641 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSBackground")))->Fill(totalNumberOfITS);
5642 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCBackground")))->Fill(totalNumberOfTPC);
5643 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDBackground")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
5645 if(isDesiredCandidate)
5647 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSSignal")))->Fill(totalNumberOfITS);
5648 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCSignal")))->Fill(totalNumberOfTPC);
5649 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDSignal")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
5661 Int_t chargeDStar = DStar->Charge();
5671 else if (chargeDStar==-1)
5680 std::cout <<
"Wrong charge DStar." << std::endl;
5683 e[2]=DStar->EProng(0,211);
5686 Double_t invMassDStar = TMath::Sqrt(esum*esum-DStar->P2());
5689 return invMassDStar - invMassD0;
5699 Int_t chargeDStar = DStar->Charge();
5709 else if (chargeDStar==-1)