28 #include <TClonesArray.h>
35 #include <TDatabasePDG.h>
37 #include <AliAnalysisDataSlot.h>
38 #include <AliAnalysisDataContainer.h>
39 #include "AliAnalysisManager.h"
40 #include "AliAODHandler.h"
41 #include "AliAODEvent.h"
42 #include "AliAODVertex.h"
43 #include "AliAODTrack.h"
44 #include "AliAODMCHeader.h"
45 #include "AliAODMCParticle.h"
48 #include "AliAnalysisTaskSE.h"
50 #include "AliKFParticle.h"
54 #include "AliKFVertex.h"
55 #include "AliESDVertex.h"
57 #include "AliAODPid.h"
58 #include "AliInputEventHandler.h"
78 fhSelectionBitsSigc(0),
79 fhSelectionBitsSigb(0),
91 fhProbmassLcPtSigc(0),
92 fhProbmassLcPtSigb(0),
94 fhIsLcResonantReco(0),
101 fhInvMassMisIdpKpi(0),
102 fhInvMassMisIdpiKp(0),
103 fhPtMisIdpKpiProb(0),
104 fhPtMisIdpiKpProb(0),
106 fhInvMassMisIdpKpiProb(0),
107 fhInvMassMisIdpiKpProb(0),
109 fFuncWeightPythia(0),
110 fFuncWeightFONLL7overLHC10f6a(0),
111 fFuncWeightFONLL5overLHC13d3(0),
112 fFuncWeightFONLL5overLHC10f6a(0),
117 fLowmasslimit(2.086),
121 fKeepLcNotFromQuark(kFALSE),
144 for(Int_t i=0;i<12;i++) {
202 AliAnalysisTaskSE(name),
205 fHistNEventsRejTM(0),
208 fhSelectionBitsSigc(0),
209 fhSelectionBitsSigb(0),
213 fhPIDmassLcPtSigc(0),
214 fhPIDmassLcPtSigb(0),
220 fhProbmassLcPtSig(0),
221 fhProbmassLcPtSigc(0),
222 fhProbmassLcPtSigb(0),
223 fhIsLcResonantGen(0),
224 fhIsLcResonantReco(0),
231 fhInvMassMisIdpKpi(0),
232 fhInvMassMisIdpiKp(0),
233 fhPtMisIdpKpiProb(0),
234 fhPtMisIdpiKpProb(0),
236 fhInvMassMisIdpKpiProb(0),
237 fhInvMassMisIdpiKpProb(0),
239 fFuncWeightPythia(0),
240 fFuncWeightFONLL7overLHC10f6a(0),
241 fFuncWeightFONLL5overLHC13d3(0),
242 fFuncWeightFONLL5overLHC10f6a(0),
247 fLowmasslimit(2.086),
248 fRDCutsAnalysis(lccutsana),
250 fFillNtuple(fillNtuple),
251 fKeepLcNotFromQuark(kFALSE),
273 for(Int_t i=0;i<12;i++) {
329 DefineOutput(1,TList::Class());
330 DefineOutput(2,TList::Class());
331 DefineOutput(3,TH1F::Class());
332 DefineOutput(4,AliNormalizationCounter::Class());
335 DefineOutput(5,TNtuple::Class());
400 if (fDebug > 1) printf(
"AnalysisTaskSELambdac::Init() \n");
418 if (fDebug > 1) printf(
"AnalysisTaskSELambdac::UserCreateOutputObjects() \n");
423 fOutput->SetName(
"OutputHistos");
425 TString hisname,histitle;
428 fhSelectBit =
new TH1F(
"hSelectBit",
"hSelectBit",5,-0.5,4.5);
430 fhSelectBit->GetXaxis()->SetBinLabel(3,
"SelectionMap");
436 fHistNEvents =
new TH1F(
"fHistNEvents",
"Number of processed events; ; Events",3,-0.5,2.5);
438 fHistNEvents->GetXaxis()->SetBinLabel(3,
"N events (after selection)");
468 fhIsLcResonantGen =
new TH1F(
"hIsLcResonantGen",
"IsLcResonant flag gen",6,-1.5,4.5);
469 fhIsLcResonantReco =
new TH1F(
"hIsLcResonantReco",
"IsLcResonant flag reco",6,-1.5,4.5);
470 fhIsLcGen =
new TH1F(
"hIsLcGen",
"IsLc flag gen",4,-1.5,2.5);
471 fhIsLcReco =
new TH1F(
"hIsLcReco",
"IsLc flag reco",4,-1.5,2.5);
477 fhRecoPDGmom =
new TH1F(
"hRecoPDGmom",
"pdg of mother reco. MatchToMCLambdac",7,-0.5,6.5);
480 fhSetIsLc =
new TH1F(
"hSetIsLc",
"Check candidates before/after rec. set is Lc",2,-0.5,1.5);
483 fhSelectionBits =
new TH2F(
"hSelectionBits",
"Reconstruction + selection bit",13,-0.5,12.5,150,0,15);
500 fhSelectionBitsSigc =
new TH2F(
"hSelectionBitsSigc",
"Reconstruction + selection bit from c",13,-0.5,12.5,150,0,15);
517 fhSelectionBitsSigb =
new TH2F(
"hSelectionBitsSigb",
"Reconstruction + selection bit from b",13,-0.5,13.5,150,0,15);
536 TString stepnames[12] = {
"GeneratedLimAcc",
"GeneratedAll",
"Generated",
"GeneratedAcc",
"Reco3Prong",
"LcBit",
"IsSelectedTracks",
"IsInFidAcc",
"PtRange",
"IsSelectedCandidate",
"IsSelectedPID",
"IsSelectedNtuple"};
537 for(Int_t i=0;i<12;i++) {
539 hisname.Form(
"hNBkgNI%i",i);
540 histitle.Form(
"N Bkg not injected %s",stepnames[i].
Data());
541 fhNBkgNI[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
542 hisname.Form(
"hNLc%i",i);
543 histitle.Form(
"N Lc %s",stepnames[i].
Data());
544 fhNLc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
545 hisname.Form(
"hNLcc%i",i);
546 histitle.Form(
"N Lc from c %s",stepnames[i].
Data());
547 fhNLcc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
548 hisname.Form(
"hNLcNonRc%i",i);
549 histitle.Form(
"N Lc non resonant from c %s",stepnames[i].
Data());
550 fhNLcNonRc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
551 hisname.Form(
"hNLcL1520c%i",i);
552 histitle.Form(
"N Lc -> L(1520) + p from c %s",stepnames[i].
Data());
553 fhNLcL1520c[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
554 hisname.Form(
"hNLcKstarc%i",i);
555 histitle.Form(
"N Lc -> K* + pi from c %s",stepnames[i].
Data());
556 fhNLcKstarc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
557 hisname.Form(
"hNLcDeltac%i",i);
558 histitle.Form(
"N Lc -> Delta + K from c %s",stepnames[i].
Data());
559 fhNLcDeltac[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
560 hisname.Form(
"hNLcb%i",i);
561 histitle.Form(
"N Lc from b %s",stepnames[i].
Data());
562 fhNLcb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
563 hisname.Form(
"hNLcNonRb%i",i);
564 histitle.Form(
"N Lc non resonant from b %s",stepnames[i].
Data());
565 fhNLcNonRb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
566 hisname.Form(
"hNLcL1520b%i",i);
567 histitle.Form(
"N Lc -> L(1520) + p from b %s",stepnames[i].
Data());
568 fhNLcL1520b[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
569 hisname.Form(
"hNLcKstarb%i",i);
570 histitle.Form(
"N Lc -> K* + pi from b %s",stepnames[i].
Data());
571 fhNLcKstarb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
572 hisname.Form(
"hNLcDeltab%i",i);
573 histitle.Form(
"N Lc -> Delta + K from b %s",stepnames[i].
Data());
574 fhNLcDeltab[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
589 hisname.Form(
"hPtEtaBkgNI%i",i);
590 histitle.Form(
"Pt vs #eta Bkg not injected %s",stepnames[i].
Data());
591 fhPtEtaBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
592 hisname.Form(
"hPtEtaLc%i",i);
593 histitle.Form(
"Pt vs #eta Lc %s",stepnames[i].
Data());
594 fhPtEtaLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
595 hisname.Form(
"hPtEtaLcc%i",i);
596 histitle.Form(
"Pt vs #eta Lc from c %s",stepnames[i].
Data());
597 fhPtEtaLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
598 hisname.Form(
"hPtEtaLcNonRc%i",i);
599 histitle.Form(
"Pt vs #eta Lc non resonant from c %s",stepnames[i].
Data());
600 fhPtEtaLcNonRc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
601 hisname.Form(
"hPtEtaLcL1520c%i",i);
602 histitle.Form(
"Pt vs #eta Lc -> L(1520) + p from c %s",stepnames[i].
Data());
603 fhPtEtaLcL1520c[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
604 hisname.Form(
"hPtEtaLcKstarc%i",i);
605 histitle.Form(
"Pt vs #eta Lc -> K* + pi from c %s",stepnames[i].
Data());
606 fhPtEtaLcKstarc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
607 hisname.Form(
"hPtEtaLcDeltac%i",i);
608 histitle.Form(
"Pt vs #eta Lc -> Delta + K from c %s",stepnames[i].
Data());
609 fhPtEtaLcDeltac[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
610 hisname.Form(
"hPtEtaLcb%i",i);
611 histitle.Form(
"Pt vs #eta Lc from b %s",stepnames[i].
Data());
612 fhPtEtaLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
613 hisname.Form(
"hPtEtaLcNonRb%i",i);
614 histitle.Form(
"Pt vs #eta Lc non resonant from b %s",stepnames[i].
Data());
615 fhPtEtaLcNonRb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
616 hisname.Form(
"hPtEtaLcL1520b%i",i);
617 histitle.Form(
"Pt vs #eta Lc -> L(1520) + p from b %s",stepnames[i].
Data());
618 fhPtEtaLcL1520b[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
619 hisname.Form(
"hPtEtaLcKstarb%i",i);
620 histitle.Form(
"Pt vs #eta Lc -> K* + pi from b %s",stepnames[i].
Data());
621 fhPtEtaLcKstarb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
622 hisname.Form(
"hPtEtaLcDeltab%i",i);
623 histitle.Form(
"Pt vs #eta Lc -> Delta + K from b %s",stepnames[i].
Data());
624 fhPtEtaLcDeltab[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
639 hisname.Form(
"hPtYBkgNI%i",i);
640 histitle.Form(
"Pt vs Y Bkg not injected %s",stepnames[i].
Data());
641 fhPtYBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
642 hisname.Form(
"hPtYLc%i",i);
643 histitle.Form(
"Pt vs Y Lc %s",stepnames[i].
Data());
644 fhPtYLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
645 hisname.Form(
"hPtYLcc%i",i);
646 histitle.Form(
"Pt vs Y Lc from c %s",stepnames[i].
Data());
647 fhPtYLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
648 hisname.Form(
"hPtYLcNonRc%i",i);
649 histitle.Form(
"Pt vs Y Lc non resonant from c %s",stepnames[i].
Data());
650 fhPtYLcNonRc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
651 hisname.Form(
"hPtYLcL1520c%i",i);
652 histitle.Form(
"Pt vs Y Lc -> L(1520) + p from c %s",stepnames[i].
Data());
653 fhPtYLcL1520c[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
654 hisname.Form(
"hPtYLcKstarc%i",i);
655 histitle.Form(
"Pt vs Y Lc -> K* + pi from c %s",stepnames[i].
Data());
656 fhPtYLcKstarc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
657 hisname.Form(
"hPtYLcDeltac%i",i);
658 histitle.Form(
"Pt vs Y Lc -> Delta + K from c %s",stepnames[i].
Data());
659 fhPtYLcDeltac[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
660 hisname.Form(
"hPtYLcb%i",i);
661 histitle.Form(
"Pt vs Y Lc from b %s",stepnames[i].
Data());
662 fhPtYLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
663 hisname.Form(
"hPtYLcNonRb%i",i);
664 histitle.Form(
"Pt vs Y Lc non resonant from b %s",stepnames[i].
Data());
665 fhPtYLcNonRb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
666 hisname.Form(
"hPtYLcL1520b%i",i);
667 histitle.Form(
"Pt vs Y Lc -> L(1520) + p from b %s",stepnames[i].
Data());
668 fhPtYLcL1520b[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
669 hisname.Form(
"hPtYLcKstarb%i",i);
670 histitle.Form(
"Pt vs Y Lc -> K* + pi from b %s",stepnames[i].
Data());
671 fhPtYLcKstarb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
672 hisname.Form(
"hPtYLcDeltab%i",i);
673 histitle.Form(
"Pt vs Y Lc -> Delta + K from b %s",stepnames[i].
Data());
674 fhPtYLcDeltab[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
689 hisname.Form(
"hPtPhiBkgNI%i",i);
690 histitle.Form(
"Pt vs #phi Bkg not injected %s",stepnames[i].
Data());
691 fhPtPhiBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
692 hisname.Form(
"hPtPhiLc%i",i);
693 histitle.Form(
"Pt vs #phi Lc %s",stepnames[i].
Data());
694 fhPtPhiLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
695 hisname.Form(
"hPtPhiLcc%i",i);
696 histitle.Form(
"Pt vs #phi Lc from c %s",stepnames[i].
Data());
697 fhPtPhiLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
698 hisname.Form(
"hPtPhiLcNonRc%i",i);
699 histitle.Form(
"Pt vs #phi Lc non resonant from c %s",stepnames[i].
Data());
700 fhPtPhiLcNonRc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
701 hisname.Form(
"hPtPhiLcL1520c%i",i);
702 histitle.Form(
"Pt vs #phi Lc -> L(1520) + p from c %s",stepnames[i].
Data());
703 fhPtPhiLcL1520c[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
704 hisname.Form(
"hPtPhiLcKstarc%i",i);
705 histitle.Form(
"Pt vs #phi Lc -> K* + pi from c %s",stepnames[i].
Data());
706 fhPtPhiLcKstarc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
707 hisname.Form(
"hPtPhiLcDeltac%i",i);
708 histitle.Form(
"Pt vs #phi Lc -> Delta + K from c %s",stepnames[i].
Data());
709 fhPtPhiLcDeltac[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
710 hisname.Form(
"hPtPhiLcb%i",i);
711 histitle.Form(
"Pt vs #phi Lc from b %s",stepnames[i].
Data());
712 fhPtPhiLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
713 hisname.Form(
"hPtPhiLcNonRb%i",i);
714 histitle.Form(
"Pt vs #phi Lc non resonant from b %s",stepnames[i].
Data());
715 fhPtPhiLcNonRb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
716 hisname.Form(
"hPtPhiLcL1520b%i",i);
717 histitle.Form(
"Pt vs #phi Lc -> L(1520) + p from b %s",stepnames[i].
Data());
718 fhPtPhiLcL1520b[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
719 hisname.Form(
"hPtPhiLcKstarb%i",i);
720 histitle.Form(
"Pt vs #phi Lc -> K* + pi from b %s",stepnames[i].
Data());
721 fhPtPhiLcKstarb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
722 hisname.Form(
"hPtPhiLcDeltab%i",i);
723 histitle.Form(
"Pt vs #phi Lc -> Delta + K from b %s",stepnames[i].
Data());
724 fhPtPhiLcDeltab[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
740 fhPtMisIdpKpi =
new TH1F(
"hMisIdpKpi",
"pKpi id'd as piKp",30,0,30);
741 fhPtMisIdpiKp =
new TH1F(
"hMisIdpiKp",
"piKp id'd as pKpi",30,0,30);
742 fhPtCorrId =
new TH1F(
"hCorrId",
"Correctly id'd pKpi",30,0,30);
751 fhPtMisIdpKpiProb =
new TH1F(
"hMisIdpKpiProb",
"pKpi id'd as piKp, most prob. PID",30,0,30);
752 fhPtMisIdpiKpProb =
new TH1F(
"hMisIdpiKpProb",
"piKp id'd as pKpi, most prob. PID",30,0,30);
753 fhPtCorrIdProb =
new TH1F(
"hCorrIdProb",
"Correctly id'd pKpi, most prob. PID",30,0,30);
765 fFuncWeightPythia=
new TF1(
"funcWeightPythia",
"1./(30. *[0]*x/TMath::Power(1.+(TMath::Power((x/[1]),[3])),[2]))",0.15,30);
770 fFuncWeightFONLL7overLHC10f6a=
new TF1(
"funcWeightFONLL7overLHC10f6a",
"([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",0.15,40.);
771 fFuncWeightFONLL7overLHC10f6a->SetParameters(2.41522e+01,4.92146e+00,6.72495e+00,2.5,6.15361e-03,4.78995e+00,-4.29135e-01,3.99421e-01,-1.57220e-02);
775 fFuncWeightFONLL5overLHC13d3=
new TF1(
"funcWeightFONLL5overLHC13d3",
"([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",0.15,30.);
776 fFuncWeightFONLL5overLHC13d3->SetParameters(2.94999e+00,3.47032e+00,2.81278e+00,2.5,1.93370e-02,3.86865e+00,-1.54113e-01,8.86944e-02,2.56267e-02);
780 fFuncWeightFONLL5overLHC10f6a=
new TF1(
"funcWeightFONLL5overLHC10f6a",
"([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",0.15,40.);
781 fFuncWeightFONLL5overLHC10f6a->SetParameters(2.77730e+01,4.78942e+00,7.45378e+00,2.5,9.86255e-02,2.30120e+00,-4.16435e-01,3.43770e-01,-2.29380e-02);
792 fNentries=
new TH1F(
"fNentries",
"n Events/Candidates QA", 16,0.5,16.5);
795 fNentries->GetXaxis()->SetBinLabel(1,
"nEventsRejTM");
796 fNentries->GetXaxis()->SetBinLabel(2,
"nEventsNoVtx");
797 fNentries->GetXaxis()->SetBinLabel(3,
"nEventsRejCutPileup");
798 fNentries->GetXaxis()->SetBinLabel(4,
"nLcGen");
799 fNentries->GetXaxis()->SetBinLabel(5,
"nLcGenFidAcc");
800 fNentries->GetXaxis()->SetBinLabel(6,
"nCandReco3Prong");
801 fNentries->GetXaxis()->SetBinLabel(7,
"nCandLcBit");
802 fNentries->GetXaxis()->SetBinLabel(8,
"nCandIsSelTracks");
803 fNentries->GetXaxis()->SetBinLabel(9,
"nCandIsInFidAcc");
804 fNentries->GetXaxis()->SetBinLabel(10,
"ptbin=-1");
805 fNentries->GetXaxis()->SetBinLabel(11,
"nCandIsSelCand");
806 fNentries->GetXaxis()->SetBinLabel(12,
"PID=0");
807 fNentries->GetXaxis()->SetBinLabel(13,
"PID=1");
808 fNentries->GetXaxis()->SetBinLabel(14,
"PID=2");
809 fNentries->GetXaxis()->SetBinLabel(15,
"PID=3");
810 fNentries->GetXaxis()->SetBinLabel(16,
"nLcSelected");
811 fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
813 AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
814 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
830 TString normName=
"NormalizationCounter";
831 AliAnalysisDataContainer *cont = GetOutputSlot(4)->GetContainer();
832 if(cont)normName=(TString)cont->GetName();
838 TString ntName=
"fNtupleLambdac";
839 AliAnalysisDataContainer *contnt = GetOutputSlot(5)->GetContainer();
840 if(contnt)ntName=(TString)contnt->GetName();
841 if(
fFillNtuple==1)
fNtupleLambdac =
new TNtuple(ntName.Data(),
"Lc",
"isLcBkg:InvMasspKpi:InvMasspiKp:Charge:PtTr0:PtTr1:PtTr2:PtLc:CosP:DecayL:DecayLSig:Dist12:SigVert:DCA:DecayLXY:DecayLXYSig:isLcResonant:selectionPID:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp");
843 else if(
fFillNtuple==2)
fNtupleLambdac =
new TNtuple(ntName.Data(),
"Lc",
"isLcBkg:InvMasspKpi:InvMasspiKp:Charge:PtTr0:PtTr1:PtTr2:PtLc:CosP:DecayL:DecayLSig:Dist12:SigVert:DCATr0:DecayLXY:DecayLXYSig:isLcResonant:selectionPID:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp:d00:d01:d02:d0Squared:d00Sig:d01Sig:d02Sig:d00SigResidual:d01SigResidual:d02SigResidual:CosPXY:DCATr1:DCATr2:Dist23:RunNumber");
845 else if(
fFillNtuple==3)
fNtupleLambdac =
new TNtuple(ntName.Data(),
"Lc",
"isLcBkg:InvMasspKpi:InvMasspiKp:Charge:PtTr0:PtTr1:PtTr2:PtLc:CosP:DecayL:DecayLSig:Dist12:SigVert:DCATr0:DecayLXY:DecayLXYSig:isLcResonant:selectionPID:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp:d00:d01:d02:d0Squared:d00Sig:d01Sig:d02Sig:d00SigResidual:d01SigResidual:d02SigResidual:CosPXY:DCATr1:DCATr2:Dist23:RunNumber:InvMasspK:InvMassKpi:InvMassppi:InvMassKp:InvMasspiK:InvMasspip");
846 else AliFatal(
"Invalid fill ntuple argument");
860 AliAODEvent *aod =
dynamic_cast<AliAODEvent*
> (InputEvent());
866 TClonesArray *array3Prong = 0;
867 TClonesArray *arrayLikeSign =0;
868 if(!aod && AODEvent() && IsStandardAOD()) {
871 aod =
dynamic_cast<AliAODEvent*
> (AODEvent());
874 AliAODHandler* aodHandler = (AliAODHandler*)
875 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
876 if(aodHandler->GetExtensions()) {
877 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
878 AliAODEvent *aodFromExt = ext->GetAOD();
879 array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject(
"Charm3Prong");
880 arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject(
"LikeSign3Prong");
883 array3Prong=(TClonesArray*)aod->GetList()->FindObject(
"Charm3Prong");
884 arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject(
"LikeSign3Prong");
889 TClonesArray *arrayMC=0;
890 AliAODMCHeader *mcHeader=0;
895 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
897 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: MC particles branch not found!\n");
903 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
905 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: MC header branch not found!\n");
919 if(!array3Prong || !aod) {
920 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: Charm3Prong branch not found!\n");
924 AliDebug(2,
"AliAnalysisTaskSELambdacTMVA::UserExec: LikeSign3Prong branch not found!\n");
929 Int_t runnumber = aod->GetRunNumber();
930 if (aod->GetTriggerMask() == 0 && (runnumber >= 195344 && runnumber <= 195677)){
931 Int_t nentriesTM = arrayMC->GetEntriesFast();
932 AliDebug(2,Form(
"Event rejected because of null trigger mask, n entries = %i",nentriesTM));
939 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
940 if(!vtx1 || TMath::Abs(aod->GetMagneticField())<0.001) {
945 TString trigclass=aod->GetFiredTriggerClasses();
956 Int_t n3Prong = array3Prong->GetEntriesFast();
957 Int_t nSelectedloose[1]={0};
958 Int_t nSelectedtight[1]={0};
962 Bool_t isInFidAcc = kFALSE;
963 Bool_t isInAcc = kFALSE;
966 Double_t zPrimVertex = vtx1 ->GetZ();
967 Double_t zMCVertex = mcHeader->GetVtxZ();
971 for (Int_t iPart=0; iPart<arrayMC->GetEntriesFast(); iPart++) {
974 AliAODMCParticle* mcPart =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(iPart));
976 AliError(
"Failed casting particle from MC array!, Skipping particle");
981 if(
fIsLc==0)
continue;
989 if(!
fIsHijing) imother=mcPart->GetMother();
991 AliAODMCParticle* mcPartMother =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(imother));
993 AliError(
"Failed casting mother particle, Skipping particle");
1001 AliDebug(2,
"Lc has p K pi in final state");
1006 if((TMath::Abs(mcPart->Y()) < 0.5)) {
1007 AliDebug(2,
"Lc in limited acceptance");
1015 AliError(
"no p K pi final state");
1027 else AliError(Form(
"Not pKpi or background - should not happen! fIsLcResonant = %i",
fIsLcResonant));
1048 for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
1064 Bool_t unsetvtx=kFALSE;
1092 if(!isSelectedTracks)
continue;
1102 if(ptbin==-1) {
fNentries->Fill(10);
continue;}
1109 if(isSelectedPID==0 )
fNentries->Fill(12);
1110 else if(isSelectedPID==1)
fNentries->Fill(13);
1111 else if(isSelectedPID==2)
fNentries->Fill(14);
1118 if(!selection)
continue;
1149 if (fDebug > 1) printf(
"AnalysisTaskSELambdac: Terminate() \n");
1151 fOutput =
dynamic_cast<TList*
> (GetOutputData(1));
1153 AliError(
"ERROR: fOutput not available\n");
1173 Int_t lambdacLab[3]={0,0,0};
1175 for(Int_t i=0;i<3;i++){
1176 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1177 Int_t lab=daugh->GetLabel();
1179 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab);
1182 Int_t partPdgcode = TMath::Abs(part->GetPdgCode());
1183 if(partPdgcode==211 || partPdgcode==321 || partPdgcode==2212){
1184 Int_t motherLabel=part->GetMother();
1185 if(motherLabel<0)
return 0;
1186 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel);
1187 if(!motherPart)
continue;
1188 Int_t motherPdg = TMath::Abs(motherPart->GetPdgCode());
1189 if(motherPdg==4122) {
1190 if(
GetLambdacDaugh(motherPart,arrayMC)){lambdacLab[i]=motherLabel;
continue;}
1192 if(motherPdg==313 || motherPdg==2224 || motherPdg==3124){
1193 Int_t granMotherLabel=motherPart->GetMother();
1194 if(granMotherLabel<0)
return 0;
1195 AliAODMCParticle *granMotherPart = (AliAODMCParticle*)arrayMC->At(granMotherLabel);
1196 if(!granMotherPart)
continue;
1197 Int_t granMotherPdg = TMath::Abs(granMotherPart->GetPdgCode());
1198 if(granMotherPdg ==4122) {
1199 if(
GetLambdacDaugh(granMotherPart,arrayMC)) {lambdacLab[i]=granMotherLabel;
continue;}
1205 if(lambdacLab[0]==lambdacLab[1] && lambdacLab[1]==lambdacLab[2]) {
return lambdacLab[0];}
1220 Int_t numberOfLambdac=0;
1222 if(TMath::Abs(part->GetPdgCode())!=4122)
return 0;
1226 Int_t nDaugh = (Int_t)part->GetNDaughters();
1227 if(nDaugh<2)
return 0;
1228 if(nDaugh>3)
return 0;
1229 AliAODMCParticle* pdaugh1 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(0));
1230 if(!pdaugh1) {
return 0;}
1231 Int_t number1 = TMath::Abs(pdaugh1->GetPdgCode());
1232 AliAODMCParticle* pdaugh2 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(1));
1233 if(!pdaugh2) {
return 0;}
1234 Int_t number2 = TMath::Abs(pdaugh2->GetPdgCode());
1236 AliDebug(2,
"Is non resonant?");
1238 Int_t thirdDaugh=part->GetDaughter(1)-1;
1239 AliAODMCParticle* pdaugh3 = (AliAODMCParticle*)arrayMC->At(thirdDaugh);
1240 Int_t number3 = TMath::Abs(pdaugh3->GetPdgCode());
1241 if((number1==321 && number2==211 && number3==2212) ||
1242 (number1==211 && number2==321 && number3==2212) ||
1243 (number1==211 && number2==2212 && number3==321) ||
1244 (number1==321 && number2==2212 && number3==211) ||
1245 (number1==2212 && number2==321 && number3==211) ||
1246 (number1==2212 && number2==211 && number3==321)) {
1248 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1249 || TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1250 || TMath::Abs(pdaugh3->Eta()) > 0.9 || pdaugh3->Pt() < 0.1) IsInAcc=kFALSE;
1251 AliDebug(2,
"Lc decays non-resonantly");
1264 if((number1==2212 && number2==313)){
1265 nfiglieK=pdaugh2->GetNDaughters();
1266 if(nfiglieK!=2)
return 0;
1267 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1268 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1269 if(!pdaughK1)
return 0;
1270 if(!pdaughK2)
return 0;
1271 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1273 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1274 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1275 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1276 AliDebug(2,
"Lc decays via K* p");
1281 if((number1==313 && number2==2212)){
1282 nfiglieK=pdaugh1->GetNDaughters();
1283 if(nfiglieK!=2)
return 0;
1284 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1285 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1286 if(!pdaughK1)
return 0;
1287 if(!pdaughK2)
return 0;
1288 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1290 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1291 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1292 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1293 AliDebug(2,
"Lc decays via K* p");
1299 Int_t nfiglieDelta=0;
1300 if(number1==321 && number2==2224){
1301 nfiglieDelta=pdaugh2->GetNDaughters();
1302 if(nfiglieDelta!=2)
return 0;
1303 AliAODMCParticle *pdaughD1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1304 AliAODMCParticle *pdaughD2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1305 if(!pdaughD1)
return 0;
1306 if(!pdaughD2)
return 0;
1307 if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1309 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1310 || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1311 || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1312 AliDebug(2,
"Lc decays via Delta++ k");
1316 if(number1==2224 && number2==321){
1317 nfiglieDelta=pdaugh1->GetNDaughters();
1318 if(nfiglieDelta!=2)
return 0;
1319 AliAODMCParticle* pdaughD1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1320 AliAODMCParticle* pdaughD2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1321 if(!pdaughD1)
return 0;
1322 if(!pdaughD2)
return 0;
1323 if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1325 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1326 || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1327 || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1328 AliDebug(2,
"Lc decays via Delta++ k");
1336 if(number1==3124 && number2==211){
1337 nfiglieLa=pdaugh1->GetNDaughters();
1338 if(nfiglieLa!=2)
return 0;
1339 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1340 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1341 if(!pdaughL1)
return 0;
1342 if(!pdaughL2)
return 0;
1343 if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1345 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1346 || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1347 || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1348 AliDebug(2,
"Lc decays via Lambda(1520) pi");
1352 if(number1==211 && number2==3124){
1353 nfiglieLa=pdaugh2->GetNDaughters();
1354 if(nfiglieLa!=2)
return 0;
1355 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1356 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1357 if(!pdaughL1)
return 0;
1358 if(!pdaughL2)
return 0;
1359 if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1361 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1362 || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1363 || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1364 AliDebug(2,
"Lc decays via Lambda(1520) pi");
1370 if(numberOfLambdac>0) {
return -100; AliDebug(2,
"Lc decays via one of 4 resonances!");}
1384 if(TMath::Abs(mcPart->GetPdgCode())==4122) {
1385 AliDebug(2,
"Found Lc! now check mother");
1390 AliDebug(2,
"Lc comes from b");
1393 else if(pdgMom==4) {
1407 TClonesArray *arrayMC) {
1420 Int_t pdgCand =4122;
1421 Int_t pdgDaughter[3]={-1,-1,-1};
1422 pdgDaughter[0]=2212;
1426 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1428 AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
1431 if(pdgMom == 4)
fIsLc=1;
1432 else if(pdgMom == 5)
fIsLc=2;
1434 Bool_t dummy = kTRUE;
1445 Bool_t IsInjected = 0;
1448 Bool_t ispKpiMC = 0;
1449 Bool_t ispiKpMC = 0;
1454 AliAODMCHeader *mcHeader2 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1460 fhMCmassLcPtSig->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1469 else if(selection==2){
1474 else if(selection==3){
1487 if(selectionProb==1) {
1492 else if(selectionProb==2) {
1499 if(ispKpiMC && selection==2){
1503 else if(ispiKpMC && selection==1){
1509 if(ispKpiMC && selectionProb==2){
1513 else if(ispiKpMC && selectionProb==1){
1529 else if(selection==2){
1532 else if(selection==3){
1537 if(selectionProb==1)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpKpi);
1538 else if(selectionProb==2)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpiKp);
1545 TClonesArray *arrayMC, Int_t selection)
1553 Bool_t IsInjected = 0;
1555 Bool_t IsLcfromLb = 0;
1558 AliAODMCHeader *mcHeader3 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1562 if(
fIsLc==2) IsLcfromLb=kTRUE;
1563 if(
fReadMC && IsInjected && !IsLc &&
fSyst >=1 )
return;
1565 Double_t invMasspKpi=-1.;
1566 Double_t invMasspiKp=-1.;
1575 if(selection==1 || selection==3) invMasspKpi=part->
InvMassLcpKpi();
1586 if(!IsInjected && IsLc==0) tmp[0]=0;
1587 else if(IsLc==1 && !IsLcfromLb) tmp[0]=1;
1588 else if(IsLc==1 && IsLcfromLb) tmp[0]=2;
1589 else if(IsInjected && IsLc==0) tmp[0]=3;
1595 tmp[3]=part->Charge();
1597 tmp[4]=part->PtProng(0);
1598 tmp[5]=part->PtProng(1);
1599 tmp[6]=part->PtProng(2);
1600 Float_t ptLc=part->Pt();
1607 Double_t dcas[3]={0};
1609 tmp[13]=TMath::Max(dcas[0],TMath::Max(dcas[1],dcas[2]));
1621 Double_t weightPythia=-1,weight7LHC10f6a=-1,weight5LHC10f6a=-1,weight5LHC13d3=-1;
1624 Int_t pdgCand =4122;
1625 Int_t pdgDaughter[3]={-1,-1,-1};
1626 pdgDaughter[0]=2212;
1629 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1631 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(labDp);
1633 ptLcMC = motherPart->Pt();
1641 tmp[19]=weightPythia;
1642 tmp[20]=weight7LHC10f6a;
1643 tmp[21]=weight5LHC10f6a;
1644 tmp[22]=weight5LHC13d3;
1646 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1647 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1648 AliVTrack *track2=
dynamic_cast<AliVTrack*
>(part->GetDaughter(2));
1652 Double_t prob0[AliPID::kSPECIES];
1653 Double_t prob1[AliPID::kSPECIES];
1654 Double_t prob2[AliPID::kSPECIES];
1656 if (!track0 || !track1 || !track2) {
1657 AliError(
"AliVTrack missing - wont fill Ntuple");
1666 tmp[23]=prob0[AliPID::kPion];
1667 tmp[24]=prob0[AliPID::kKaon];
1668 tmp[25]=prob0[AliPID::kProton];
1669 tmp[26]=prob1[AliPID::kPion];
1670 tmp[27]=prob1[AliPID::kKaon];
1671 tmp[28]=prob1[AliPID::kProton];
1672 tmp[29]=prob2[AliPID::kPion];
1673 tmp[30]=prob2[AliPID::kKaon];
1674 tmp[31]=prob2[AliPID::kProton];
1678 for(Int_t iprob=23;iprob<=31;iprob++) {
1684 Double_t d00 = part->Getd0Prong(0);
1685 Double_t d01 = part->Getd0Prong(1);
1686 Double_t d02 = part->Getd0Prong(2);
1693 tmp[35]=d00*d00 + d01*d01 + d02*d02;
1703 Double_t ns0=dd0/edd0;
1704 Double_t ns1=dd1/edd1;
1705 Double_t ns2=dd2/edd2;
1715 Int_t runNumber=aod->GetRunNumber();
1716 tmp[46]=(Float_t)runNumber;
1719 tmp[47]=part->InvMass2Prongs(1,0,321,2212);
1720 tmp[48]=part->InvMass2Prongs(2,1,211,321);
1721 tmp[49]=part->InvMass2Prongs(2,0,211,2212);
1722 tmp[50]=part->InvMass2Prongs(1,2,321,2212);
1723 tmp[51]=part->InvMass2Prongs(0,1,211,321);
1724 tmp[52]=part->InvMass2Prongs(0,2,211,2212);
1828 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1829 for(Int_t i=0;i<3;i++){
1830 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1831 lab[i]=daugh->GetLabel();
1832 if(lab[i]<0)
return kFALSE;
1833 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1834 if(!part)
return kFALSE;
1835 pdgs[i]=TMath::Abs(part->GetPdgCode());
1838 if(pdgs[0]==2212 && pdgs[1]==321 && pdgs[2]==211)
return kTRUE;
1849 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1850 for(Int_t i=0;i<3;i++){
1851 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1852 lab[i]=daugh->GetLabel();
1853 if(lab[i]<0)
return kFALSE;
1854 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1855 if(!part)
return kFALSE;
1856 pdgs[i]=TMath::Abs(part->GetPdgCode());
1859 if(pdgs[2]==2212 && pdgs[1]==321 && pdgs[0]==211) {
return kTRUE;}
1881 Int_t selection = 0;
1884 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1885 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1886 AliVTrack *track2=
dynamic_cast<AliVTrack*
>(part->GetDaughter(2));
1888 Double_t prob0[AliPID::kSPECIES];
1889 Double_t prob1[AliPID::kSPECIES];
1890 Double_t prob2[AliPID::kSPECIES];
1892 if (!track0 || !track1 || !track2) {
1893 AliError(
"AliVTrack missing");
1899 if(prob0[AliPID::kProton] * prob1[AliPID::kKaon] * prob2[AliPID::kPion] > prob2[AliPID::kProton] * prob1[AliPID::kKaon] * prob0[AliPID::kPion]) selection = 1;
Double_t NormalizedDecayLengthXY() const
Double_t NormalizedDecayLength() const
Bool_t fLcCut
Vertexer heavy flavour (used to pass the cuts)
TH2F * fhMCmassLcPtSig
!Lc signal invariant mass vs pt
TH2F * fhPtYLcNonRb[12]
! hist. for n Lc from b non resonant, pT vs rapidity
Bool_t fRealPid
flag for access to MC
TH2F * fhInvMassMisIdpKpiProb
! hist for inv mass pKpi signal mis id'd as piKp most prob PID
TH1F * fhIsLcGen
!hist for resonant flag gen
TH2F * fhPtPhiLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT vs phi
TH2F * fhPtEtaLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT vs eta
TH2F * fhPtPhiLc[12]
! hist. for n Lc tot., pT vs phi
void StoreCandidates(AliVEvent *, Int_t nCand=0, Bool_t flagFilter=kTRUE)
void FillSelectionBits(AliAODRecoDecayHF3Prong *d, TH2F *hSelectionBits)
TH2F * fhProbmassLcPtSigb
!Lc from b signal invariant mass vs pt
void Getd0MeasMinusExpProng(Int_t ip, Double_t magf, Double_t &d0diff, Double_t &errd0diff) const
TH2F * fhPtEtaBkgNI[12]
! hist. for n bkg, pT vs eta
Bool_t HasSelectionBit(Int_t i) const
TH1F * fhNLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT
TH1F * fhNLcb[12]
! hist. for n Lc tot. from b, pT
TH2F * fhPIDmassLcPtSig
!Lc signal invariant mass vs pt
void UnsetOwnPrimaryVtx()
Double_t GetDist12toPrim() const
virtual void Terminate(Option_t *option)
Int_t GetPIDselectionMaxProb(AliAODRecoDecayHF3Prong *part)
TList * fOutput
! list send on output slot 0
void FillNtuple(AliAODEvent *aod, AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC, Int_t selection)
TH2F * fhInvMassMisIdpKpi
! hist for inv mass pKpi signal mis id'd as piKp
Int_t LambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC, Bool_t &isInAcc) const
TH2F * fhPtPhiLcc[12]
! hist. for n Lc tot. from c, pT vs phi
virtual void UserCreateOutputObjects()
TH2F * fhPIDmassLcPtSigb
!Lc from b signal invariant mass vs pt
TH2F * fhProbmassLcPtSigc
!Lc from c signal invariant mass vs pt
Float_t fUpmasslimit
pt of Lc candidate
Float_t fCandidateVars[4]
is Lc resonant - 1=non resonant, 2=via L1520 + pi, 3=via K* + p, 4=via Delta++ + K ...
TH2F * fhPtYLc[12]
! hist. for n Lc tot., pT vs rapidity
Int_t fIsLc
cuts with KF vertexer
Int_t GetWhyRejection() const
Double_t CosPointingAngleXY() const
ULong_t GetSelectionMap() const
TH1F * fhPtMisIdpiKpProb
! hist for pt pKpi signal mis id'd as piKp most prob PID
void FillMassHists(AliAODEvent *aod, AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC, Int_t selection, Int_t selectionProb)
TH2F * fhPtYLcNonRc[12]
! hist. for n Lc from c non resonant, pT vs rapidity
TH2F * fhPtYLcc[12]
! hist. for n Lc tot. from c, pT vs rapidity
AliPIDResponse * fPIDResponse
histo with number of entries
TH1F * fhPtCorrId
! hist for correctly id'd pKpi
static Int_t CheckOrigin(TClonesArray *arrayMC, AliAODMCParticle *mcPart, Bool_t searchUpToQuark=kTRUE)
Double_t GetMaxVtxZ() const
Bool_t fKeepLcNotFromQuark
filling ntuple type
TH2F * fhPtEtaLc[12]
! hist. for n Lc tot., pT vs eta
TH2F * fhPtEtaLcKstarc[12]
! hist. for n Lc from c K* + p, pT vs eta
TH2F * fhPtEtaLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT vs eta
TH2F * fhPtEtaLcNonRc[12]
! hist. for n Lc from c non resonant, pT vs eta
AliAODPidHF * GetPidHF() const
TH2F * fhPtYLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT vs rapidity
AliNormalizationCounter * fCounter
!AliNormalizationCounter on output slot 7
TF1 * fFuncWeightPythia
! weight function for Pythia vs pPb prod.
void SetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC, Bool_t &isInAcc)
Bool_t fReadMC
flag for collision system. 0=pp, 1=PbPb, 2=pPb
TH2F * fhPtPhiLcKstarc[12]
! hist. for n Lc from c K* + p, pT vs phi
TH1F * fhNLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT
Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
TH2F * fhInvMassMisIdpiKpProb
! hist for inv mass pKpi signal mis id'd as piKp most prob PID
TH2F * fhMCmassLcPt
!Lc Bkg+signal invariant mass vs pt
TH2F * fhPtEtaLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT vs eta
Int_t fSyst
flag to keep background in
TH2F * fhPtYLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT vs rapidity
TH2F * fhPIDmassLcPtSigc
!Lc from c signal invariant mass vs pt
TH2F * fhPtYLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT vs rapidity
TH2F * fhPtPhiLcb[12]
! hist. for n Lc tot. from b, pT vs phi
AliPIDCombined * GetPidCombined() const
TH2F * fhProbmassLcPtSig
!Lc signal invariant mass vs pt
TH2F * fhSelectionBits
! hist for ALL Filter bits
virtual ~AliAnalysisTaskSELambdacTMVA()
TH2F * fhInvMassMisIdpiKp
! hist for inv mass pKpi signal mis id'd as piKp
TNtuple * fNtupleLambdac
! output ntuple
TH2F * fhPtPhiLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT vs phi
virtual Bool_t IsInFiducialAcceptance(Double_t pt, Double_t y) const
TH1F * fhNLcc[12]
! hist. for n Lc tot. from c, pT
TH1F * fhSelectBit
! hist for Filter Bit
TH1F * fhIsLcResonantGen
!hist for resonant flag gen
TH2F * fhSelectionBitsSigb
! hist for ALL Filter bits Lc from b
Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
TH2F * fhPtYBkgNI[12]
! hist. for n bkg, pT vs rapidity
AliAODVertex * GetOwnPrimaryVtx() const
TH2F * fhPtPhiLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT vs phi
Double_t GetSigmaVert(const AliAODEvent *aod=0x0)
void FillEffHists(Int_t kStep)
AliAODPidHF * GetPidprot() const
TH1F * fhNLcKstarb[12]
! hist. for n Lc from b K* + p, pT
TH1F * fNentries
flag for whether Lc is from Hijing
AliAnalysisVertexingHF * fVHF
apply analysis cuts
Bool_t fKeepBkgNt
flag to keep Lc not from quark
Double_t Getd0errProng(Int_t ip) const
prongs
TH1F * fhNBkgNI[12]
! hist. for n bkg, pT
TH2F * fhPIDmassLcPt
!Lc Bkg+signal invariant mass vs pt
TH2F * fhPtPhiLcNonRb[12]
! hist. for n Lc from b non resonant, pT vs phi
TH2F * fhPtEtaLcc[12]
! hist. for n Lc tot. from c, pT vs eta
AliAnalysisTaskSELambdacTMVA()
TH2F * fhMCmassLcPtSigc
!Lc from c signal invariant mass vs pt
Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d, TClonesArray *arrayMC) const
AliPIDResponse * GetPidResponse() const
Float_t fLowmasslimit
upper inv mass limit for histos
Bool_t IsCandidateInjected(AliAODRecoDecayHF *cand, AliAODMCHeader *header, TClonesArray *arrayMC)
TH2F * fhProbmassLcPt
!Lc Bkg+signal invariant mass vs pt
TH1F * fhPtMisIdpiKp
! hist for pt pKpi signal mis id'd as piKp
void GetDCAs(Double_t dca[3]) const
AliAODPidHF * GetPidpion() const
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Double_t GetDist23toPrim() const
Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
Double_t DecayLengthXY() const
virtual void UserExec(Option_t *option)
TH2F * fhPtPhiLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT vs phi
TH1F * fhSetIsLc
! hist for before/after reco check MC LC
TH2F * fhPtEtaLcDeltac[12]
! hist. for n Lc from c Delta++ + K, pT vs eta
TH2F * fhPtPhiBkgNI[12]
! hist. for n bkg, pT vs phi
TH1F * fHistNEvents
!hist. for No. of events
TH2F * fhPtYLcb[12]
! hist. for n Lc tot. from b, pT vs rapidity
Bool_t IsEventSelected(AliVEvent *event)
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
void StoreEvent(AliVEvent *, AliRDHFCuts *, Bool_t mc=kFALSE, Int_t multiplicity=-9999, Double_t spherocity=-99.)
TH2F * fhPtPhiLcKstarb[12]
! hist. for n Lc from b K* + p, pT vs phi
TList * fListCuts
Analysis cuts.
Int_t fFillNtuple
list of cuts
TF1 * fFuncWeightFONLL5overLHC10f6a
! weight function for FONLL vs p prod.
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
void SetOldPid(Bool_t oldPid)
TH2F * fhPtYLcKstarb[12]
! hist. for n Lc from b K* + p, pT vs rapidity
TH2F * fhPtYLcL1520c[12]
! hist. for n Lc from c L1520 + pi, pT vs rapidity
TF1 * fFuncWeightFONLL7overLHC10f6a
! weight function for FONLL vs p prod.
TH1F * fhNLcL1520b[12]
! hist. for n Lc from b L1520 + pi, pT
TH1F * fhPtMisIdpKpiProb
! hist for pt pKpi signal mis id'd as piKp most prob PID
TH1F * fhNLcNonRc[12]
! hist. for n Lc from c non resonant, pT
TH2F * fhPtEtaLcb[12]
! hist. for n Lc tot. from b, pT vs eta
void SetIsLcReco(AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC)
TH1F * fhIsLcReco
!hist for resonant flag reco
Bool_t GetIsUsePID() const
TH1F * fhRecoPDGmom
!hist for Reco pdg
TH2F * fhPtPhiLcNonRc[12]
! hist. for n Lc from c non resonant, pT vs phi
TH1F * fhIsLcResonantReco
!hist for resonant flag reco
TH1F * fhNLcNonRb[12]
! hist. for n Lc from b non resonant, pT
TH2F * fhPtYLcKstarc[12]
! hist. for n Lc from c K* + p, pT vs rapidity
TH2F * fhMCmassLcPtSigb
!Lc from b signal invariant mass vs pt
Double_t CosPointingAngle() const
Double_t InvMassLcpKpi() const
TH1F * fhPtMisIdpKpi
! hist for pt pKpi signal mis id'd as piKp
TH1F * fhNLc[12]
! hist. for n Lc tot., pT
TH1F * fhNLcKstarc[12]
! hist. for n Lc from c K* + p, pT
void SetIsLcGen(AliAODMCParticle *partMC, TClonesArray *arrayMC)
Int_t fIsLcResonant
is MC Lc - 0=not Lc, 1=Lc from c, 2=Lc from b
Int_t PtBin(Double_t pt) const
TH1F * fhNLcDeltab[12]
! hist. for n Lc from b Delta++ + K, pT
Double_t DecayLength() const
TH2F * fhSelectionBitsSigc
! hist for ALL Filter bits Lc from c
TH2F * fhPtEtaLcNonRb[12]
! hist. for n Lc from b non resonant, pT vs eta
TH2F * fhPtEtaLcKstarb[12]
! hist. for n Lc from b K* + p, pT vs eta
Double_t InvMassLcpiKp() const
Bool_t fIsHijing
flag for Lc filter bit PID
TF1 * fFuncWeightFONLL5overLHC13d3
! weight function for FONLL vs pPb prod.
Bool_t fMCPid
flag for access to MC
void SetPidResponse(AliPIDResponse *pidResp)
AliVertexingHFUtils * fVertUtil
Class with functions useful for different D2H analyses //.
TH1F * fhPtCorrIdProb
! hist for correctly id'd pKpi most prob PID
Bool_t fLcPIDCut
flag for Lc filter bit cut
AliRDHFCutsLctopKpi * fRDCutsAnalysis
lower inv mass limit for histos