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 fNtupleLambdacReco(0),
110 fFuncWeightPythia(0),
111 fFuncWeightFONLL7overLHC10f6a(0),
112 fFuncWeightFONLL5overLHC13d3(0),
113 fFuncWeightFONLL5overLHC10f6a(0),
114 fFuncWeightFONLL5overLHC13d3Lc(0),
115 fFuncWeightFONLL7overLHC11b2Lc(0),
116 fFuncWeightFONLL7overLHC10f7aLc(0),
117 fUseNchWeight(kFALSE),
123 fLowmasslimit(2.086),
128 fKeepLcNotFromQuark(kFALSE),
151 for(
Int_t i=0;i<12;i++) {
287 for(
Int_t i=0;i<12;i++) {
343 DefineOutput(1,TList::Class());
344 DefineOutput(2,TList::Class());
345 DefineOutput(3,TH1F::Class());
346 DefineOutput(4,AliNormalizationCounter::Class());
349 DefineOutput(5,TNtuple::Class());
415 if (fDebug > 1) printf(
"AnalysisTaskSELambdac::Init() \n");
433 if (fDebug > 1) printf(
"AnalysisTaskSELambdac::UserCreateOutputObjects() \n");
438 fOutput->SetName(
"OutputHistos");
443 fhSelectBit =
new TH1F(
"hSelectBit",
"hSelectBit",5,-0.5,4.5);
445 fhSelectBit->GetXaxis()->SetBinLabel(3,
"SelectionMap");
451 fHistNEvents =
new TH1F(
"fHistNEvents",
"Number of processed events; ; Events",3,-0.5,2.5);
453 fHistNEvents->GetXaxis()->SetBinLabel(3,
"N events (after selection)");
483 fhIsLcResonantGen =
new TH1F(
"hIsLcResonantGen",
"IsLcResonant flag gen",6,-1.5,4.5);
484 fhIsLcResonantReco =
new TH1F(
"hIsLcResonantReco",
"IsLcResonant flag reco",6,-1.5,4.5);
485 fhIsLcGen =
new TH1F(
"hIsLcGen",
"IsLc flag gen",4,-1.5,2.5);
486 fhIsLcReco =
new TH1F(
"hIsLcReco",
"IsLc flag reco",4,-1.5,2.5);
492 fhRecoPDGmom =
new TH1F(
"hRecoPDGmom",
"pdg of mother reco. MatchToMCLambdac",7,-0.5,6.5);
495 fhSetIsLc =
new TH1F(
"hSetIsLc",
"Check candidates before/after rec. set is Lc",2,-0.5,1.5);
498 fhSelectionBits =
new TH2F(
"hSelectionBits",
"Reconstruction + selection bit",13,-0.5,12.5,150,0,15);
515 fhSelectionBitsSigc =
new TH2F(
"hSelectionBitsSigc",
"Reconstruction + selection bit from c",13,-0.5,12.5,150,0,15);
532 fhSelectionBitsSigb =
new TH2F(
"hSelectionBitsSigb",
"Reconstruction + selection bit from b",13,-0.5,13.5,150,0,15);
551 TString stepnames[12] = {
"GeneratedLimAcc",
"GeneratedAll",
"Generated",
"GeneratedAcc",
"Reco3Prong",
"LcBit",
"IsSelectedTracks",
"IsInFidAcc",
"PtRange",
"IsSelectedCandidate",
"IsSelectedPID",
"IsSelectedNtuple"};
552 for(
Int_t i=0;i<12;i++) {
554 hisname.Form(
"hNBkgNI%i",i);
555 histitle.Form(
"N Bkg not injected %s",stepnames[i].
Data());
556 fhNBkgNI[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
557 hisname.Form(
"hNLc%i",i);
558 histitle.Form(
"N Lc %s",stepnames[i].
Data());
559 fhNLc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
560 hisname.Form(
"hNLcc%i",i);
561 histitle.Form(
"N Lc from c %s",stepnames[i].
Data());
562 fhNLcc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
563 hisname.Form(
"hNLcNonRc%i",i);
564 histitle.Form(
"N Lc non resonant from c %s",stepnames[i].
Data());
565 fhNLcNonRc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
566 hisname.Form(
"hNLcL1520c%i",i);
567 histitle.Form(
"N Lc -> L(1520) + p from c %s",stepnames[i].
Data());
568 fhNLcL1520c[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
569 hisname.Form(
"hNLcKstarc%i",i);
570 histitle.Form(
"N Lc -> K* + pi from c %s",stepnames[i].
Data());
571 fhNLcKstarc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
572 hisname.Form(
"hNLcDeltac%i",i);
573 histitle.Form(
"N Lc -> Delta + K from c %s",stepnames[i].
Data());
574 fhNLcDeltac[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
575 hisname.Form(
"hNLcb%i",i);
576 histitle.Form(
"N Lc from b %s",stepnames[i].
Data());
577 fhNLcb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
578 hisname.Form(
"hNLcNonRb%i",i);
579 histitle.Form(
"N Lc non resonant from b %s",stepnames[i].
Data());
580 fhNLcNonRb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
581 hisname.Form(
"hNLcL1520b%i",i);
582 histitle.Form(
"N Lc -> L(1520) + p from b %s",stepnames[i].
Data());
583 fhNLcL1520b[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
584 hisname.Form(
"hNLcKstarb%i",i);
585 histitle.Form(
"N Lc -> K* + pi from b %s",stepnames[i].
Data());
586 fhNLcKstarb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
587 hisname.Form(
"hNLcDeltab%i",i);
588 histitle.Form(
"N Lc -> Delta + K from b %s",stepnames[i].
Data());
589 fhNLcDeltab[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
604 hisname.Form(
"hPtEtaBkgNI%i",i);
605 histitle.Form(
"Pt vs #eta Bkg not injected %s",stepnames[i].
Data());
606 fhPtEtaBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
607 hisname.Form(
"hPtEtaLc%i",i);
608 histitle.Form(
"Pt vs #eta Lc %s",stepnames[i].
Data());
609 fhPtEtaLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
610 hisname.Form(
"hPtEtaLcc%i",i);
611 histitle.Form(
"Pt vs #eta Lc from c %s",stepnames[i].
Data());
612 fhPtEtaLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
613 hisname.Form(
"hPtEtaLcNonRc%i",i);
614 histitle.Form(
"Pt vs #eta Lc non resonant from c %s",stepnames[i].
Data());
616 hisname.Form(
"hPtEtaLcL1520c%i",i);
617 histitle.Form(
"Pt vs #eta Lc -> L(1520) + p from c %s",stepnames[i].
Data());
619 hisname.Form(
"hPtEtaLcKstarc%i",i);
620 histitle.Form(
"Pt vs #eta Lc -> K* + pi from c %s",stepnames[i].
Data());
622 hisname.Form(
"hPtEtaLcDeltac%i",i);
623 histitle.Form(
"Pt vs #eta Lc -> Delta + K from c %s",stepnames[i].
Data());
625 hisname.Form(
"hPtEtaLcb%i",i);
626 histitle.Form(
"Pt vs #eta Lc from b %s",stepnames[i].
Data());
627 fhPtEtaLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
628 hisname.Form(
"hPtEtaLcNonRb%i",i);
629 histitle.Form(
"Pt vs #eta Lc non resonant from b %s",stepnames[i].
Data());
631 hisname.Form(
"hPtEtaLcL1520b%i",i);
632 histitle.Form(
"Pt vs #eta Lc -> L(1520) + p from b %s",stepnames[i].
Data());
634 hisname.Form(
"hPtEtaLcKstarb%i",i);
635 histitle.Form(
"Pt vs #eta Lc -> K* + pi from b %s",stepnames[i].
Data());
637 hisname.Form(
"hPtEtaLcDeltab%i",i);
638 histitle.Form(
"Pt vs #eta Lc -> Delta + K from b %s",stepnames[i].
Data());
654 hisname.Form(
"hPtYBkgNI%i",i);
655 histitle.Form(
"Pt vs Y Bkg not injected %s",stepnames[i].
Data());
656 fhPtYBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
657 hisname.Form(
"hPtYLc%i",i);
658 histitle.Form(
"Pt vs Y Lc %s",stepnames[i].
Data());
659 fhPtYLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
660 hisname.Form(
"hPtYLcc%i",i);
661 histitle.Form(
"Pt vs Y Lc from c %s",stepnames[i].
Data());
662 fhPtYLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
663 hisname.Form(
"hPtYLcNonRc%i",i);
664 histitle.Form(
"Pt vs Y Lc non resonant from c %s",stepnames[i].
Data());
665 fhPtYLcNonRc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
666 hisname.Form(
"hPtYLcL1520c%i",i);
667 histitle.Form(
"Pt vs Y Lc -> L(1520) + p from c %s",stepnames[i].
Data());
669 hisname.Form(
"hPtYLcKstarc%i",i);
670 histitle.Form(
"Pt vs Y Lc -> K* + pi from c %s",stepnames[i].
Data());
672 hisname.Form(
"hPtYLcDeltac%i",i);
673 histitle.Form(
"Pt vs Y Lc -> Delta + K from c %s",stepnames[i].
Data());
675 hisname.Form(
"hPtYLcb%i",i);
676 histitle.Form(
"Pt vs Y Lc from b %s",stepnames[i].
Data());
677 fhPtYLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
678 hisname.Form(
"hPtYLcNonRb%i",i);
679 histitle.Form(
"Pt vs Y Lc non resonant from b %s",stepnames[i].
Data());
680 fhPtYLcNonRb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
681 hisname.Form(
"hPtYLcL1520b%i",i);
682 histitle.Form(
"Pt vs Y Lc -> L(1520) + p from b %s",stepnames[i].
Data());
684 hisname.Form(
"hPtYLcKstarb%i",i);
685 histitle.Form(
"Pt vs Y Lc -> K* + pi from b %s",stepnames[i].
Data());
687 hisname.Form(
"hPtYLcDeltab%i",i);
688 histitle.Form(
"Pt vs Y Lc -> Delta + K from b %s",stepnames[i].
Data());
704 hisname.Form(
"hPtPhiBkgNI%i",i);
705 histitle.Form(
"Pt vs #phi Bkg not injected %s",stepnames[i].
Data());
707 hisname.Form(
"hPtPhiLc%i",i);
708 histitle.Form(
"Pt vs #phi Lc %s",stepnames[i].
Data());
709 fhPtPhiLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
710 hisname.Form(
"hPtPhiLcc%i",i);
711 histitle.Form(
"Pt vs #phi Lc from c %s",stepnames[i].
Data());
712 fhPtPhiLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
713 hisname.Form(
"hPtPhiLcNonRc%i",i);
714 histitle.Form(
"Pt vs #phi Lc non resonant from c %s",stepnames[i].
Data());
716 hisname.Form(
"hPtPhiLcL1520c%i",i);
717 histitle.Form(
"Pt vs #phi Lc -> L(1520) + p from c %s",stepnames[i].
Data());
719 hisname.Form(
"hPtPhiLcKstarc%i",i);
720 histitle.Form(
"Pt vs #phi Lc -> K* + pi from c %s",stepnames[i].
Data());
722 hisname.Form(
"hPtPhiLcDeltac%i",i);
723 histitle.Form(
"Pt vs #phi Lc -> Delta + K from c %s",stepnames[i].
Data());
725 hisname.Form(
"hPtPhiLcb%i",i);
726 histitle.Form(
"Pt vs #phi Lc from b %s",stepnames[i].
Data());
727 fhPtPhiLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
728 hisname.Form(
"hPtPhiLcNonRb%i",i);
729 histitle.Form(
"Pt vs #phi Lc non resonant from b %s",stepnames[i].
Data());
731 hisname.Form(
"hPtPhiLcL1520b%i",i);
732 histitle.Form(
"Pt vs #phi Lc -> L(1520) + p from b %s",stepnames[i].
Data());
734 hisname.Form(
"hPtPhiLcKstarb%i",i);
735 histitle.Form(
"Pt vs #phi Lc -> K* + pi from b %s",stepnames[i].
Data());
737 hisname.Form(
"hPtPhiLcDeltab%i",i);
738 histitle.Form(
"Pt vs #phi Lc -> Delta + K from b %s",stepnames[i].
Data());
755 fhPtMisIdpKpi =
new TH1F(
"hMisIdpKpi",
"pKpi id'd as piKp",30,0,30);
756 fhPtMisIdpiKp =
new TH1F(
"hMisIdpiKp",
"piKp id'd as pKpi",30,0,30);
757 fhPtCorrId =
new TH1F(
"hCorrId",
"Correctly id'd pKpi",30,0,30);
766 fhPtMisIdpKpiProb =
new TH1F(
"hMisIdpKpiProb",
"pKpi id'd as piKp, most prob. PID",30,0,30);
767 fhPtMisIdpiKpProb =
new TH1F(
"hMisIdpiKpProb",
"piKp id'd as pKpi, most prob. PID",30,0,30);
768 fhPtCorrIdProb =
new TH1F(
"hCorrIdProb",
"Correctly id'd pKpi, most prob. PID",30,0,30);
780 fFuncWeightPythia=
new TF1(
"funcWeightPythia",
"1./(30. *[0]*x/TMath::Power(1.+(TMath::Power((x/[1]),[3])),[2]))",0.15,30);
785 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.);
786 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);
790 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.);
791 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);
795 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.);
796 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);
800 fFuncWeightFONLL5overLHC13d3Lc=
new TF1(
"funcWeightFONLL5overLHC13d3Lc",
"([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",0.15,20.);
801 fFuncWeightFONLL5overLHC13d3Lc->SetParameters(5.94428e+01,1.63585e+01,9.65555e+00,6.71944e+00,8.88338e-02,2.40477e+00,-4.88649e-02,-6.78599e-01,-2.10951e-01);
805 fFuncWeightFONLL7overLHC11b2Lc=
new TF1(
"funcWeightFONLL7overLHC11b2Lc",
"([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",1.,20.);
806 fFuncWeightFONLL7overLHC11b2Lc->SetParameters(2.11879e+02,3.73290e+00,2.01235e+01,1.41508e+00,1.06268e-01,1.86285e+00,-4.52956e-02,-9.90631e-01,-1.31615e+00);
810 fFuncWeightFONLL7overLHC10f7aLc=
new TF1(
"funcWeightFONLL7overLHC10f7aLc",
"([0]*x)/TMath::Power([2],(1+TMath::Power([3],x/[1])))+[4]*TMath::Exp([5]+[6]*x)+[7]*TMath::Exp([8]*x)",01.,20.);
811 fFuncWeightFONLL7overLHC10f7aLc->SetParameters(2.84268e+02,2.18850e+01,2.36298e+01,7.46144e+00,1.69747e-01,1.66993e+00,-5.54726e-02,-1.53869e+00,-1.18404e+00);
817 fNentries=
new TH1F(
"fNentries",
"n Events/Candidates QA", 16,0.5,16.5);
820 fNentries->GetXaxis()->SetBinLabel(1,
"nEventsRejTM");
821 fNentries->GetXaxis()->SetBinLabel(2,
"nEventsNoVtx");
822 fNentries->GetXaxis()->SetBinLabel(3,
"nEventsRejCutPileup");
823 fNentries->GetXaxis()->SetBinLabel(4,
"nLcGen");
824 fNentries->GetXaxis()->SetBinLabel(5,
"nLcGenFidAcc");
825 fNentries->GetXaxis()->SetBinLabel(6,
"nCandReco3Prong");
826 fNentries->GetXaxis()->SetBinLabel(7,
"nCandLcBit");
827 fNentries->GetXaxis()->SetBinLabel(8,
"nCandIsSelTracks");
828 fNentries->GetXaxis()->SetBinLabel(9,
"nCandIsInFidAcc");
829 fNentries->GetXaxis()->SetBinLabel(10,
"ptbin=-1");
830 fNentries->GetXaxis()->SetBinLabel(11,
"nCandIsSelCand");
831 fNentries->GetXaxis()->SetBinLabel(12,
"PID=0");
832 fNentries->GetXaxis()->SetBinLabel(13,
"PID=1");
833 fNentries->GetXaxis()->SetBinLabel(14,
"PID=2");
834 fNentries->GetXaxis()->SetBinLabel(15,
"PID=3");
835 fNentries->GetXaxis()->SetBinLabel(16,
"nLcSelected");
836 fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
839 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
855 TString normName=
"NormalizationCounter";
856 AliAnalysisDataContainer *cont = GetOutputSlot(4)->GetContainer();
857 if(cont)normName=(
TString)cont->GetName();
863 TString ntName=
"fNtupleLambdac";
864 AliAnalysisDataContainer *contnt = GetOutputSlot(5)->GetContainer();
865 if(contnt)ntName=(
TString)contnt->GetName();
866 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:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp");
868 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:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp:d00:d01:d02:d0Squared:d00Sig:d01Sig:d02Sig:d00SigResidual:d01SigResidual:d02SigResidual:CosPXY:DCATr1:DCATr2:Dist23:RunNumber");
870 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:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp:d00:d01:d02:d0Squared:d00Sig:d01Sig:d02Sig:d00SigResidual:d01SigResidual:d02SigResidual:CosPXY:DCATr1:DCATr2:Dist23:RunNumber:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:weights5LHC13d3Lc:weights7LHC11b2Lc:weights7LHC10f7aLc:multiplicity:weightsMultiplicity");
872 else if(
fFillNtuple==4)
fNtupleLambdac =
new TNtuple(ntName.Data(),
"Lc",
"isLcBkg:InvMasspKpi:InvMasspiKp:Charge:PtTr0:PtTr1:PtTr2:PtLc:CosP:DecayL:DecayLSig:Dist12:SigVert:DCATr0:DecayLXY:DecayLXYSig:isLcResonant:selectionPID:Tr0Ppi:Tr0PK:Tr0Pp:Tr1Ppi:Tr1PK:Tr1Pp:Tr2Ppi:Tr2PK:Tr2Pp:d00:d01:d02:d0Squared:d00Sig:d01Sig:d02Sig:d00SigResidual:d01SigResidual:d02SigResidual:CosPXY:DCATr1:DCATr2:Dist23:RunNumber:PtLcMC:weightsPythia:weights7LHC106a:weights5LHC10f6a:weights5LHC13d3:weights5LHC13d3Lc:weights7LHC11b2Lc:weights7LHC10f7aLc:multiplicity:weightsMultiplicity:InvMasspK:InvMassKpi:InvMassppi:InvMassKp:InvMasspiK:InvMasspip");
873 else AliFatal(
"Invalid fill ntuple argument");
879 TString ntName=
"fNtupleLambdacReco";
880 AliAnalysisDataContainer *contntrec = GetOutputSlot(6)->GetContainer();
881 if(contntrec)ntName=(
TString)contntrec->GetName();
882 fNtupleLambdacReco =
new TNtuple(ntName.Data(),
"Lc Reco",
"isLcBkg:PtLc:PtLcMC:PtTr0:PtTr1:PtTr2:PtTr0MC:PtTr1MC:PtTr2MC:isTOFTr0:isTOFTr1:isTOFTr2:selectionCand:selectionPID:selectionPIDprob:Charge");
902 TClonesArray *array3Prong = 0;
903 TClonesArray *arrayLikeSign =0;
904 if(!aod && AODEvent() && IsStandardAOD()) {
910 AliAODHandler* aodHandler = (AliAODHandler*)
911 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
912 if(aodHandler->GetExtensions()) {
913 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
915 array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject(
"Charm3Prong");
916 arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject(
"LikeSign3Prong");
919 array3Prong=(TClonesArray*)aod->GetList()->FindObject(
"Charm3Prong");
920 arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject(
"LikeSign3Prong");
925 TClonesArray *arrayMC=0;
926 AliAODMCHeader *mcHeader=0;
931 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
933 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: MC particles branch not found!\n");
939 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
941 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: MC header branch not found!\n");
955 if(!array3Prong || !aod) {
956 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: Charm3Prong branch not found!\n");
960 AliDebug(2,
"AliAnalysisTaskSELambdacTMVA::UserExec: LikeSign3Prong branch not found!\n");
965 Int_t runnumber = aod->GetRunNumber();
966 if (aod->GetTriggerMask() == 0 && (runnumber >= 195344 && runnumber <= 195677)){
967 Int_t nentriesTM = arrayMC->GetEntriesFast();
968 AliDebug(2,Form(
"Event rejected because of null trigger mask, n entries = %i",nentriesTM));
975 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
976 if(!vtx1 || TMath::Abs(aod->GetMagneticField())<0.001) {
981 TString trigclass=aod->GetFiredTriggerClasses();
992 Int_t n3Prong = array3Prong->GetEntriesFast();
993 Int_t nSelectedloose[1]={0};
994 Int_t nSelectedtight[1]={0};
998 Bool_t isInFidAcc = kFALSE;
1002 Double_t zPrimVertex = vtx1 ->GetZ();
1003 Double_t zMCVertex = mcHeader->GetVtxZ();
1007 for (
Int_t iPart=0; iPart<arrayMC->GetEntriesFast(); iPart++) {
1010 AliAODMCParticle* mcPart =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(iPart));
1012 AliError(
"Failed casting particle from MC array!, Skipping particle");
1017 if(
fIsLc==0)
continue;
1025 if(!
fIsHijing) imother=mcPart->GetMother();
1027 AliAODMCParticle* mcPartMother =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(imother));
1029 AliError(
"Failed casting mother particle, Skipping particle");
1037 AliDebug(2,
"Lc has p K pi in final state");
1042 if((TMath::Abs(mcPart->Y()) < 0.5)) {
1043 AliDebug(2,
"Lc in limited acceptance");
1051 AliError(
"no p K pi final state");
1063 else AliError(Form(
"Not pKpi or background - should not happen! fIsLcResonant = %i",
fIsLcResonant));
1084 for (
Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
1130 if(!isSelectedTracks)
continue;
1140 if(ptbin==-1) {
fNentries->Fill(10);
continue;}
1149 if(isSelectedPID==0 )
fNentries->Fill(12);
1150 else if(isSelectedPID==1)
fNentries->Fill(13);
1151 else if(isSelectedPID==2)
fNentries->Fill(14);
1155 Int_t selectionProb = 0;
1159 if(!selection)
continue;
1190 if (fDebug > 1) printf(
"AnalysisTaskSELambdac: Terminate() \n");
1194 AliError(
"ERROR: fOutput not available\n");
1217 Int_t lambdacLab[3]={0,0,0};
1219 for(
Int_t i=0;i<3;i++){
1220 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1221 Int_t lab=daugh->GetLabel();
1223 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab);
1226 Int_t partPdgcode = TMath::Abs(part->GetPdgCode());
1227 if(partPdgcode==211 || partPdgcode==321 || partPdgcode==2212){
1228 Int_t motherLabel=part->GetMother();
1229 if(motherLabel<0)
return 0;
1230 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel);
1231 if(!motherPart)
continue;
1232 Int_t motherPdg = TMath::Abs(motherPart->GetPdgCode());
1233 if(motherPdg==4122) {
1234 if(
GetLambdacDaugh(motherPart,arrayMC)){lambdacLab[i]=motherLabel;
continue;}
1236 if(motherPdg==313 || motherPdg==2224 || motherPdg==3124){
1237 Int_t granMotherLabel=motherPart->GetMother();
1238 if(granMotherLabel<0)
return 0;
1239 AliAODMCParticle *granMotherPart = (AliAODMCParticle*)arrayMC->At(granMotherLabel);
1240 if(!granMotherPart)
continue;
1241 Int_t granMotherPdg = TMath::Abs(granMotherPart->GetPdgCode());
1242 if(granMotherPdg ==4122) {
1243 if(
GetLambdacDaugh(granMotherPart,arrayMC)) {lambdacLab[i]=granMotherLabel;
continue;}
1249 if(lambdacLab[0]==lambdacLab[1] && lambdacLab[1]==lambdacLab[2]) {
return lambdacLab[0];}
1264 Int_t numberOfLambdac=0;
1266 if(TMath::Abs(part->GetPdgCode())!=4122)
return 0;
1271 if(nDaugh<2)
return 0;
1272 if(nDaugh>3)
return 0;
1273 AliAODMCParticle* pdaugh1 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(0));
1274 if(!pdaugh1) {
return 0;}
1275 Int_t number1 = TMath::Abs(pdaugh1->GetPdgCode());
1276 AliAODMCParticle* pdaugh2 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(1));
1277 if(!pdaugh2) {
return 0;}
1278 Int_t number2 = TMath::Abs(pdaugh2->GetPdgCode());
1280 AliDebug(2,
"Is non resonant?");
1282 Int_t thirdDaugh=part->GetDaughter(1)-1;
1283 AliAODMCParticle* pdaugh3 = (AliAODMCParticle*)arrayMC->At(thirdDaugh);
1284 Int_t number3 = TMath::Abs(pdaugh3->GetPdgCode());
1285 if((number1==321 && number2==211 && number3==2212) ||
1286 (number1==211 && number2==321 && number3==2212) ||
1287 (number1==211 && number2==2212 && number3==321) ||
1288 (number1==321 && number2==2212 && number3==211) ||
1289 (number1==2212 && number2==321 && number3==211) ||
1290 (number1==2212 && number2==211 && number3==321)) {
1292 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1293 || TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1294 || TMath::Abs(pdaugh3->Eta()) > 0.9 || pdaugh3->Pt() < 0.1) IsInAcc=kFALSE;
1295 AliDebug(2,
"Lc decays non-resonantly");
1308 if((number1==2212 && number2==313)){
1309 nfiglieK=pdaugh2->GetNDaughters();
1310 if(nfiglieK!=2)
return 0;
1311 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1312 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1313 if(!pdaughK1)
return 0;
1314 if(!pdaughK2)
return 0;
1315 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1317 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1318 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1319 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1320 AliDebug(2,
"Lc decays via K* p");
1325 if((number1==313 && number2==2212)){
1326 nfiglieK=pdaugh1->GetNDaughters();
1327 if(nfiglieK!=2)
return 0;
1328 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1329 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1330 if(!pdaughK1)
return 0;
1331 if(!pdaughK2)
return 0;
1332 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1334 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1335 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1336 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1337 AliDebug(2,
"Lc decays via K* p");
1343 Int_t nfiglieDelta=0;
1344 if(number1==321 && number2==2224){
1345 nfiglieDelta=pdaugh2->GetNDaughters();
1346 if(nfiglieDelta!=2)
return 0;
1347 AliAODMCParticle *pdaughD1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1348 AliAODMCParticle *pdaughD2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1349 if(!pdaughD1)
return 0;
1350 if(!pdaughD2)
return 0;
1351 if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1353 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1354 || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1355 || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1356 AliDebug(2,
"Lc decays via Delta++ k");
1360 if(number1==2224 && number2==321){
1361 nfiglieDelta=pdaugh1->GetNDaughters();
1362 if(nfiglieDelta!=2)
return 0;
1363 AliAODMCParticle* pdaughD1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1364 AliAODMCParticle* pdaughD2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1365 if(!pdaughD1)
return 0;
1366 if(!pdaughD2)
return 0;
1367 if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1369 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1370 || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1371 || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1372 AliDebug(2,
"Lc decays via Delta++ k");
1380 if(number1==3124 && number2==211){
1381 nfiglieLa=pdaugh1->GetNDaughters();
1382 if(nfiglieLa!=2)
return 0;
1383 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1384 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1385 if(!pdaughL1)
return 0;
1386 if(!pdaughL2)
return 0;
1387 if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1389 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1390 || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1391 || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1392 AliDebug(2,
"Lc decays via Lambda(1520) pi");
1396 if(number1==211 && number2==3124){
1397 nfiglieLa=pdaugh2->GetNDaughters();
1398 if(nfiglieLa!=2)
return 0;
1399 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1400 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1401 if(!pdaughL1)
return 0;
1402 if(!pdaughL2)
return 0;
1403 if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1405 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1406 || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1407 || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1408 AliDebug(2,
"Lc decays via Lambda(1520) pi");
1414 if(numberOfLambdac>0) {
return -100; AliDebug(2,
"Lc decays via one of 4 resonances!");}
1428 if(TMath::Abs(mcPart->GetPdgCode())==4122) {
1429 AliDebug(2,
"Found Lc! now check mother");
1434 AliDebug(2,
"Lc comes from b");
1437 else if(pdgMom==4) {
1451 TClonesArray *arrayMC) {
1464 Int_t pdgCand =4122;
1465 Int_t pdgDaughter[3]={-1,-1,-1};
1466 pdgDaughter[0]=2212;
1470 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1472 AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
1475 if(pdgMom == 4)
fIsLc=1;
1476 else if(pdgMom == 5)
fIsLc=2;
1498 AliAODMCHeader *mcHeader2 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1504 fhMCmassLcPtSig->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1513 else if(selection==2){
1518 else if(selection==3){
1531 if(selectionProb==1) {
1536 else if(selectionProb==2) {
1543 if(ispKpiMC && selection==2){
1547 else if(ispiKpMC && selection==1){
1553 if(ispKpiMC && selectionProb==2){
1557 else if(ispiKpMC && selectionProb==1){
1573 else if(selection==2){
1576 else if(selection==3){
1581 if(selectionProb==1)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpKpi);
1582 else if(selectionProb==2)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpiKp);
1589 TClonesArray *arrayMC,
Int_t selection)
1602 AliAODMCHeader *mcHeader3 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1606 if(
fIsLc==2) IsLcfromLb=kTRUE;
1607 if(
fReadMC && IsInjected && !IsLc &&
fSyst >=1 )
return;
1619 if(selection==1 || selection==3) invMasspKpi=part->
InvMassLcpKpi();
1630 if(!IsInjected && IsLc==0) tmp[0]=0;
1631 else if(IsLc==1 && !IsLcfromLb) tmp[0]=1;
1632 else if(IsLc==1 && IsLcfromLb) tmp[0]=2;
1633 else if(IsInjected && IsLc==0) tmp[0]=3;
1639 tmp[3]=part->Charge();
1641 tmp[4]=part->PtProng(0);
1642 tmp[5]=part->PtProng(1);
1643 tmp[6]=part->PtProng(2);
1653 tmp[13]=TMath::Max(dcas[0],TMath::Max(dcas[1],dcas[2]));
1663 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1664 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1665 AliVTrack *track2=
dynamic_cast<AliVTrack*
>(part->GetDaughter(2));
1668 for(
Int_t iprob=18;iprob<=26;iprob++) {
1678 if (!track0 || !track1 || !track2) {
1679 AliError(
"AliVTrack missing - wont fill Ntuple");
1700 Double_t d00 = part->Getd0Prong(0);
1701 Double_t d01 = part->Getd0Prong(1);
1702 Double_t d02 = part->Getd0Prong(2);
1709 tmp[30]=d00*d00 + d01*d01 + d02*d02;
1731 Int_t runNumber=aod->GetRunNumber();
1737 Double_t weightPythia=-1,weight7LHC10f6a=-1,weight5LHC10f6a=-1,weight5LHC13d3=-1;
1739 Double_t weight7LHC10f7aLc=-1,weight7LHC11b2Lc=-1,weight5LHC13d3Lc=-1;
1743 Int_t pdgCand =4122;
1744 Int_t pdgDaughter[3]={-1,-1,-1};
1745 pdgDaughter[0]=2212;
1748 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1750 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(labDp);
1751 ptLcMC = motherPart->Pt();
1762 tmp[43]=weightPythia;
1763 tmp[44]=weight7LHC10f6a;
1764 tmp[45]=weight5LHC10f6a;
1765 tmp[46]=weight5LHC13d3;
1766 tmp[47]=weight5LHC13d3Lc;
1767 tmp[48]=weight7LHC11b2Lc;
1768 tmp[49]=weight7LHC10f7aLc;
1776 multWeight *=
GetNchWeight(static_cast<Int_t>(nTracklets));
1777 AliDebug(2,Form(
"Using Nch weights, Mult=%f Weight=%f\n",nTracklets,multWeight));
1784 tmp[52]=part->InvMass2Prongs(1,0,321,2212);
1785 tmp[53]=part->InvMass2Prongs(2,1,211,321);
1786 tmp[54]=part->InvMass2Prongs(2,0,211,2212);
1787 tmp[55]=part->InvMass2Prongs(1,2,321,2212);
1788 tmp[56]=part->InvMass2Prongs(0,1,211,321);
1789 tmp[57]=part->InvMass2Prongs(0,2,211,2212);
1893 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1894 for(
Int_t i=0;i<3;i++){
1895 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1896 lab[i]=daugh->GetLabel();
1897 if(lab[i]<0)
return kFALSE;
1898 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1899 if(!part)
return kFALSE;
1900 pdgs[i]=TMath::Abs(part->GetPdgCode());
1903 if(pdgs[0]==2212 && pdgs[1]==321 && pdgs[2]==211)
return kTRUE;
1914 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1915 for(
Int_t i=0;i<3;i++){
1916 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1917 lab[i]=daugh->GetLabel();
1918 if(lab[i]<0)
return kFALSE;
1919 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1920 if(!part)
return kFALSE;
1921 pdgs[i]=TMath::Abs(part->GetPdgCode());
1924 if(pdgs[2]==2212 && pdgs[1]==321 && pdgs[0]==211) {
return kTRUE;}
1948 Int_t selection = 0;
1951 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1952 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1953 AliVTrack *track2=
dynamic_cast<AliVTrack*
>(part->GetDaughter(2));
1959 if (!track0 || !track1 || !track2) {
1960 AliError(
"AliVTrack missing");
1976 if(nch<=0)
return 0.;
1977 if(!
fHistoMCNch) { AliError(
"Input histos to evaluate Nch weights missing");
return 0.; }
1984 TClonesArray *arrayMC)
1997 AliAODMCHeader *mcHeader3 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
2001 if(
fIsLc==2) IsLcfromLb=kTRUE;
2006 if(!IsInjected && IsLc==0) tmp[0]=0;
2007 else if(IsLc==1 && !IsLcfromLb) tmp[0]=1;
2008 else if(IsLc==1 && IsLcfromLb) tmp[0]=2;
2009 else if(IsInjected && IsLc==0) tmp[0]=3;
2015 Int_t pdgCand =4122;
2016 Int_t pdgDaughter[3]={-1,-1,-1};
2017 pdgDaughter[0]=2212;
2020 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
2022 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(labDp);
2023 ptLcMC = motherPart->Pt();
2027 tmp[3]=part->PtProng(0);
2028 tmp[4]=part->PtProng(1);
2029 tmp[5]=part->PtProng(2);
2034 for(
Int_t i=0;i<3;i++) {
2035 AliAODTrack *daugh=(AliAODTrack*)part->GetDaughter(i);
2036 Int_t daughLab= daugh->GetLabel();
2037 if(daughLab<0)
continue;
2039 AliAODMCParticle* pdaugh =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(daughLab));
2041 MCpt[i] = pdaugh->Pt();
2048 tmp[10]=isTOFpid[1];
2049 tmp[11]=isTOFpid[2];
2054 Int_t selectionPIDprob = 0;
2056 tmp[12]=selectionCand;
2057 tmp[13]=selectionPID;
2058 tmp[14]=selectionPIDprob;
2059 tmp[15]=part->Charge();
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
Bool_t fAnalysis
flag to cut with KF vertexer
TH2F * fhPtEtaBkgNI[12]
! hist. for n bkg, pT vs eta
TH1F * fHistNEventsRejTM
!hist. for Rejected events from null trigger mask
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)
Bool_t CheckTOFPIDStatus(AliAODTrack *track) const
Int_t GetPIDselectionMaxProb(AliAODRecoDecayHF3Prong *part)
TList * fOutput
! list send on output slot 0
Double_t GetNchWeight(Int_t nch)
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
TF1 * fFuncWeightFONLL7overLHC10f7aLc
! weight function for FONLL vs p prod. Lc
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
void FillRecoNtuple(AliAODEvent *aod, AliAODRecoDecayHF3Prong *part, TClonesArray *arrayMC)
TF1 * fFuncWeightFONLL7overLHC11b2Lc
! weight function for FONLL vs p prod. Lc
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)
Functions to check the decay tree.
Double_t GetMaxVtxZ() const
Bool_t fKeepLcNotFromQuark
filling ntuple type reco
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
TNtuple * fNtupleLambdacReco
! output ntuple after reconstruction
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)
Int_t fFillNtupleReco
filling ntuple type
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
static Int_t GetNumberOfTrackletsInEtaRange(AliAODEvent *ev, Double_t mineta, Double_t maxeta)
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
Bool_t fResPid
flag for real PID
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)
Float_t fPtLc
candidate variables, 0=Pt, 1=Eta, 2=Y, 3=Phi
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.
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
Bool_t fUseKF
flag for PID with resonant channels
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
TF1 * fFuncWeightFONLL5overLHC13d3Lc
! weight function for FONLL vs pPb prod. Lc
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
TH1F * fHistoMCNch
flag for using multiplicity weights
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