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 */
9 //*************************************************************************
10 // Class AliAnalysisTaskSEDplus
11 // AliAnalysisTaskSE for the D+ candidates Invariant Mass Histogram and
12 //comparison of heavy-flavour decay candidates
13 // to MC truth (kinematics stored in the AOD)
14 // Renu Bala, bala@to.infn.it
15 // F. Prino, prino@to.infn.it
16 // G. Ortona, ortona@to.infn.it
17 //*************************************************************************
26 #include "AliRDHFCutsDplustoKpipi.h"
27 #include "AliAnalysisTaskSE.h"
28 #include "AliAnalysisVertexingHF.h"
29 #include "AliNormalizationCounter.h"
31 class AliAnalysisTaskSEDplus : public AliAnalysisTaskSE
35 AliAnalysisTaskSEDplus();
36 AliAnalysisTaskSEDplus(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts,AliRDHFCutsDplustoKpipi* productioncuts,Bool_t fillNtuple=kFALSE);
37 virtual ~AliAnalysisTaskSEDplus();
39 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
40 void SetDoLikeSign(Int_t dols=0){fDoLS=dols;}
41 void SetUseStrangeness(Bool_t uses=kTRUE){fUseStrangeness=uses;}
42 void SetMassLimits(Float_t range);
43 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
44 void SetPtBinLimit(Int_t n, Float_t *limitarray);
45 void SetBinWidth(Float_t w);
46 void SetUseBit(Bool_t dols=kTRUE){fUseBit=dols;}
48 Float_t GetUpperMassLimit(){return fUpmasslimit;}
49 Float_t GetLowerMassLimit(){return fLowmasslimit;}
50 Int_t GetNBinsPt(){return fNPtBins;}
51 Double_t GetPtBinLimit(Int_t ibin);
52 Float_t GetBinWidth(){return fBinWidth;}
53 Int_t GetNBinsHistos();
55 void LSAnalysis(TClonesArray *arrayOppositeSign,TClonesArray *arrayLikeSign,AliAODEvent *aod,AliAODVertex *vtx1, Int_t nDplusOS);
57 // Implementation of interface methods
58 virtual void UserCreateOutputObjects();
60 virtual void LocalInit() {Init();}
61 virtual void UserExec(Option_t *option);
62 virtual void Terminate(Option_t *option);
66 AliAnalysisTaskSEDplus(const AliAnalysisTaskSEDplus &source);
67 AliAnalysisTaskSEDplus& operator=(const AliAnalysisTaskSEDplus& source);
68 Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
69 Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
70 Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
71 Int_t GetLSHistoIndex(Int_t iPtBin)const { return iPtBin*5;}
75 TList *fOutput; //! list send on output slot 0
76 TH1F *fHistNEvents; //!hist. for No. of events
77 TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC)
78 TH1F *fCosPHist[3*kMaxPtBins]; //!hist. for PointingAngle (LC)
79 TH1F *fDLenHist[3*kMaxPtBins]; //!hist. for Dec Length (LC)
80 TH1F *fSumd02Hist[3*kMaxPtBins]; //!hist. for sum d02 (LC)
81 TH1F *fSigVertHist[3*kMaxPtBins]; //!hist. for sigVert (LC)
82 TH1F *fPtMaxHist[3*kMaxPtBins]; //!hist. for Pt Max (LC)
83 TH1F *fPtKHist[3*kMaxPtBins]; //!hist. for PtK (LC)
84 TH1F *fPtpi1Hist[3*kMaxPtBins]; //!hist. for PtPi1 (LC)
85 TH1F *fPtpi2Hist[3*kMaxPtBins]; //!hist. for PtPi2 (LC)
86 TH1F *fDCAHist[3*kMaxPtBins]; //!hist. for DCA (LC)
87 TH1F *fDLxy[3*kMaxPtBins]; //!hist. for DLxy (LC)
88 TH1F *fDLxyTC[3*kMaxPtBins]; //!hist. for DLxy (TC)
89 TH1F *fCosxy[3*kMaxPtBins]; //!hist. for Cosxy (LC)
90 TH1F *fCosxyTC[3*kMaxPtBins]; //!hist. for Cosxy (TC)
91 TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
92 TH1F *fMassHistTCPlus[3*kMaxPtBins]; //!hist. for D+ inv mass (TC)
93 TH1F *fMassHistTCMinus[3*kMaxPtBins]; //!hist. for D- 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 TH1F *fHistCentrality[3];//!hist. for cent distr (all,sel ev, )
103 TH2F *fPtVsMass; //! hist. of pt vs. mass (prod. cuts)
104 TH2F *fPtVsMassTC; //! hist. of pt vs. mass (analysis cuts)
105 TH2F *fYVsPt; //! hist. of Y vs. Pt (prod. cuts)
106 TH2F *fYVsPtTC; //! hist. of Y vs. Pt (analysis cuts)
107 TH2F *fYVsPtSig; //! hist. of Y vs. Pt (MC, only sig, prod. cuts)
108 TH2F *fYVsPtSigTC; //! hist. of Y vs. Pt (MC, only sig, analysis cuts)
109 TNtuple *fNtupleDplus; //! output ntuple
110 Float_t fUpmasslimit; //upper inv mass limit for histos
111 Float_t fLowmasslimit; //lower inv mass limit for histos
112 Int_t fNPtBins; //Number of Pt Bins
113 Float_t fBinWidth;//width of one bin in output histos
114 TList *fListCuts; //list of cuts
115 AliRDHFCutsDplustoKpipi *fRDCutsProduction; //Production D+ Cuts
116 AliRDHFCutsDplustoKpipi *fRDCutsAnalysis; //Cuts for Analysis
117 AliNormalizationCounter *fCounter;//!Counter for normalization
118 Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins
119 Bool_t fFillNtuple; // flag for filling ntuple
120 Bool_t fReadMC; //flag for access to MC
121 Bool_t fUseStrangeness;//flag to enhance strangeness in MC to fit to data
122 Bool_t fUseBit; //flag to use bitmask
123 Int_t fDoLS; //flag to do LS analysis
125 ClassDef(AliAnalysisTaskSEDplus,12); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates