1 #ifndef ALIANALYSISTASKDPLUS_H
2 #define ALIANALYSISTASKDPLUS_H
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 //*************************************************************************
8 // Class AliAnalysisTaskSEDplus
9 // AliAnalysisTaskSE for the D+ candidates Invariant Mass Histogram and
10 //comparison of heavy-flavour decay candidates
11 // to MC truth (kinematics stored in the AOD)
12 // Renu Bala, bala@to.infn.it
13 //*************************************************************************
21 #include "AliAnalysisTaskSE.h"
22 #include "AliAnalysisVertexingHF.h"
24 class AliAnalysisTaskSEDplus : public AliAnalysisTaskSE
28 AliAnalysisTaskSEDplus();
29 AliAnalysisTaskSEDplus(const char *name, Bool_t fillNtuple=kFALSE);
30 virtual ~AliAnalysisTaskSEDplus();
32 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
33 void SetDoLikeSign(Bool_t dols=kTRUE){fDoLS=dols;}
34 void SetMassLimits(Float_t range);
35 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
36 void SetPtBinLimit(Int_t n, Double_t *limitarray);
38 Float_t GetUpperMassLimit(){return fUpmasslimit;}
39 Float_t GetLowerMassLimit(){return fLowmasslimit;}
40 Int_t GetNBinsPt(){return fNPtBins;}
41 Double_t GetPtBinLimit(Int_t ibin);
43 void LSAnalysis(TClonesArray *arrayOppositeSign,TClonesArray *arrayLikeSign,AliAODEvent *aod,AliAODVertex *vtx1, Int_t nDplusOS);
45 // Implementation of interface methods
46 virtual void UserCreateOutputObjects();
48 virtual void LocalInit() {Init();}
49 virtual void UserExec(Option_t *option);
50 virtual void Terminate(Option_t *option);
54 AliAnalysisTaskSEDplus(const AliAnalysisTaskSEDplus &source);
55 AliAnalysisTaskSEDplus& operator=(const AliAnalysisTaskSEDplus& source);
56 Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
57 Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
58 Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
59 Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
63 TList *fOutput; //! list send on output slot 0
64 TH1F *fHistNEvents; //!hist. for No. of events
65 TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC)
66 TH1F* fCosPHist[3*kMaxPtBins]; //!hist. for PointingAngle (LC)
67 TH1F* fDLenHist[3*kMaxPtBins]; //!hist. for Dec Length (LC)
68 TH1F* fSumd02Hist[3*kMaxPtBins]; //!hist. for sum d02 (LC)
69 TH1F* fSigVertHist[3*kMaxPtBins]; //!hist. for sigVert (LC)
70 TH1F* fPtMaxHist[3*kMaxPtBins]; //!hist. for Pt Max (LC)
71 TH1F* fDCAHist[3*kMaxPtBins]; //!hist. for DCA (LC)
72 TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
73 TH1F *fMassHistLS[5*kMaxPtBins];//!hist. for LS inv mass (LC)
74 TH1F *fCosPHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 1 (LC)
75 TH1F *fDLenHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 2 (LC)
76 TH1F *fSumd02HistLS[3*kMaxPtBins];//!hist. for LS cuts variable 3 (LC)
77 TH1F *fSigVertHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 4 (LC)
78 TH1F *fPtMaxHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 5 (LC)
79 TH1F *fDCAHistLS[3*kMaxPtBins];//!hist. for LS cuts variable 6 (LC)
80 TH1F *fMassHistLSTC[5*kMaxPtBins];//!hist. for LS inv mass (TC)
81 TNtuple *fNtupleDplus; //! output ntuple
82 Float_t fUpmasslimit; //upper inv mass limit for histos
83 Float_t fLowmasslimit; //lower inv mass limit for histos
84 Int_t fNPtBins; //number of bins in Pt for histograms
85 Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins
86 Bool_t fFillNtuple; // flag for filling ntuple
87 Bool_t fReadMC; //flag for access to MC
88 Bool_t fDoLS; //flag to do LS analysis
89 AliAnalysisVertexingHF *fVHF; // Vertexer heavy flavour (used to pass the cuts)
91 ClassDef(AliAnalysisTaskSEDplus,4); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates