1 #ifndef ALIANALYSISTASKLAMBDAC_H
2 #define ALIANALYSISTASKLAMBDAC_H
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 //*************************************************************************
10 // Class AliAnalysisTaskSELambdac
11 // AliAnalysisTaskSE for the Lambdac candidates Invariant Mass Histogram and
12 //comparison of heavy-flavour decay candidates
13 // to MC truth (kinematics stored in the AOD)
15 //*************************************************************************
24 #include "AliAnalysisTaskSE.h"
25 #include "AliAnalysisVertexingHF.h"
26 #include "AliAODMCParticle.h"
27 #include "AliRDHFCutsLctopKpi.h"
28 #include "AliRDHFCuts.h"
29 #include "TClonesArray.h"
31 class AliAnalysisTaskSELambdac : public AliAnalysisTaskSE
35 AliAnalysisTaskSELambdac();
36 AliAnalysisTaskSELambdac(const char *name, Bool_t fillNtuple,AliRDHFCutsLctopKpi *lccutsana, AliRDHFCutsLctopKpi *lccutsprod);
37 virtual ~AliAnalysisTaskSELambdac();
39 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
40 void SetMCPid(){fMCPid=kTRUE;fReadMC=kTRUE;fRealPid=kFALSE;fResPid=kFALSE;return;}
41 void SetRealPid(){fRealPid=kTRUE;fMCPid=kFALSE;fResPid=kFALSE;return;}
42 void SetResonantPid(){fResPid=kTRUE;fRealPid=kFALSE;fMCPid=kFALSE;return;}
43 void SetCutsKF(Float_t cutsKF[10]){for(Int_t i=0;i<10;i++){fCutsKF[i]=cutsKF[i];}return;}
44 void SetUseKF(Bool_t useKF=kTRUE){fUseKF=useKF;}
45 void SetMassLimits(Float_t range);
46 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
47 void SetPtBinLimit(Int_t n, Float_t *limitarray);
49 Float_t GetUpperMassLimit() const {return fUpmasslimit;}
50 Float_t GetLowerMassLimit() const {return fLowmasslimit;}
51 Int_t GetNBinsPt() const {return fNPtBins;}
52 Double_t GetPtBinLimit(Int_t ibin) const ;
53 Bool_t IspiKpMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
54 Bool_t IspKpiMC(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
55 Bool_t IspiKpResonant(AliAODRecoDecayHF3Prong *d,Double_t field) const ;
56 Bool_t IspKpiResonant(AliAODRecoDecayHF3Prong *d,Double_t field) const ;
57 Bool_t VertexingKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const ;
58 Int_t MatchToMCLambdac(AliAODRecoDecayHF3Prong *d,TClonesArray *arrayMC) const ;
59 Bool_t GetLambdacDaugh(AliAODMCParticle *part, TClonesArray *arrayMC) const ;
61 // Implementation of interface methods
62 virtual void UserCreateOutputObjects();
64 virtual void LocalInit() {Init();}
65 virtual void UserExec(Option_t *option);
66 virtual void Terminate(Option_t *option);
70 AliAnalysisTaskSELambdac(const AliAnalysisTaskSELambdac &source);
71 AliAnalysisTaskSELambdac& operator=(const AliAnalysisTaskSELambdac& source);
72 Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
73 Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
74 Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
75 Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
77 Bool_t ReconstructKF(AliAODRecoDecayHF3Prong *d,Int_t *pdgs,Double_t field) const;
81 TList *fOutput; //! list send on output slot 0
82 TH1F *fHistNEvents; //!hist. for No. of events
83 TH1F *fhChi2; //!hist. for No. of events
84 TH1F *fhMassPtGreater3; //!hist. for No. of events
85 TH1F *fhMassPtGreater3TC; //!hist. for No. of events
86 TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC)
87 TH1F* fCosPHist[3*kMaxPtBins]; //!hist. for PointingAngle (LC)
88 TH1F* fDLenHist[3*kMaxPtBins]; //!hist. for Dec Length (LC)
89 TH1F* fSumd02Hist[3*kMaxPtBins]; //!hist. for sum d02 (LC)
90 TH1F* fSigVertHist[3*kMaxPtBins]; //!hist. for sigVert (LC)
91 TH1F* fPtMaxHist[3*kMaxPtBins]; //!hist. for Pt Max (LC)
92 TH1F* fDCAHist[3*kMaxPtBins]; //!hist. for DCA (LC)
93 TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
94 TH1F *fMassHistLS[5*kMaxPtBins];//!hist. for LS inv mass (LC)
95 TH1F *fCosPHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 1 (LC)
96 TH1F *fDLenHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 2 (LC)
97 TH1F *fSumd02HistLS[3*kMaxPtBins];//!hist. for LS cuts variable 3 (LC)
98 TH1F *fSigVertHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 4 (LC)
99 TH1F *fPtMaxHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 5 (LC)
100 TH1F *fDCAHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 6 (LC)
101 TH1F *fMassHistLSTC[5*kMaxPtBins];//!hist. for LS inv mass (TC)
102 TNtuple *fNtupleLambdac; //! output ntuple
103 Float_t fUpmasslimit; //upper inv mass limit for histos
104 Float_t fLowmasslimit; //lower inv mass limit for histos
105 Float_t fCutsKF[10]; //cuts with KF vertexer
106 Int_t fNPtBins; //number of bins in Pt for histograms
107 AliRDHFCutsLctopKpi *fRDCutsAnalysis; //Cuts for Analysis
108 AliRDHFCutsLctopKpi *fRDCutsProduction; //Production Cuts
109 TList *fListCuts; //list of cuts
110 Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins
111 Bool_t fFillNtuple; // flag for filling ntuple
112 Bool_t fReadMC; //flag for access to MC
113 Bool_t fMCPid; //flag for access to MC
114 Bool_t fRealPid; //flag for real PID
115 Bool_t fResPid; //flag for PID with resonant channels
116 Bool_t fUseKF; //flag to cut with KF vertexer
117 AliAnalysisVertexingHF *fVHF; // Vertexer heavy flavour (used to pass the cuts)
119 ClassDef(AliAnalysisTaskSELambdac,3); // AliAnalysisTaskSE for the invariant mass analysis of heavy-flavour decay candidates (Lambdac)