1 #ifndef ALIANALYSISTASKSEDPLUSCORRELATIONS_H
2 #define ALIANALYSISTASKSEDPLUSCORRELATIONS_H
4 /* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 //*************************************************************************
10 // Class AliAnalysisTaskSEDplusCorrelations
13 // Sadhana Dash (correlation)
14 //*************************************************************************
22 #include <THnSparse.h>
25 #include "AliRDHFCutsDplustoKpipi.h"
26 #include "AliHFAssociatedTrackCuts.h"
27 #include "AliAnalysisTaskSE.h"
28 #include "AliAnalysisVertexingHF.h"
29 #include "AliEventPoolManager.h"
30 #include "AliNormalizationCounter.h"
31 #include "AliAODMCHeader.h"
32 #include "AliAODMCParticle.h"
33 #include "AliHFCorrelator.h"
37 class AliAODMCParticle;
41 class AliEventPoolManager;
46 class AliAnalysisTaskSEDplusCorrelations : public AliAnalysisTaskSE
50 AliAnalysisTaskSEDplusCorrelations();
51 AliAnalysisTaskSEDplusCorrelations(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts, AliHFAssociatedTrackCuts* assotrcuts);
52 virtual ~AliAnalysisTaskSEDplusCorrelations();
54 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
55 void SetEventMix(Bool_t mixing){fMixing=mixing;}
57 // void SetUseStrangeness(Bool_t uses=kTRUE){fUseStrangeness=uses;}
58 void SetMassLimits(Float_t range);
59 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
60 void SetBinWidth(Float_t w);
61 void SetUseBit(Bool_t dols=kTRUE){fUseBit=dols;}
62 void SetCorrelator(Int_t l) {fSelect = l;} // select 1 for hadrons, 2 for Kaons, 3 for Kzeros
63 void SetUseDisplacement(Int_t m) {fDisplacement=m;} // select 0 for no displ, 1 for abs displ, 2 for d0/sigma_d0
64 void SetSystem(Bool_t system){fSystem=system;} // select between pp (kFALSE) or PbPb (kTRUE)
67 void FillCorrelations(AliAODRecoDecayHF3Prong* d, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t sel) const;
68 void FillMCCorrelations(AliAODRecoDecayHF3Prong* d, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Bool_t* mcSource,Int_t sel) const;
74 Float_t GetUpperMassLimit(){return fUpmasslimit;}
75 Float_t GetLowerMassLimit(){return fLowmasslimit;}
76 Int_t GetNBinsPt(){return fNPtBins;}
77 Float_t GetBinWidth(){return fBinWidth;}
78 Int_t GetNBinsHistos();
80 // Implementation of interface methods
81 virtual void UserCreateOutputObjects();
83 virtual void LocalInit() {Init();}
84 virtual void UserExec(Option_t *option);
85 virtual void Terminate(Option_t *option);
89 AliAnalysisTaskSEDplusCorrelations(const AliAnalysisTaskSEDplusCorrelations &source);
90 AliAnalysisTaskSEDplusCorrelations& operator=(const AliAnalysisTaskSEDplusCorrelations& source);
92 // AliEventPoolManager* fPoolMgr; //! event pool manager
93 // TObject* fHandler; //! Analysis Handler
94 //AliHFCorrelator * fCorrelator; // object for correlations
96 Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
97 Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
98 Int_t GetBackgroundHistoIndex(Int_t iPtBin) const { return iPtBin*3+2;}
99 Float_t GetStrangenessWeights(const AliAODRecoDecayHF3Prong* d, TClonesArray* arrayMC, Float_t factor[3]) const;
100 Float_t GetTrueImpactParameter(AliAODMCHeader *mcHeader, TClonesArray* arrayMC, AliAODMCParticle *partD0) const ;
101 enum {kMaxPtBins=20};
103 TList *fOutput; //! list send on output slot 0
104 // TObject* fHandler; //! Analysis Handler
105 //AliEventPoolManager* fPoolMgr; //! event pool manager
106 AliHFCorrelator* fCorrelator; // object for correlations
107 Int_t fSelect; // select what to correlate with a D* 1-chargedtracks,2-chargedkaons,3-k0s
108 Int_t fDisplacement; // set 0 for no displacement cut, 1 for absolute d0, 2 for d0/sigma_d0
109 TH1F *fHistNEvents; //!hist. for No. of events
110 TH1F *fMCSources; //!hist. for No. of events
111 TH1F *fK0Origin; //!hist. for No. of events
112 TH1F *fKaonOrigin; //!hist. for No. of events
113 TH2F *fInvMassK0S; //!hist. for D- inv mass (TC)
114 TH2F *fEventMix; //!hist. for event mixing
115 TH2F *fMassVsdPhiHistHad[3*kMaxPtBins]; //!hist. for inv mass (LC)
116 TH3D *fMassVsdEtaHistHad[3*kMaxPtBins]; //!hist. for inv mass (LC)
117 TH2F *fMassVsdPhiHistKaon[3*kMaxPtBins]; //!hist. for inv mass (LC)
118 TH3D *fMassVsdEtaHistKaon[3*kMaxPtBins]; //!hist. for inv mass (LC)
119 TH2F *fMassVsdPhiHistKshort[3*kMaxPtBins]; //!hist. for inv mass (LC)
120 TH3D *fMassVsdEtaHistKshort[3*kMaxPtBins]; //!hist. for inv mass (LC)
121 TH2F *fMassVsdPhiHistLeadHad[3*kMaxPtBins]; //!hist. for inv mass (LC)
122 TH3D *fMassVsdEtaHistLeadHad[3*kMaxPtBins]; //!hist. for inv mass (LC)
123 TH1F *fMassHistK0S[3*kMaxPtBins]; //!hist. for inv mass (LC)
126 TH1F *fLeadPt[3*kMaxPtBins]; //!hist. for D- inv mass (TC)
127 TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC)
128 TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
129 TH1F *fMassHistTCPlus[3*kMaxPtBins]; //!hist. for D+ inv mass (TC)
130 TH1F *fMassHistTCMinus[3*kMaxPtBins]; //!hist. for D- inv mass (TC)
131 // TH2F *fInvMassK0S; //!hist. for D- inv mass (TC)
132 TH2F *fPtVsMass; //! hist. of pt vs. mass (prod. cuts)
133 TH2F *fPtVsMassTC; //! hist. of pt vs. mass (analysis cuts)
134 TH2F *fYVsPt; //! hist. of Y vs. Pt (prod. cuts)
135 TH2F *fYVsPtTC; //! hist. of Y vs. Pt (analysis cuts)
136 TH2F *fYVsPtSig; //! hist. of Y vs. Pt (MC, only sig, prod. cuts)
137 TH2F *fYVsPtSigTC; //! hist. of Y vs. Pt (MC, only sig, analysis cuts)
138 Float_t fUpmasslimit; //upper inv mass limit for histos
139 Float_t fLowmasslimit; //lower inv mass limit for histos
140 Int_t fNPtBins; //Number of Pt Bins
141 Float_t fBinWidth;//width of one bin in output histos
142 TList *fListCuts; //list of cuts
143 TList *fListCutsAsso; //list of cuts
144 AliRDHFCutsDplustoKpipi *fRDCutsAnalysis; //Cuts for Analysis
145 AliHFAssociatedTrackCuts *fCuts;
146 AliNormalizationCounter *fCounter;//!Counter for normalization
147 Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins
148 Bool_t fReadMC; //flag for access to MC
149 // Bool_t fUseStrangeness;//flag to enhance strangeness in MC to fit to data
150 Bool_t fUseBit; // flag to use bitmask
151 Bool_t fMixing; // flag to use bitmask
155 ClassDef(AliAnalysisTaskSEDplusCorrelations,2); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates