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);
1158 if(!selection)
continue;
1189 if (fDebug > 1) printf(
"AnalysisTaskSELambdac: Terminate() \n");
1193 AliError(
"ERROR: fOutput not available\n");
1216 Int_t lambdacLab[3]={0,0,0};
1218 for(
Int_t i=0;i<3;i++){
1219 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1220 Int_t lab=daugh->GetLabel();
1222 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab);
1225 Int_t partPdgcode = TMath::Abs(part->GetPdgCode());
1226 if(partPdgcode==211 || partPdgcode==321 || partPdgcode==2212){
1227 Int_t motherLabel=part->GetMother();
1228 if(motherLabel<0)
return 0;
1229 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel);
1230 if(!motherPart)
continue;
1231 Int_t motherPdg = TMath::Abs(motherPart->GetPdgCode());
1232 if(motherPdg==4122) {
1233 if(
GetLambdacDaugh(motherPart,arrayMC)){lambdacLab[i]=motherLabel;
continue;}
1235 if(motherPdg==313 || motherPdg==2224 || motherPdg==3124){
1236 Int_t granMotherLabel=motherPart->GetMother();
1237 if(granMotherLabel<0)
return 0;
1238 AliAODMCParticle *granMotherPart = (AliAODMCParticle*)arrayMC->At(granMotherLabel);
1239 if(!granMotherPart)
continue;
1240 Int_t granMotherPdg = TMath::Abs(granMotherPart->GetPdgCode());
1241 if(granMotherPdg ==4122) {
1242 if(
GetLambdacDaugh(granMotherPart,arrayMC)) {lambdacLab[i]=granMotherLabel;
continue;}
1248 if(lambdacLab[0]==lambdacLab[1] && lambdacLab[1]==lambdacLab[2]) {
return lambdacLab[0];}
1263 Int_t numberOfLambdac=0;
1265 if(TMath::Abs(part->GetPdgCode())!=4122)
return 0;
1270 if(nDaugh<2)
return 0;
1271 if(nDaugh>3)
return 0;
1272 AliAODMCParticle* pdaugh1 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(0));
1273 if(!pdaugh1) {
return 0;}
1274 Int_t number1 = TMath::Abs(pdaugh1->GetPdgCode());
1275 AliAODMCParticle* pdaugh2 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(1));
1276 if(!pdaugh2) {
return 0;}
1277 Int_t number2 = TMath::Abs(pdaugh2->GetPdgCode());
1279 AliDebug(2,
"Is non resonant?");
1281 Int_t thirdDaugh=part->GetDaughter(1)-1;
1282 AliAODMCParticle* pdaugh3 = (AliAODMCParticle*)arrayMC->At(thirdDaugh);
1283 Int_t number3 = TMath::Abs(pdaugh3->GetPdgCode());
1284 if((number1==321 && number2==211 && number3==2212) ||
1285 (number1==211 && number2==321 && number3==2212) ||
1286 (number1==211 && number2==2212 && number3==321) ||
1287 (number1==321 && number2==2212 && number3==211) ||
1288 (number1==2212 && number2==321 && number3==211) ||
1289 (number1==2212 && number2==211 && number3==321)) {
1291 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1292 || TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1293 || TMath::Abs(pdaugh3->Eta()) > 0.9 || pdaugh3->Pt() < 0.1) IsInAcc=kFALSE;
1294 AliDebug(2,
"Lc decays non-resonantly");
1307 if((number1==2212 && number2==313)){
1308 nfiglieK=pdaugh2->GetNDaughters();
1309 if(nfiglieK!=2)
return 0;
1310 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1311 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1312 if(!pdaughK1)
return 0;
1313 if(!pdaughK2)
return 0;
1314 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1316 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1317 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1318 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1319 AliDebug(2,
"Lc decays via K* p");
1324 if((number1==313 && number2==2212)){
1325 nfiglieK=pdaugh1->GetNDaughters();
1326 if(nfiglieK!=2)
return 0;
1327 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1328 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1329 if(!pdaughK1)
return 0;
1330 if(!pdaughK2)
return 0;
1331 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1333 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1334 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1335 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1336 AliDebug(2,
"Lc decays via K* p");
1342 Int_t nfiglieDelta=0;
1343 if(number1==321 && number2==2224){
1344 nfiglieDelta=pdaugh2->GetNDaughters();
1345 if(nfiglieDelta!=2)
return 0;
1346 AliAODMCParticle *pdaughD1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1347 AliAODMCParticle *pdaughD2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1348 if(!pdaughD1)
return 0;
1349 if(!pdaughD2)
return 0;
1350 if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1352 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1353 || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1354 || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1355 AliDebug(2,
"Lc decays via Delta++ k");
1359 if(number1==2224 && number2==321){
1360 nfiglieDelta=pdaugh1->GetNDaughters();
1361 if(nfiglieDelta!=2)
return 0;
1362 AliAODMCParticle* pdaughD1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1363 AliAODMCParticle* pdaughD2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1364 if(!pdaughD1)
return 0;
1365 if(!pdaughD2)
return 0;
1366 if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1368 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1369 || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1370 || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1371 AliDebug(2,
"Lc decays via Delta++ k");
1379 if(number1==3124 && number2==211){
1380 nfiglieLa=pdaugh1->GetNDaughters();
1381 if(nfiglieLa!=2)
return 0;
1382 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1383 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1384 if(!pdaughL1)
return 0;
1385 if(!pdaughL2)
return 0;
1386 if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1388 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1389 || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1390 || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1391 AliDebug(2,
"Lc decays via Lambda(1520) pi");
1395 if(number1==211 && number2==3124){
1396 nfiglieLa=pdaugh2->GetNDaughters();
1397 if(nfiglieLa!=2)
return 0;
1398 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1399 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1400 if(!pdaughL1)
return 0;
1401 if(!pdaughL2)
return 0;
1402 if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1404 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1405 || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1406 || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1407 AliDebug(2,
"Lc decays via Lambda(1520) pi");
1413 if(numberOfLambdac>0) {
return -100; AliDebug(2,
"Lc decays via one of 4 resonances!");}
1427 if(TMath::Abs(mcPart->GetPdgCode())==4122) {
1428 AliDebug(2,
"Found Lc! now check mother");
1433 AliDebug(2,
"Lc comes from b");
1436 else if(pdgMom==4) {
1450 TClonesArray *arrayMC) {
1463 Int_t pdgCand =4122;
1464 Int_t pdgDaughter[3]={-1,-1,-1};
1465 pdgDaughter[0]=2212;
1469 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1471 AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
1474 if(pdgMom == 4)
fIsLc=1;
1475 else if(pdgMom == 5)
fIsLc=2;
1497 AliAODMCHeader *mcHeader2 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1503 fhMCmassLcPtSig->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1512 else if(selection==2){
1517 else if(selection==3){
1530 if(selectionProb==1) {
1535 else if(selectionProb==2) {
1542 if(ispKpiMC && selection==2){
1546 else if(ispiKpMC && selection==1){
1552 if(ispKpiMC && selectionProb==2){
1556 else if(ispiKpMC && selectionProb==1){
1572 else if(selection==2){
1575 else if(selection==3){
1580 if(selectionProb==1)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpKpi);
1581 else if(selectionProb==2)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpiKp);
1588 TClonesArray *arrayMC,
Int_t selection)
1601 AliAODMCHeader *mcHeader3 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1605 if(
fIsLc==2) IsLcfromLb=kTRUE;
1606 if(
fReadMC && IsInjected && !IsLc &&
fSyst >=1 )
return;
1618 if(selection==1 || selection==3) invMasspKpi=part->
InvMassLcpKpi();
1629 if(!IsInjected && IsLc==0) tmp[0]=0;
1630 else if(IsLc==1 && !IsLcfromLb) tmp[0]=1;
1631 else if(IsLc==1 && IsLcfromLb) tmp[0]=2;
1632 else if(IsInjected && IsLc==0) tmp[0]=3;
1638 tmp[3]=part->Charge();
1640 tmp[4]=part->PtProng(0);
1641 tmp[5]=part->PtProng(1);
1642 tmp[6]=part->PtProng(2);
1652 tmp[13]=TMath::Max(dcas[0],TMath::Max(dcas[1],dcas[2]));
1662 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1663 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1664 AliVTrack *track2=
dynamic_cast<AliVTrack*
>(part->GetDaughter(2));
1671 if (!track0 || !track1 || !track2) {
1672 AliError(
"AliVTrack missing - wont fill Ntuple");
1681 tmp[18]=prob0[AliPID::kPion];
1682 tmp[19]=prob0[AliPID::kKaon];
1684 tmp[21]=prob1[AliPID::kPion];
1685 tmp[22]=prob1[AliPID::kKaon];
1687 tmp[24]=prob2[AliPID::kPion];
1688 tmp[25]=prob2[AliPID::kKaon];
1693 for(
Int_t iprob=18;iprob<=26;iprob++) {
1698 Double_t d00 = part->Getd0Prong(0);
1699 Double_t d01 = part->Getd0Prong(1);
1700 Double_t d02 = part->Getd0Prong(2);
1707 tmp[30]=d00*d00 + d01*d01 + d02*d02;
1729 Int_t runNumber=aod->GetRunNumber();
1735 Double_t weightPythia=-1,weight7LHC10f6a=-1,weight5LHC10f6a=-1,weight5LHC13d3=-1;
1737 Double_t weight7LHC10f7aLc=-1,weight7LHC11b2Lc=-1,weight5LHC13d3Lc=-1;
1741 Int_t pdgCand =4122;
1742 Int_t pdgDaughter[3]={-1,-1,-1};
1743 pdgDaughter[0]=2212;
1746 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1748 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(labDp);
1749 ptLcMC = motherPart->Pt();
1760 tmp[43]=weightPythia;
1761 tmp[44]=weight7LHC10f6a;
1762 tmp[45]=weight5LHC10f6a;
1763 tmp[46]=weight5LHC13d3;
1764 tmp[47]=weight5LHC13d3Lc;
1765 tmp[48]=weight7LHC11b2Lc;
1766 tmp[49]=weight7LHC10f7aLc;
1774 multWeight *=
GetNchWeight(static_cast<Int_t>(nTracklets));
1775 AliDebug(2,Form(
"Using Nch weights, Mult=%f Weight=%f\n",nTracklets,multWeight));
1782 tmp[52]=part->InvMass2Prongs(1,0,321,2212);
1783 tmp[53]=part->InvMass2Prongs(2,1,211,321);
1784 tmp[54]=part->InvMass2Prongs(2,0,211,2212);
1785 tmp[55]=part->InvMass2Prongs(1,2,321,2212);
1786 tmp[56]=part->InvMass2Prongs(0,1,211,321);
1787 tmp[57]=part->InvMass2Prongs(0,2,211,2212);
1891 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1892 for(
Int_t i=0;i<3;i++){
1893 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1894 lab[i]=daugh->GetLabel();
1895 if(lab[i]<0)
return kFALSE;
1896 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1897 if(!part)
return kFALSE;
1898 pdgs[i]=TMath::Abs(part->GetPdgCode());
1901 if(pdgs[0]==2212 && pdgs[1]==321 && pdgs[2]==211)
return kTRUE;
1912 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1913 for(
Int_t i=0;i<3;i++){
1914 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1915 lab[i]=daugh->GetLabel();
1916 if(lab[i]<0)
return kFALSE;
1917 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1918 if(!part)
return kFALSE;
1919 pdgs[i]=TMath::Abs(part->GetPdgCode());
1922 if(pdgs[2]==2212 && pdgs[1]==321 && pdgs[0]==211) {
return kTRUE;}
1946 Int_t selection = 0;
1949 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1950 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1951 AliVTrack *track2=
dynamic_cast<AliVTrack*
>(part->GetDaughter(2));
1957 if (!track0 || !track1 || !track2) {
1958 AliError(
"AliVTrack missing");
1964 if(prob0[
AliPID::kProton] * prob1[AliPID::kKaon] * prob2[AliPID::kPion] > prob2[
AliPID::kProton] * prob1[AliPID::kKaon] * prob0[AliPID::kPion]) selection = 1;
1974 if(nch<=0)
return 0.;
1975 if(!
fHistoMCNch) { AliError(
"Input histos to evaluate Nch weights missing");
return 0.; }
1982 TClonesArray *arrayMC)
1995 AliAODMCHeader *mcHeader3 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1999 if(
fIsLc==2) IsLcfromLb=kTRUE;
2004 if(!IsInjected && IsLc==0) tmp[0]=0;
2005 else if(IsLc==1 && !IsLcfromLb) tmp[0]=1;
2006 else if(IsLc==1 && IsLcfromLb) tmp[0]=2;
2007 else if(IsInjected && IsLc==0) tmp[0]=3;
2013 Int_t pdgCand =4122;
2014 Int_t pdgDaughter[3]={-1,-1,-1};
2015 pdgDaughter[0]=2212;
2018 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
2020 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(labDp);
2021 ptLcMC = motherPart->Pt();
2025 tmp[3]=part->PtProng(0);
2026 tmp[4]=part->PtProng(1);
2027 tmp[5]=part->PtProng(2);
2032 for(
Int_t i=0;i<3;i++) {
2033 AliAODTrack *daugh=(AliAODTrack*)part->GetDaughter(i);
2034 Int_t daughLab= daugh->GetLabel();
2035 if(daughLab<0)
continue;
2037 AliAODMCParticle* pdaugh =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(daughLab));
2039 MCpt[i] = pdaugh->Pt();
2046 tmp[10]=isTOFpid[1];
2047 tmp[11]=isTOFpid[2];
2053 tmp[12]=selectionCand;
2054 tmp[13]=selectionPID;
2055 tmp[14]=selectionPIDprob;
2056 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