27 #include "Riostream.h"
32 #include "TClonesArray.h"
33 #include "TDatabasePDG.h"
39 #include "AliAnalysisDataSlot.h"
40 #include "AliAnalysisDataContainer.h"
41 #include "AliAnalysisManager.h"
42 #include "AliAODHandler.h"
43 #include "AliAODEvent.h"
44 #include "AliAODVertex.h"
45 #include "AliAODTrack.h"
48 #include "AliAnalysisTaskSE.h"
61 fCharm4ProngTClArr(0),
70 fhInvMassD0Sum10MevBin1(0),
71 fhInvMassD0barSum10MevBin1(0),
72 fhInvMassSumAll10MevBin1(0),
73 fhInvMassD0Sum5MevBin1(0),
74 fhInvMassD0barSum5MevBin1(0),
75 fhInvMassSumAll5MevBin1(0),
76 fhInvMassD0Sum10MevBin2(0),
77 fhInvMassD0barSum10MevBin2(0),
78 fhInvMassSumAll10MevBin2(0),
79 fhInvMassD0Sum5MevBin2(0),
80 fhInvMassD0barSum5MevBin2(0),
81 fhInvMassSumAll5MevBin2(0),
82 fhInvMassD0Sum10MevBin3(0),
83 fhInvMassD0barSum10MevBin3(0),
84 fhInvMassSumAll10MevBin3(0),
85 fhInvMassD0Sum5MevBin3(0),
86 fhInvMassD0barSum5MevBin3(0),
87 fhInvMassSumAll5MevBin3(0),
88 fhInvMassD0Sum10MevBin4(0),
89 fhInvMassD0barSum10MevBin4(0),
90 fhInvMassSumAll10MevBin4(0),
91 fhInvMassD0Sum5MevBin4(0),
92 fhInvMassD0barSum5MevBin4(0),
93 fhInvMassSumAll5MevBin4(0),
94 fhInvMassD0Sum10MevBin5(0),
95 fhInvMassD0barSum10MevBin5(0),
96 fhInvMassSumAll10MevBin5(0),
97 fhInvMassD0Sum5MevBin5(0),
98 fhInvMassD0barSum5MevBin5(0),
99 fhInvMassSumAll5MevBin5(0),
136 fMultipleHypsType(0),
146 fVerticesHFTClArr(0),
147 fCharm4ProngTClArr(0),
156 fhInvMassD0Sum10MevBin1(0),
157 fhInvMassD0barSum10MevBin1(0),
158 fhInvMassSumAll10MevBin1(0),
159 fhInvMassD0Sum5MevBin1(0),
160 fhInvMassD0barSum5MevBin1(0),
161 fhInvMassSumAll5MevBin1(0),
162 fhInvMassD0Sum10MevBin2(0),
163 fhInvMassD0barSum10MevBin2(0),
164 fhInvMassSumAll10MevBin2(0),
165 fhInvMassD0Sum5MevBin2(0),
166 fhInvMassD0barSum5MevBin2(0),
167 fhInvMassSumAll5MevBin2(0),
168 fhInvMassD0Sum10MevBin3(0),
169 fhInvMassD0barSum10MevBin3(0),
170 fhInvMassSumAll10MevBin3(0),
171 fhInvMassD0Sum5MevBin3(0),
172 fhInvMassD0barSum5MevBin3(0),
173 fhInvMassSumAll5MevBin3(0),
174 fhInvMassD0Sum10MevBin4(0),
175 fhInvMassD0barSum10MevBin4(0),
176 fhInvMassSumAll10MevBin4(0),
177 fhInvMassD0Sum5MevBin4(0),
178 fhInvMassD0barSum5MevBin4(0),
179 fhInvMassSumAll5MevBin4(0),
180 fhInvMassD0Sum10MevBin5(0),
181 fhInvMassD0barSum10MevBin5(0),
182 fhInvMassSumAll10MevBin5(0),
183 fhInvMassD0Sum5MevBin5(0),
184 fhInvMassD0barSum5MevBin5(0),
185 fhInvMassSumAll5MevBin5(0),
222 fMultipleHypsType(0),
235 DefineOutput(0, TTree::Class());
236 DefineOutput(1, TList::Class());
237 DefineOutput(2, TList::Class());
238 DefineOutput(3, TList::Class());
239 DefineOutput(4, TList::Class());
240 DefineOutput(5, TList::Class());
241 DefineOutput(6, TList::Class());
242 DefineOutput(7, AliRDHFCutsD0toKpipipi::Class());
286 if(fDebug > 1) printf(
"AnalysisTaskSESelectHF4Prong::Init() \n");
297 if(fDebug > 1) printf(
"AnalysisTaskSESelectHF4Prong::UserCreateOutputObjects() \n");
327 fhInvMassD0Sum10MevBin1 =
new TH1F(
"fhInvMassD0Sum10MevBin1",
"D0 invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
332 fhInvMassD0barSum10MevBin1 =
new TH1F(
"fhInvMassD0barSum10MevBin1",
"D0bar invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
337 fhInvMassSumAll10MevBin1 =
new TH1F(
"fhInvMassSumAll10MevBin1",
"D0/D0bar invariant mass Bin1 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
342 fhInvMassD0Sum5MevBin1 =
new TH1F(
"fhInvMassD0Sum5MevBin1",
"D0 invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
347 fhInvMassD0barSum5MevBin1 =
new TH1F(
"fhInvMassD0barSum5MevBin1",
"D0bar invariant mass Bin1 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
352 fhInvMassSumAll5MevBin1 =
new TH1F(
"fhInvMassSumAll5MevBin1",
"D0/D0bar invariant mass Bin1 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
357 fhInvMassD0Sum10MevBin2 =
new TH1F(
"fhInvMassD0Sum10MevBin2",
"D0 invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
362 fhInvMassD0barSum10MevBin2 =
new TH1F(
"fhInvMassD0barSum10MevBin2",
"D0bar invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
367 fhInvMassSumAll10MevBin2 =
new TH1F(
"fhInvMassSumAll10MevBin2",
"D0/D0bar invariant mass Bin2 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
372 fhInvMassD0Sum5MevBin2 =
new TH1F(
"fhInvMassD0Sum5MevBin2",
"D0 invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
377 fhInvMassD0barSum5MevBin2 =
new TH1F(
"fhInvMassD0barSum5MevBin2",
"D0bar invariant mass Bin2 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
382 fhInvMassSumAll5MevBin2 =
new TH1F(
"fhInvMassSumAll5MevBin2",
"D0/D0bar invariant mass Bin2 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
387 fhInvMassD0Sum10MevBin3 =
new TH1F(
"fhInvMassD0Sum10MevBin3",
"D0 invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
392 fhInvMassD0barSum10MevBin3 =
new TH1F(
"fhInvMassD0barSum10MevBin3",
"D0bar invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
397 fhInvMassSumAll10MevBin3 =
new TH1F(
"fhInvMassSumAll10MevBin3",
"D0/D0bar invariant mass Bin3 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
402 fhInvMassD0Sum5MevBin3 =
new TH1F(
"fhInvMassD0Sum5MevBin3",
"D0 invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
407 fhInvMassD0barSum5MevBin3 =
new TH1F(
"fhInvMassD0barSum5MevBin3",
"D0bar invariant mass Bin3 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
412 fhInvMassSumAll5MevBin3 =
new TH1F(
"fhInvMassSumAll5MevBin3",
"D0/D0bar invariant mass Bin3 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
417 fhInvMassD0Sum10MevBin4 =
new TH1F(
"fhInvMassD0Sum10MevBin4",
"D0 invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
422 fhInvMassD0barSum10MevBin4 =
new TH1F(
"fhInvMassD0barSum10MevBin4",
"D0bar invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
427 fhInvMassSumAll10MevBin4 =
new TH1F(
"fhInvMassSumAll10MevBin4",
"D0/D0bar invariant mass Bin4 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
432 fhInvMassD0Sum5MevBin4 =
new TH1F(
"fhInvMassD0Sum5MevBin4",
"D0 invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
437 fhInvMassD0barSum5MevBin4 =
new TH1F(
"fhInvMassD0barSum5MevBin4",
"D0bar invariant mass Bin4 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
442 fhInvMassSumAll5MevBin4 =
new TH1F(
"fhInvMassSumAll5MevBin4",
"D0/D0bar invariant mass Bin4 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
447 fhInvMassD0Sum10MevBin5 =
new TH1F(
"fhInvMassD0Sum10MevBin5",
"D0 invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
452 fhInvMassD0barSum10MevBin5 =
new TH1F(
"fhInvMassD0barSum10MevBin5",
"D0bar invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
457 fhInvMassSumAll10MevBin5 =
new TH1F(
"fhInvMassSumAll10MevBin5",
"D0/D0bar invariant mass Bin5 (good hyps); Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2);
462 fhInvMassD0Sum5MevBin5 =
new TH1F(
"fhInvMassD0Sum5MevBin5",
"D0 invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
467 fhInvMassD0barSum5MevBin5 =
new TH1F(
"fhInvMassD0barSum5MevBin5",
"D0bar invariant mass Bin5 (good hyp); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
472 fhInvMassSumAll5MevBin5 =
new TH1F(
"fhInvMassSumAll5MevBin5",
"D0/D0bar invariant mass Bin5 (good hyps); Inv. mass [GeV]; Entries/5 MeV",120,1.6,2.2);
477 fhReflBin1 =
new TH2F(
"fhReflBin1",
"Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
482 fhReflBin2 =
new TH2F(
"fhReflBin2",
"Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
487 fhReflBin3 =
new TH2F(
"fhReflBin3",
"Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
492 fhReflBin4 =
new TH2F(
"fhReflBin4",
"Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
497 fhReflBin5 =
new TH2F(
"fhReflBin5",
"Invariant Mass Histogram for reflections; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,8,0.,8.);
502 fhReflD0Bin1 =
new TH2F(
"fhReflD0Bin1",
"Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
507 fhReflD0Bin2 =
new TH2F(
"fhReflD0Bin2",
"Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
512 fhReflD0Bin3 =
new TH2F(
"fhReflD0Bin3",
"Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
517 fhReflD0Bin4 =
new TH2F(
"fhReflD0Bin4",
"Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
522 fhReflD0Bin5 =
new TH2F(
"fhReflD0Bin5",
"Invariant Mass Histogram for reflections - D0 hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
527 fhReflD0barBin1 =
new TH2F(
"fhReflD0barBin1",
"Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
532 fhReflD0barBin2 =
new TH2F(
"fhReflD0barBin2",
"Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
537 fhReflD0barBin3 =
new TH2F(
"fhReflD0barBin3",
"Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
542 fhReflD0barBin4 =
new TH2F(
"fhReflD0barBin4",
"Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
547 fhReflD0barBin5 =
new TH2F(
"fhReflD0barBin5",
"Invariant Mass Histogram for reflections - D0bar hyp.; Inv. mass [GeV]; Entries/10 MeV",60,1.6,2.2,7,0.,7.);
552 fScatterP4PID =
new TH2F(
"fScatterP4PID",
"Transverse momentum of K vs l-s Pi (D0 + D0bar); Pt of K [GeV/c]; Pt of Pi [GeV/c]",500,0.,5.,500,0.,5.);
556 fPtVsY =
new TH2F(
"fPtVsY",
"Pt vs Y PPR Sel. Candidates; Pt [GeV/c]; Y",250,0.,25.,300,-3.,3.);
560 fPtVsYAll =
new TH2F(
"fPtVsYAll",
"Pt vs Y All Candidates; Pt [GeV/c]; Y",250,0.,25.,300,-3.,3.);
564 fEventCounter =
new TH1F(
"fEventCounter",
"N° of total events; NA; Events",1,0.,1.);
568 fCutDCA =
new TH1F(
"fCutDCA",
"DCA of candidate (couple); DCA [cm]; Entries/micron",500,0.,0.05);
572 fCutDCA3 =
new TH1F(
"fCutDCA3",
"DCA of candidate (trips); DCA [cm]; Entries/micron",500,0.,0.05);
576 fCutDCA2 =
new TH1F(
"fCutDCA2",
"DCA of candidate (quads1); DCA [cm]; Entries/micron",500,0.,0.05);
580 fCutDCA5 =
new TH1F(
"fCutDCA5",
"DCA of candidate (quads2); DCA [cm]; Entries/micron",500,0.,0.05);
584 fCutVertexDist2 =
new TH1F(
"fCutVertexDist2",
"Distance Vtx doubl.-Primary Vtx; Distance [cm]; Entries/15 micron",500,0.,0.75);
588 fCutVertexDist3 =
new TH1F(
"fCutVertexDist3",
"Distance Vtx trips-Primary Vtx; Distance [cm]; Entries/10 micron",500,0.,0.5);
592 fCutVertexDist4 =
new TH1F(
"fCutVertexDist4",
"Distance Vtx quads-Primary Vtx; Distance [cm]; Entries/5 micron",500,0.,0.25);
596 fCutCosinePoint =
new TH1F(
"fCutCosinePoint",
"Cosine of angle of pointing; Cos(Thetapt.); Entries/10^(-3)",250,0.75,1.);
600 fCutPt =
new TH1F(
"fCutPt",
"Pt of candidate D0; Pt [GeV/c]; Entries/5 MeV",3000,0.,15.);
604 fCutY =
new TH1F(
"fCutY",
"Y of candidate D0; Pt [GeV/c]; Entries/5 MeV",900,-9.,9.);
605 fCutY->SetMinimum(0);
608 fPIDSel =
new TH1F(
"fPIDSel",
"Ratio of D0 selected by PID for Correction",3,0.,3.);
610 fPIDSel->GetXaxis()->SetBinLabel(1,
"D0allhyp All");
611 fPIDSel->GetXaxis()->SetBinLabel(2,
"D0allhyp PID");
612 fPIDSel->GetXaxis()->SetBinLabel(3,
"D0allhyp PID (hypok)");
614 fPIDSelBin1 =
new TH1F(
"fPIDSelBin1",
"Ratio of D0 selected by PID for Correction",3,0.,3.);
616 fPIDSelBin1->GetXaxis()->SetBinLabel(1,
"D0allhyp All");
617 fPIDSelBin1->GetXaxis()->SetBinLabel(2,
"D0allhyp PID");
618 fPIDSelBin1->GetXaxis()->SetBinLabel(3,
"D0allhyp PID (hypok)");
620 fPIDSelBin2 =
new TH1F(
"fPIDSelBin1",
"Ratio of D0 selected by PID for Correction",3,0.,3.);
622 fPIDSelBin2->GetXaxis()->SetBinLabel(1,
"D0allhyp All");
623 fPIDSelBin2->GetXaxis()->SetBinLabel(2,
"D0allhyp PID");
624 fPIDSelBin2->GetXaxis()->SetBinLabel(3,
"D0allhyp PID (hypok)");
626 fPIDSelBin3 =
new TH1F(
"fPIDSelBin1",
"Ratio of D0 selected by PID for Correction",3,0.,3.);
628 fPIDSelBin3->GetXaxis()->SetBinLabel(1,
"D0allhyp All");
629 fPIDSelBin3->GetXaxis()->SetBinLabel(2,
"D0allhyp PID");
630 fPIDSelBin3->GetXaxis()->SetBinLabel(3,
"D0allhyp PID (hypok)");
632 fPIDSelBin4 =
new TH1F(
"fPIDSelBin1",
"Ratio of D0 selected by PID for Correction",3,0.,3.);
634 fPIDSelBin4->GetXaxis()->SetBinLabel(1,
"D0allhyp All");
635 fPIDSelBin4->GetXaxis()->SetBinLabel(2,
"D0allhyp PID");
636 fPIDSelBin4->GetXaxis()->SetBinLabel(3,
"D0allhyp PID (hypok)");
638 fPIDSelBin5 =
new TH1F(
"fPIDSelBin1",
"Ratio of D0 selected by PID for Correction",3,0.,3.);
640 fPIDSelBin5->GetXaxis()->SetBinLabel(1,
"D0allhyp All");
641 fPIDSelBin5->GetXaxis()->SetBinLabel(2,
"D0allhyp PID");
642 fPIDSelBin5->GetXaxis()->SetBinLabel(3,
"D0allhyp PID (hypok)");
644 fMultipleHyps =
new TH2F(
"fMultipleHyps",
"N. of hyp. accepted for each candidate (accounted N. times)",8,0.,8.,5,0.,5.);
660 fMultipleHypsType =
new TH2F(
"fMultipleHypsType",
"Type of hyp. accepted for each candidate",8,0.,8.,5,0.,5.);
686 fPtSel =
new TH1F(
"fPtSel",
"Pt of candidates accepted; Pt [GeV/c]; Entries/10 MeV",2000,0.,20.);
701 TClonesArray *inputArrayCharm4Prong = 0;
703 if(!aodIn && AODEvent() && IsStandardAOD()) {
709 AliAODHandler* aodHandler = (AliAODHandler*)
710 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
711 if(aodHandler->GetExtensions()) {
712 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
715 inputArrayCharm4Prong=(TClonesArray*)aodFromExt->GetList()->FindObject(
"Charm4Prong");
719 inputArrayCharm4Prong=(TClonesArray*)aodIn->GetList()->FindObject(
"Charm4Prong");
722 if(!inputArrayCharm4Prong) {
723 printf(
"AliAnalysisTaskSESelectHF4Prong::UserExec: D0to3Kpi branch not found!\n");
735 if(!aodIn->GetPrimaryVertex())
return;
738 AliAODVertex *vtx1 = (AliAODVertex*)aodIn->GetPrimaryVertex();
742 Int_t trkIDtoEntry[100000];
743 for(
Int_t it=0;it<aodIn->GetNumberOfTracks();it++) {
744 AliAODTrack *track = aodIn->GetTrack(it);
745 trkIDtoEntry[track->GetID()]=it;
748 Int_t iOutVerticesHF=0,iOutCharm4Prong=0;
757 Int_t nInCharm4Prong = inputArrayCharm4Prong->GetEntriesFast();
758 printf(
"Number of D0->K3pi: %d\n",nInCharm4Prong);
760 for (
Int_t iCharm4Prong = 0; iCharm4Prong < nInCharm4Prong; iCharm4Prong++) {
799 Int_t flagAccLim = 1;
803 if (TMath::Abs(yPart) > 0.8) flagAccLim = 0;
806 Double_t maxFiducialY = -0.2/15*ptPart*ptPart+1.9/15*ptPart+0.5;
807 Double_t minFiducialY = 0.2/15*ptPart*ptPart-1.9/15*ptPart-0.5;
808 if (yPart < minFiducialY || yPart > maxFiducialY) flagAccLim = 0;;
813 fPtVsY->Fill(ptPart,yPart);
827 AliAODTrack *trk0 = (AliAODTrack*)dIn->GetDaughter(0);
828 AliAODTrack *trk1 = (AliAODTrack*)dIn->GetDaughter(1);
829 AliAODTrack *trk2 = (AliAODTrack*)dIn->GetDaughter(2);
830 AliAODTrack *trk3 = (AliAODTrack*)dIn->GetDaughter(3);
831 if(!trk0 || !trk1 || !trk2 || !trk3) {
832 trk0=aodIn->GetTrack(trkIDtoEntry[dIn->
GetProngID(0)]);
833 trk1=aodIn->GetTrack(trkIDtoEntry[dIn->
GetProngID(1)]);
834 trk2=aodIn->GetTrack(trkIDtoEntry[dIn->
GetProngID(2)]);
835 trk3=aodIn->GetTrack(trkIDtoEntry[dIn->
GetProngID(3)]);
837 printf(
"pt of positive track #1: %f\n",trk0->Pt());
838 printf(
"pt of negative track #1: %f\n",trk1->Pt());
839 printf(
"pt of positive track #2: %f\n",trk2->Pt());
840 printf(
"pt of negative track #2: %f\n",trk3->Pt());
847 Int_t hypD01 = 0, hypD02 = 0, hypD0bar1 = 0, hypD0bar2 = 0;
848 Int_t pid1 = 0, pid2 = 0, pidbar1 = 0, pidbar2 = 0;
852 if (pidSelection > 0) {
868 if (selD01 == 1 && pid1==1) hypD01 = 1;
869 if (selD02 == 1 && pid2==1) hypD02 = 1;
870 if (selD0bar1 == 1 && pidbar1==1) hypD0bar1 = 1;
871 if (selD0bar2 == 1 && pidbar2==1) hypD0bar2 = 1;
874 if (hypD01 == 1 || hypD02 == 1 || hypD0bar1 == 1 || hypD0bar2 == 1) {
900 if (hypD01+hypD02+hypD0bar1+hypD0bar2 > 0)
AnalysisReflection(aodIn, dIn, hypD01, hypD02, hypD0bar1, hypD0bar2);
1015 if(hypD01||hypD02||hypD0bar1||hypD0bar2) {
1016 AliAODVertex *v =
new(verticesHFRef[iOutVerticesHF++])
1017 AliAODVertex(*(dIn->GetSecondaryVtx()));
1020 dOut->SetSecondaryVtx(v);
1028 printf(
"Number of selected D0->K3pi: %d\n",iOutCharm4Prong);
1057 Int_t flagMult = hypD01+hypD02+hypD0bar1+hypD0bar2;
1058 Int_t flagLayer1 = -1, flagLayer2 = -1, flagLayer3 = -1, flagLayer4 = -1;
1060 if (flagMult == 1) {flagLayer1 = 0; flagLayer2 = 0; flagLayer3 = 0; flagLayer4 = 0;}
1061 else if (flagMult == 2 || flagMult == 3 || flagMult == 4) {flagLayer1 = 1; flagLayer2 = 1; flagLayer3 = 1; flagLayer4 = 1;}
1063 FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, flagLayer1, flagLayer2, flagLayer3, flagLayer4);
1068 TClonesArray* mcArray =
dynamic_cast<TClonesArray*
>(aodIn->FindListObject(AliAODMCParticle::StdBranchName()));
1070 AliError(
"Could not find Monte-Carlo in AOD");
1073 Int_t pdgCand = 421;
1074 Int_t pdgDgCharm4Prong[4]={321,211,211,211};
1076 Int_t mcLabel = d->MatchToMC(pdgCand,mcArray,4,pdgDgCharm4Prong);
1077 printf(
"MatchToMC = %d\n",mcLabel);
1080 FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 7, 7, 7, 7);
1083 FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 2, 2, 2, 2);
1087 if (flagMult == 1) {
1088 FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 3, 3, 3, 3);
1105 flagLayer1 = 6; flagLayer2 = 6; flagLayer3 = 6; flagLayer4 = 6;
1128 FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, flagLayer1, flagLayer2, flagLayer3, flagLayer4);
1129 FillReflHistos(d, hypD01, hypD02, hypD0bar1, hypD0bar2, 4, 4, 4, 4);
1148 AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
1149 AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
1150 AliAODTrack *trk2 = (AliAODTrack*)d->GetDaughter(2);
1151 AliAODTrack *trk3 = (AliAODTrack*)d->GetDaughter(3);
1154 labels[0] = trk0->GetLabel();
1155 labels[1] = trk1->GetLabel();
1156 labels[2] = trk2->GetLabel();
1157 labels[3] = trk3->GetLabel();
1158 if (labels[0]<=0 || labels[1]<=0 || labels[2]<=0 || labels[3]<=0) {AliWarning(
"Negative Label for daughter, skipping");
return truthHyp;}
1159 AliAODMCParticle* mc0 =
dynamic_cast<AliAODMCParticle*
>(mcArray->At(labels[0]));
1160 AliAODMCParticle* mc1 =
dynamic_cast<AliAODMCParticle*
>(mcArray->At(labels[1]));
1161 AliAODMCParticle* mc2 =
dynamic_cast<AliAODMCParticle*
>(mcArray->At(labels[2]));
1162 AliAODMCParticle* mc3 =
dynamic_cast<AliAODMCParticle*
>(mcArray->At(labels[3]));
1163 if (!mc0 || !mc1 || !mc2 || !mc3) {AliWarning(
"At least one Daughter Particle not found in tree, skipping");
return truthHyp;}
1164 pdg[0] = TMath::Abs(mc0->GetPdgCode());
1165 pdg[1] = TMath::Abs(mc1->GetPdgCode());
1166 pdg[2] = TMath::Abs(mc2->GetPdgCode());
1167 pdg[3] = TMath::Abs(mc3->GetPdgCode());
1168 if (pdg[0]==211 && pdg[1]==321 && pdg[2]==211 && pdg[3]==211) truthHyp = 1;
1169 if (pdg[0]==211 && pdg[1]==211 && pdg[2]==211 && pdg[3]==321) truthHyp = 2;
1170 if (pdg[0]==321 && pdg[1]==211 && pdg[2]==211 && pdg[3]==211) truthHyp = 3;
1171 if (pdg[0]==211 && pdg[1]==211 && pdg[2]==321 && pdg[3]==211) truthHyp = 4;
1308 for(
int i=0; i<6; i++) {
fPtBinH[i]=ptlimits[i];}
1314 printf(
"PtBin limits---------\n");
1315 for (
int i=0; i<5; i++) {
1318 printf(
"MC Truth = %d\n",
fMCTruth);
1319 printf(
"---------------------\n");
1355 if(fDebug > 1) printf(
"AnalysisTaskSESelectHF4Prong: Terminate() \n");
1359 printf(
"ERROR: fOutput not available\n");
1364 printf(
"ERROR: fOutput not available\n");
1369 printf(
"ERROR: fOutput not available\n");
1374 printf(
"ERROR: fOutput not available\n");
1379 printf(
"ERROR: fOutput not available\n");
1384 printf(
"ERROR: fOutputC not available\n");
void FillReflHistos(AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayer1, Int_t flagLayer2, Int_t flagLayer3, Int_t flagLayer4)
virtual void UserCreateOutputObjects()
Implementation of interface methods.
TH1F * fCutCosinePoint
! Cosine of pointing angle
TH1F * fCutPt
! Candidate D0 Pt
TH1F * fhInvMassD0barSum10MevBin5
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
TH1F * fhInvMassSumAll5MevBin5
! Invariant mass superimpose (good hyp only) 5Mev
TH1F * fhInvMassSumAll10MevBin3
! Invariant mass superimpose (good hyp only) 10Mev
TH1F * fCutY
! Candidate D0 Y
virtual Int_t D01Selected(TObject *obj, Int_t selectionLevel)
TH1F * fCutVertexDist2
! Vertex doubl. to primary distance
TH1F * fhInvMassD0barSum10MevBin1
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
TH1F * fhInvMassD0Sum5MevBin3
! Invariant mass D01+D02 (good hyp) 5Mev
void UnsetOwnPrimaryVtx()
TH1F * fPIDSelBin3
! PID Selected Bin3
TH1F * fPIDSelBin5
! PID Selected Bin5
virtual Int_t IsSelectedFromPID(AliAODRecoDecayHF4Prong *d, Int_t *hyp1, Int_t *hyp2, Int_t *hyp3, Int_t *hyp4)
TH1F * fCutDCA5
! DCA histogram quads2
TH1F * fPIDSelBin2
! PID Selected Bin2
TH1F * fhInvMassD0Sum10MevBin5
! Invariant mass D01+D02 (good hyp) 10Mev BIN5
TH1F * fhInvMassSumAll10MevBin2
! Invariant mass superimpose (good hyp only) 10Mev
TH1F * fhInvMassD0Sum10MevBin3
! Invariant mass D01+D02 (good hyp) 10Mev BIN3
TH2F * fhReflD0Bin4
! Analysis for reflection - D0 study - Bin4
Double_t fmassD0bar[2]
!To store invariant mass for D0bar hypotheses
virtual Int_t D0bar1Selected(TObject *obj, Int_t selectionLevel)
TH1F * fhInvMassD0barSum10MevBin2
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
AliAnalysisTaskSESelectHF4Prong()
TList * fOutput4
! list send on output slot 4
void AnalysisReflection(AliAODEvent *aodIn, AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04)
TH1F * fhInvMassD0Sum10MevBin4
! Invariant mass D01+D02 (good hyp) 10Mev BIN4
TH1F * fPIDSel
! PID Selected
Double_t GetDist12toPrim() const
TH1F * fPtSel
! Pt of selected candidates
TH1F * fCutDCA2
! DCA histogram quads1
TList * fOutputC
! list send on output slot 6
TList * fOutput3
! list send on output slot 3
TH1F * fhInvMassD0Sum5MevBin4
! Invariant mass D01+D02 (good hyp) 5Mev
void InvMassD0(Double_t mD0[2]) const
virtual Int_t D02Selected(TObject *obj, Int_t selectionLevel)
TH1F * fhInvMassD0Sum10MevBin2
! Invariant mass D01+D02 (good hyp) 10Mev BIN2
TH1F * fhInvMassD0barSum5MevBin4
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TH2F * fMultipleHypsType
! Multiple hypotesis accepted counter
TH1F * fhInvMassD0Sum10MevBin1
! Invariant mass D01+D02 (good hyp) 10Mev BIN1
Double_t fmassD0[2]
bin i has pt between values i and i+1
TH1F * fCutDCA3
! DCA histogram trips
TList * fOutput2
! list send on output slot 2
TH1F * fCutVertexDist3
! Vertex trips to primary distance
AliRDHFCutsD0toKpipipi * fCuts
TH1F * fhInvMassD0barSum5MevBin2
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TH2F * fhReflD0barBin3
! Analysis for reflection - D0bar study - Bin3
TH2F * fPtVsY
! Pt vs Y of selected candidates (by PPR cuts)
TH2F * fhReflD0Bin2
! Analysis for reflection - D0 study - Bin2
Int_t fSelected
!Flag for selection of candidate
TH1F * fhInvMassD0Sum5MevBin5
! Invariant mass D01+D02 (good hyp) 5Mev
TH2F * fhReflD0Bin3
! Analysis for reflection - D0 study - Bin3
void SetPtBinH(Double_t *ptlimits)
TH1F * fhInvMassSumAll5MevBin1
! Invariant mass superimpose (good hyp only) 5Mev
TH1F * fhInvMassSumAll5MevBin2
! Invariant mass superimpose (good hyp only) 5Mev
TH1F * fhInvMassD0barSum10MevBin4
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
AliAODVertex * GetOwnPrimaryVtx() const
Int_t StudyMCTruth(TClonesArray *mcArray, AliAODRecoDecayHF4Prong *d)
void InvMassD0bar(Double_t mD0bar[2]) const
TH2F * fMultipleHyps
! Multiple hypotesis accepted counter
virtual void UserExec(Option_t *option)
TH1F * fhInvMassD0Sum5MevBin2
! Invariant mass D01+D02 (good hyp) 5Mev
UShort_t GetProngID(Int_t ip) const
TH2F * fhReflD0barBin1
! Analysis for reflection - D0bar study - Bin1
TH2F * fhReflD0Bin5
! Analysis for reflection - D0 study - Bin5
void FillReflD0barHistos(AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayforD0bar_1, Int_t flagLayforD0bar_2, Int_t flagLayforD0bar_3, Int_t flagLayforD0bar_4)
Double_t GetDist3toPrim() const
Double_t GetDist4toPrim() const
virtual Int_t D0bar2Selected(TObject *obj, Int_t selectionLevel)
TH1F * fhInvMassSumAll5MevBin4
! Invariant mass superimpose (good hyp only) 5Mev
TH2F * fhReflBin5
! Analysis for reflection - Bin5
TH1F * fhInvMassSumAll10MevBin1
! Invariant mass superimpose (good hyp only) 10Mev
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
TH1F * fEventCounter
! Event Counter
TH2F * fhReflD0barBin5
! Analysis for reflection - D0bar study - Bin5
TH1F * fPIDSelBin4
! PID Selected Bin4
TList * fOutput5
! list send on output slot 5
TClonesArray * fVerticesHFTClArr
! Array of heavy-flavour vertices
TH2F * fhReflBin2
! Analysis for reflection - Bin2
TH1F * fhInvMassD0barSum10MevBin3
! Invariant mass D0bar1+D0bar2 (good hyp) 10Mev
TH2F * fhReflBin3
! Analysis for reflection - Bin3
TH1F * fhInvMassSumAll10MevBin4
! Invariant mass superimpose (good hyp only) 10Mev
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
virtual ~AliAnalysisTaskSESelectHF4Prong()
virtual void Terminate(Option_t *option)
TH1F * fhInvMassSumAll5MevBin3
! Invariant mass superimpose (good hyp only) 5Mev
TH2F * fhReflD0Bin1
! Analysis for reflection - D0 study - Bin1
TH2F * fPtVsYAll
! Pt vs Y of all candidates
TH1F * fPIDSelBin1
! PID Selected Bin1
void FillReflD0Histos(AliAODRecoDecayHF4Prong *d, Int_t hyp01, Int_t hyp02, Int_t hyp03, Int_t hyp04, Int_t flagLayforD0_1, Int_t flagLayforD0_2, Int_t flagLayforD0_3, Int_t flagLayforD0_4)
TH1F * fCutDCA
! DCA histogram doubl.
TH1F * fhInvMassD0barSum5MevBin3
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TH1F * fhInvMassD0Sum5MevBin1
! Invariant mass D01+D02 (good hyp) 5Mev
TH1F * fhInvMassSumAll10MevBin5
! Invariant mass superimpose (good hyp only) 10Mev
TH2F * fhReflBin4
! Analysis for reflection - Bin4
TH1F * fhInvMassD0barSum5MevBin5
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TList * fOutput
flag for MC truth analysis
Double_t CosPointingAngle() const
TH2F * fhReflD0barBin2
! Analysis for reflection - D0bar study - Bin2
TH2F * fhReflBin1
! Analysis for reflection - Bin1
TH1F * fCutVertexDist4
! Vertex quads to primary distance
TH1F * fhInvMassD0barSum5MevBin1
! Invariant mass D0bar1+D0bar2 (good hyp) 5Mev
TClonesArray * fCharm4ProngTClArr
! Array of D0->K3pi
void PrintPtBinHandMCFlag()
TH2F * fScatterP4PID
! K momentum vs like sign Pi momentum after PID
TH2F * fhReflD0barBin4
! Analysis for reflection - D0bar study - Bin4