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