43 #include <TParticle.h> 46 #include <TDatabasePDG.h> 47 #include <AliAnalysisDataSlot.h> 48 #include <AliAnalysisDataContainer.h> 51 #include "AliMCEvent.h" 52 #include "AliAnalysisManager.h" 53 #include "AliAODMCHeader.h" 54 #include "AliAODHandler.h" 56 #include "AliVertex.h" 57 #include "AliVVertex.h" 58 #include "AliESDVertex.h" 59 #include "AliAODVertex.h" 60 #include "AliVertexerTracks.h" 61 #include "AliExternalTrackParam.h" 62 #include "AliNeutralTrackParam.h" 63 #include "AliAODRecoDecay.h" 68 #include "AliESDtrack.h" 69 #include "AliAODMCParticle.h" 71 #include "AliAODEvent.h" 73 #include "AliAODInputHandler.h" 100 fOutputD0_DStarPt(0),
101 fOutputDStar_DStarPt(0),
104 fQuickSignalAnalysis(0),
114 fnPtBinsD0forD0ptbin(0),
115 fnPtBinsD0forDStarptbin(0),
116 fnPtBinsDStarforDStarptbin(0),
118 fnPtBinsD0forD0ptbinLimits(0),
119 fnPtBinsD0forDStarptbinLimits(0),
120 fnPtBinsDStarforDStarptbinLimits(0),
122 fPtBinLimitsD0forD0ptbin(0),
123 fPtBinLimitsD0forDStarptbin(0),
124 fPtBinLimitsDStarforDStarptbin(0),
125 fDaughterHistogramArray(),
126 fDaughterHistogramArray2D(),
127 fMotherHistogramArray(),
128 fMotherHistogramArray2D(),
129 fMotherHistogramArrayExtra()
183 Info(
"AliAnalysisTaskSEB0toDStarPi",
"Calling Constructor");
233 DefineOutput(1,TList::Class());
234 DefineOutput(2,TList::Class());
235 DefineOutput(3,TList::Class());
236 DefineOutput(4,AliRDHFCutsB0toDStarPi::Class());
237 DefineOutput(5,AliNormalizationCounter::Class());
238 DefineOutput(6,TList::Class());
239 DefineOutput(7,TList::Class());
240 DefineOutput(8,TList::Class());
241 DefineOutput(9,TList::Class());
242 DefineOutput(10,TList::Class());
243 DefineOutput(11,TList::Class());
244 DefineOutput(12,TList::Class());
245 DefineOutput(13,TList::Class());
246 DefineOutput(14,TList::Class());
247 DefineOutput(15,TList::Class());
248 DefineOutput(16,TList::Class());
256 Info(
"~AliAnalysisTaskSEB0toDStarPi",
"Calling Destructor");
282 if(fDebug > 1) printf(
"AliAnalysisTaskSEB0toDStarPi::Init() \n");
285 PostData(4,copyfCuts);
301 Error(
"UserExec",
"NO EVENT FOUND!");
306 std::cout <<
"\r" <<
"Analysing event number: " <<
fEvents << std::endl;
314 std::bitset<32> maskEV(((AliAODInputHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected());
315 std::cout <<
"Event mask: " << maskEV << std::endl;
325 TClonesArray * D0TracksFromFriendFile = 0;
328 if(!aodEvent && AODEvent() && IsStandardAOD())
332 aodEvent =
dynamic_cast<AliAODEvent*
> (AODEvent());
335 AliAODHandler* aodHandler = (AliAODHandler*)((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
336 if(aodHandler->GetExtensions())
338 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
340 D0TracksFromFriendFile=(TClonesArray*)aodFromExt->GetList()->FindObject(
"D0toKpi");
345 D0TracksFromFriendFile=(TClonesArray*)aodEvent->GetList()->FindObject(
"D0toKpi");
350 if(!aodEvent->GetPrimaryVertex() || TMath::Abs(aodEvent->GetMagneticField())<0.001)
return;
356 TString trigclass=aodEvent->GetFiredTriggerClasses();
357 if(trigclass.Contains(
"C0SMH-B-NOPF-ALLNOTRD")||trigclass.Contains(
"C0SMH-B-NOPF-ALL"))
fCEvents->Fill(5);
377 AliAODVertex *primaryVertex = (AliAODVertex*)aodEvent->GetPrimaryVertex();
378 if(!primaryVertex)
return;
379 if(primaryVertex->GetNContributors()<1)
return;
382 if(!D0TracksFromFriendFile)
384 AliInfo(
"Could not find array of HF vertices, skipping the event");
387 else AliDebug(2, Form(
"Found %d vertices",D0TracksFromFriendFile->GetEntriesFast()));
397 TClonesArray *mcTrackArray = 0;
398 if(
fUseMCInfo) mcTrackArray =
dynamic_cast<TClonesArray*
>(aodEvent->FindListObject(AliAODMCParticle::StdBranchName()));
401 TMatrix * B0toDStarPiLabelMatrix =
new TMatrix(0,7);
419 B0PionSelection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix);
421 D0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile);
422 DStarAndB0Selection(aodEvent,primaryVertex,bz,mcTrackArray,B0toDStarPiLabelMatrix,D0TracksFromFriendFile);
429 delete B0toDStarPiLabelMatrix; B0toDStarPiLabelMatrix = NULL;
462 AliAnalysisTaskSE::Terminate();
466 printf(
"ERROR: fOutput not available\n");
474 printf(
"ERROR: fOutputD0Pion not available\n");
479 printf(
"ERROR: fOutputD0Kaon not available\n");
484 printf(
"ERROR: fOutputDStarPion not available\n");
489 printf(
"ERROR: fOutputB0Pion not available\n");
494 printf(
"ERROR: fOutputD0 not available\n");
499 printf(
"ERROR: fOutputDStar not available\n");
504 printf(
"ERROR: fOutputB0 not available\n");
509 printf(
"ERROR: fOutputD0_D0Pt not available\n");
514 printf(
"ERROR: fOutputD0_DStarPt not available\n");
519 printf(
"ERROR: fOutputDStar_DStarPt not available\n");
524 printf(
"ERROR: fOutputB0MC not available\n");
533 Info(
"UserCreateOutputObjects",
"CreateOutputObjects of task %s\n", GetName());
612 fCEvents =
new TH1F(
"fCEvents",
"conter",13,0,13);
614 fCEvents->GetXaxis()->SetTitle(
"1");
615 fCEvents->GetYaxis()->SetTitle(
"counts");
616 fCEvents->GetXaxis()->SetBinLabel(2,
"no. of events");
617 fCEvents->GetXaxis()->SetBinLabel(3,
"good prim vtx and B field");
618 fCEvents->GetXaxis()->SetBinLabel(4,
"no event selected");
619 fCEvents->GetXaxis()->SetBinLabel(5,
"no vtx contributors");
620 fCEvents->GetXaxis()->SetBinLabel(6,
"trigger for PbPb");
621 fCEvents->GetXaxis()->SetBinLabel(7,
"no z vtx");
622 fCEvents->GetXaxis()->SetBinLabel(12,
"no. of D0 fail to be rec");
627 TString name_mc_B0_pt =
"mc_B0_pt";
628 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);
629 hist_mc_B0_pt->Sumw2();
630 hist_mc_B0_pt->SetLineColor(6);
631 hist_mc_B0_pt->SetMarkerStyle(20);
632 hist_mc_B0_pt->SetMarkerSize(0.6);
633 hist_mc_B0_pt->SetMarkerColor(6);
634 TH1F* histogram_mc_B0_pt = (TH1F*)hist_mc_B0_pt->Clone();
637 TString name_mc_B0_pion_pt =
"mc_B0_pion_pt";
638 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);
639 hist_mc_B0_pion_pt->Sumw2();
640 hist_mc_B0_pion_pt->SetLineColor(6);
641 hist_mc_B0_pion_pt->SetMarkerStyle(20);
642 hist_mc_B0_pion_pt->SetMarkerSize(0.6);
643 hist_mc_B0_pion_pt->SetMarkerColor(6);
644 TH1F* histogram_mc_B0_pion_pt = (TH1F*)hist_mc_B0_pion_pt->Clone();
647 TString name_mc_DStar_pt =
"mc_DStar_pt";
648 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);
649 hist_mc_DStar_pt->Sumw2();
650 hist_mc_DStar_pt->SetLineColor(6);
651 hist_mc_DStar_pt->SetMarkerStyle(20);
652 hist_mc_DStar_pt->SetMarkerSize(0.6);
653 hist_mc_DStar_pt->SetMarkerColor(6);
654 TH1F* histogram_mc_DStar_pt = (TH1F*)hist_mc_DStar_pt->Clone();
657 TString name_mc_DStar_pion_pt =
"mc_DStar_pion_pt";
658 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);
659 hist_mc_DStar_pion_pt->Sumw2();
660 hist_mc_DStar_pion_pt->SetLineColor(6);
661 hist_mc_DStar_pion_pt->SetMarkerStyle(20);
662 hist_mc_DStar_pion_pt->SetMarkerSize(0.6);
663 hist_mc_DStar_pion_pt->SetMarkerColor(6);
664 TH1F* histogram_mc_DStar_pion_pt = (TH1F*)hist_mc_DStar_pion_pt->Clone();
667 TString name_mc_D0_pt =
"mc_D0_pt";
668 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);
669 hist_mc_D0_pt->Sumw2();
670 hist_mc_D0_pt->SetLineColor(6);
671 hist_mc_D0_pt->SetMarkerStyle(20);
672 hist_mc_D0_pt->SetMarkerSize(0.6);
673 hist_mc_D0_pt->SetMarkerColor(6);
674 TH1F* histogram_mc_D0_pt = (TH1F*)hist_mc_D0_pt->Clone();
677 TString name_mc_D0_pion_pt =
"mc_D0_pion_pt";
678 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);
679 hist_mc_D0_pion_pt->Sumw2();
680 hist_mc_D0_pion_pt->SetLineColor(6);
681 hist_mc_D0_pion_pt->SetMarkerStyle(20);
682 hist_mc_D0_pion_pt->SetMarkerSize(0.6);
683 hist_mc_D0_pion_pt->SetMarkerColor(6);
684 TH1F* histogram_mc_D0_pion_pt = (TH1F*)hist_mc_D0_pion_pt->Clone();
687 TString name_mc_D0_kaon_pt =
"mc_D0_kaon_pt";
688 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);
689 hist_mc_D0_kaon_pt->Sumw2();
690 hist_mc_D0_kaon_pt->SetLineColor(6);
691 hist_mc_D0_kaon_pt->SetMarkerStyle(20);
692 hist_mc_D0_kaon_pt->SetMarkerSize(0.6);
693 hist_mc_D0_kaon_pt->SetMarkerColor(6);
694 TH1F* histogram_mc_D0_kaon_pt = (TH1F*)hist_mc_D0_kaon_pt->Clone();
699 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
700 TH1F* hist_dca_D0_DStarPion =
new TH1F(name_dca_D0_DStarPion.Data(),
"dca_D0_DStarPion; DCA [cm]; Entries",1000,0,0.2);
701 hist_dca_D0_DStarPion->Sumw2();
702 hist_dca_D0_DStarPion->SetLineColor(6);
703 hist_dca_D0_DStarPion->SetMarkerStyle(20);
704 hist_dca_D0_DStarPion->SetMarkerSize(0.6);
705 hist_dca_D0_DStarPion->SetMarkerColor(6);
706 TH1F* histogram_dca_D0_DStarPion = (TH1F*)hist_dca_D0_DStarPion->Clone();
709 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
710 TH1F* hist_dca_D0_B0Pion =
new TH1F(name_dca_D0_B0Pion.Data(),
"dca_D0_B0Pion; DCA [cm]; Entries",1000,0,0.2);
711 hist_dca_D0_B0Pion->Sumw2();
712 hist_dca_D0_B0Pion->SetLineColor(6);
713 hist_dca_D0_B0Pion->SetMarkerStyle(20);
714 hist_dca_D0_B0Pion->SetMarkerSize(0.6);
715 hist_dca_D0_B0Pion->SetMarkerColor(6);
716 TH1F* histogram_dca_D0_B0Pion = (TH1F*)hist_dca_D0_B0Pion->Clone();
719 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
720 TH1F* hist_dca_DStarPion_B0Pion =
new TH1F(name_dca_DStarPion_B0Pion.Data(),
"dca_DStarPion_B0Pion; DCA [cm]; Entries",1000,0,0.2);
721 hist_dca_DStarPion_B0Pion->Sumw2();
722 hist_dca_DStarPion_B0Pion->SetLineColor(6);
723 hist_dca_DStarPion_B0Pion->SetMarkerStyle(20);
724 hist_dca_DStarPion_B0Pion->SetMarkerSize(0.6);
725 hist_dca_DStarPion_B0Pion->SetMarkerColor(6);
726 TH1F* histogram_dca_DStarPion_B0Pion = (TH1F*)hist_dca_DStarPion_B0Pion->Clone();
729 TString name_dca_Signal_D0_DStarPion =
"dca_Signal_D0_DStarPion";
730 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);
731 hist_dca_Signal_D0_DStarPion->Sumw2();
732 hist_dca_Signal_D0_DStarPion->SetLineColor(4);
733 hist_dca_Signal_D0_DStarPion->SetMarkerStyle(20);
734 hist_dca_Signal_D0_DStarPion->SetMarkerSize(0.6);
735 hist_dca_Signal_D0_DStarPion->SetMarkerColor(4);
736 TH1F* histogram_dca_Signal_D0_DStarPion = (TH1F*)hist_dca_Signal_D0_DStarPion->Clone();
737 fOutputB0MC->Add(histogram_dca_Signal_D0_DStarPion);
739 TString name_dca_Signal_D0_B0Pion =
"dca_Signal_D0_B0Pion";
740 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);
741 hist_dca_Signal_D0_B0Pion->Sumw2();
742 hist_dca_Signal_D0_B0Pion->SetLineColor(4);
743 hist_dca_Signal_D0_B0Pion->SetMarkerStyle(20);
744 hist_dca_Signal_D0_B0Pion->SetMarkerSize(0.6);
745 hist_dca_Signal_D0_B0Pion->SetMarkerColor(4);
746 TH1F* histogram_dca_Signal_D0_B0Pion = (TH1F*)hist_dca_Signal_D0_B0Pion->Clone();
749 TString name_dca_Signal_DStarPion_B0Pion =
"dca_Signal_DStarPion_B0Pion";
750 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);
751 hist_dca_Signal_DStarPion_B0Pion->Sumw2();
752 hist_dca_Signal_DStarPion_B0Pion->SetLineColor(4);
753 hist_dca_Signal_DStarPion_B0Pion->SetMarkerStyle(20);
754 hist_dca_Signal_DStarPion_B0Pion->SetMarkerSize(0.6);
755 hist_dca_Signal_DStarPion_B0Pion->SetMarkerColor(4);
756 TH1F* histogram_dca_Signal_DStarPion_B0Pion = (TH1F*)hist_dca_Signal_DStarPion_B0Pion->Clone();
757 fOutputB0MC->Add(histogram_dca_Signal_DStarPion_B0Pion);
761 TString name_B0s_in_analysis =
"B0s_in_analysis";
762 TH1F* hist_B0s_in_analysis =
new TH1F(name_B0s_in_analysis.Data(),
"Number of B0 to kpipipi in the Analysis; Entries",10,0,10);
763 hist_B0s_in_analysis->Sumw2();
764 hist_B0s_in_analysis->SetLineColor(6);
765 hist_B0s_in_analysis->SetMarkerStyle(20);
766 hist_B0s_in_analysis->SetMarkerSize(0.6);
767 hist_B0s_in_analysis->SetMarkerColor(6);
768 hist_B0s_in_analysis->SetStats(kTRUE);
769 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(1,
"no. of B0s");
770 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(2,
"no. of B0s to kpipipi");
771 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(3,
"no. with all tracks in event");
772 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(4,
"no. ...");
773 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(5,
"no. ...");
774 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(6,
"no. ...");
775 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(7,
"no. ...");
776 hist_B0s_in_analysis->GetXaxis()->SetBinLabel(8,
"no. ...");
777 TH1F* hist_B0s_in_analysis_mc = (TH1F*)hist_B0s_in_analysis->Clone();
780 TString name_B0s_per_bin =
"B0s_per_bin";
781 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);
788 hist_B0s_per_bin->GetXaxis()->SetBinLabel(i+1,bin_name);
790 TH1F* hist_B0s_per_bin_mc = (TH1F*)hist_B0s_per_bin->Clone();
796 for (
Int_t i = 0; i < 4; i++){
805 for (
Int_t j = 0; j < 6; j++){
806 if(j==0) add_name =
"";
807 if(j==1) add_name =
"Signal";
808 if(j==2) add_name =
"Cut";
809 if(j==3) add_name =
"SignalCut";
810 if(j==4) add_name =
"Result";
811 if(j==5) add_name =
"SignalResult";
814 TString discription_Histogram =
"";
815 Int_t numberOfBins = 0;
819 for (
Int_t k = 0; k < 9; ++k)
821 if(k==0){name_Histogram =
"ptTrack"; discription_Histogram =
"pt track; p_{T} [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
822 if(k==1){name_Histogram =
"momentumTrack"; discription_Histogram =
"momentum track; p [GeV/c]; Entries"; numberOfBins = 600; lowerBound = 0; upperBound = 30;}
823 if(k==2){name_Histogram =
"numberOfITS"; discription_Histogram =
"Number of ITS clusters track; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
824 if(k==3){name_Histogram =
"numberOfTPC"; discription_Histogram =
"Number of TPC clusters track; [#]; Entries"; numberOfBins = 601; lowerBound = -0.5; upperBound = 600.5;}
825 if(k==4){name_Histogram =
"pointsOnITS"; discription_Histogram =
"Number of ITS clusters track per layer; [#]; Entries"; numberOfBins = 10; lowerBound = -0.5; upperBound = 9.5;}
826 if(k==5){name_Histogram =
"nSigmaTPC"; discription_Histogram =
"n sigma TPC for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
827 if(k==6){name_Histogram =
"nSigmaTOF"; discription_Histogram =
"n sigma TOF for track PID; sigma; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
828 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;}
829 if(k==8){name_Histogram =
"impactParameter"; discription_Histogram =
"Impact Parameter track; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
831 name_Histogram += add_name;
832 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
834 if(j%2==0) histogram->SetLineColor(6);
835 if(j%2==1) histogram->SetLineColor(4);
836 histogram->SetMarkerStyle(20);
837 histogram->SetMarkerSize(0.6);
838 if(j%2==0) histogram->SetMarkerColor(6);
839 if(j%2==1) histogram->SetMarkerColor(4);
840 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
841 listout->Add(histogram_Clone);
845 TString numberofparticlesperevent=
"numberofparticlesperevent";
846 numberofparticlesperevent += add_name;
847 TH1F* hist_numberofparticlesperevent =
new TH1F(numberofparticlesperevent.Data(),
"Number of particles per event; number of particles in one event; Entries",100,0,100);
848 hist_numberofparticlesperevent->Sumw2();
849 hist_numberofparticlesperevent->SetLineColor(6);
850 hist_numberofparticlesperevent->SetMarkerStyle(20);
851 hist_numberofparticlesperevent->SetMarkerSize(0.6);
852 hist_numberofparticlesperevent->SetMarkerColor(6);
853 TH1F* histogram_numberofparticlesperevent = (TH1F*)hist_numberofparticlesperevent->Clone();
854 listout->Add(histogram_numberofparticlesperevent);
858 TH1F * effectOfCuts =
new TH1F(
"effectOfCutsOnBackground",
"Removal counter",18,0,18);
859 effectOfCuts->SetStats(kTRUE);
860 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
861 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
862 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
863 effectOfCuts->GetXaxis()->SetBinLabel(2,
"1");
864 effectOfCuts->GetXaxis()->SetBinLabel(3,
"2");
865 effectOfCuts->GetXaxis()->SetBinLabel(4,
"3");
866 effectOfCuts->GetXaxis()->SetBinLabel(5,
"4");
867 effectOfCuts->GetXaxis()->SetBinLabel(6,
"5");
868 effectOfCuts->GetXaxis()->SetBinLabel(7,
"6");
869 effectOfCuts->GetXaxis()->SetBinLabel(8,
"7");
870 effectOfCuts->GetXaxis()->SetBinLabel(9,
"8");
871 effectOfCuts->GetXaxis()->SetBinLabel(10,
"9");
872 effectOfCuts->GetXaxis()->SetBinLabel(11,
"10");
873 effectOfCuts->GetXaxis()->SetBinLabel(12,
"11");
874 effectOfCuts->GetXaxis()->SetBinLabel(13,
"12");
875 effectOfCuts->GetXaxis()->SetBinLabel(14,
"13");
876 effectOfCuts->GetXaxis()->SetBinLabel(15,
"14");
877 effectOfCuts->GetXaxis()->SetBinLabel(16,
"15");
878 effectOfCuts->GetXaxis()->SetBinLabel(17,
"16");
879 effectOfCuts->GetXaxis()->SetBinLabel(18,
"17");
880 listout->Add(effectOfCuts);
883 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsOnSignal",
"Removal counter",18,0,18);
884 effectOfCutsMC->SetStats(kTRUE);
885 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
886 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
887 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
888 effectOfCutsMC->GetXaxis()->SetBinLabel(2,
"1");
889 effectOfCutsMC->GetXaxis()->SetBinLabel(3,
"2");
890 effectOfCutsMC->GetXaxis()->SetBinLabel(4,
"3");
891 effectOfCutsMC->GetXaxis()->SetBinLabel(5,
"4");
892 effectOfCutsMC->GetXaxis()->SetBinLabel(6,
"5");
893 effectOfCutsMC->GetXaxis()->SetBinLabel(7,
"6");
894 effectOfCutsMC->GetXaxis()->SetBinLabel(8,
"7");
895 effectOfCutsMC->GetXaxis()->SetBinLabel(9,
"8");
896 effectOfCutsMC->GetXaxis()->SetBinLabel(10,
"9");
897 effectOfCutsMC->GetXaxis()->SetBinLabel(11,
"10");
898 effectOfCutsMC->GetXaxis()->SetBinLabel(12,
"11");
899 effectOfCutsMC->GetXaxis()->SetBinLabel(13,
"12");
900 effectOfCutsMC->GetXaxis()->SetBinLabel(14,
"13");
901 effectOfCutsMC->GetXaxis()->SetBinLabel(15,
"14");
902 effectOfCutsMC->GetXaxis()->SetBinLabel(16,
"15");
903 effectOfCutsMC->GetXaxis()->SetBinLabel(17,
"16");
904 effectOfCutsMC->GetXaxis()->SetBinLabel(18,
"17");
905 listout->Add(effectOfCutsMC);
908 TString name_particle_pdg =
"particle_pdg";
909 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
910 hist_particle_pdg->Sumw2();
911 hist_particle_pdg->SetLineColor(6);
912 hist_particle_pdg->SetMarkerStyle(20);
913 hist_particle_pdg->SetMarkerSize(0.6);
914 hist_particle_pdg->SetMarkerColor(6);
915 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
916 listout->Add(histogram_particle_pdg);
919 TString name_particle_mother_pdg =
"particle_mother_pdg";
920 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
921 hist_particle_mother_pdg->Sumw2();
922 hist_particle_mother_pdg->SetLineColor(6);
923 hist_particle_mother_pdg->SetMarkerStyle(20);
924 hist_particle_mother_pdg->SetMarkerSize(0.6);
925 hist_particle_mother_pdg->SetMarkerColor(6);
926 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
927 listout->Add(histogram_particle_mother_pdg);
930 TString name_ptB0_vs_ptTrack =
"ptB0_vs_ptTrackBackground";
931 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);
932 hist_ptB0_vs_ptTrack->Sumw2();
933 hist_ptB0_vs_ptTrack->SetLineColor(6);
934 hist_ptB0_vs_ptTrack->SetMarkerStyle(20);
935 hist_ptB0_vs_ptTrack->SetMarkerSize(0.6);
936 hist_ptB0_vs_ptTrack->SetMarkerColor(6);
937 TH2F* histogram_ptB0_vs_ptTrack = (
TH2F*)hist_ptB0_vs_ptTrack->Clone();
938 listout->Add(histogram_ptB0_vs_ptTrack);
941 TString name_ptB0_vs_ptTrackMC =
"ptB0_vs_ptTrackSignal";
942 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);
943 hist_ptB0_vs_ptTrackMC->Sumw2();
944 hist_ptB0_vs_ptTrackMC->SetLineColor(4);
945 hist_ptB0_vs_ptTrackMC->SetMarkerStyle(20);
946 hist_ptB0_vs_ptTrackMC->SetMarkerSize(0.6);
947 hist_ptB0_vs_ptTrackMC->SetMarkerColor(6);
948 TH2F* histogram_ptB0_vs_ptTrackMC = (
TH2F*)hist_ptB0_vs_ptTrackMC->Clone();
949 listout->Add(histogram_ptB0_vs_ptTrackMC);
954 for (
Int_t i = 0; i < 6; i++){
958 Int_t nHistogramSets = 0;
966 for (
Int_t j = 0; j < nHistogramSets; j++){
969 if(j==0) add_name =
"";
970 if(j==1) add_name =
"Signal";
971 if(j==2) add_name =
"Cut";
972 if(j==3) add_name =
"SignalCut";
973 if(j==4) add_name =
"Result";
974 if(j==5) add_name =
"SignalResult";
975 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];}
976 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];}
996 TString discription_Histogram =
"";
997 Int_t numberOfBins = 0;
1000 Int_t numberOfBinsTwo = 0;
1004 for (
Int_t k = 0; k < 40; ++k)
1006 if(k==0){name_Histogram =
"ptMother"; discription_Histogram =
"pt mother; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1007 if(k==1){name_Histogram =
"ptFirstDaughter"; discription_Histogram =
"pt first daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1008 if(k==2){name_Histogram =
"ptSecondDaughter"; discription_Histogram =
"pt second daughter; p_{T} [GeV/c]; Entries"; numberOfBins = 300; lowerBound = 0; upperBound = 30;}
1009 if(k==3){name_Histogram =
"etaMother"; discription_Histogram =
"eta mother; #eta; Entries"; numberOfBins = 100; lowerBound = -2; upperBound = 2;}
1010 if(k==4){name_Histogram =
"phiMother"; discription_Histogram =
"phi mother; #phi; Entries"; numberOfBins = 25; lowerBound = 0; upperBound = 2*TMath::Pi();}
1011 if(k==5){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1012 if(k==6){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1014 if(k==7){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter; [cm]; Entries"; numberOfBins = 2000; lowerBound = 0; upperBound = 0.5;}
1016 if(k==8){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle; [Cos(#theta)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1017 if(k==9){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product; [cm^{2}]; Entries"; numberOfBins = 500; lowerBound = -0.01; upperBound = 0.01;}
1018 if(k==10){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY; [cm^{2}]; Entries"; numberOfBins = 400; lowerBound = 0; upperBound = 0.1;}
1019 if(k==11){name_Histogram =
"invariantMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1020 if(k==12){name_Histogram =
"deltaMassMother"; discription_Histogram =
"mass mother candidate; m [GeV/c^{2}]; Entries"; numberOfBins = 10000; lowerBound = 0; upperBound = 10;}
1021 if(k==13){name_Histogram =
"dcaMother"; discription_Histogram =
"dca mother; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 0.25;}
1022 if(k==14){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex; distance [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 1;}
1023 if(k==15){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex; [cm]; Entries"; numberOfBins = 100; lowerBound = 0; upperBound = 50;}
1024 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;}
1025 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;}
1026 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;}
1027 if(k==19){name_Histogram =
"angleMotherFirstDaughter"; discription_Histogram =
"flight angle mother and first daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1028 if(k==20){name_Histogram =
"angleMotherSecondDaughter"; discription_Histogram =
"flight angle mother and second daughter; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = 0.5; upperBound = 1;}
1029 if(k==21){name_Histogram =
"angleBetweenBothDaughters"; discription_Histogram =
"angle between both daughters; [Cos(#phi)]; Entries"; numberOfBins = 100; lowerBound = -1; upperBound = 1;}
1030 if(k==22){name_Histogram =
"cosThetaStar"; discription_Histogram =
"cosThetaStar; [Cos(#theta*)]; Entries"; numberOfBins = 200; lowerBound = -2; upperBound = 2;}
1031 if(k==23){name_Histogram =
"vertexX"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1032 if(k==24){name_Histogram =
"vertexY"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -5; upperBound = 5;}
1033 if(k==25){name_Histogram =
"vertexZ"; discription_Histogram =
"Vertex position; [cm]; Entries"; numberOfBins = 500; lowerBound = -20; upperBound = 20;}
1036 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;}
1038 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;}
1040 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;}
1042 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;}
1044 if(k==30){
if(i==0 || i==3 || i==4){name_Histogram =
"impactProductToDStar"; discription_Histogram =
"impact product w.r.t. DStar decay vertex; [cm]; Entries"; numberOfBins = 500; lowerBound = -0.02; upperBound = 0.21;}
1046 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;}
1048 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;}
1050 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;}
1052 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;}
1054 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;}
1057 if(k==36){name_Histogram =
"topomaticFirstDaughter"; discription_Histogram =
"topomatic d0 first daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1058 if(k==37){name_Histogram =
"topomaticSecondDaughter"; discription_Histogram =
"topomatic d0 second daughter; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1059 if(k==38){name_Histogram =
"topomaticMax"; discription_Histogram =
"Max topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1060 if(k==39){name_Histogram =
"topomaticMin"; discription_Histogram =
"Min topomatic; [cm]; Entries"; numberOfBins = 500; lowerBound = 0; upperBound = 20;}
1062 name_Histogram += add_name;
1063 TH1F* histogram =
new TH1F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound);
1065 if(j%2==0) histogram->SetLineColor(6);
1066 if(j%2==1) histogram->SetLineColor(4);
1067 histogram->SetMarkerStyle(20);
1068 histogram->SetMarkerSize(0.6);
1069 if(j%2==0) histogram->SetMarkerColor(6);
1070 if(j%2==1) histogram->SetMarkerColor(4);
1071 TH1F* histogram_Clone = (TH1F*)histogram->Clone();
1072 listout->Add(histogram_Clone);
1077 name_Histogram =
"";
1078 discription_Histogram =
"";
1082 numberOfBinsTwo = 0;
1083 lowerBoundTwo = 0.0;
1084 upperBoundTwo = 0.0;
1089 Int_t nVariables = 8;
1090 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
1094 TString name2D =
"2D_Histograms";
1096 list2D->SetName(name2D);
1097 listout->Add(list2D);
1099 for (
Int_t k = 0; k < nHistograms; ++k)
1101 numberOfBins = 50; numberOfBinsTwo = 50;
1102 if(nFirst==0){name_Histogram =
"d0FirstDaughter"; discription_Histogram =
"d0 first daughter [cm];"; lowerBound = 0; upperBound = 1;}
1103 if(nFirst==1){name_Histogram =
"d0SecondDaughter"; discription_Histogram =
"d0 second daughter [cm];"; lowerBound = 0; upperBound = 1;}
1104 if(nFirst==2){name_Histogram =
"d0Mother"; discription_Histogram =
"d0 mother [cm];"; lowerBound = 0; upperBound = 1;}
1105 if(nFirst==3){name_Histogram =
"pointingAngleMother"; discription_Histogram =
"pointing angle [Cos(#theta)];"; lowerBound = -1; upperBound = 1;}
1106 if(nFirst==4){name_Histogram =
"impactProduct"; discription_Histogram =
"impact product [cm^{2}];"; lowerBound = -0.01; upperBound = 0.01;}
1107 if(nFirst==5){name_Histogram =
"impactProductXY"; discription_Histogram =
"impact product XY [cm^{2}];"; lowerBound = 0; upperBound = 0.5;}
1108 if(nFirst==6){name_Histogram =
"vertexDistance"; discription_Histogram =
"vertex distance between mother and primary vertex [cm];"; lowerBound = 0; upperBound = 1;}
1109 if(nFirst==7){name_Histogram =
"normDecayLength"; discription_Histogram =
"Normalized decay length w.r.t primary vertex [cm];"; lowerBound = 0; upperBound = 50;}
1110 if(nFirst==8){name_Histogram =
"pseudoProperDecayTime"; discription_Histogram =
"Pseudo Proper Decay Time w.r.t primary vertex [a.u.];"; lowerBound = -10; upperBound = 10;}
1112 if(nSecond==0){name_Histogram +=
"d0FirstDaughter"; discription_Histogram +=
"d0 first daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1113 if(nSecond==1){name_Histogram +=
"d0SecondDaughter"; discription_Histogram +=
"d0 second daughter [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1114 if(nSecond==2){name_Histogram +=
"d0Mother"; discription_Histogram +=
"d0 mother [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1115 if(nSecond==3){name_Histogram +=
"pointingAngleMother"; discription_Histogram +=
"pointing angle [Cos(#theta)];"; lowerBoundTwo = -1; upperBoundTwo = 1;}
1116 if(nSecond==4){name_Histogram +=
"impactProduct"; discription_Histogram +=
"impact product [cm^{2}];"; lowerBoundTwo = -0.01; upperBoundTwo = 0.01;}
1117 if(nSecond==5){name_Histogram +=
"impactProductXY"; discription_Histogram +=
"impact product XY [cm^{2}];"; lowerBoundTwo = 0; upperBoundTwo = 0.5;}
1118 if(nSecond==6){name_Histogram +=
"vertexDistance"; discription_Histogram +=
"vertex distance between mother and primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 1;}
1119 if(nSecond==7){name_Histogram +=
"normDecayLength"; discription_Histogram +=
"Normalized decay length w.r.t primary vertex [cm];"; lowerBoundTwo = 0; upperBoundTwo = 50;}
1120 if(nSecond==8){name_Histogram +=
"pseudoProperDecayTime"; discription_Histogram +=
"Pseudo Proper Decay Time w.r.t primary vertex [a.u.];"; lowerBoundTwo = -10; upperBoundTwo = 10;}
1122 name_Histogram += add_name;
1123 TH2F* histogram =
new TH2F(name_Histogram.Data(),discription_Histogram.Data(),numberOfBins,lowerBound,upperBound,numberOfBinsTwo,lowerBoundTwo,upperBoundTwo);
1125 if(j%2==0) histogram->SetLineColor(6);
1126 if(j%2==1) histogram->SetLineColor(4);
1127 histogram->SetMarkerStyle(20);
1128 histogram->SetMarkerSize(0.6);
1129 histogram->SetMarkerColor(6);
1130 TH2F* histogram_Clone = (
TH2F*)histogram->Clone();
1131 list2D->Add(histogram_Clone);
1135 if(nSecond>nVariables)
1138 nSecond = nFirst + 1;
1143 TH1F * effectOfCuts =
new TH1F(
"effectOfCuts",
"Removal counter",100,0,100);
1144 effectOfCuts->SetStats(kTRUE);
1145 effectOfCuts->GetXaxis()->SetTitle(
"Cut number");
1146 effectOfCuts->GetYaxis()->SetTitle(
"Particles cut");
1147 effectOfCuts->GetXaxis()->SetBinLabel(1,
"total");
1148 for (
Int_t i = 1; i < 100; ++i)
1152 effectOfCuts->GetXaxis()->SetBinLabel(i+1,integerText);
1154 listout->Add(effectOfCuts);
1157 TH1F * effectOfCutsMC =
new TH1F(
"effectOfCutsMC",
"Removal counter",100,0,100);
1158 effectOfCutsMC->SetStats(kTRUE);
1159 effectOfCutsMC->GetXaxis()->SetTitle(
"Cut number");
1160 effectOfCutsMC->GetYaxis()->SetTitle(
"Particles cut");
1161 effectOfCutsMC->GetXaxis()->SetBinLabel(1,
"total");
1162 for (
Int_t i = 1; i < 100; ++i)
1166 effectOfCutsMC->GetXaxis()->SetBinLabel(i+1,integerText);
1168 listout->Add(effectOfCutsMC);
1171 TString name_particle_pdg =
"particle_pdg";
1172 TH1F* hist_particle_pdg =
new TH1F(name_particle_pdg.Data(),
"Pdg code particle; pdg code; Entries",2000,-0.5,1999.5);
1173 hist_particle_pdg->Sumw2();
1174 hist_particle_pdg->SetLineColor(6);
1175 hist_particle_pdg->SetMarkerStyle(20);
1176 hist_particle_pdg->SetMarkerSize(0.6);
1177 hist_particle_pdg->SetMarkerColor(6);
1178 TH1F* histogram_particle_pdg = (TH1F*)hist_particle_pdg->Clone();
1179 listout->Add(histogram_particle_pdg);
1182 TString name_particle_mother_pdg =
"particle_mother_pdg";
1183 TH1F* hist_particle_mother_pdg =
new TH1F(name_particle_mother_pdg.Data(),
"Pdg code particle mother; pdg code; Entries",2000,-0.5,1999.5);
1184 hist_particle_mother_pdg->Sumw2();
1185 hist_particle_mother_pdg->SetLineColor(6);
1186 hist_particle_mother_pdg->SetMarkerStyle(20);
1187 hist_particle_mother_pdg->SetMarkerSize(0.6);
1188 hist_particle_mother_pdg->SetMarkerColor(6);
1189 TH1F* histogram_particle_mother_pdg = (TH1F*)hist_particle_mother_pdg->Clone();
1190 listout->Add(histogram_particle_mother_pdg);
1193 TString name_distance_vertex_from_real =
"distance_vertex_from_real";
1194 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);
1195 hist_distance_vertex_from_real->Sumw2();
1196 hist_distance_vertex_from_real->SetLineColor(6);
1197 hist_distance_vertex_from_real->SetMarkerStyle(20);
1198 hist_distance_vertex_from_real->SetMarkerSize(0.6);
1199 hist_distance_vertex_from_real->SetMarkerColor(6);
1200 TH1F* histogram_distance_vertex_from_real = (TH1F*)hist_distance_vertex_from_real->Clone();
1201 listout->Add(histogram_distance_vertex_from_real);
1204 TString name_distance_vertex_from_real_new =
"distance_vertex_from_real_new";
1205 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);
1206 hist_distance_vertex_from_real_new->Sumw2();
1207 hist_distance_vertex_from_real_new->SetLineColor(6);
1208 hist_distance_vertex_from_real_new->SetMarkerStyle(20);
1209 hist_distance_vertex_from_real_new->SetMarkerSize(0.6);
1210 hist_distance_vertex_from_real_new->SetMarkerColor(6);
1211 TH1F* histogram_distance_vertex_from_real_new = (TH1F*)hist_distance_vertex_from_real_new->Clone();
1212 listout->Add(histogram_distance_vertex_from_real_new);
1215 TString name_momentum_resolution =
"momentum_resolution";
1216 TH1F* hist_momentum_resolution =
new TH1F(name_momentum_resolution.Data(),
"Momentum resolution; difference between real and reconstructed momentum [GeV/c]; Entries",1000,0,1);
1217 hist_momentum_resolution->Sumw2();
1218 hist_momentum_resolution->SetLineColor(6);
1219 hist_momentum_resolution->SetMarkerStyle(20);
1220 hist_momentum_resolution->SetMarkerSize(0.6);
1221 hist_momentum_resolution->SetMarkerColor(6);
1222 TH1F* histogram_momentum_resolution = (TH1F*)hist_momentum_resolution->Clone();
1223 listout->Add(histogram_momentum_resolution);
1228 for (
Int_t k = 0; k < fnPtBins+3; ++k){
1230 if(k==0) ptBinMother =
"";
1231 if(k==1) ptBinMother =
"_ptbin_6_to_inf";
1232 if(k==2) ptBinMother =
"_ptbin_3_to_inf";
1233 if(k>2) {ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[k-3]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[k-2];}
1235 TString name_deltaMassMother =
"deltaInvMassB0";
1236 name_deltaMassMother += ptBinMother;
1237 TH1F* hist_deltaMassMother =
new TH1F(name_deltaMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1238 hist_deltaMassMother->Sumw2();
1239 hist_deltaMassMother->SetLineColor(6);
1240 hist_deltaMassMother->SetMarkerStyle(20);
1241 hist_deltaMassMother->SetMarkerSize(0.6);
1242 hist_deltaMassMother->SetMarkerColor(6);
1243 TH1F* histogram_deltaMassMother = (TH1F*)hist_deltaMassMother->Clone();
1246 for (
Int_t i = 0; i < 3; ++i){
1248 if(i==0) signName =
"";
1249 if(i==1) signName =
"_SameSign";
1250 if(i==2) signName =
"_SignSum";
1251 TString name_invariantMassMother =
"invariantMassB0";
1252 name_invariantMassMother += ptBinMother + signName;
1253 TH1F* hist_invariantMassMother =
new TH1F(name_invariantMassMother.Data(),
"mass mother candidate; m [GeV/c^2]; Entries",2000,0,20);
1254 hist_invariantMassMother->Sumw2();
1255 hist_invariantMassMother->SetLineColor(6);
1256 hist_invariantMassMother->SetMarkerStyle(20);
1257 hist_invariantMassMother->SetMarkerSize(0.6);
1258 hist_invariantMassMother->SetMarkerColor(6);
1259 TH1F* histogram_invariantMassMother = (TH1F*)hist_invariantMassMother->Clone();
1264 TString name_cutEffectBackground =
"cutEffectBackground";
1265 TH2I* hist_cutEffectBackground =
new TH2I(name_cutEffectBackground.Data(),
"Effect of Cuts on background; cut number; cut number",99,0,99,99,0,99);
1266 for (
int i = 0; i < 99; ++i)
1270 hist_cutEffectBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1271 hist_cutEffectBackground->GetYaxis()->SetBinLabel(i+1,integerText);
1273 TH2I* histogram_cutEffectBackground = (TH2I*)hist_cutEffectBackground->Clone();
1276 TString name_cutEffectSignal =
"cutEffectSignal";
1277 TH2I* hist_cutEffectSignal =
new TH2I(name_cutEffectSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99,99,0,99);
1278 for (
Int_t i = 0; i < 99; ++i)
1282 hist_cutEffectSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1283 hist_cutEffectSignal->GetYaxis()->SetBinLabel(i+1,integerText);
1285 TH2I* histogram_cutEffectSignal = (TH2I*)hist_cutEffectSignal->Clone();
1288 TString name_cutEffectUniqueBackground =
"cutEffectUniqueBackground";
1289 TH1I* hist_cutEffectUniqueBackground =
new TH1I(name_cutEffectUniqueBackground.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1290 for (
Int_t i = 0; i < 99; ++i)
1294 hist_cutEffectUniqueBackground->GetXaxis()->SetBinLabel(i+1,integerText);
1296 TH1I* histogram_cutEffectUniqueBackground = (
TH1I*)hist_cutEffectUniqueBackground->Clone();
1297 fOutputB0MC->Add(histogram_cutEffectUniqueBackground);
1299 TString name_cutEffectUniqueSignal =
"cutEffectUniqueSignal";
1300 TH1I* hist_cutEffectUniqueSignal =
new TH1I(name_cutEffectUniqueSignal.Data(),
"Effect of Cuts on Signal; cut number; cut number",99,0,99);
1301 for (
Int_t i = 0; i < 99; ++i)
1305 hist_cutEffectUniqueSignal->GetXaxis()->SetBinLabel(i+1,integerText);
1307 TH1I* histogram_cutEffectUniqueSignal = (
TH1I*)hist_cutEffectUniqueSignal->Clone();
1308 fOutputB0MC->Add(histogram_cutEffectUniqueSignal);
1310 TString name_totalITSBackground =
"totalITSBackground";
1311 TH1F* hist_totalITSBackground =
new TH1F(name_totalITSBackground.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1312 hist_totalITSBackground->Sumw2();
1313 hist_totalITSBackground->SetLineColor(6);
1314 hist_totalITSBackground->SetMarkerStyle(20);
1315 hist_totalITSBackground->SetMarkerSize(0.6);
1316 hist_totalITSBackground->SetMarkerColor(6);
1317 TH1F* histogram_totalITSBackground = (TH1F*)hist_totalITSBackground->Clone();
1320 TString name_totalITSSignal =
"totalITSSignal";
1321 TH1F* hist_totalITSSignal =
new TH1F(name_totalITSSignal.Data(),
"Total nr. of ITS hits for the daughters; number [#]; Entries",30,0,30);
1322 hist_totalITSSignal->Sumw2();
1323 hist_totalITSSignal->SetLineColor(6);
1324 hist_totalITSSignal->SetMarkerStyle(20);
1325 hist_totalITSSignal->SetMarkerSize(0.6);
1326 hist_totalITSSignal->SetMarkerColor(6);
1327 TH1F* histogram_totalITSSignal = (TH1F*)hist_totalITSSignal->Clone();
1330 TString name_totalTPCBackground =
"totalTPCBackground";
1331 TH1F* hist_totalTPCBackground =
new TH1F(name_totalTPCBackground.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1332 hist_totalTPCBackground->Sumw2();
1333 hist_totalTPCBackground->SetLineColor(6);
1334 hist_totalTPCBackground->SetMarkerStyle(20);
1335 hist_totalTPCBackground->SetMarkerSize(0.6);
1336 hist_totalTPCBackground->SetMarkerColor(6);
1337 TH1F* histogram_totalTPCBackground = (TH1F*)hist_totalTPCBackground->Clone();
1340 TString name_totalTPCSignal =
"totalTPCSignal";
1341 TH1F* hist_totalTPCSignal =
new TH1F(name_totalTPCSignal.Data(),
"Total nr. of TPC hits for the daughters; number [#]; Entries",1000,0,1000);
1342 hist_totalTPCSignal->Sumw2();
1343 hist_totalTPCSignal->SetLineColor(6);
1344 hist_totalTPCSignal->SetMarkerStyle(20);
1345 hist_totalTPCSignal->SetMarkerSize(0.6);
1346 hist_totalTPCSignal->SetMarkerColor(6);
1347 TH1F* histogram_totalTPCSignal = (TH1F*)hist_totalTPCSignal->Clone();
1350 TString name_totalSigmaPIDBackground =
"totalSigmaPIDBackground";
1351 TH1F* hist_totalSigmaPIDBackground =
new TH1F(name_totalSigmaPIDBackground.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1352 hist_totalSigmaPIDBackground->Sumw2();
1353 hist_totalSigmaPIDBackground->SetLineColor(6);
1354 hist_totalSigmaPIDBackground->SetMarkerStyle(20);
1355 hist_totalSigmaPIDBackground->SetMarkerSize(0.6);
1356 hist_totalSigmaPIDBackground->SetMarkerColor(6);
1357 TH1F* histogram_totalSigmaPIDBackground = (TH1F*)hist_totalSigmaPIDBackground->Clone();
1358 fOutputB0MC->Add(histogram_totalSigmaPIDBackground);
1360 TString name_totalSigmaPIDSignal =
"totalSigmaPIDSignal";
1361 TH1F* hist_totalSigmaPIDSignal =
new TH1F(name_totalSigmaPIDSignal.Data(),
"Total sigma of TPC and TOF PID for the daughters; number [#]; Entries",1000,0,100);
1362 hist_totalSigmaPIDSignal->Sumw2();
1363 hist_totalSigmaPIDSignal->SetLineColor(6);
1364 hist_totalSigmaPIDSignal->SetMarkerStyle(20);
1365 hist_totalSigmaPIDSignal->SetMarkerSize(0.6);
1366 hist_totalSigmaPIDSignal->SetMarkerColor(6);
1367 TH1F* histogram_totalSigmaPIDSignal = (TH1F*)hist_totalSigmaPIDSignal->Clone();
1377 AliESDVertex *vertexESD = 0;
1378 AliAODVertex *vertexAOD = 0;
1380 AliVertexerTracks *vertexer =
new AliVertexerTracks(bField);
1382 vertexer->SetVtxStart((AliESDVertex*)primary);
1383 vertexESD = (AliESDVertex*)vertexer->VertexForSelectedESDTracks(tracks);
1385 delete vertexer; vertexer=NULL;
1387 if(!vertexESD)
return vertexAOD;
1390 if(vertexESD->GetNContributors()!=tracks->GetEntriesFast())
1392 delete vertexESD; vertexESD=NULL;
1398 for(
Int_t a=0;a<3;a++)pos[a]=0.;
1399 for(
Int_t b=0;b<6;b++)cov[b]=0.;
1402 vertexESD->GetXYZ(pos);
1403 vertexESD->GetCovMatrix(cov);
1406 Double_t vertRadius2=pos[0]*pos[0]+pos[1]*pos[1];
1409 delete vertexESD; vertexESD=NULL;
1413 chi2perNDF = vertexESD->GetChi2toNDF();
1414 dispersion = vertexESD->GetDispersion();
1415 delete vertexESD; vertexESD=NULL;
1417 vertexAOD =
new AliAODVertex(pos,cov,chi2perNDF,0x0,-1,AliAODVertex::kUndef,nprongs);
1424 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
1425 for (
Int_t i=0; i<mcTrackArray->GetEntriesFast(); i++){
1427 Int_t mcLabelPionB0 = 0;
1428 Int_t mcLabelPionDStar = 0;
1429 Int_t mcLabelPionD0 = 0;
1430 Int_t mcLabelKaon = 0;
1431 Int_t mcLabelD0 = 0;
1432 Int_t mcLabelDStar = 0;
1433 Int_t mcLabelB0 = 0;
1438 Bool_t mcPionB0Present = kFALSE;
1439 Bool_t mcPionDStarPresent = kFALSE;
1440 Bool_t mcPionD0Present = kFALSE;
1441 Bool_t mcKaonPresent = kFALSE;
1444 AliAODMCParticle *mcTrackParticle =
dynamic_cast< AliAODMCParticle*
>(mcTrackArray->At(i));
1445 Int_t pdgCodeMC=TMath::Abs(mcTrackParticle->GetPdgCode());
1447 if (pdgCodeMC==511){
1450 Int_t nDaughterB0 = mcTrackParticle->GetNDaughters();
1451 ptMC[0] = mcTrackParticle->Pt();
1453 TString fillthis=
"B0s_in_analysis";
1454 ((TH1F*)(listout->FindObject(fillthis)))->Fill(0);
1457 for(
Int_t iDaughterB0=0; iDaughterB0<2; iDaughterB0++){
1459 AliAODMCParticle* daughterB0 = (AliAODMCParticle*)mcTrackArray->At(mcTrackParticle->GetDaughter(iDaughterB0));
1460 if(!daughterB0)
break;
1461 Int_t pdgCodeDaughterB0=TMath::Abs(daughterB0->GetPdgCode());
1463 if (pdgCodeDaughterB0==211){
1464 mcLabelPionB0 = mcTrackParticle->GetDaughter(iDaughterB0);
1465 mcPionB0Present = kTRUE;
1466 ptMC[1] = daughterB0->Pt();
1468 }
else if (pdgCodeDaughterB0==413){
1469 mcLabelDStar = mcTrackParticle->GetDaughter(iDaughterB0);
1470 Int_t nDaughterDStar = daughterB0->GetNDaughters();
1471 ptMC[2] = daughterB0->Pt();
1473 if(nDaughterDStar==2){
1474 for(
Int_t iDaughterDStar=0; iDaughterDStar<2; iDaughterDStar++){
1476 AliAODMCParticle* daughterDStar = (AliAODMCParticle*)mcTrackArray->At(daughterB0->GetDaughter(iDaughterDStar));
1477 if(!daughterDStar)
break;
1478 Int_t pdgCodeDaughterDStar=TMath::Abs(daughterDStar->GetPdgCode());
1480 if (pdgCodeDaughterDStar==211){
1481 mcLabelPionDStar = daughterB0->GetDaughter(iDaughterDStar);
1482 mcPionDStarPresent = kTRUE;
1483 ptMC[3] = daughterDStar->Pt();
1485 }
else if (pdgCodeDaughterDStar==421){
1486 mcLabelD0 = daughterB0->GetDaughter(iDaughterDStar);
1487 Int_t nDaughterD0 = daughterDStar->GetNDaughters();
1488 ptMC[4] = daughterDStar->Pt();
1491 for(
Int_t iDaughterD0=0; iDaughterD0<2; iDaughterD0++){
1493 AliAODMCParticle* daughterD0 = (AliAODMCParticle*)mcTrackArray->At(daughterDStar->GetDaughter(iDaughterD0));
1494 if(!daughterD0)
break;
1495 Int_t pdgCodeDaughterD0=TMath::Abs(daughterD0->GetPdgCode());
1497 if (pdgCodeDaughterD0==211){
1498 mcLabelPionD0 = daughterDStar->GetDaughter(iDaughterD0);
1499 ptMC[5] = daughterD0->Pt();
1500 mcPionD0Present = kTRUE;
1502 }
else if (pdgCodeDaughterD0==321){
1503 mcLabelKaon = daughterDStar->GetDaughter(iDaughterD0);;
1504 mcKaonPresent = kTRUE;
1505 ptMC[6] = daughterD0->Pt();
1518 if (mcPionB0Present && mcPionDStarPresent && mcPionD0Present && mcKaonPresent){
1519 Int_t rows = B0toDStarPiLabelMatrix->GetNrows();
1521 B0toDStarPiLabelMatrix->ResizeTo(rows+1,7);
1522 particleMatrix(rows,0) = mcLabelPionB0;
1523 particleMatrix(rows,1) = mcLabelPionDStar;
1524 particleMatrix(rows,2) = mcLabelPionD0;
1525 particleMatrix(rows,3) = mcLabelKaon;
1526 particleMatrix(rows,4) = mcLabelD0;
1527 particleMatrix(rows,5) = mcLabelDStar;
1528 particleMatrix(rows,6) = mcLabelB0;
1531 TString fillthis=
"B0s_in_analysis";
1532 ((TH1F*)(listout->FindObject(fillthis)))->Fill(1);
1534 fillthis=
"B0s_per_bin";
1537 if(
fPtBinLimits[j] < ptMC[0] && ptMC[0] <
fPtBinLimits[j+1]) {((TH1F*)(listout->FindObject(fillthis)))->Fill(j);
break;}
1540 fillthis=
"mc_B0_pt";
1541 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[0]);
1542 fillthis=
"mc_B0_pion_pt";
1543 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[1]);
1544 fillthis=
"mc_DStar_pt";
1545 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[2]);
1546 fillthis=
"mc_DStar_pion_pt";
1547 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[3]);
1548 fillthis=
"mc_D0_pt";
1549 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[4]);
1550 fillthis=
"mc_D0_pion_pt";
1551 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[5]);
1552 fillthis=
"mc_D0_kaon_pt";
1553 ((TH1F*)(listout->FindObject(fillthis)))->Fill(ptMC[6]);
1560 Int_t numberOfB0s = 0;
1562 for (
Int_t i = 0; i < B0toDStarPiLabelMatrix->GetNrows(); i++)
1564 Int_t particleCounter = 0;
1565 for (
Int_t j = 0; j < 4; j++)
1567 Int_t labelParticleInList = (
Int_t)particleMatrix(i,j);
1568 for (
Int_t k=0; k<aodevent->GetNumberOfTracks(); k++)
1570 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodevent->GetTrack(k));
1571 if(!aodTrack) AliFatal(
"Not a standard AOD");
1572 if(TMath::Abs(aodTrack->Eta())>0.8)
continue;
1573 if(aodTrack->GetITSNcls() < 1)
continue;
1574 if(aodTrack->GetTPCNcls() < 1)
continue;
1575 if(aodTrack->GetLabel() == labelParticleInList)
1583 if (particleCounter==4)
1585 TString fillthis=
"B0s_in_analysis";
1586 ((TH1F*)(listout->FindObject(fillthis)))->Fill(2);
1588 correctLabelArray.Set(numberOfB0s);
1589 correctLabelArray.AddAt(i,numberOfB0s-1);
1593 for (
Int_t i = 0; i < correctLabelArray.GetSize(); i++)
1595 particleMatrix(i,0) = (
Int_t)particleMatrix(correctLabelArray[i],0);
1596 particleMatrix(i,1) = (
Int_t)particleMatrix(correctLabelArray[i],1);
1597 particleMatrix(i,2) = (
Int_t)particleMatrix(correctLabelArray[i],2);
1598 particleMatrix(i,3) = (
Int_t)particleMatrix(correctLabelArray[i],3);
1599 particleMatrix(i,4) = (
Int_t)particleMatrix(correctLabelArray[i],4);
1600 particleMatrix(i,5) = (
Int_t)particleMatrix(correctLabelArray[i],5);
1601 particleMatrix(i,6) = (
Int_t)particleMatrix(correctLabelArray[i],6);
1603 B0toDStarPiLabelMatrix->ResizeTo(correctLabelArray.GetSize(),7);
1610 Int_t numberofparticles = 0;
1611 Int_t numberofparticlesused = 0;
1612 Int_t iClonesArray = 0;
1617 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
1618 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
1619 if(!aodTrack) AliFatal(
"Not a standard AOD");
1622 if(aodTrack->GetITSNcls() < 1)
continue;
1623 if(aodTrack->GetTPCNcls() < 1)
continue;
1624 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
1625 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
1626 if(aodTrack->GetID() < 0)
continue;
1628 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
1630 Int_t mcLabelParticle = -1;
1631 Int_t pdgParticle = -1;
1632 mcLabelParticle = aodTrack->GetLabel();
1634 numberofparticles++;
1637 Double_t pt_track = aodTrack->Pt();
1638 Double_t momentum_track = aodTrack->P();
1639 Int_t numberOfITS = aodTrack->GetITSNcls();
1640 Int_t numberOfTPC = aodTrack->GetTPCNcls();
1643 Int_t pionPIDnumber = 2;
1644 Int_t kaonPIDnumber = 3;
1649 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
1650 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
1652 AliExternalTrackParam particleTrack;
1653 particleTrack.CopyFromVTrack(aodTrack);
1655 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
1658 Bool_t isDesiredCandidate = kFALSE;
1660 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
1661 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
1662 if(mcLabelParticle == (
Int_t)particleMatrix(k,1)){
1663 isDesiredCandidate = kTRUE;
1669 Int_t daughterType = 2;
1678 for (
Int_t j = 0; j < 10; ++i)
1686 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1689 if(isDesiredCandidate)
1697 for (
Int_t j = 0; j < 10; ++i)
1705 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1714 if(isDesiredCandidate) {
1721 if(isDesiredCandidate) {
1728 if(isDesiredCandidate) {
1735 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
1736 if(isDesiredCandidate) {
1744 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
1745 if(isDesiredCandidate) {
1754 if(isDesiredCandidate) {
1762 if(isDesiredCandidate) {
1771 if(isDesiredCandidate) {
1784 for (
Int_t j = 0; j < 10; ++i)
1792 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1795 if(isDesiredCandidate)
1803 for (
Int_t j = 0; j < 10; ++i)
1811 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1816 numberofparticlesused++;
1827 Int_t numberofparticles = 0;
1828 Int_t numberofparticlesused = 0;
1829 Int_t iClonesArray = 0;
1834 for (
Int_t i=0; i<aodEvent->GetNumberOfTracks(); i++){
1835 AliAODTrack* aodTrack =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(i));
1836 if(!aodTrack) AliFatal(
"Not a standard AOD");
1839 if(aodTrack->GetITSNcls() < 1)
continue;
1840 if(aodTrack->GetTPCNcls() < 1)
continue;
1841 if(aodTrack->GetStatus()&AliESDtrack::kITSpureSA)
continue;
1842 if(!(aodTrack->GetStatus()&AliESDtrack::kITSin))
continue;
1843 if(aodTrack->GetID() < 0)
continue;
1845 if(!aodTrack->GetCovarianceXYZPxPyPz(covtest))
continue;
1848 Int_t mcLabelParticle = -1;
1849 Int_t pdgParticle = -1;
1850 mcLabelParticle = aodTrack->GetLabel();
1852 numberofparticles++;
1855 Double_t pt_track = aodTrack->Pt();
1856 Double_t momentum_track = aodTrack->P();
1857 Int_t numberOfITS = aodTrack->GetITSNcls();
1858 Int_t numberOfTPC = aodTrack->GetTPCNcls();
1861 Int_t pionPIDnumber = 2;
1862 Int_t kaonPIDnumber = 3;
1867 TPCok = trackPIDHF->
GetnSigmaTPC(aodTrack, pionPIDnumber, nSigmaTPC);
1868 TOFok = trackPIDHF->
GetnSigmaTOF(aodTrack, pionPIDnumber, nSigmaTOF);
1870 AliExternalTrackParam particleTrack;
1871 particleTrack.CopyFromVTrack(aodTrack);
1873 particleTrack.PropagateToDCA(primaryVertex,bz,100.,d0,covd0);
1877 Bool_t isDesiredCandidate = kFALSE;
1879 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
1880 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k){
1881 if(mcLabelParticle == (
Int_t)particleMatrix(k,0)){
1882 isDesiredCandidate = kTRUE;
1888 Int_t daughterType = 3;
1896 for (
Int_t j = 0; j < 10; ++i)
1904 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1907 if(isDesiredCandidate)
1915 for (
Int_t j = 0; j < 10; ++i)
1923 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
1932 if(isDesiredCandidate) {
1939 if(isDesiredCandidate) {
1946 if(isDesiredCandidate) {
1953 if(!(aodTrack->GetStatus()&AliESDtrack::kITSrefit)) {
1954 if(isDesiredCandidate) {
1962 if((!(aodTrack->GetStatus()&AliESDtrack::kTPCrefit))) {
1963 if(isDesiredCandidate) {
1972 if(isDesiredCandidate) {
1980 if(isDesiredCandidate) {
1989 if(isDesiredCandidate) {
2002 for (
Int_t j = 0; j < 10; ++i)
2010 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2013 if(isDesiredCandidate)
2021 for (
Int_t j = 0; j < 10; ++i)
2029 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2035 numberofparticlesused++;
2050 for (
Int_t j = 0; j < D0TracksFromFriendFile->GetEntriesFast(); j++)
2055 if(!trackD0) {std::cout <<
"found none" << std::endl;
continue;}
2056 if(trackD0 == NULL) {std::cout <<
"found NULL" << std::endl;
continue;}
2064 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(trackD0->GetDaughter(0));
2065 AliAODTrack * trackSecondDaughter = (AliAODTrack*)(trackD0->GetDaughter(1));
2067 AliAODVertex *vertexMother = (AliAODVertex*)trackD0->GetSecondaryVtx();
2070 Int_t pdgCodeMother = -1;
2071 Float_t pdgCodeGrandMother = -1;
2072 Bool_t isDesiredCandidate = kFALSE;
2073 Int_t motherType, histType;
2075 Int_t mcLabelD0 = -1;
2083 isDesiredCandidate = kTRUE;
2085 Int_t mcLabelFirstTrack = -1;
2086 mcLabelFirstTrack = trackFirstDaughter->GetLabel();
2088 if(mcLabelFirstTrack >= 0)
2090 AliAODMCParticle *mcParticleFirstTrack = (AliAODMCParticle*)mcTrackArray->At(mcLabelFirstTrack);
2091 AliAODMCParticle *mcMotherParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelD0);
2093 if(mcParticleFirstTrack && mcMotherParticle)
2095 pdgCodeMother = mcMotherParticle->GetPdgCode();
2097 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()));
2100 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()));
2112 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
2116 Bool_t cutMother = kFALSE;
2118 Bool_t bCutArray[25] = {0};
2120 if(cutReturnValue == -1) cutMother = kTRUE;
2121 if(cutReturnValue == 0) cutMother = kTRUE;
2126 for (
Int_t k = 0; k < 25; ++k)
2128 if (bCutArray[k] == kTRUE){
2129 if(isDesiredCandidate){
2141 if(isDesiredCandidate){
2144 delete vertexMother; vertexMother = NULL;
2145 delete trackD0; trackD0 = NULL;
2154 FillD0Histograms(trackD0, primaryVertex, bz, motherType, histType,pdgCodeMother);
2174 Int_t ObjectNumber = TProcessID::GetObjectCount();
2177 AliAODTrack * trackFirstDaughter = (AliAODTrack*)(aodEvent->GetTrack(
fDStarPionTracks->at(i)));
2178 if(!trackFirstDaughter)
continue;
2181 if(trackFirstDaughter->Charge() == -1) pdgD0 = -421;
2189 if(!trackSecondDaughter) {std::cout <<
"found none" << std::endl;
continue;}
2190 if(trackSecondDaughter == NULL) {std::cout <<
"found NULL" << std::endl;
continue;}
2193 if(trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(0) || trackFirstDaughter->GetID() == trackSecondDaughter->
GetProngID(1))
continue;
2196 if(trackFirstDaughter->Charge() == trackSecondDaughter->Charge() || TMath::Abs(trackFirstDaughter->Charge() + trackSecondDaughter->Charge()) != 1)
continue;
2200 if(trackFirstDaughter->Charge() == -1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(1))->Charge() != -1)
continue;
2201 if(trackFirstDaughter->Charge() == 1 && ((AliAODTrack*)trackSecondDaughter->GetDaughter(0))->Charge() != 1)
continue;
2205 if(trackFirstDaughter->Charge()==1)
2207 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),2)))
continue;
2208 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),3)))
continue;
2209 }
else if (trackFirstDaughter->Charge()==-1){
2210 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(0)),3)))
continue;
2211 if(!(
fCuts->
SelectPID(((AliAODTrack*)trackSecondDaughter->GetDaughter(1)),2)))
continue;
2215 AliExternalTrackParam DStarPionTrackParam;
2216 DStarPionTrackParam.CopyFromVTrack(trackFirstDaughter);
2217 AliExternalTrackParam D0TrackParam;
2218 D0TrackParam.CopyFromVTrack(trackSecondDaughter);
2223 tracksTestVertex.Add(&DStarPionTrackParam);
2224 tracksTestVertex.Add(&D0TrackParam);
2227 AliAODVertex *testVertex =
RecalculateVertex(primaryVertex,&tracksTestVertex,bz,dispersionTest);
2228 if(!testVertex) {
delete testVertex; testVertex = NULL;
continue;}
2230 Double_t d0z0Test[2],covd0z0Test[3];
2233 DStarPionTrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
2234 D0TrackParam.PropagateToDCA(testVertex,bz,100.,d0z0Test,covd0z0Test);
2235 delete testVertex; testVertex = NULL;
2237 Double_t pdgMassPion = TDatabasePDG::Instance()->GetParticle(211)->Mass();
2238 Double_t pdgMassD0 = TDatabasePDG::Instance()->GetParticle(421)->Mass();
2239 Double_t pdgMassDStar = TDatabasePDG::Instance()->GetParticle(413)->Mass();
2241 Double_t energyDStarPion = pdgMassPion*pdgMassPion + DStarPionTrackParam.Px()*DStarPionTrackParam.Px()+DStarPionTrackParam.Py()*DStarPionTrackParam.Py()+DStarPionTrackParam.Pz()*DStarPionTrackParam.Pz();
2242 Double_t energyD0 = pdgMassD0*pdgMassD0 + D0TrackParam.Px()*D0TrackParam.Px()+D0TrackParam.Py()*D0TrackParam.Py()+D0TrackParam.Pz()*D0TrackParam.Pz();
2243 Double_t energySum = TMath::Sqrt(energyDStarPion) + TMath::Sqrt(energyD0);
2245 Double_t pxDStarTest = DStarPionTrackParam.Px() + D0TrackParam.Px();
2246 Double_t pyDStarTest = DStarPionTrackParam.Py() + D0TrackParam.Py();
2247 Double_t pzDStarTest = DStarPionTrackParam.Pz() + D0TrackParam.Pz();
2248 Double_t p2DStarTest = pxDStarTest*pxDStarTest + pyDStarTest*pyDStarTest + pzDStarTest*pzDStarTest;
2250 Double_t invMassDStarTest = TMath::Sqrt(energySum*energySum-p2DStarTest);
2253 Int_t nCutIndex = 35;
2254 Bool_t bCutArrayTemp[25];
2255 Double_t cutVariableValue = TMath::Abs(invMassDStarTest-pdgMassDStar)/2.0;
2257 if(!bPassedCut)
continue;
2265 AliAODTrack * trackB0Pion =
dynamic_cast<AliAODTrack*
>(aodEvent->GetTrack(
fB0PionTracks->at(i)));
2266 if(!trackB0Pion)
continue;
2269 AliAODTrack* twoProngdaughter0 = (AliAODTrack*)trackSecondDaughter->GetDaughter(0);
2270 AliAODTrack* twoProngdaughter1 = (AliAODTrack*)trackSecondDaughter->GetDaughter(1);
2271 UShort_t idProng0 = twoProngdaughter0->GetID();
2272 UShort_t idProng1 = twoProngdaughter1->GetID();
2274 if(trackB0Pion->GetID() == trackFirstDaughter->GetID() || trackB0Pion->GetID() == idProng0 || trackB0Pion->GetID() == idProng1)
continue;
2279 Bool_t bSameSign = kFALSE;
2280 if(trackB0Pion->Charge() == (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) && trackB0Pion->Charge() + (trackSecondDaughter->Charge() + trackFirstDaughter->Charge()) != 0) bSameSign = kTRUE;
2289 AliExternalTrackParam firstTrack;
2290 firstTrack.CopyFromVTrack(trackFirstDaughter);
2291 AliExternalTrackParam secondTrack;
2292 secondTrack.CopyFromVTrack(trackSecondDaughter);
2293 AliExternalTrackParam thirdTrack;
2294 thirdTrack.CopyFromVTrack(trackB0Pion);
2297 TObjArray daughterTracksWithRecalculation;
2299 daughterTracksWithRecalculation.Add(&firstTrack);
2300 daughterTracksWithRecalculation.Add(&secondTrack);
2301 daughterTracksWithRecalculation.Add(&thirdTrack);
2304 AliAODVertex *vertexMother =
RecalculateVertex(primaryVertex,&daughterTracksWithRecalculation,bz,dispersion);
2305 if(!vertexMother) {
delete vertexMother; vertexMother = NULL;
continue;}
2308 if(vertexMother->GetNDaughters()!=2)
2310 std::cout <<
"bad reconstruction - number of daughters for vertex is incorrect" << std::endl;
2311 delete vertexMother; vertexMother = NULL;
2315 Double_t xdummyDStar=0.,ydummyDStar=0.,eDStar[2];
2316 Double_t d0z0DStar[2],covd0z0DStar[3],d0DStar[2],d0errDStar[2];
2319 firstTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
2320 secondTrack.PropagateToDCA(vertexMother,bz,100.,d0z0DStar,covd0z0DStar);
2322 Double_t pxDStar[2],pyDStar[2],pzDStar[2];
2323 pxDStar[0] = firstTrack.Px();
2324 pyDStar[0] = firstTrack.Py();
2325 pzDStar[0] = firstTrack.Pz();
2326 pxDStar[1] = secondTrack.Px();
2327 pyDStar[1] = secondTrack.Py();
2328 pzDStar[1] = secondTrack.Pz();
2331 xyz_track1[0] = firstTrack.GetX();
2332 firstTrack.GetYAt(xyz_track1[0],bz,xyz_track1[1]);
2333 firstTrack.GetZAt(xyz_track1[0],bz,xyz_track1[2]);
2336 xyz_track2[0] = secondTrack.GetX();
2337 secondTrack.GetYAt(xyz_track2[0],bz,xyz_track2[1]);
2338 secondTrack.GetZAt(xyz_track2[0],bz,xyz_track2[2]);
2340 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]));
2342 firstTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
2343 d0DStar[0] = d0z0DStar[0];
2344 d0errDStar[0] = TMath::Sqrt(covd0z0DStar[0]);
2345 secondTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0DStar,covd0z0DStar);
2346 d0DStar[1] = d0z0DStar[0];
2347 d0errDStar[1] = TMath::Sqrt(covd0z0DStar[0]);
2350 Double_t dcaDStarPionD0 = secondTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
2351 Double_t dcaDStarPionB0Pion = secondTrack.GetDCA(&thirdTrack,bz,xdummyDStar,ydummyDStar);
2352 Double_t dcaB0PionD0 = thirdTrack.GetDCA(&firstTrack,bz,xdummyDStar,ydummyDStar);
2360 Short_t chargeDStar = trackFirstDaughter->Charge() + trackSecondDaughter->Charge();
2361 AliAODVertex * vertexDStar =
new AliAODVertex(*vertexMother);
2364 std::cout <<
"no dstar vertex" << std::endl;
2365 delete vertexMother; vertexMother = NULL;
2366 delete vertexDStar; vertexDStar = NULL;
2371 Int_t nProngsDStar = 2;
2375 delete vertexMother; vertexMother = NULL;
2376 delete vertexDStar; vertexDStar = NULL;
2377 delete trackDStar; trackDStar = NULL;
2381 trackDStar->SetCharge(chargeDStar);
2384 idDStar[0]= trackFirstDaughter->GetID();
2388 prongsDStar[0] = 211;
2389 prongsDStar[1] = 421;
2392 if(vertexDStar->GetNDaughters()!=2)
2394 std::cout <<
"bad reconstruction 2 - number of daughters for vertex is incorrect" << std::endl;
2395 delete vertexMother; vertexMother = NULL;
2396 delete vertexDStar; vertexDStar = NULL;
2397 delete trackDStar; trackDStar = NULL;
2403 trackDStar->GetSecondaryVtx()->AddDaughter(trackFirstDaughter);
2404 trackDStar->GetSecondaryVtx()->AddDaughter(trackSecondDaughter);
2416 Double_t xdummy=0.,ydummy=0.,dca,e[2];
2417 Double_t d0z0[2],covd0z0[3],d0[2],d0err[2];
2419 AliExternalTrackParam fourthTrack;
2420 fourthTrack.CopyFromVTrack(trackDStar);
2422 thirdTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
2423 fourthTrack.PropagateToDCA(vertexMother,bz,100.,d0z0,covd0z0);
2426 px[0] = thirdTrack.Px();
2427 py[0] = thirdTrack.Py();
2428 pz[0] = thirdTrack.Pz();
2429 px[1] = fourthTrack.Px();
2430 py[1] = fourthTrack.Py();
2431 pz[1] = fourthTrack.Pz();
2438 id[0]= thirdTrack.GetID();
2441 thirdTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
2443 d0err[0] = TMath::Sqrt(covd0z0[0]);
2444 fourthTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
2446 d0err[1] = TMath::Sqrt(covd0z0[0]);
2448 dca = fourthTrack.GetDCA(&thirdTrack,bz,xdummy,ydummy);
2451 Short_t chargeMother = trackFirstDaughter->Charge() + trackDStar->Charge();
2452 Int_t nProngsB0 = 2;
2456 delete vertexMother; vertexMother = NULL;
2457 delete vertexDStar; vertexDStar = NULL;
2458 delete trackDStar; trackDStar = NULL;
2459 delete trackB0; trackB0 = NULL;
2463 trackB0->SetCharge(chargeMother);
2465 trackB0->GetSecondaryVtx()->AddDaughter(trackB0Pion);
2466 trackB0->GetSecondaryVtx()->AddDaughter(trackDStar);
2478 Bool_t isDesiredCandidate = kFALSE;
2479 Int_t mcLabelB0 = -1;
2480 Int_t mcLabelDStar = -1;
2482 Int_t motherType, histType;
2490 if (mcLabelB0 >= 0 && mcLabelDStar >= 0 && trackB0Pion->GetLabel() >= 0)
2492 AliAODMCParticle *mcTrackDStarPion = (AliAODMCParticle*)mcTrackArray->At(trackB0Pion->GetLabel());
2493 AliAODMCParticle *mcTrackDStar = (AliAODMCParticle*)mcTrackArray->At(mcLabelDStar);
2495 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()));
2498 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()));
2501 isDesiredCandidate = kTRUE;
2516 Bool_t cutDStar = kFALSE;
2518 Bool_t bCutArrayDStar[25] = {0};
2520 if(cutReturnValueDStar == -1) cutDStar = kTRUE;
2521 if(cutReturnValueDStar == 0) cutDStar = kTRUE;
2523 Bool_t bCutArrayD0[35] = {0};
2525 if(cutReturnValueD0 == -1) cutDStar = kTRUE;
2526 if(cutReturnValueD0 == 0) cutDStar = kTRUE;
2532 for (
Int_t n = 0; n < 25; ++n)
2534 if(bCutArrayDStar[n] == kTRUE){
2535 if(isDesiredCandidate){
2542 for (
Int_t n = 0; n < 35; ++n)
2544 if(bCutArrayD0[n] == kTRUE){
2545 if(isDesiredCandidate){
2557 if(isDesiredCandidate)
2561 delete vertexMother; vertexMother = NULL;
2562 delete vertexDStar; vertexDStar = NULL;
2563 delete trackDStar; trackDStar = NULL;
2592 if(isDesiredCandidate)
2594 AliAODMCParticle *mcTrackFirstDaughter = (AliAODMCParticle*)mcTrackArray->At(trackB0Pion->GetLabel());
2595 AliAODMCParticle *mcTrackB0 = (AliAODMCParticle*)mcTrackArray->At(mcLabelB0);
2597 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()));
2600 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()));
2610 if(isDesiredCandidate)
2619 Bool_t cutMother = kFALSE;
2621 Bool_t bCutArray[85] = {0};
2622 Int_t numberOfCuts = 85;
2624 if(cutReturnValue == -1) cutMother = kTRUE;
2625 if(cutReturnValue == 0) cutMother = kTRUE;
2630 Double_t invariantMassMother = trackB0->InvMass(2,prongs);
2631 Double_t pdgMassMother=TDatabasePDG::Instance()->GetParticle(511)->Mass();
2635 for (
Int_t n = 0; n < 85; ++n)
2637 if(bCutArray[n] == kTRUE){
2638 if(isDesiredCandidate){
2645 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow){
2646 for (
Int_t i = 0; i < numberOfCuts; ++i)
2648 if(bCutArray[i] == kFALSE)
continue;
2649 for (
Int_t j = 0; j < numberOfCuts; ++j)
2651 if(bCutArray[j] == kFALSE)
continue;
2652 if(isDesiredCandidate == kFALSE) histName =
"cutEffectBackground";
2653 if(isDesiredCandidate == kTRUE) histName =
"cutEffectSignal";
2654 ((TH2I*)(
fOutputB0MC->FindObject(histName)))->Fill(i,j);
2658 for (
Int_t i = 0; i < numberOfCuts; ++i)
2660 if(bCutArray[i] == kFALSE)
continue;
2662 for (
Int_t j = 0; j < numberOfCuts; ++j)
2665 if(bCutArray[j] == kTRUE)
2674 if(isDesiredCandidate == kFALSE) histName =
"cutEffectUniqueBackground";
2675 if(isDesiredCandidate == kTRUE) histName =
"cutEffectUniqueSignal";
2687 if(isDesiredCandidate)
2691 delete vertexMother; vertexMother = NULL;
2692 delete trackB0; trackB0 = NULL;
2693 delete vertexDStar; vertexDStar = NULL;
2694 delete trackDStar; trackDStar = NULL;
2699 TString name_dca_D0_DStarPion =
"dca_D0_DStarPion";
2700 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_DStarPion)))->Fill(dcaDStarPionD0);
2702 TString name_dca_D0_B0Pion =
"dca_D0_B0Pion";
2703 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_D0_B0Pion)))->Fill(dcaB0PionD0);
2705 TString name_dca_DStarPion_B0Pion =
"dca_DStarPion_B0Pion";
2706 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
2710 TString name_dca_MC_D0_DStarPion =
"dca_MC_D0_DStarPion";
2711 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_MC_D0_DStarPion)))->Fill(dcaDStarPionD0);
2713 TString name_dca_MC_D0_B0Pion =
"dca_MC_D0_B0Pion";
2714 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_MC_D0_B0Pion)))->Fill(dcaB0PionD0);
2716 TString name_dca_MC_DStarPion_B0Pion =
"dca_MC_DStarPion_B0Pion";
2717 ((TH1F*)(
fOutputB0MC->FindObject(name_dca_MC_DStarPion_B0Pion)))->Fill(dcaDStarPionB0Pion);
2738 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
2743 if(!isDesiredCandidate)
2745 motherType = 0; histType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2749 if(isDesiredCandidate)
2751 motherType = 0; histType = 5;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2761 ptBinMother +=
"_ptbin_"; ptBinMother +=
fPtBinLimits[ptBin]; ptBinMother +=
"_to_"; ptBinMother +=
fPtBinLimits[ptBin+1];
2762 histType = 6 + 2 * ptBin;
2765 Int_t histTypeD0 = 2 * d0PtBin;
2768 Int_t histTypeD0DStar = 2 * d0DStarPtBin;
2771 Int_t histTypeDStar = 2 * dstarPtBin;
2774 if (TMath::Abs(invariantMassMother-pdgMassMother)<massWindow)
2776 if(!bSameSign && histType > 5)
2778 if(!isDesiredCandidate)
2780 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2783 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0, pdgD0);
2784 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar, pdgD0);
2788 if(isDesiredCandidate)
2791 motherType = 0;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histType, pdgD0);
2794 motherType = 3;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0 + 1, pdgD0);
2795 motherType = 4;
FillD0Histograms(selectedD0, primaryVertex, bz, motherType, histTypeD0DStar + 1, pdgD0);
2804 fillthis=
"invariantMassB0";
2805 fillthis +=
"_SameSign";
2806 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2807 fillthis=
"invariantMassB0";
2808 fillthis += ptBinMother +
"_SameSign";
2809 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2810 fillthis=
"invariantMassB0";
2811 fillthis +=
"_SignSum";
2812 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2813 fillthis=
"invariantMassB0";
2814 fillthis += ptBinMother +
"_SignSum";
2815 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2820 fillthis=
"deltaInvMassB0";
2821 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2822 fillthis=
"deltaInvMassB0";
2823 fillthis += ptBinMother;
2824 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2826 fillthis=
"invariantMassB0";
2827 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2828 fillthis=
"invariantMassB0";
2829 fillthis += ptBinMother;
2830 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2831 fillthis=
"invariantMassB0";
2832 fillthis +=
"_SignSum";
2833 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2834 fillthis=
"invariantMassB0";
2835 fillthis += ptBinMother +
"_SignSum";
2836 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2839 if(trackB0->Pt() > 6.0)
2841 ptBinMother =
"_ptbin_6_to_inf";
2844 fillthis=
"invariantMassB0";
2845 fillthis += ptBinMother +
"_SameSign";
2846 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2847 fillthis=
"invariantMassB0";
2848 fillthis += ptBinMother +
"_SignSum";
2849 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2853 fillthis=
"deltaInvMassB0";
2854 fillthis += ptBinMother;
2855 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2857 fillthis=
"invariantMassB0";
2858 fillthis += ptBinMother;
2859 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2860 fillthis=
"invariantMassB0";
2861 fillthis += ptBinMother +
"_SignSum";
2862 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2867 if(trackB0->Pt() > 3.0)
2869 ptBinMother =
"_ptbin_3_to_inf";
2872 fillthis=
"invariantMassB0";
2873 fillthis += ptBinMother +
"_SameSign";
2874 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2875 fillthis=
"invariantMassB0";
2876 fillthis += ptBinMother +
"_SignSum";
2877 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,-1);
2881 fillthis=
"deltaInvMassB0";
2882 fillthis += ptBinMother;
2883 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invmassDelta);
2885 fillthis=
"invariantMassB0";
2886 fillthis += ptBinMother;
2887 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother);
2888 fillthis=
"invariantMassB0";
2889 fillthis += ptBinMother +
"_SignSum";
2890 ((TH1F*)(
fOutputB0MC->FindObject(fillthis)))->Fill(invariantMassMother,1);
2895 delete vertexMother; vertexMother = NULL;
2896 delete trackB0; trackB0 = NULL;
2897 delete vertexDStar; vertexDStar = NULL;
2898 delete trackDStar; trackDStar = NULL;
2905 TProcessID::SetObjectCount(ObjectNumber);
2914 AliAODTrack* selectedB0Pion = (AliAODTrack*)selectedB0->GetDaughter(0);
2917 AliAODTrack* selectedDStarPion = (AliAODTrack*)selectedDStar->GetDaughter(0);
2920 AliAODTrack* selectedD0Pion;
2921 AliAODTrack* selectedD0Kaon;
2923 if(selectedDStarPion->Charge() == 1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(0);
2924 if(selectedDStarPion->Charge() == -1) selectedD0Pion = (AliAODTrack*)selectedD0->GetDaughter(1);
2926 if(selectedDStarPion->Charge() == 1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(1);
2927 if(selectedDStarPion->Charge() == -1) selectedD0Kaon = (AliAODTrack*)selectedD0->GetDaughter(0);
2929 Double_t d0B0pion = TMath::Abs(selectedB0->Getd0Prong(0));
2930 Double_t d0DStarpion = TMath::Abs(selectedDStar->Getd0Prong(0));
2934 if(selectedDStarPion->Charge() == 1) d0D0pion = selectedD0->Getd0Prong(0);
2935 if(selectedDStarPion->Charge() == -1) d0D0pion = selectedD0->Getd0Prong(1);
2937 if(selectedDStarPion->Charge() == 1) d0D0kaon = selectedD0->Getd0Prong(1);
2938 if(selectedDStarPion->Charge() == -1) d0D0kaon = selectedD0->Getd0Prong(0);
2942 Int_t numberOfITS = 0;
2943 Int_t numberOfTPC = 0;
2944 Int_t daughterType, histType;
2945 Int_t totalNumberOfITS = 0;
2946 Int_t totalNumberOfTPC = 0;
2951 Int_t pionPIDnumber = 2;
2952 Int_t kaonPIDnumber = 3;
2959 pt_track = selectedD0Pion->Pt();
2960 momentum_track = selectedD0Pion->P();
2961 numberOfITS = selectedD0Pion->GetITSNcls();
2962 numberOfTPC = selectedD0Pion->GetTPCNcls();
2963 totalNumberOfITS += numberOfITS;
2964 totalNumberOfTPC += numberOfTPC;
2965 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Pion, pionPIDnumber, nSigmaTPC);
2966 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Pion, pionPIDnumber, nSigmaTOF);
2967 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
2968 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
2974 if(!isDesiredCandidate)
2981 for (
Int_t j = 0; j < 10; ++j)
2983 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
2989 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
2994 if(isDesiredCandidate)
3002 for (
Int_t j = 0; j < 10; ++j)
3004 if(selectedD0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3010 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3019 Float_t pdgCodeParticleMother = -1;
3020 Int_t mcLabelParticle = -1;
3021 Int_t mcLabelParticleMother = -1;
3022 mcLabelParticle = selectedD0Pion->GetLabel();
3024 if(mcLabelParticle >= 0){
3026 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3027 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3029 mcLabelParticleMother = mcTrackParticle->GetMother();
3031 if(mcLabelParticleMother >= 0){
3032 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3033 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3034 ((TH1F*)fDaughterHistogramArray2D[0][3])->Fill(pdgCodeParticleMother);
3042 pt_track = selectedD0Kaon->Pt();
3043 momentum_track = selectedD0Kaon->P();
3044 numberOfITS = selectedD0Kaon->GetITSNcls();
3045 numberOfTPC = selectedD0Kaon->GetTPCNcls();
3046 totalNumberOfITS += numberOfITS;
3047 totalNumberOfTPC += numberOfTPC;
3048 TPCok = trackPIDHF->
GetnSigmaTPC(selectedD0Kaon, kaonPIDnumber, nSigmaTPC);
3049 TOFok = trackPIDHF->
GetnSigmaTOF(selectedD0Kaon, kaonPIDnumber, nSigmaTOF);
3050 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
3051 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
3055 if(!isDesiredCandidate)
3062 for (
Int_t j = 0; j < 10; ++j)
3064 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3070 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3075 if(isDesiredCandidate)
3083 for (
Int_t j = 0; j < 10; ++j)
3085 if(selectedD0Kaon->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3091 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3100 Float_t pdgCodeParticleMother = -1;
3101 Int_t mcLabelParticle = -1;
3102 Int_t mcLabelParticleMother = -1;
3103 mcLabelParticle = selectedD0Kaon->GetLabel();
3105 if(mcLabelParticle >= 0){
3107 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3108 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3110 mcLabelParticleMother = mcTrackParticle->GetMother();
3112 if(mcLabelParticleMother >= 0){
3113 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3114 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3115 ((TH1F*)fDaughterHistogramArray2D[1][3])->Fill(pdgCodeParticleMother);
3121 pt_track = selectedDStarPion->Pt();
3122 momentum_track = selectedDStarPion->P();
3123 numberOfITS = selectedDStarPion->GetITSNcls();
3124 numberOfTPC = selectedDStarPion->GetTPCNcls();
3125 totalNumberOfITS += numberOfITS;
3126 totalNumberOfTPC += numberOfTPC;
3127 TPCok = trackPIDHF->
GetnSigmaTPC(selectedDStarPion, pionPIDnumber, nSigmaTPC);
3128 TOFok = trackPIDHF->
GetnSigmaTOF(selectedDStarPion, pionPIDnumber, nSigmaTOF);
3129 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
3133 if(!isDesiredCandidate)
3140 for (
Int_t j = 0; j < 10; ++j)
3142 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3148 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3153 if(isDesiredCandidate)
3161 for (
Int_t j = 0; j < 10; ++j)
3163 if(selectedDStarPion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3169 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3178 Float_t pdgCodeParticleMother = -1;
3179 Int_t mcLabelParticle = -1;
3180 Int_t mcLabelParticleMother = -1;
3181 mcLabelParticle = selectedDStarPion->GetLabel();
3183 if(mcLabelParticle >= 0){
3185 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3186 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3188 mcLabelParticleMother = mcTrackParticle->GetMother();
3190 if(mcLabelParticleMother >= 0){
3191 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3192 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3193 ((TH1F*)fDaughterHistogramArray2D[2][3])->Fill(pdgCodeParticleMother);
3199 pt_track = selectedB0Pion->Pt();
3200 momentum_track = selectedB0Pion->P();
3201 numberOfITS = selectedB0Pion->GetITSNcls();
3202 numberOfTPC = selectedB0Pion->GetTPCNcls();
3203 totalNumberOfITS += numberOfITS;
3204 totalNumberOfTPC += numberOfTPC;
3205 TPCok = trackPIDHF->
GetnSigmaTPC(selectedB0Pion, pionPIDnumber, nSigmaTPC);
3206 TOFok = trackPIDHF->
GetnSigmaTOF(selectedB0Pion, pionPIDnumber, nSigmaTOF);
3207 if(TPCok != -1) nSigmaTPCtotal += nSigmaTPC*nSigmaTPC;
3208 if(TOFok != -1) nSigmaTOFtotal += nSigmaTOF*nSigmaTOF;
3212 if(!isDesiredCandidate)
3219 for (
Int_t j = 0; j < 10; ++j)
3221 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3227 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3232 if(isDesiredCandidate)
3240 for (
Int_t j = 0; j < 10; ++j)
3242 if(selectedB0Pion->HasPointOnITSLayer(j)) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][4])->Fill(j);
3248 if(TPCok != -1 && TOFok != -1) ((TH1F*)
fDaughterHistogramArray[daughterType][histType][6])->Fill(sqrt(nSigmaTPC*nSigmaTPC + nSigmaTOF*nSigmaTOF));
3257 Float_t pdgCodeParticleMother = -1;
3258 Int_t mcLabelParticle = -1;
3259 Int_t mcLabelParticleMother = -1;
3260 mcLabelParticle = selectedB0Pion->GetLabel();
3262 if(mcLabelParticle >= 0){
3264 AliAODMCParticle *mcTrackParticle = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticle);
3265 pdgCodeParticle = TMath::Abs(mcTrackParticle->GetPdgCode());
3267 mcLabelParticleMother = mcTrackParticle->GetMother();
3269 if(mcLabelParticleMother >= 0){
3270 AliAODMCParticle *mcTrackParticleMother = (AliAODMCParticle*)mcTrackArray->At(mcLabelParticleMother);
3271 pdgCodeParticleMother = TMath::Abs(mcTrackParticleMother->GetPdgCode());
3272 ((TH1F*)fDaughterHistogramArray2D[3][3])->Fill(pdgCodeParticleMother);
3277 if(!isDesiredCandidate)
3279 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSBackground")))->Fill(totalNumberOfITS);
3280 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCBackground")))->Fill(totalNumberOfTPC);
3281 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDBackground")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
3283 if(isDesiredCandidate)
3285 ((TH1F*)(
fOutputB0MC->FindObject(
"totalITSSignal")))->Fill(totalNumberOfITS);
3286 ((TH1F*)(
fOutputB0MC->FindObject(
"totalTPCSignal")))->Fill(totalNumberOfTPC);
3287 ((TH1F*)(
fOutputB0MC->FindObject(
"totalSigmaPIDSignal")))->Fill(sqrt(nSigmaTPCtotal + nSigmaTOFtotal));
3299 Int_t chargeDStar = DStar->Charge();
3309 else if (chargeDStar==-1)
3318 std::cout <<
"Wrong charge DStar." << std::endl;
3321 e[2]=DStar->EProng(0,211);
3324 Double_t invMassDStar = TMath::Sqrt(esum*esum-DStar->P()*DStar->P());
3327 return invMassDStar - invMassD0;
3337 Int_t chargeDStar = DStar->Charge();
3347 else if (chargeDStar==-1)
3356 std::cout <<
"Wrong charge DStar." << std::endl;
3359 e[0]=DStar->EProng(0,211);
3360 e[3]=B0->EProng(0,211);
3362 Double_t esum = e[0]+e[1]+e[2]+e[3];
3363 Double_t invMassB0 = TMath::Sqrt(esum*esum-B0->P()*B0->P());
3367 return invMassB0 - invMassD0;
3372 if(histType<0)
return;
3385 Double_t invariantMassMother = 0.0;
3388 AliAODVertex * vertexMother = 0x0;
3389 AliAODVertex * vertexDaughter = 0x0;
3391 Double_t decayLengthDaughter = 0.0;
3393 Double_t angleMotherFirstDaughter = 0.0;
3394 Double_t angleMotherSecondDaughter = 0.0;
3395 Double_t topomaticFirstDaughter = 0.0;
3396 Double_t topomaticSecondDaughter = 0.0;
3399 UInt_t prongs[2], prongs2[2];
3400 Double_t angleBetweenBothDaughters = 0;
3403 Double_t pdgMassMother=TDatabasePDG::Instance()->GetParticle(421)->Mass();
3406 prongs[0] = 211; prongs[1] = 321;
3407 prongs2[0] = 321; prongs2[1] = 211;
3408 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
3409 AliAODTrack * secondDaughter = (AliAODTrack*)selectedMother->GetDaughter(1);
3410 vertexMother = selectedMother->GetSecondaryVtx();
3411 ptFirstDaughter = firstDaughter->Pt();
3412 ptSecondDaughter = secondDaughter->Pt();
3419 for(
Int_t ipr=0; ipr<2; ipr++)
3424 if(errdiffIP>0.) normdd0=diffIP/errdiffIP;
3425 if(ipr==0) dd0pr1=normdd0;
3426 if(ipr==1) dd0pr2=normdd0;
3429 if(TMath::Abs(dd0pr1)>TMath::Abs(dd0pr2)) {dd0max=dd0pr1; dd0min=dd0pr2;}
3430 else {dd0max=dd0pr2; dd0min=dd0pr1;}
3432 AliExternalTrackParam motherTrack;
3433 motherTrack.CopyFromVTrack(selectedMother);
3435 motherTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3438 ptMother = selectedMother->Pt();
3439 momentumMother = selectedMother->P();
3440 etaMother = selectedMother->Eta();
3441 phiMother = selectedMother->Phi();
3443 d0Mother = TMath::Abs(d0[0]);
3444 d0firstTrack = TMath::Abs(selectedMother->Getd0Prong(0));
3445 d0secondTrack = TMath::Abs(selectedMother->Getd0Prong(1));
3447 impactProduct = selectedMother->
Prodd0d0();
3448 impactProductXY = TMath::Abs(selectedMother->
ImpParXY());
3449 invariantMassMother = selectedMother->InvMass(2,prongs);
3450 if(pdgCodeMother == -421) invariantMassMother = selectedMother->InvMass(2,prongs2);
3452 dcaMother = selectedMother->GetDCA();
3453 vertexDistance = vertexMother->DistanceToVertex(primaryVertex);
3454 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) /(selectedMother->P() * firstDaughter->P());
3455 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) /(selectedMother->P() * secondDaughter->P());
3456 cosThetaStar = selectedMother->CosThetaStar(0,421,211,321);
3457 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) /(firstDaughter->P() * secondDaughter->P());
3460 Double_t pseudoProperDecayLength = ((vertexMother->GetX() - primaryVertex->GetX()) * selectedMother->Px() / TMath::Abs(selectedMother->Pt())) + ((vertexMother->GetY() - primaryVertex->GetY()) * selectedMother->Py() / TMath::Abs(selectedMother->Pt()));
3461 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother/ptMother;
3462 decayTime = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
3464 Double_t phi = selectedMother->Phi();
3465 Double_t theta = selectedMother->Theta();
3467 selectedMother->GetCovarianceXYZPxPyPz(covMatrix);
3474 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
3475 +covMatrix[13]*2.*cp*sp*ct*ct
3476 +covMatrix[18]*2.*cp*ct*st
3477 +covMatrix[14]*sp*sp*ct*ct
3478 +covMatrix[19]*2.*sp*ct*st
3479 +covMatrix[20]*st*st;
3480 Double_t normalizedDecayTime = selectedMother->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
3482 Double_t eKaon = selectedMother->EProng(1,321);
3483 Double_t invMassKaon = TMath::Sqrt(eKaon*eKaon-secondDaughter->P()*secondDaughter->P());
3485 invmassDelta = invMassD0 - invMassKaon;
3487 Double_t vertexMotherX = vertexMother->GetX();
3488 Double_t vertexMotherY = vertexMother->GetY();
3489 Double_t vertexMotherZ = vertexMother->GetZ();
3529 Int_t nVariables = 8;
3530 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
3531 for (
Int_t k = 0; k < nHistograms; ++k)
3536 if(nFirst==0) firstVariable = d0firstTrack;
3537 if(nFirst==1) firstVariable = d0secondTrack;
3538 if(nFirst==2) firstVariable = d0Mother;
3539 if(nFirst==3) firstVariable = pointingAngle;
3540 if(nFirst==4) firstVariable = impactProduct;
3541 if(nFirst==5) firstVariable = impactProductXY;
3542 if(nFirst==6) firstVariable = vertexDistance;
3543 if(nFirst==7) firstVariable = normDecayLength;
3544 if(nFirst==8) firstVariable = pseudoProperDecayTime;
3546 if(nSecond==0) secondVariable = d0firstTrack;
3547 if(nSecond==1) secondVariable = d0secondTrack;
3548 if(nSecond==2) secondVariable = d0Mother;
3549 if(nSecond==3) secondVariable = pointingAngle;
3550 if(nSecond==4) secondVariable = impactProduct;
3551 if(nSecond==5) secondVariable = impactProductXY;
3552 if(nSecond==6) secondVariable = vertexDistance;
3553 if(nSecond==7) secondVariable = normDecayLength;
3554 if(nSecond==8) secondVariable = pseudoProperDecayTime;
3559 if(nSecond>nVariables)
3562 nSecond = nFirst + 1;
3571 if(histType<0)
return;
3584 Double_t invariantMassMother = 0.0;
3587 AliAODVertex * vertexMother = 0x0;
3588 AliAODVertex * vertexDaughter = 0x0;
3592 Double_t angleMotherFirstDaughter = 0.0;
3593 Double_t angleMotherSecondDaughter = 0.0;
3594 Double_t topomaticFirstDaughter = 0.0;
3595 Double_t topomaticSecondDaughter = 0.0;
3600 Double_t angleBetweenBothDaughters = 0;
3604 if(motherType==1 || motherType==5){
3605 prongs[0] = 211; prongs[1] = 421;
3607 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
3610 ptFirstDaughter = firstDaughter->Pt();
3611 ptSecondDaughter = secondDaughter->Pt();
3612 vertexMother = selectedMother->GetSecondaryVtx();
3613 vertexDaughter = secondDaughter->GetSecondaryVtx();
3614 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) /(selectedMother->P() * firstDaughter->P());
3615 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) /(selectedMother->P() * secondDaughter->P());
3616 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) /(firstDaughter->P() * secondDaughter->P());
3617 cosThetaStar = selectedMother->CosThetaStar(0,413,211,421);
3618 pdgMassMother = TDatabasePDG::Instance()->GetParticle(413)->Mass();
3621 prongs[0] = 211; prongs[1] = 413;
3623 AliAODTrack * firstDaughter = (AliAODTrack*)selectedMother->GetDaughter(0);
3626 ptFirstDaughter = firstDaughter->Pt();
3627 ptSecondDaughter = secondDaughter->Pt();
3628 vertexMother = selectedMother->GetSecondaryVtx();
3629 vertexDaughter = secondDaughter->GetSecondaryVtx();
3630 angleMotherFirstDaughter = (selectedMother->Px() * firstDaughter->Px() + selectedMother->Py() * firstDaughter->Py() + selectedMother->Pz() * firstDaughter->Pz()) /(selectedMother->P() * firstDaughter->P());
3631 angleMotherSecondDaughter = (selectedMother->Px() * secondDaughter->Px() + selectedMother->Py() * secondDaughter->Py() + selectedMother->Pz() * secondDaughter->Pz()) /(selectedMother->P() * secondDaughter->P());
3632 angleBetweenBothDaughters = (firstDaughter->Px() * secondDaughter->Px() + firstDaughter->Py() * secondDaughter->Py() + firstDaughter->Pz() * secondDaughter->Pz()) /(firstDaughter->P() * secondDaughter->P());
3633 cosThetaStar = selectedMother->CosThetaStar(0,511,211,413);
3634 pdgMassMother = TDatabasePDG::Instance()->GetParticle(511)->Mass();
3643 for(
Int_t ipr=0; ipr<2; ipr++)
3648 if(errdiffIP>0.) normdd0=diffIP/errdiffIP;
3649 if(ipr==0) dd0pr1=normdd0;
3650 if(ipr==1) dd0pr2=normdd0;
3654 if(TMath::Abs(dd0pr1)>TMath::Abs(dd0pr2)) {dd0max=dd0pr1; dd0min=dd0pr2;}
3655 else {dd0max=dd0pr2; dd0min=dd0pr1;}
3659 AliExternalTrackParam motherTrack;
3660 motherTrack.CopyFromVTrack(selectedMother);
3662 motherTrack.PropagateToDCA(primaryVertex,bz,100.,d0z0,covd0z0);
3665 ptMother = selectedMother->Pt();
3666 momentumMother = selectedMother->P();
3667 etaMother = selectedMother->Eta();
3668 phiMother = selectedMother->Phi();
3669 d0Mother = TMath::Abs(d0[0]);
3672 impactProduct = selectedMother->
Prodd0d0();
3673 impactProductXY = TMath::Abs(selectedMother->
ImpParXY());
3674 invariantMassMother = selectedMother->InvMass(2,prongs);
3675 dcaMother = selectedMother->GetDCA();
3676 vertexDistance = vertexMother->DistanceToVertex(primaryVertex);
3677 d0firstTrack = TMath::Abs(selectedMother->Getd0Prong(0));
3678 d0secondTrack = TMath::Abs(selectedMother->Getd0Prong(1));
3681 Double_t pseudoProperDecayLength = ((vertexMother->GetX() - primaryVertex->GetX()) * selectedMother->Px() / TMath::Abs(selectedMother->Pt())) + ((vertexMother->GetY() - primaryVertex->GetY()) * selectedMother->Py() / TMath::Abs(selectedMother->Pt()));
3682 Double_t pseudoProperDecayTime = pseudoProperDecayLength * pdgMassMother/ptMother;
3683 decayTime = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
3685 Double_t phi = selectedMother->Phi();
3686 Double_t theta = selectedMother->Theta();
3688 selectedMother->GetCovarianceXYZPxPyPz(covMatrix);
3695 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
3696 +covMatrix[13]*2.*cp*sp*ct*ct
3697 +covMatrix[18]*2.*cp*ct*st
3698 +covMatrix[14]*sp*sp*ct*ct
3699 +covMatrix[19]*2.*sp*ct*st
3700 +covMatrix[20]*st*st;
3701 Double_t normalizedDecayTime = selectedMother->
NormalizedDecayLength() / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
3703 Double_t vertexMotherX = vertexMother->GetX();
3704 Double_t vertexMotherY = vertexMother->GetY();
3705 Double_t vertexMotherZ = vertexMother->GetZ();
3743 Int_t nVariables = 8;
3744 Int_t nHistograms = nVariables * (nVariables - 1) / 2;
3745 for (
Int_t k = 0; k < nHistograms; ++k)
3750 if(nFirst==0) firstVariable = d0firstTrack;
3751 if(nFirst==1) firstVariable = d0secondTrack;
3752 if(nFirst==2) firstVariable = d0Mother;
3753 if(nFirst==3) firstVariable = pointingAngle;
3754 if(nFirst==4) firstVariable = impactProduct;
3755 if(nFirst==5) firstVariable = impactProductXY;
3756 if(nFirst==6) firstVariable = vertexDistance;
3757 if(nFirst==7) firstVariable = normDecayLength;
3758 if(nFirst==8) firstVariable = pseudoProperDecayTime;
3760 if(nSecond==0) secondVariable = d0firstTrack;
3761 if(nSecond==1) secondVariable = d0secondTrack;
3762 if(nSecond==2) secondVariable = d0Mother;
3763 if(nSecond==3) secondVariable = pointingAngle;
3764 if(nSecond==4) secondVariable = impactProduct;
3765 if(nSecond==5) secondVariable = impactProductXY;
3766 if(nSecond==6) secondVariable = vertexDistance;
3767 if(nSecond==7) secondVariable = normDecayLength;
3768 if(nSecond==8) secondVariable = pseudoProperDecayTime;
3773 if(nSecond>nVariables)
3776 nSecond = nFirst + 1;
3780 if(motherType==1 || motherType==5){
3781 motherType = motherType -1;
3783 AliAODRecoDecay* secondDaughter = (AliAODRecoDecay*)selectedMother->GetDaughter(1);
3784 AliAODTrack * pionD0 = (AliAODTrack*)selectedMother->GetDaughter(0);
3785 AliAODTrack * kaonD0 = (AliAODTrack*)selectedMother->GetDaughter(1);
3787 AliAODVertex * vertexDStar = vertexMother;
3788 AliAODVertex * vertexD0 = secondDaughter->GetSecondaryVtx();
3789 pdgMassMother = TDatabasePDG::Instance()->GetParticle(421)->Mass();
3791 AliExternalTrackParam pionD0Track;
3792 AliExternalTrackParam kaonD0Track;
3796 pionD0Track.CopyFromVTrack(pionD0);
3797 pionD0Track.PropagateToDCA(vertexDStar,bz,100.,d0z0,covd0z0);
3800 kaonD0Track.CopyFromVTrack(kaonD0);
3801 kaonD0Track.PropagateToDCA(vertexDStar,bz,100.,d0z0,covd0z0);
3804 AliExternalTrackParam D0Track;
3805 D0Track.CopyFromVTrack(secondDaughter);
3806 Double_t d0z0D0[2],covd0z0D0[3],d0D0;
3807 motherTrack.PropagateToDCA(vertexDStar,bz,100.,d0z0D0,covd0z0D0);
3810 Double_t impactProductToDStar = d0[0]*d0[1];
3813 Double_t momentumMother = secondDaughter->P();
3814 Double_t pointingAngleToDStar = secondDaughter->CosPointingAngle(vertexDStar);
3815 Double_t d0FirstDaughterToDStar = TMath::Abs(d0[0]);
3816 Double_t d0SecondDaughterToDStar = TMath::Abs(d0[1]);
3817 Double_t normDecayLengthToDStar = secondDaughter->NormalizedDecayLength(vertexDStar);
3819 Double_t pseudoProperDecayLength = ((vertexD0->GetX() - vertexDStar->GetX()) * secondDaughter->Px() / TMath::Abs(secondDaughter->Pt())) + ((vertexD0->GetY() - vertexDStar->GetY()) * secondDaughter->Py() / TMath::Abs(secondDaughter->Pt()));
3820 Double_t pseudoProperDecayTimeToDStar = pseudoProperDecayLength * pdgMassMother/ptMother;
3821 Double_t DecayTimeToDStar = vertexDistance / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother/(momentumMother*momentumMother)) + 1)));
3823 Double_t phi = secondDaughter->Phi();
3824 Double_t theta = secondDaughter->Theta();
3826 secondDaughter->GetCovarianceXYZPxPyPz(covMatrix);
3833 Double_t errorMomentum = covMatrix[9]*cp*cp*ct*ct
3834 +covMatrix[13]*2.*cp*sp*ct*ct
3835 +covMatrix[18]*2.*cp*ct*st
3836 +covMatrix[14]*sp*sp*ct*ct
3837 +covMatrix[19]*2.*sp*ct*st
3838 +covMatrix[20]*st*st;
3839 Double_t normDecayTimeToDStar = secondDaughter->NormalizedDecayLength(vertexDStar) / (299792458 * TMath::Sqrt(1/((pdgMassMother*pdgMassMother*errorMomentum*errorMomentum/(momentumMother*momentumMother)) + 1)));
3866 Int_t ndg = candidate->GetNDaughters();
3867 if(!ndg) { AliError(
"No daughters available");
return -1;}
3868 if(ndg != 2)
return -1;
3871 if(B0toDStarPiLabelMatrix->GetNrows() == 0)
return -1;
3874 Int_t dgLabels[2] = {-1};
3875 Int_t pdgDg[2] = {0};
3876 Int_t signalPosition = -1;
3879 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
3880 dgLabels[0] = trk0->GetLabel();
3881 AliAODTrack *trk1 = (AliAODTrack*)candidate->GetDaughter(1);
3882 dgLabels[1] = trk1->GetLabel();
3883 pdgDg[0] = 211; pdgDg[1] = 321;
3886 else if(pdgabs==413)
3888 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
3889 dgLabels[0] = trk0->GetLabel();
3891 pdgDg[0] = 211; pdgDg[1] = 421;
3894 else if(pdgabs==511)
3896 AliAODTrack *trk0 = (AliAODTrack*)candidate->GetDaughter(0);
3897 dgLabels[0] = trk0->GetLabel();
3899 pdgDg[0] = 211; pdgDg[1] = 413;
3904 std::cout <<
"Wrong pdg supplied for function to match candidate to monte carlo signal." << std::endl;
3907 if(dgLabels[0]==-1)
return -1;
3908 if(dgLabels[1]==-1)
return -1;
3911 Int_t labMom[2]={0,0};
3912 Int_t i,j,lab,labMother,pdgMother,pdgPart;
3913 AliAODMCParticle *
part=0;
3914 AliAODMCParticle *mother=0;
3915 Double_t pxSumDgs=0.,pySumDgs=0.,pzSumDgs=0.;
3916 Bool_t pdgUsed[2]={kFALSE,kFALSE};
3919 for(i=0; i<ndg; i++)
3922 lab = TMath::Abs(dgLabels[i]);
3925 printf(
"daughter with negative label %d\n",lab);
3928 part = (AliAODMCParticle*)mcArray->At(lab);
3931 printf(
"no MC particle\n");
3936 pdgPart=TMath::Abs(part->GetPdgCode());
3937 for(j=0; j<ndg; j++)
3939 if(!pdgUsed[j] && pdgPart==pdgDg[j])
3948 while(mother->GetMother()>=0)
3950 labMother=mother->GetMother();
3951 mother = (AliAODMCParticle*)mcArray->At(labMother);
3954 printf(
"no MC mother particle\n");
3957 pdgMother = TMath::Abs(mother->GetPdgCode());
3958 if(pdgMother==pdgabs)
3960 labMom[i]=labMother;
3962 pxSumDgs += part->Px();
3963 pySumDgs += part->Py();
3964 pzSumDgs += part->Pz();
3969 if(labMom[i]==-1)
return -1;
3973 labMother=labMom[0];
3975 for(i=0; i<ndg; i++)
3977 if(labMom[i]==-1)
return -1;
3978 if(labMom[i]!=labMother)
return -1;
3982 for(i=0; i<ndg; i++)
3984 if(pdgUsed[i]==kFALSE)
return -1;
3988 mother = (AliAODMCParticle*)mcArray->At(labMother);
3993 if((TMath::Abs(pxMother-pxSumDgs)/(TMath::Abs(pxMother)+1.e-13)) > 0.001 &&
3994 (TMath::Abs(pyMother-pySumDgs)/(TMath::Abs(pyMother)+1.e-13)) > 0.001 &&
3995 (TMath::Abs(pzMother-pzSumDgs)/(TMath::Abs(pzMother)+1.e-13)) > 0.001)
4005 Int_t bIsSignal = kFALSE;
4006 TMatrix &particleMatrix = *B0toDStarPiLabelMatrix;
4007 for (
Int_t k = 0; k < B0toDStarPiLabelMatrix->GetNrows(); ++k)
4009 if(labMother == (
Int_t)particleMatrix(k,signalPosition))
4015 if(!bIsSignal)
return -1;
Double_t NormalizedDecayLength() const
void FillD0Histograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType, Int_t pdgCodeMother=-1)
Int_t fnPtBinsD0forD0ptbinLimits
virtual Int_t SelectPID(AliAODTrack *track, Int_t type)
Bool_t UseTPCRefitB0Pion()
ULong64_t GetTriggerMask()
TList * fOutput
! User output
Int_t fnPtBinsD0forDStarptbin
Int_t GetMinTPCNclsB0Pion()
void Getd0MeasMinusExpProng(Int_t ip, Double_t magf, Double_t &d0diff, Double_t &errd0diff) const
Int_t GetnSigmaTOF(AliAODTrack *track, Int_t species, Double_t &sigma) const
Float_t * fPtBinLimitsD0forDStarptbin
void FillDStarAndB0Histograms(AliAODRecoDecayHF2Prong *selectedMother, AliAODVertex *primaryVertex, Double_t bz, Int_t motherType, Int_t histType)
Float_t * fPtBinLimitsDStarforDStarptbin
virtual ~AliAnalysisTaskSEB0toDStarPi()
virtual void Terminate(Option_t *option)
Int_t GetnSigmaTPC(AliAODTrack *track, Int_t species, Double_t &sigma) const
Bool_t UseTPCRefitDStarPion()
Double_t ImpParXY() const
Int_t ApplyCutOnVariableDStarforDStarptbin(Int_t nCutIndex, Int_t ptbin, Float_t cutVariableValue, Bool_t bCutArray[25])
Bool_t fQuickSignalAnalysis
Int_t MatchCandidateToMonteCarlo(Int_t pdgabs, AliAODRecoDecayHF2Prong *candidate, TClonesArray *mcArray, TMatrix *B0toDStarPiLabelMatrix) const
void InvMass(Int_t icalo, TString particle, TString fileName)
Int_t * fDaughterHistogramArray2D[4][6]
AliNormalizationCounter * fCounter
!Counter for normalization slot 4
Double_t DeltaInvMassB0Kpipipi(AliAODRecoDecayHF2Prong *B0) const
Int_t PtBinDStarforDStarptbin(Double_t pt) const
Int_t * fMotherHistogramArray[6][50][46]
Int_t GetWhyRejection() const
Double_t GetMinPtDStarPion()
Int_t IsD0forD0ptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
Bool_t FillRecoCand(AliVEvent *event, AliAODRecoDecayHF3Prong *rd3)
Double_t InvMassD0() const
Double_t Prodd0d0() const
AliAnalysisTaskSEB0toDStarPi()
std::vector< Int_t > * fD0Tracks
TList * fOutputDStar_DStarPt
virtual void UserCreateOutputObjects()
Implementation of interface methods.
Int_t PtBinD0forDStarptbin(Double_t pt) const
Bool_t fUseMCInfo
n. of events
TString part
use mixed event to constrain combinatorial background
AliAODPidHF * GetPidHF() const
AliRDHFCutsB0toDStarPi * fCuts
void D0Selection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, TClonesArray *D0TracksFromFriendFile)
Bool_t fShowMask
Use MC info.
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
void B0toDStarPiSignalTracksInMC(TClonesArray *mcTrackArray, AliAODEvent *aodevent, TMatrix *B0toDStarPiLabelMatrix, TList *listout)
Int_t fnPtBinsD0forDStarptbinLimits
Int_t IsDStarforDStarptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
Bool_t UseFilterBitDStarPion()
Float_t * GetPtBinLimitsDStarforDStarptbin() const
Int_t GetNPtBinsD0forD0ptbin() const
void DStarAndB0Selection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix, TClonesArray *D0TracksFromFriendFile)
Int_t fnPtBinsD0forD0ptbin
Float_t * GetPtBinLimitsD0forD0ptbin() const
void SetProngIDs(Int_t nIDs, UShort_t *id)
UShort_t GetProngID(Int_t ip) const
virtual void UserExec(Option_t *option)
std::vector< Int_t > * fDStarPionTracks
std::vector< Int_t > * fB0PionTracks
TList * fOutputB0MC
! User output 7
Double_t GetMinPtB0Pion()
void SetPrimaryVtxRef(TObject *vtx)
primary vertex
Int_t GetMinITSNclsDStarPion()
Int_t GetMinTPCNclsDStarPion()
Bool_t UseFilterBitB0Pion()
Int_t * fMotherHistogramArray2D[6][16][60]
void B0PionSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix)
void FillFinalTrackHistograms(AliAODRecoDecayHF2Prong *trackB0, Bool_t isDesiredCandidate, TClonesArray *mcTrackArray)
Int_t GetFilterBitDStarPion()
Bool_t IsEventSelected(AliVEvent *event)
AliAODVertex * RecalculateVertex(const AliVVertex *primary, TObjArray *tracks, Double_t bField, Double_t dispersion)
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
Int_t PtBinD0forD0ptbin(Double_t pt) const
TList * fOutputD0_DStarPt
TH1F * fCEvents
Cuts - sent to output slot 3.
Float_t * GetPtBinLimits() const
Int_t GetMinITSNclsB0Pion()
Int_t GetNPtBinsDStarforDStarptbin() const
Int_t * fDaughterHistogramArray[4][5][15]
Bool_t UseITSRefitB0Pion()
Double_t DeltaInvMassDStarKpipi(AliAODRecoDecayHF2Prong *DStar) const
Int_t IsD0forDStarptbinSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod, Bool_t *bCutArray)
Float_t * GetPtBinLimitsD0forDStarptbin() const
Int_t GetNPtBinsD0forDStarptbin() const
Int_t fnPtBinsDStarforDStarptbin
Int_t fnPtBinsDStarforDStarptbinLimits
Double_t CosPointingAngle() const
Float_t * fPtBinLimitsD0forD0ptbin
Int_t GetFilterBitB0Pion()
Int_t PtBin(Double_t pt) const
Bool_t UseITSRefitDStarPion()
void DStarPionSelection(AliAODEvent *aodEvent, AliAODVertex *primaryVertex, Double_t bz, TClonesArray *mcTrackArray, TMatrix *B0toDStarPiLabelMatrix)
Int_t * fMotherHistogramArrayExtra[7][10]