Incrementing class version.
[u/mrichter/AliRoot.git] / PWGHF / correlationHF / AliAnalysisTaskSEDplusCorrelations.h
CommitLineData
35151011 1#ifndef ALIANALYSISTASKSEDPLUSCORRELATIONS_H
2#define ALIANALYSISTASKSEDPLUSCORRELATIONS_H
3
4/* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9//*************************************************************************
10// Class AliAnalysisTaskSEDplusCorrelations
11
12// Authors:
13// Sadhana Dash (correlation)
14//*************************************************************************
15
16#include <TROOT.h>
17#include <TSystem.h>
18#include <TNtuple.h>
19#include <TH1F.h>
20#include <TH2F.h>
8d35b368 21#include <TH3D.h>
35151011 22#include <THnSparse.h>
23#include <TArrayD.h>
24
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"
34
35class TParticle ;
36class TClonesArray ;
37class AliAODMCParticle;
38class AliAODEvent;
39class AliVParticle;
40class TObjArray;
41class AliEventPoolManager;
42class AliESDEvent;
43
44
45
46class AliAnalysisTaskSEDplusCorrelations : public AliAnalysisTaskSE
47{
48 public:
49
50 AliAnalysisTaskSEDplusCorrelations();
51 AliAnalysisTaskSEDplusCorrelations(const char *name, AliRDHFCutsDplustoKpipi* analysiscuts, AliHFAssociatedTrackCuts* assotrcuts);
52 virtual ~AliAnalysisTaskSEDplusCorrelations();
53
54 void SetReadMC(Bool_t readMC=kTRUE){fReadMC=readMC;}
55 void SetEventMix(Bool_t mixing){fMixing=mixing;}
56
cb7c2594 57 void CreateCorrelationObjs();
58
59 // standard way used in Dplus task
35151011 60 void SetMassLimits(Float_t range);
61 void SetMassLimits(Float_t lowlimit, Float_t uplimit);
62 void SetBinWidth(Float_t w);
cb7c2594 63
35151011 64 void SetUseBit(Bool_t dols=kTRUE){fUseBit=dols;}
cb7c2594 65
35151011 66 void SetCorrelator(Int_t l) {fSelect = l;} // select 1 for hadrons, 2 for Kaons, 3 for Kzeros
67 void SetUseDisplacement(Int_t m) {fDisplacement=m;} // select 0 for no displ, 1 for abs displ, 2 for d0/sigma_d0
68 void SetSystem(Bool_t system){fSystem=system;} // select between pp (kFALSE) or PbPb (kTRUE)
69
cb7c2594 70 void SetUseReconstruction(Bool_t reco){fReco = reco;}
71
72 void SetTrigEfficiency(Bool_t trigeff = kTRUE) {fTrig = trigeff;}
73
74 void FillCorrelations(Double_t ptTrack,Double_t mass, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t sel, Double_t eweight) const;
75
76 void FillMCTruthCorrelations(Double_t ptTrack, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t mcSource, Int_t origDplus, Int_t sel) const;
77
78 void FillMCRCorrelations(Double_t ptTrack,Double_t mass, Double_t deltaPhi, Double_t deltaEta, Int_t ind, Int_t mcSource, Int_t origDplus,Double_t eweight) const;
79 Bool_t IsDDaughter(AliAODMCParticle* d, AliAODMCParticle* track, TClonesArray* mcArray) const;
35151011 80
cb7c2594 81 Int_t CheckTrackOrigin(TClonesArray* arrayMC, AliAODMCParticle* mcPartCandidate) const ;
35151011 82
cb7c2594 83 Int_t CheckOrigin(TClonesArray* arrayMC, AliAODMCParticle* mcPartCandidate) const ;
35151011 84
85
cb7c2594 86
87
35151011 88
89
90 Float_t GetUpperMassLimit(){return fUpmasslimit;}
91 Float_t GetLowerMassLimit(){return fLowmasslimit;}
92 Int_t GetNBinsPt(){return fNPtBins;}
93 Float_t GetBinWidth(){return fBinWidth;}
94 Int_t GetNBinsHistos();
95
96 // Implementation of interface methods
cb7c2594 97
35151011 98 virtual void UserCreateOutputObjects();
99 virtual void Init();
100 virtual void LocalInit() {Init();}
101 virtual void UserExec(Option_t *option);
102 virtual void Terminate(Option_t *option);
103
104
105 private:
106 AliAnalysisTaskSEDplusCorrelations(const AliAnalysisTaskSEDplusCorrelations &source);
107 AliAnalysisTaskSEDplusCorrelations& operator=(const AliAnalysisTaskSEDplusCorrelations& source);
108
cb7c2594 109
35151011 110
111 Int_t GetHistoIndex(Int_t iPtBin) const { return iPtBin*3;}
cb7c2594 112
35151011 113 Int_t GetSignalHistoIndex(Int_t iPtBin) const { return iPtBin*3+1;}
cb7c2594 114
115
35151011 116 enum {kMaxPtBins=20};
cb7c2594 117
118 //For dplus efficiency
119
35151011 120
121 TList *fOutput; //! list send on output slot 0
cb7c2594 122
35151011 123 AliHFCorrelator* fCorrelator; // object for correlations
cb7c2594 124
125 Int_t fSelect; // select what to correlate with a Dplus 1-chargedtracks,2-chargedkaons,3-k0s
35151011 126 Int_t fDisplacement; // set 0 for no displacement cut, 1 for absolute d0, 2 for d0/sigma_d0
127 TH1F *fHistNEvents; //!hist. for No. of events
35151011 128
cb7c2594 129 Bool_t fTrig; // flag for using trig eff
35151011 130
cb7c2594 131 TH2D *fEventMix; //!hist. for event mixing
132
133 TH1F *fMassHistK0S[3*kMaxPtBins]; //!hist. for inv mass (LC)
134
35151011 135 TH1F *fLeadPt[3*kMaxPtBins]; //!hist. for D- inv mass (TC)
cb7c2594 136
137 TH1F *fPtSig[3*kMaxPtBins]; //!hist. for D- inv mass (TC)
138
35151011 139 TH1F *fMassHist[3*kMaxPtBins]; //!hist. for inv mass (LC)
140 TH1F *fMassHistTC[3*kMaxPtBins]; //!hist. for inv mass (TC)
cb7c2594 141 TH1F *fMassHistOrigC[3*kMaxPtBins]; //!hist. for inv mass (TC)
142 TH1F *fMassHistOrigB[3*kMaxPtBins]; //!hist. for inv mass (TC)
143 TH1F *fMassHistMC[3*kMaxPtBins]; //!hist. for inv mass (TC)
144
145
146
35151011 147 Float_t fUpmasslimit; //upper inv mass limit for histos
148 Float_t fLowmasslimit; //lower inv mass limit for histos
cb7c2594 149
35151011 150 Int_t fNPtBins; //Number of Pt Bins
cb7c2594 151
35151011 152 Float_t fBinWidth;//width of one bin in output histos
cb7c2594 153
35151011 154 TList *fListCuts; //list of cuts
cb7c2594 155
156 //TList *fListCutsAsso; //list of cuts
157
35151011 158 AliRDHFCutsDplustoKpipi *fRDCutsAnalysis; //Cuts for Analysis
cb7c2594 159
35151011 160 AliHFAssociatedTrackCuts *fCuts;
cb7c2594 161
35151011 162 AliNormalizationCounter *fCounter;//!Counter for normalization
cb7c2594 163
35151011 164 Double_t fArrayBinLimits[kMaxPtBins+1]; //limits for the Pt bins
cb7c2594 165
35151011 166 Bool_t fReadMC; //flag for access to MC
167 // Bool_t fUseStrangeness;//flag to enhance strangeness in MC to fit to data
168 Bool_t fUseBit; // flag to use bitmask
169 Bool_t fMixing; // flag to use bitmask
170
171 Bool_t fSystem; //
cb7c2594 172 Bool_t fReco; // use reconstruction or MC truth
173 ClassDef(AliAnalysisTaskSEDplusCorrelations,3); // AliAnalysisTaskSE for the MC association of heavy-flavour decay candidates
35151011 174};
175
176#endif