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),
113 fFuncWeightFONLL5overLHC13d3Lc(0),
114 fFuncWeightFONLL7overLHC11b2Lc(0),
115 fFuncWeightFONLL7overLHC10f7aLc(0),
120 fLowmasslimit(2.086),
124 fKeepLcNotFromQuark(kFALSE),
147 for(Int_t i=0;i<12;i++) {
205 AliAnalysisTaskSE(name),
208 fHistNEventsRejTM(0),
211 fhSelectionBitsSigc(0),
212 fhSelectionBitsSigb(0),
216 fhPIDmassLcPtSigc(0),
217 fhPIDmassLcPtSigb(0),
223 fhProbmassLcPtSig(0),
224 fhProbmassLcPtSigc(0),
225 fhProbmassLcPtSigb(0),
226 fhIsLcResonantGen(0),
227 fhIsLcResonantReco(0),
234 fhInvMassMisIdpKpi(0),
235 fhInvMassMisIdpiKp(0),
236 fhPtMisIdpKpiProb(0),
237 fhPtMisIdpiKpProb(0),
239 fhInvMassMisIdpKpiProb(0),
240 fhInvMassMisIdpiKpProb(0),
242 fFuncWeightPythia(0),
243 fFuncWeightFONLL7overLHC10f6a(0),
244 fFuncWeightFONLL5overLHC13d3(0),
245 fFuncWeightFONLL5overLHC10f6a(0),
246 fFuncWeightFONLL5overLHC13d3Lc(0),
247 fFuncWeightFONLL7overLHC11b2Lc(0),
248 fFuncWeightFONLL7overLHC10f7aLc(0),
253 fLowmasslimit(2.086),
254 fRDCutsAnalysis(lccutsana),
256 fFillNtuple(fillNtuple),
257 fKeepLcNotFromQuark(kFALSE),
279 for(Int_t i=0;i<12;i++) {
335 DefineOutput(1,TList::Class());
336 DefineOutput(2,TList::Class());
337 DefineOutput(3,TH1F::Class());
338 DefineOutput(4,AliNormalizationCounter::Class());
341 DefineOutput(5,TNtuple::Class());
406 if (fDebug > 1) printf(
"AnalysisTaskSELambdac::Init() \n");
424 if (fDebug > 1) printf(
"AnalysisTaskSELambdac::UserCreateOutputObjects() \n");
429 fOutput->SetName(
"OutputHistos");
431 TString hisname,histitle;
434 fhSelectBit =
new TH1F(
"hSelectBit",
"hSelectBit",5,-0.5,4.5);
436 fhSelectBit->GetXaxis()->SetBinLabel(3,
"SelectionMap");
442 fHistNEvents =
new TH1F(
"fHistNEvents",
"Number of processed events; ; Events",3,-0.5,2.5);
444 fHistNEvents->GetXaxis()->SetBinLabel(3,
"N events (after selection)");
474 fhIsLcResonantGen =
new TH1F(
"hIsLcResonantGen",
"IsLcResonant flag gen",6,-1.5,4.5);
475 fhIsLcResonantReco =
new TH1F(
"hIsLcResonantReco",
"IsLcResonant flag reco",6,-1.5,4.5);
476 fhIsLcGen =
new TH1F(
"hIsLcGen",
"IsLc flag gen",4,-1.5,2.5);
477 fhIsLcReco =
new TH1F(
"hIsLcReco",
"IsLc flag reco",4,-1.5,2.5);
483 fhRecoPDGmom =
new TH1F(
"hRecoPDGmom",
"pdg of mother reco. MatchToMCLambdac",7,-0.5,6.5);
486 fhSetIsLc =
new TH1F(
"hSetIsLc",
"Check candidates before/after rec. set is Lc",2,-0.5,1.5);
489 fhSelectionBits =
new TH2F(
"hSelectionBits",
"Reconstruction + selection bit",13,-0.5,12.5,150,0,15);
506 fhSelectionBitsSigc =
new TH2F(
"hSelectionBitsSigc",
"Reconstruction + selection bit from c",13,-0.5,12.5,150,0,15);
523 fhSelectionBitsSigb =
new TH2F(
"hSelectionBitsSigb",
"Reconstruction + selection bit from b",13,-0.5,13.5,150,0,15);
542 TString stepnames[12] = {
"GeneratedLimAcc",
"GeneratedAll",
"Generated",
"GeneratedAcc",
"Reco3Prong",
"LcBit",
"IsSelectedTracks",
"IsInFidAcc",
"PtRange",
"IsSelectedCandidate",
"IsSelectedPID",
"IsSelectedNtuple"};
543 for(Int_t i=0;i<12;i++) {
545 hisname.Form(
"hNBkgNI%i",i);
546 histitle.Form(
"N Bkg not injected %s",stepnames[i].
Data());
547 fhNBkgNI[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
548 hisname.Form(
"hNLc%i",i);
549 histitle.Form(
"N Lc %s",stepnames[i].
Data());
550 fhNLc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
551 hisname.Form(
"hNLcc%i",i);
552 histitle.Form(
"N Lc from c %s",stepnames[i].
Data());
553 fhNLcc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
554 hisname.Form(
"hNLcNonRc%i",i);
555 histitle.Form(
"N Lc non resonant from c %s",stepnames[i].
Data());
556 fhNLcNonRc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
557 hisname.Form(
"hNLcL1520c%i",i);
558 histitle.Form(
"N Lc -> L(1520) + p from c %s",stepnames[i].
Data());
559 fhNLcL1520c[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
560 hisname.Form(
"hNLcKstarc%i",i);
561 histitle.Form(
"N Lc -> K* + pi from c %s",stepnames[i].
Data());
562 fhNLcKstarc[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
563 hisname.Form(
"hNLcDeltac%i",i);
564 histitle.Form(
"N Lc -> Delta + K from c %s",stepnames[i].
Data());
565 fhNLcDeltac[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
566 hisname.Form(
"hNLcb%i",i);
567 histitle.Form(
"N Lc from b %s",stepnames[i].
Data());
568 fhNLcb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
569 hisname.Form(
"hNLcNonRb%i",i);
570 histitle.Form(
"N Lc non resonant from b %s",stepnames[i].
Data());
571 fhNLcNonRb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
572 hisname.Form(
"hNLcL1520b%i",i);
573 histitle.Form(
"N Lc -> L(1520) + p from b %s",stepnames[i].
Data());
574 fhNLcL1520b[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
575 hisname.Form(
"hNLcKstarb%i",i);
576 histitle.Form(
"N Lc -> K* + pi from b %s",stepnames[i].
Data());
577 fhNLcKstarb[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
578 hisname.Form(
"hNLcDeltab%i",i);
579 histitle.Form(
"N Lc -> Delta + K from b %s",stepnames[i].
Data());
580 fhNLcDeltab[i] =
new TH1F(hisname.Data(),histitle.Data(),100,0,20);
595 hisname.Form(
"hPtEtaBkgNI%i",i);
596 histitle.Form(
"Pt vs #eta Bkg not injected %s",stepnames[i].
Data());
597 fhPtEtaBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
598 hisname.Form(
"hPtEtaLc%i",i);
599 histitle.Form(
"Pt vs #eta Lc %s",stepnames[i].
Data());
600 fhPtEtaLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
601 hisname.Form(
"hPtEtaLcc%i",i);
602 histitle.Form(
"Pt vs #eta Lc from c %s",stepnames[i].
Data());
603 fhPtEtaLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
604 hisname.Form(
"hPtEtaLcNonRc%i",i);
605 histitle.Form(
"Pt vs #eta Lc non resonant from c %s",stepnames[i].
Data());
606 fhPtEtaLcNonRc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
607 hisname.Form(
"hPtEtaLcL1520c%i",i);
608 histitle.Form(
"Pt vs #eta Lc -> L(1520) + p from c %s",stepnames[i].
Data());
609 fhPtEtaLcL1520c[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
610 hisname.Form(
"hPtEtaLcKstarc%i",i);
611 histitle.Form(
"Pt vs #eta Lc -> K* + pi from c %s",stepnames[i].
Data());
612 fhPtEtaLcKstarc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
613 hisname.Form(
"hPtEtaLcDeltac%i",i);
614 histitle.Form(
"Pt vs #eta Lc -> Delta + K from c %s",stepnames[i].
Data());
615 fhPtEtaLcDeltac[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
616 hisname.Form(
"hPtEtaLcb%i",i);
617 histitle.Form(
"Pt vs #eta Lc from b %s",stepnames[i].
Data());
618 fhPtEtaLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
619 hisname.Form(
"hPtEtaLcNonRb%i",i);
620 histitle.Form(
"Pt vs #eta Lc non resonant from b %s",stepnames[i].
Data());
621 fhPtEtaLcNonRb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
622 hisname.Form(
"hPtEtaLcL1520b%i",i);
623 histitle.Form(
"Pt vs #eta Lc -> L(1520) + p from b %s",stepnames[i].
Data());
624 fhPtEtaLcL1520b[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
625 hisname.Form(
"hPtEtaLcKstarb%i",i);
626 histitle.Form(
"Pt vs #eta Lc -> K* + pi from b %s",stepnames[i].
Data());
627 fhPtEtaLcKstarb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
628 hisname.Form(
"hPtEtaLcDeltab%i",i);
629 histitle.Form(
"Pt vs #eta Lc -> Delta + K from b %s",stepnames[i].
Data());
630 fhPtEtaLcDeltab[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
645 hisname.Form(
"hPtYBkgNI%i",i);
646 histitle.Form(
"Pt vs Y Bkg not injected %s",stepnames[i].
Data());
647 fhPtYBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
648 hisname.Form(
"hPtYLc%i",i);
649 histitle.Form(
"Pt vs Y Lc %s",stepnames[i].
Data());
650 fhPtYLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
651 hisname.Form(
"hPtYLcc%i",i);
652 histitle.Form(
"Pt vs Y Lc from c %s",stepnames[i].
Data());
653 fhPtYLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
654 hisname.Form(
"hPtYLcNonRc%i",i);
655 histitle.Form(
"Pt vs Y Lc non resonant from c %s",stepnames[i].
Data());
656 fhPtYLcNonRc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
657 hisname.Form(
"hPtYLcL1520c%i",i);
658 histitle.Form(
"Pt vs Y Lc -> L(1520) + p from c %s",stepnames[i].
Data());
659 fhPtYLcL1520c[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
660 hisname.Form(
"hPtYLcKstarc%i",i);
661 histitle.Form(
"Pt vs Y Lc -> K* + pi from c %s",stepnames[i].
Data());
662 fhPtYLcKstarc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
663 hisname.Form(
"hPtYLcDeltac%i",i);
664 histitle.Form(
"Pt vs Y Lc -> Delta + K from c %s",stepnames[i].
Data());
665 fhPtYLcDeltac[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
666 hisname.Form(
"hPtYLcb%i",i);
667 histitle.Form(
"Pt vs Y Lc from b %s",stepnames[i].
Data());
668 fhPtYLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
669 hisname.Form(
"hPtYLcNonRb%i",i);
670 histitle.Form(
"Pt vs Y Lc non resonant from b %s",stepnames[i].
Data());
671 fhPtYLcNonRb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
672 hisname.Form(
"hPtYLcL1520b%i",i);
673 histitle.Form(
"Pt vs Y Lc -> L(1520) + p from b %s",stepnames[i].
Data());
674 fhPtYLcL1520b[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
675 hisname.Form(
"hPtYLcKstarb%i",i);
676 histitle.Form(
"Pt vs Y Lc -> K* + pi from b %s",stepnames[i].
Data());
677 fhPtYLcKstarb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
678 hisname.Form(
"hPtYLcDeltab%i",i);
679 histitle.Form(
"Pt vs Y Lc -> Delta + K from b %s",stepnames[i].
Data());
680 fhPtYLcDeltab[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,200,-10,10);
695 hisname.Form(
"hPtPhiBkgNI%i",i);
696 histitle.Form(
"Pt vs #phi Bkg not injected %s",stepnames[i].
Data());
697 fhPtPhiBkgNI[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
698 hisname.Form(
"hPtPhiLc%i",i);
699 histitle.Form(
"Pt vs #phi Lc %s",stepnames[i].
Data());
700 fhPtPhiLc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
701 hisname.Form(
"hPtPhiLcc%i",i);
702 histitle.Form(
"Pt vs #phi Lc from c %s",stepnames[i].
Data());
703 fhPtPhiLcc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
704 hisname.Form(
"hPtPhiLcNonRc%i",i);
705 histitle.Form(
"Pt vs #phi Lc non resonant from c %s",stepnames[i].
Data());
706 fhPtPhiLcNonRc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
707 hisname.Form(
"hPtPhiLcL1520c%i",i);
708 histitle.Form(
"Pt vs #phi Lc -> L(1520) + p from c %s",stepnames[i].
Data());
709 fhPtPhiLcL1520c[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
710 hisname.Form(
"hPtPhiLcKstarc%i",i);
711 histitle.Form(
"Pt vs #phi Lc -> K* + pi from c %s",stepnames[i].
Data());
712 fhPtPhiLcKstarc[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
713 hisname.Form(
"hPtPhiLcDeltac%i",i);
714 histitle.Form(
"Pt vs #phi Lc -> Delta + K from c %s",stepnames[i].
Data());
715 fhPtPhiLcDeltac[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
716 hisname.Form(
"hPtPhiLcb%i",i);
717 histitle.Form(
"Pt vs #phi Lc from b %s",stepnames[i].
Data());
718 fhPtPhiLcb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
719 hisname.Form(
"hPtPhiLcNonRb%i",i);
720 histitle.Form(
"Pt vs #phi Lc non resonant from b %s",stepnames[i].
Data());
721 fhPtPhiLcNonRb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
722 hisname.Form(
"hPtPhiLcL1520b%i",i);
723 histitle.Form(
"Pt vs #phi Lc -> L(1520) + p from b %s",stepnames[i].
Data());
724 fhPtPhiLcL1520b[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
725 hisname.Form(
"hPtPhiLcKstarb%i",i);
726 histitle.Form(
"Pt vs #phi Lc -> K* + pi from b %s",stepnames[i].
Data());
727 fhPtPhiLcKstarb[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
728 hisname.Form(
"hPtPhiLcDeltab%i",i);
729 histitle.Form(
"Pt vs #phi Lc -> Delta + K from b %s",stepnames[i].
Data());
730 fhPtPhiLcDeltab[i] =
new TH2F(hisname.Data(),histitle.Data(),20,0,20,70,0,7);
746 fhPtMisIdpKpi =
new TH1F(
"hMisIdpKpi",
"pKpi id'd as piKp",30,0,30);
747 fhPtMisIdpiKp =
new TH1F(
"hMisIdpiKp",
"piKp id'd as pKpi",30,0,30);
748 fhPtCorrId =
new TH1F(
"hCorrId",
"Correctly id'd pKpi",30,0,30);
757 fhPtMisIdpKpiProb =
new TH1F(
"hMisIdpKpiProb",
"pKpi id'd as piKp, most prob. PID",30,0,30);
758 fhPtMisIdpiKpProb =
new TH1F(
"hMisIdpiKpProb",
"piKp id'd as pKpi, most prob. PID",30,0,30);
759 fhPtCorrIdProb =
new TH1F(
"hCorrIdProb",
"Correctly id'd pKpi, most prob. PID",30,0,30);
771 fFuncWeightPythia=
new TF1(
"funcWeightPythia",
"1./(30. *[0]*x/TMath::Power(1.+(TMath::Power((x/[1]),[3])),[2]))",0.15,30);
776 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.);
777 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);
781 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.);
782 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);
786 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.);
787 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);
791 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.);
792 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);
796 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.);
797 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);
801 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.);
802 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);
818 fNentries=
new TH1F(
"fNentries",
"n Events/Candidates QA", 16,0.5,16.5);
821 fNentries->GetXaxis()->SetBinLabel(1,
"nEventsRejTM");
822 fNentries->GetXaxis()->SetBinLabel(2,
"nEventsNoVtx");
823 fNentries->GetXaxis()->SetBinLabel(3,
"nEventsRejCutPileup");
824 fNentries->GetXaxis()->SetBinLabel(4,
"nLcGen");
825 fNentries->GetXaxis()->SetBinLabel(5,
"nLcGenFidAcc");
826 fNentries->GetXaxis()->SetBinLabel(6,
"nCandReco3Prong");
827 fNentries->GetXaxis()->SetBinLabel(7,
"nCandLcBit");
828 fNentries->GetXaxis()->SetBinLabel(8,
"nCandIsSelTracks");
829 fNentries->GetXaxis()->SetBinLabel(9,
"nCandIsInFidAcc");
830 fNentries->GetXaxis()->SetBinLabel(10,
"ptbin=-1");
831 fNentries->GetXaxis()->SetBinLabel(11,
"nCandIsSelCand");
832 fNentries->GetXaxis()->SetBinLabel(12,
"PID=0");
833 fNentries->GetXaxis()->SetBinLabel(13,
"PID=1");
834 fNentries->GetXaxis()->SetBinLabel(14,
"PID=2");
835 fNentries->GetXaxis()->SetBinLabel(15,
"PID=3");
836 fNentries->GetXaxis()->SetBinLabel(16,
"nLcSelected");
837 fNentries->GetXaxis()->SetNdivisions(1,kFALSE);
839 AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager();
840 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
856 TString normName=
"NormalizationCounter";
857 AliAnalysisDataContainer *cont = GetOutputSlot(4)->GetContainer();
858 if(cont)normName=(TString)cont->GetName();
864 TString ntName=
"fNtupleLambdac";
865 AliAnalysisDataContainer *contnt = GetOutputSlot(5)->GetContainer();
866 if(contnt)ntName=(TString)contnt->GetName();
867 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");
869 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");
871 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");
873 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:InvMasspK:InvMassKpi:InvMassppi:InvMassKp:InvMasspiK:InvMasspip");
874 else AliFatal(
"Invalid fill ntuple argument");
888 AliAODEvent *aod =
dynamic_cast<AliAODEvent*
> (InputEvent());
894 TClonesArray *array3Prong = 0;
895 TClonesArray *arrayLikeSign =0;
896 if(!aod && AODEvent() && IsStandardAOD()) {
899 aod =
dynamic_cast<AliAODEvent*
> (AODEvent());
902 AliAODHandler* aodHandler = (AliAODHandler*)
903 ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
904 if(aodHandler->GetExtensions()) {
905 AliAODExtension *ext = (AliAODExtension*)aodHandler->GetExtensions()->FindObject(
"AliAOD.VertexingHF.root");
906 AliAODEvent *aodFromExt = ext->GetAOD();
907 array3Prong=(TClonesArray*)aodFromExt->GetList()->FindObject(
"Charm3Prong");
908 arrayLikeSign=(TClonesArray*)aodFromExt->GetList()->FindObject(
"LikeSign3Prong");
911 array3Prong=(TClonesArray*)aod->GetList()->FindObject(
"Charm3Prong");
912 arrayLikeSign=(TClonesArray*)aod->GetList()->FindObject(
"LikeSign3Prong");
917 TClonesArray *arrayMC=0;
918 AliAODMCHeader *mcHeader=0;
923 arrayMC = (TClonesArray*)aod->GetList()->FindObject(AliAODMCParticle::StdBranchName());
925 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: MC particles branch not found!\n");
931 mcHeader = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
933 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: MC header branch not found!\n");
947 if(!array3Prong || !aod) {
948 AliError(
"AliAnalysisTaskSELambdacTMVA::UserExec: Charm3Prong branch not found!\n");
952 AliDebug(2,
"AliAnalysisTaskSELambdacTMVA::UserExec: LikeSign3Prong branch not found!\n");
957 Int_t runnumber = aod->GetRunNumber();
958 if (aod->GetTriggerMask() == 0 && (runnumber >= 195344 && runnumber <= 195677)){
959 Int_t nentriesTM = arrayMC->GetEntriesFast();
960 AliDebug(2,Form(
"Event rejected because of null trigger mask, n entries = %i",nentriesTM));
967 AliAODVertex *vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
968 if(!vtx1 || TMath::Abs(aod->GetMagneticField())<0.001) {
973 TString trigclass=aod->GetFiredTriggerClasses();
984 Int_t n3Prong = array3Prong->GetEntriesFast();
985 Int_t nSelectedloose[1]={0};
986 Int_t nSelectedtight[1]={0};
990 Bool_t isInFidAcc = kFALSE;
991 Bool_t isInAcc = kFALSE;
994 Double_t zPrimVertex = vtx1 ->GetZ();
995 Double_t zMCVertex = mcHeader->GetVtxZ();
999 for (Int_t iPart=0; iPart<arrayMC->GetEntriesFast(); iPart++) {
1002 AliAODMCParticle* mcPart =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(iPart));
1004 AliError(
"Failed casting particle from MC array!, Skipping particle");
1009 if(
fIsLc==0)
continue;
1017 if(!
fIsHijing) imother=mcPart->GetMother();
1019 AliAODMCParticle* mcPartMother =
dynamic_cast<AliAODMCParticle*
>(arrayMC->At(imother));
1021 AliError(
"Failed casting mother particle, Skipping particle");
1029 AliDebug(2,
"Lc has p K pi in final state");
1034 if((TMath::Abs(mcPart->Y()) < 0.5)) {
1035 AliDebug(2,
"Lc in limited acceptance");
1043 AliError(
"no p K pi final state");
1055 else AliError(Form(
"Not pKpi or background - should not happen! fIsLcResonant = %i",
fIsLcResonant));
1076 for (Int_t i3Prong = 0; i3Prong < n3Prong; i3Prong++) {
1092 Bool_t unsetvtx=kFALSE;
1120 if(!isSelectedTracks)
continue;
1130 if(ptbin==-1) {
fNentries->Fill(10);
continue;}
1137 if(isSelectedPID==0 )
fNentries->Fill(12);
1138 else if(isSelectedPID==1)
fNentries->Fill(13);
1139 else if(isSelectedPID==2)
fNentries->Fill(14);
1146 if(!selection)
continue;
1177 if (fDebug > 1) printf(
"AnalysisTaskSELambdac: Terminate() \n");
1179 fOutput =
dynamic_cast<TList*
> (GetOutputData(1));
1181 AliError(
"ERROR: fOutput not available\n");
1201 Int_t lambdacLab[3]={0,0,0};
1203 for(Int_t i=0;i<3;i++){
1204 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1205 Int_t lab=daugh->GetLabel();
1207 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab);
1210 Int_t partPdgcode = TMath::Abs(part->GetPdgCode());
1211 if(partPdgcode==211 || partPdgcode==321 || partPdgcode==2212){
1212 Int_t motherLabel=part->GetMother();
1213 if(motherLabel<0)
return 0;
1214 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(motherLabel);
1215 if(!motherPart)
continue;
1216 Int_t motherPdg = TMath::Abs(motherPart->GetPdgCode());
1217 if(motherPdg==4122) {
1218 if(
GetLambdacDaugh(motherPart,arrayMC)){lambdacLab[i]=motherLabel;
continue;}
1220 if(motherPdg==313 || motherPdg==2224 || motherPdg==3124){
1221 Int_t granMotherLabel=motherPart->GetMother();
1222 if(granMotherLabel<0)
return 0;
1223 AliAODMCParticle *granMotherPart = (AliAODMCParticle*)arrayMC->At(granMotherLabel);
1224 if(!granMotherPart)
continue;
1225 Int_t granMotherPdg = TMath::Abs(granMotherPart->GetPdgCode());
1226 if(granMotherPdg ==4122) {
1227 if(
GetLambdacDaugh(granMotherPart,arrayMC)) {lambdacLab[i]=granMotherLabel;
continue;}
1233 if(lambdacLab[0]==lambdacLab[1] && lambdacLab[1]==lambdacLab[2]) {
return lambdacLab[0];}
1248 Int_t numberOfLambdac=0;
1250 if(TMath::Abs(part->GetPdgCode())!=4122)
return 0;
1254 Int_t nDaugh = (Int_t)part->GetNDaughters();
1255 if(nDaugh<2)
return 0;
1256 if(nDaugh>3)
return 0;
1257 AliAODMCParticle* pdaugh1 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(0));
1258 if(!pdaugh1) {
return 0;}
1259 Int_t number1 = TMath::Abs(pdaugh1->GetPdgCode());
1260 AliAODMCParticle* pdaugh2 = (AliAODMCParticle*)arrayMC->At(part->GetDaughter(1));
1261 if(!pdaugh2) {
return 0;}
1262 Int_t number2 = TMath::Abs(pdaugh2->GetPdgCode());
1264 AliDebug(2,
"Is non resonant?");
1266 Int_t thirdDaugh=part->GetDaughter(1)-1;
1267 AliAODMCParticle* pdaugh3 = (AliAODMCParticle*)arrayMC->At(thirdDaugh);
1268 Int_t number3 = TMath::Abs(pdaugh3->GetPdgCode());
1269 if((number1==321 && number2==211 && number3==2212) ||
1270 (number1==211 && number2==321 && number3==2212) ||
1271 (number1==211 && number2==2212 && number3==321) ||
1272 (number1==321 && number2==2212 && number3==211) ||
1273 (number1==2212 && number2==321 && number3==211) ||
1274 (number1==2212 && number2==211 && number3==321)) {
1276 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1277 || TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1278 || TMath::Abs(pdaugh3->Eta()) > 0.9 || pdaugh3->Pt() < 0.1) IsInAcc=kFALSE;
1279 AliDebug(2,
"Lc decays non-resonantly");
1292 if((number1==2212 && number2==313)){
1293 nfiglieK=pdaugh2->GetNDaughters();
1294 if(nfiglieK!=2)
return 0;
1295 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1296 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1297 if(!pdaughK1)
return 0;
1298 if(!pdaughK2)
return 0;
1299 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1301 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1302 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1303 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1304 AliDebug(2,
"Lc decays via K* p");
1309 if((number1==313 && number2==2212)){
1310 nfiglieK=pdaugh1->GetNDaughters();
1311 if(nfiglieK!=2)
return 0;
1312 AliAODMCParticle* pdaughK1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1313 AliAODMCParticle* pdaughK2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1314 if(!pdaughK1)
return 0;
1315 if(!pdaughK2)
return 0;
1316 if((TMath::Abs(pdaughK1->GetPdgCode())==211 && TMath::Abs(pdaughK2->GetPdgCode())==321) || (TMath::Abs(pdaughK1->GetPdgCode())==321 && TMath::Abs(pdaughK2->GetPdgCode())==211)) {
1318 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1319 || TMath::Abs(pdaughK1->Eta()) > 0.9 || pdaughK1->Pt() < 0.1
1320 || TMath::Abs(pdaughK2->Eta()) > 0.9 || pdaughK2->Pt() < 0.1) IsInAcc=kFALSE;
1321 AliDebug(2,
"Lc decays via K* p");
1327 Int_t nfiglieDelta=0;
1328 if(number1==321 && number2==2224){
1329 nfiglieDelta=pdaugh2->GetNDaughters();
1330 if(nfiglieDelta!=2)
return 0;
1331 AliAODMCParticle *pdaughD1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1332 AliAODMCParticle *pdaughD2=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(1));
1333 if(!pdaughD1)
return 0;
1334 if(!pdaughD2)
return 0;
1335 if((TMath::Abs(pdaughD1->GetPdgCode())==211 && TMath::Abs(pdaughD2->GetPdgCode())==2212) || (TMath::Abs(pdaughD1->GetPdgCode())==2212 && TMath::Abs(pdaughD2->GetPdgCode())==211)) {
1337 if( TMath::Abs(pdaugh1->Eta()) > 0.9 || pdaugh1->Pt() < 0.1
1338 || TMath::Abs(pdaughD1->Eta()) > 0.9 || pdaughD1->Pt() < 0.1
1339 || TMath::Abs(pdaughD2->Eta()) > 0.9 || pdaughD2->Pt() < 0.1) IsInAcc=kFALSE;
1340 AliDebug(2,
"Lc decays via Delta++ k");
1344 if(number1==2224 && number2==321){
1345 nfiglieDelta=pdaugh1->GetNDaughters();
1346 if(nfiglieDelta!=2)
return 0;
1347 AliAODMCParticle* pdaughD1 = (AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1348 AliAODMCParticle* pdaughD2 = (AliAODMCParticle*)arrayMC->At(pdaugh1->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(pdaugh2->Eta()) > 0.9 || pdaugh2->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");
1364 if(number1==3124 && number2==211){
1365 nfiglieLa=pdaugh1->GetNDaughters();
1366 if(nfiglieLa!=2)
return 0;
1367 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(0));
1368 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh1->GetDaughter(1));
1369 if(!pdaughL1)
return 0;
1370 if(!pdaughL2)
return 0;
1371 if((TMath::Abs(pdaughL1->GetPdgCode())==321 && TMath::Abs(pdaughL2->GetPdgCode())==2212) || (TMath::Abs(pdaughL1->GetPdgCode())==2212 && TMath::Abs(pdaughL2->GetPdgCode())==321)) {
1373 if( TMath::Abs(pdaugh2->Eta()) > 0.9 || pdaugh2->Pt() < 0.1
1374 || TMath::Abs(pdaughL1->Eta()) > 0.9 || pdaughL1->Pt() < 0.1
1375 || TMath::Abs(pdaughL2->Eta()) > 0.9 || pdaughL2->Pt() < 0.1) IsInAcc=kFALSE;
1376 AliDebug(2,
"Lc decays via Lambda(1520) pi");
1380 if(number1==211 && number2==3124){
1381 nfiglieLa=pdaugh2->GetNDaughters();
1382 if(nfiglieLa!=2)
return 0;
1383 AliAODMCParticle *pdaughL1=(AliAODMCParticle*)arrayMC->At(pdaugh2->GetDaughter(0));
1384 AliAODMCParticle *pdaughL2=(AliAODMCParticle*)arrayMC->At(pdaugh2->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(pdaugh1->Eta()) > 0.9 || pdaugh1->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");
1398 if(numberOfLambdac>0) {
return -100; AliDebug(2,
"Lc decays via one of 4 resonances!");}
1412 if(TMath::Abs(mcPart->GetPdgCode())==4122) {
1413 AliDebug(2,
"Found Lc! now check mother");
1418 AliDebug(2,
"Lc comes from b");
1421 else if(pdgMom==4) {
1435 TClonesArray *arrayMC) {
1448 Int_t pdgCand =4122;
1449 Int_t pdgDaughter[3]={-1,-1,-1};
1450 pdgDaughter[0]=2212;
1454 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1456 AliAODMCParticle *partDp = (AliAODMCParticle*)arrayMC->At(labDp);
1459 if(pdgMom == 4)
fIsLc=1;
1460 else if(pdgMom == 5)
fIsLc=2;
1462 Bool_t dummy = kTRUE;
1473 Bool_t IsInjected = 0;
1476 Bool_t ispKpiMC = 0;
1477 Bool_t ispiKpMC = 0;
1482 AliAODMCHeader *mcHeader2 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1488 fhMCmassLcPtSig->Fill(d->Pt(),ispKpiMC ? invMassLcpKpi : invMassLcpiKp);
1497 else if(selection==2){
1502 else if(selection==3){
1515 if(selectionProb==1) {
1520 else if(selectionProb==2) {
1527 if(ispKpiMC && selection==2){
1531 else if(ispiKpMC && selection==1){
1537 if(ispKpiMC && selectionProb==2){
1541 else if(ispiKpMC && selectionProb==1){
1557 else if(selection==2){
1560 else if(selection==3){
1565 if(selectionProb==1)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpKpi);
1566 else if(selectionProb==2)
fhProbmassLcPt->Fill(d->Pt(),invMassLcpiKp);
1573 TClonesArray *arrayMC, Int_t selection)
1581 Bool_t IsInjected = 0;
1583 Bool_t IsLcfromLb = 0;
1586 AliAODMCHeader *mcHeader3 = (AliAODMCHeader*)aod->GetList()->FindObject(AliAODMCHeader::StdBranchName());
1590 if(
fIsLc==2) IsLcfromLb=kTRUE;
1591 if(
fReadMC && IsInjected && !IsLc &&
fSyst >=1 )
return;
1593 Double_t invMasspKpi=-1.;
1594 Double_t invMasspiKp=-1.;
1603 if(selection==1 || selection==3) invMasspKpi=part->
InvMassLcpKpi();
1614 if(!IsInjected && IsLc==0) tmp[0]=0;
1615 else if(IsLc==1 && !IsLcfromLb) tmp[0]=1;
1616 else if(IsLc==1 && IsLcfromLb) tmp[0]=2;
1617 else if(IsInjected && IsLc==0) tmp[0]=3;
1623 tmp[3]=part->Charge();
1625 tmp[4]=part->PtProng(0);
1626 tmp[5]=part->PtProng(1);
1627 tmp[6]=part->PtProng(2);
1628 Float_t ptLc=part->Pt();
1635 Double_t dcas[3]={0};
1637 tmp[13]=TMath::Max(dcas[0],TMath::Max(dcas[1],dcas[2]));
1647 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1648 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1649 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[18]=prob0[AliPID::kPion];
1667 tmp[19]=prob0[AliPID::kKaon];
1668 tmp[20]=prob0[AliPID::kProton];
1669 tmp[21]=prob1[AliPID::kPion];
1670 tmp[22]=prob1[AliPID::kKaon];
1671 tmp[23]=prob1[AliPID::kProton];
1672 tmp[24]=prob2[AliPID::kPion];
1673 tmp[25]=prob2[AliPID::kKaon];
1674 tmp[26]=prob2[AliPID::kProton];
1678 for(Int_t iprob=18;iprob<=26;iprob++) {
1683 Double_t d00 = part->Getd0Prong(0);
1684 Double_t d01 = part->Getd0Prong(1);
1685 Double_t d02 = part->Getd0Prong(2);
1692 tmp[30]=d00*d00 + d01*d01 + d02*d02;
1702 Double_t ns0=dd0/edd0;
1703 Double_t ns1=dd1/edd1;
1704 Double_t ns2=dd2/edd2;
1714 Int_t runNumber=aod->GetRunNumber();
1715 tmp[41]=(Float_t)runNumber;
1720 Double_t weightPythia=-1,weight7LHC10f6a=-1,weight5LHC10f6a=-1,weight5LHC13d3=-1;
1722 Double_t weight7LHC10f7aLc=-1,weight7LHC11b2Lc=-1,weight5LHC13d3Lc=-1;
1726 Int_t pdgCand =4122;
1727 Int_t pdgDaughter[3]={-1,-1,-1};
1728 pdgDaughter[0]=2212;
1731 labDp = part->MatchToMC(pdgCand,arrayMC,3,pdgDaughter);
1733 AliAODMCParticle *motherPart = (AliAODMCParticle*)arrayMC->At(labDp);
1734 ptLcMC = motherPart->Pt();
1745 tmp[43]=weightPythia;
1746 tmp[44]=weight7LHC10f6a;
1747 tmp[45]=weight5LHC10f6a;
1748 tmp[46]=weight5LHC13d3;
1749 tmp[47]=weight5LHC13d3Lc;
1750 tmp[48]=weight7LHC11b2Lc;
1751 tmp[49]=weight7LHC10f7aLc;
1753 tmp[50]=part->InvMass2Prongs(1,0,321,2212);
1754 tmp[51]=part->InvMass2Prongs(2,1,211,321);
1755 tmp[52]=part->InvMass2Prongs(2,0,211,2212);
1756 tmp[53]=part->InvMass2Prongs(1,2,321,2212);
1757 tmp[54]=part->InvMass2Prongs(0,1,211,321);
1758 tmp[55]=part->InvMass2Prongs(0,2,211,2212);
1863 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1864 for(Int_t i=0;i<3;i++){
1865 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1866 lab[i]=daugh->GetLabel();
1867 if(lab[i]<0)
return kFALSE;
1868 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1869 if(!part)
return kFALSE;
1870 pdgs[i]=TMath::Abs(part->GetPdgCode());
1873 if(pdgs[0]==2212 && pdgs[1]==321 && pdgs[2]==211)
return kTRUE;
1884 Int_t lab[3]={0,0,0},pdgs[3]={0,0,0};
1885 for(Int_t i=0;i<3;i++){
1886 AliAODTrack *daugh=(AliAODTrack*)d->GetDaughter(i);
1887 lab[i]=daugh->GetLabel();
1888 if(lab[i]<0)
return kFALSE;
1889 AliAODMCParticle *part= (AliAODMCParticle*)arrayMC->At(lab[i]);
1890 if(!part)
return kFALSE;
1891 pdgs[i]=TMath::Abs(part->GetPdgCode());
1894 if(pdgs[2]==2212 && pdgs[1]==321 && pdgs[0]==211) {
return kTRUE;}
1916 Int_t selection = 0;
1919 AliVTrack *track0=
dynamic_cast<AliVTrack*
>(part->GetDaughter(0));
1920 AliVTrack *track1=
dynamic_cast<AliVTrack*
>(part->GetDaughter(1));
1921 AliVTrack *track2=
dynamic_cast<AliVTrack*
>(part->GetDaughter(2));
1923 Double_t prob0[AliPID::kSPECIES];
1924 Double_t prob1[AliPID::kSPECIES];
1925 Double_t prob2[AliPID::kSPECIES];
1927 if (!track0 || !track1 || !track2) {
1928 AliError(
"AliVTrack missing");
1934 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
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
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)
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
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
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