Fix in AliTrackerBase::PropagateTo... routines: length integral was not correctly...
[u/mrichter/AliRoot.git] / PWGUD / dNdPt / AlidNdPtAnalysisPbPb.h
CommitLineData
e2ddd2da 1
2#ifndef AlidNdPtAnalysisPbPb_H
3#define AlidNdPtAnalysisPbPb_H
4
5
6//------------------------------------------------------------------------------
7// AlidNdPtAnalysisPbPb class used for dNdPt analysis.in PbPb collision
8//
9// Author: J.Otwinowski 04/11/2008
68f10917 10// last change: 2011-04-04 by M.Knichel
e2ddd2da 11//------------------------------------------------------------------------------
12
13class iostream;
14
15class TFile;
16class TCint;
17class TProfile;
18class TFolder;
19class TObjArray;
20class TString;
21class THnSparse;
22
23class AliESDtrackCuts;
24class AliVertexerTracks;
25class AliESD;
26class AliESDfriend;
27class AliESDfriendTrack;
28class AlidNdPtHelper;
3e0c3624 29class AliTriggerAnalysis;
e2ddd2da 30
31#include "AlidNdPt.h"
32
33class AlidNdPtAnalysisPbPb : public AlidNdPt {
34public :
35 AlidNdPtAnalysisPbPb();
36 AlidNdPtAnalysisPbPb(Char_t* name, Char_t* title);
37 ~AlidNdPtAnalysisPbPb();
38
39 // Init data members
40 virtual void Init();
41
42 // Process events
43 virtual void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0);
44
45 // Merge output objects (needed by PROOF)
46 virtual Long64_t Merge(TCollection* const list);
47
48 // Analyse output histograms
49 virtual void Analyse();
50
51 // Export objects to folder
52 virtual TFolder *ExportToFolder(TObjArray * const array=0);
53
54 // Get analysis folder
55 TFolder* GetAnalysisFolder() const {return fAnalysisFolder;}
56
57 // Fill control histograms
58 void SetHistogramsOn(const Bool_t histOn=kTRUE) {fHistogramsOn = histOn;}
59 Bool_t IsHistogramsOn() const {return fHistogramsOn;}
60
61 // Create folder for analysed histograms
62 TFolder *CreateFolder(TString folder = "folderdNdPtAnalysis",TString title = "Analysed dNdPt histograms");
68f10917 63
64 // Set binning for Histograms (if not set default binning is used)
fc98fbb5 65 void SetBinsMult(Int_t nbins, Double_t* edges) { fMultNbins = nbins; fBinsMult = CloneArray(nbins+1,edges); }
66 void SetBinsPt(Int_t nbins, Double_t* edges) { fPtNbins = nbins; fBinsPt = CloneArray(nbins+1,edges); }
67 void SetBinsPtCorr(Int_t nbins, Double_t* edges) { fPtCorrNbins = nbins; fBinsPtCorr = CloneArray(nbins+1,edges); }
68 void SetBinsEta(Int_t nbins, Double_t* edges) { fEtaNbins = nbins; fBinsEta = CloneArray(nbins+1,edges); }
69 void SetBinsZv(Int_t nbins, Double_t* edges) { fZvNbins = nbins; fBinsZv= CloneArray(nbins+1,edges); }
70 void SetBinsCentrality(Int_t nbins, Double_t* edges) { fCentralityNbins = nbins; fBinsCentrality = CloneArray(nbins+1,edges); }
e2ddd2da 71
72 // Fill histograms
73ca0831 73 void FillHistograms(AliESDtrack *const esdTrack, AliStack *const stack, AlidNdPtHelper::TrackObject trackObj, Float_t centralityF);
74 void FillHistograms(AliStack *const stack, Int_t label, AlidNdPtHelper::TrackObject trackObj, Float_t centralityF);
75 void FillHistograms(TObjArray *const allChargedTracks,Int_t *const labelsAll,Int_t multAll,Int_t *const labelsAcc,Int_t multAcc,Int_t *const labelsRec,Int_t multRec, Float_t centralityF);
e2ddd2da 76
77 // Getters
78 THnSparseF *GetTrackPtCorrelationMatrix() const {return fTrackPtCorrelationMatrix;}
79 //
80 THnSparseF *GetGenEventMatrix() const {return fGenEventMatrix;}
81 THnSparseF *GetTriggerEventMatrix() const {return fTriggerEventMatrix;}
82 THnSparseF *GetRecEventMatrix() const {return fRecEventMatrix;}
83 //
84 THnSparseF *GetGenTrackEventMatrix() const {return fGenTrackEventMatrix;}
85 THnSparseF *GetTriggerTrackEventMatrix() const {return fTriggerTrackEventMatrix;}
86 THnSparseF *GetRecTrackEventMatrix() const {return fRecTrackEventMatrix;}
87 //
88 THnSparseF *GetGenTrackMatrix() const {return fGenTrackMatrix;}
89 THnSparseF *GetGenPrimTrackMatrix() const {return fGenPrimTrackMatrix;}
90 THnSparseF *GetRecPrimTrackMatrix() const {return fRecPrimTrackMatrix;}
91
92 THnSparseF *GetRecTrackMatrix() const {return fRecTrackMatrix;}
93 THnSparseF *GetRecSecTrackMatrix() const {return fRecSecTrackMatrix;}
94 THnSparseF *GetRecMultTrackMatrix() const {return fRecMultTrackMatrix;}
95 //
96 // control histograms
97 //
98 THnSparseF *GetMCEventHist1() const {return fMCEventHist1;}
99 THnSparseF *GetRecEventHist1() const {return fRecEventHist1;}
100 THnSparseF *GetRecEventHist2() const {return fRecEventHist2;}
101
102
103 THnSparseF *GetRecMCEventHist1() const {return fRecMCEventHist1;}
104 THnSparseF *GetRecMCTrackHist1() const {return fRecMCTrackHist1;}
105
106 THnSparseF *GetRecMCEventHist2() const {return fRecMCEventHist2;}
107
108 THnSparseF *GetMCTrackHist1(Int_t i) const {return fMCTrackHist1[i];}
109 THnSparseF *GetMCPrimTrackHist1(Int_t i) const {return fMCPrimTrackHist1[i];}
110 THnSparseF *GetMCPrimTrackHist2(Int_t i) const {return fMCPrimTrackHist2[i];}
111 THnSparseF *GetMCSecTrackHist1(Int_t i) const {return fMCSecTrackHist1[i];}
112
113 THnSparseF *GetRecTrackHist1(Int_t i) const {return fRecTrackHist1[i];}
51ce74a4 114 THnSparseF *GetRecTrackHist2(Int_t i) const {return fRecTrackHist2[i];}
e2ddd2da 115 THnSparseF *GetRecTrackMultHist1(Int_t i) const {return fRecTrackMultHist1[i];}
116
117
118 THnSparseF *GetMCMultRecTrackHist1() const {return fMCMultRecTrackHist1;}
119
51ce74a4 120 THnSparseF *GetRecTrackHist3() const {return fRecTrackHist3;}
73ca0831 121
122 TString GetCentralityEstimator() const {return fCentralityEstimator; }
123
124 void SetCentralityEstimator(TString centEst="V0M") { fCentralityEstimator = centEst; }
e2ddd2da 125
126private:
127
128 // analysis folder
129 TFolder *fAnalysisFolder; // folder for analysed histograms
130 Bool_t fHistogramsOn; // switch on/off filling of control histograms
131
132 //
133 // correlation matrices (histograms)
134 //
135 // rec. track pt vs true track pt correlation matrix for given eta
73ca0831 136 THnSparseF *fTrackPtCorrelationMatrix; //-> Pt:mcPt:mcEta:centrality
e2ddd2da 137
138 //
139 // event level correction
140 //
141 // all generated
73ca0831 142 THnSparseF *fGenEventMatrix; //-> mcZv:multMB:centrality
e2ddd2da 143
144 // trigger bias corrections (fTriggerEventMatrix / fGenEventMatrix)
73ca0831 145 THnSparseF *fTriggerEventMatrix; //-> mcZv:multMB:centrality
e2ddd2da 146
147 // event vertex rec. eff correction (fRecEventMatrix / fTriggerEventMatrix)
73ca0831 148 THnSparseF *fRecEventMatrix; //-> mcZv:multMB:centrality
e2ddd2da 149
150 // track-event level correction
73ca0831 151 THnSparseF *fGenTrackEventMatrix; //-> mcZv:mcPt:mcEta:centrality
e2ddd2da 152
153 // trigger bias corrections (fTriggerTrackEventMatrix / fGenTrackEventMatrix)
73ca0831 154 THnSparseF *fTriggerTrackEventMatrix; //-> mcZv:mcPt:mcEta:centrality
e2ddd2da 155
156 // event vertex rec. corrections (fRecTrackEventMatrix / fTriggerTrackEventMatrix)
73ca0831 157 THnSparseF *fRecTrackEventMatrix; //-> mcZv:Pt:mcEta:centrality
e2ddd2da 158
159 //
160 // track level correction
161 //
162 // track rec. efficiency correction (fRecPrimTrackMatrix / fGenPrimTrackMatrix)
73ca0831 163 THnSparseF *fGenTrackMatrix; //-> mcZv:mcPt:mcEta:centrality
164 THnSparseF *fGenPrimTrackMatrix; //-> mcZv:mcPt:mcEta:centrality
165 THnSparseF *fRecPrimTrackMatrix; //-> mcZv:mcPt:mcEta:centrality
e2ddd2da 166 // secondary track contamination correction (fRecSecTrackMatrix / fRecTrackMatrix)
73ca0831 167 THnSparseF *fRecTrackMatrix; //-> mcZv:mcPt:mcEta:centrality
168 THnSparseF *fRecSecTrackMatrix; //-> mcZv:mcPt:mcEta:centrality
e2ddd2da 169 // multiple rec. track corrections (fRecMultTrackMatrix / fRecTrackMatrix)
73ca0831 170 THnSparseF *fRecMultTrackMatrix; //-> mcZv:Pt:mcEta:centrality
e2ddd2da 171
172 //
173 // ESD and MC control analysis histograms
174 //
175 // THnSparse event histograms
73ca0831 176 THnSparseF *fMCEventHist1; //-> mcXv:mcYv:mcZv:centrality
177 THnSparseF *fRecEventHist1; //-> Xv:Yv:Zv:centrality
178 THnSparseF *fRecEventHist2; //-> Zv:multMB:mult:centrality
179 THnSparseF *fRecMCEventHist1; //-> Xv-mcXv:Yv-mcYv:Zv-mcZv:centrality
180 THnSparseF *fRecMCEventHist2; //-> Xv-mcXv:Zv-mcZv:mult:centrality
e2ddd2da 181
182 // [0] - after charged track selection, [1] - after acceptance cuts, [2] - after esd track cuts
73ca0831 183 THnSparseF *fMCTrackHist1[AlidNdPtHelper::kCutSteps]; //-> mcPt:mcEta:mcPhi:centrality
184 THnSparseF *fMCPrimTrackHist1[AlidNdPtHelper::kCutSteps]; //-> mcPt:mcEta:pid:mech:mother:centrality
185 THnSparseF *fMCPrimTrackHist2[AlidNdPtHelper::kCutSteps]; //-> pdg:mech:mother:centrality
186 THnSparseF *fMCSecTrackHist1[AlidNdPtHelper::kCutSteps]; //-> mcPt:mcEta:pid:mech:mother:centrality
e2ddd2da 187
73ca0831 188 THnSparseF *fRecTrackHist1[AlidNdPtHelper::kCutSteps]; //-> Pt:Eta:Phi:centrality
189 THnSparseF *fRecTrackHist2[AlidNdPtHelper::kCutSteps]; //-> Zv:Pt:Eta:centrality
190 THnSparseF *fRecTrackMultHist1[AlidNdPtHelper::kCutSteps]; //-> Pt:mult:centrality
191 THnSparseF *fRecMCTrackHist1; //-> mcPt:mcEta:(Pt-mcPt)/mcPt:(Eta-mcEta):centrality
e2ddd2da 192
193 //multple reconstructed tracks
73ca0831 194 THnSparseF *fMCMultRecTrackHist1; //-> mcPt:mcEta:pid:centrality
e2ddd2da 195 // track control histograms
73ca0831 196 THnSparseF *fRecTrackHist3; //-> nclust:chi2:Pt:Eta:Phi:centrality
e2ddd2da 197
3e0c3624 198 AliTriggerAnalysis *fTriggerAnalysis; //! trigger analysis object;
68f10917 199 TString fCentralityEstimator; // use centrality can be "VOM" (default), "FMD", "TRK", "TKL", "CL0", "CL1", "V0MvsFMD", "TKLvsV0M", "ZEMvsZDC"
200
201 //binning for THNsparse
202 Int_t fMultNbins;
203 Int_t fPtNbins;
204 Int_t fPtCorrNbins;
205 Int_t fEtaNbins;
206 Int_t fZvNbins;
207 Int_t fCentralityNbins;
208 Double_t* fBinsMult;
209 Double_t* fBinsPt;
210 Double_t* fBinsPtCorr;
211 Double_t* fBinsEta;
212 Double_t* fBinsZv;
213 Double_t* fBinsCentrality;
214
215 Bool_t fIsInit;
216
3e0c3624 217
e2ddd2da 218 AlidNdPtAnalysisPbPb(const AlidNdPtAnalysisPbPb&); // not implemented
68f10917 219 AlidNdPtAnalysisPbPb& operator=(const AlidNdPtAnalysisPbPb&); // not implemented
e2ddd2da 220
68f10917 221 ClassDef(AlidNdPtAnalysisPbPb,6);
e2ddd2da 222};
223
224#endif