new functionality and new class added
[u/mrichter/AliRoot.git] / PWG0 / dNdPt / AlidNdPtAnalysis.h
CommitLineData
00b81913 1#ifndef ALIDNDPTANALYSIS_H
2#define ALIDNDPTANALYSIS_H
0aaa8b91 3
4//------------------------------------------------------------------------------
00b81913 5// AlidNdPtAnalysis class used for dNdPt analysis.
0aaa8b91 6//
0aaa8b91 7// Author: J.Otwinowski 04/11/2008
8//------------------------------------------------------------------------------
9
00b81913 10class iostream;
11
12class TFile;
13class TCint;
0aaa8b91 14class TProfile;
15class TFolder;
16class TObjArray;
17class TString;
00b81913 18class THnSparse;
0aaa8b91 19
20class AliESDtrackCuts;
21class AliVertexerTracks;
22class AliESD;
23class AliESDfriend;
24class AliESDfriendTrack;
bad4ba69 25class AlidNdPtHelper;
26
0aaa8b91 27#include "AlidNdPt.h"
0aaa8b91 28
29class AlidNdPtAnalysis : public AlidNdPt {
30public :
31 AlidNdPtAnalysis();
32 AlidNdPtAnalysis(Char_t* name, Char_t* title);
33 ~AlidNdPtAnalysis();
34
35 // Init data members
36 virtual void Init();
37
38 // Process events
39 virtual void Process(AliESDEvent *const esdEvent=0, AliMCEvent *const mcEvent=0);
40
41 // Merge output objects (needed by PROOF)
00b81913 42 virtual Long64_t Merge(TCollection* const list);
0aaa8b91 43
44 // Analyse output histograms
45 virtual void Analyse();
46
47 // Export objects to folder
c931948b 48 virtual TFolder *ExportToFolder(TObjArray * const array=0);
0aaa8b91 49
50 // Get analysis folder
00b81913 51 TFolder* GetAnalysisFolder() const {return fAnalysisFolder;}
0aaa8b91 52
53 // Fill control histograms
00b81913 54 void SetHistogramsOn(const Bool_t histOn=kTRUE) {fHistogramsOn = histOn;}
55 Bool_t IsHistogramsOn() const {return fHistogramsOn;}
0aaa8b91 56
57 // Create folder for analysed histograms
58 TFolder *CreateFolder(TString folder = "folderdNdPtAnalysis",TString title = "Analysed dNdPt histograms");
59
60 // Fill histograms
61 void FillHistograms(AliESDtrack *const esdTrack, AliStack *const stack, AlidNdPtHelper::TrackObject trackObj);
62 void FillHistograms(AliStack *const stack, Int_t label, AlidNdPtHelper::TrackObject trackObj);
63 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);
64
65 // Getters
00b81913 66 THnSparseF *GetEventMultCorrelationMatrix() const {return fEventMultCorrelationMatrix;}
67 THnSparseF *GetTrackPtCorrelationMatrix() const {return fTrackPtCorrelationMatrix;}
0aaa8b91 68
69 //
00b81913 70 THnSparseF *GetGenEventMatrix() const {return fGenEventMatrix;}
71 THnSparseF *GetGenSDEventMatrix() const {return fGenSDEventMatrix;}
72 THnSparseF *GetGenDDEventMatrix() const {return fGenDDEventMatrix;}
73 THnSparseF *GetGenNDEventMatrix() const {return fGenNDEventMatrix;}
74 THnSparseF *GetGenNSDEventMatrix() const {return fGenNSDEventMatrix;}
75
76 THnSparseF *GetTriggerEventMatrix() const {return fTriggerEventMatrix;}
77 THnSparseF *GetTriggerSDEventMatrix() const {return fTriggerSDEventMatrix;}
78 THnSparseF *GetTriggerDDEventMatrix() const {return fTriggerDDEventMatrix;}
79 THnSparseF *GetTriggerNDEventMatrix() const {return fTriggerNDEventMatrix;}
80 THnSparseF *GetTriggerNSDEventMatrix() const {return fTriggerNSDEventMatrix;}
81
82 THnSparseF *GetRecEventMatrix() const {return fRecEventMatrix;}
83 THnSparseF *GetRecSDEventMatrix() const {return fRecSDEventMatrix;}
84 THnSparseF *GetRecDDEventMatrix() const {return fRecDDEventMatrix;}
85 THnSparseF *GetRecNDEventMatrix() const {return fRecNDEventMatrix;}
86 THnSparseF *GetRecNSDEventMatrix() const {return fRecNSDEventMatrix;}
0aaa8b91 87
88 //
00b81913 89 THnSparseF *GetGenTrackEventMatrix() const {return fGenTrackEventMatrix;}
90 THnSparseF *GetGenTrackSDEventMatrix() const {return fGenTrackSDEventMatrix;}
91 THnSparseF *GetGenTrackDDEventMatrix() const {return fGenTrackDDEventMatrix;}
92 THnSparseF *GetGenTrackNDEventMatrix() const {return fGenTrackNDEventMatrix;}
93 THnSparseF *GetGenTrackNSDEventMatrix() const {return fGenTrackNSDEventMatrix;}
94
95 THnSparseF *GetTriggerTrackEventMatrix() const {return fTriggerTrackEventMatrix;}
96 THnSparseF *GetTriggerTrackSDEventMatrix() const {return fTriggerTrackSDEventMatrix;}
97 THnSparseF *GetTriggerTrackDDEventMatrix() const {return fTriggerTrackDDEventMatrix;}
98 THnSparseF *GetTriggerTrackNDEventMatrix() const {return fTriggerTrackNDEventMatrix;}
99 THnSparseF *GetTriggerTrackNSDEventMatrix() const {return fTriggerTrackNSDEventMatrix;}
100
101 THnSparseF *GetRecTrackEventMatrix() const {return fRecTrackEventMatrix;}
102 THnSparseF *GetRecTrackSDEventMatrix() const {return fRecTrackSDEventMatrix;}
103 THnSparseF *GetRecTrackDDEventMatrix() const {return fRecTrackDDEventMatrix;}
104 THnSparseF *GetRecTrackNDEventMatrix() const {return fRecTrackNDEventMatrix;}
105 THnSparseF *GetRecTrackNSDEventMatrix() const {return fRecTrackNSDEventMatrix;}
0aaa8b91 106
107 //
00b81913 108 THnSparseF *GetGenTrackMatrix() const {return fGenTrackMatrix;}
109 THnSparseF *GetGenPrimTrackMatrix() const {return fGenPrimTrackMatrix;}
110 THnSparseF *GetRecPrimTrackMatrix() const {return fRecPrimTrackMatrix;}
0aaa8b91 111
00b81913 112 THnSparseF *GetRecTrackMatrix() const {return fRecTrackMatrix;}
113 THnSparseF *GetRecSecTrackMatrix() const {return fRecSecTrackMatrix;}
114 THnSparseF *GetRecMultTrackMatrix() const {return fRecMultTrackMatrix;}
0aaa8b91 115
116 //
117 // control histograms
118 //
00b81913 119 THnSparseF *GetMCEventHist1() const {return fMCEventHist1;}
120 THnSparseF *GetRecEventHist1() const {return fRecEventHist1;}
121 THnSparseF *GetRecEventHist2() const {return fRecEventHist2;}
122 THnSparseF *GetRecMCEventHist1() const {return fRecMCEventHist1;}
123 THnSparseF *GetRecMCEventHist2() const {return fRecMCEventHist2;}
124 THnSparseF *GetRecMCEventHist3() const {return fRecMCEventHist3;}
0aaa8b91 125
00b81913 126 THnSparseF *GetMCTrackHist1(Int_t i) const {return fMCTrackHist1[i];}
127 THnSparseF *GetMCPrimTrackHist1(Int_t i) const {return fMCPrimTrackHist1[i];}
7f7dd416 128 THnSparseF *GetMCPrimTrackHist2(Int_t i) const {return fMCPrimTrackHist2[i];}
00b81913 129 THnSparseF *GetMCSecTrackHist1(Int_t i) const {return fMCSecTrackHist1[i];}
0aaa8b91 130
00b81913 131 THnSparseF *GetRecTrackHist1(Int_t i) const {return fRecTrackHist1[i];}
132 THnSparseF *GetRecTrackMultHist1(Int_t i) const {return fRecTrackMultHist1[i];}
0aaa8b91 133
00b81913 134 THnSparseF *GetRecMCTrackHist1() const {return fRecMCTrackHist1;}
135 THnSparseF *GetMCMultRecTrackHist1() const {return fMCMultRecTrackHist1;}
0aaa8b91 136
00b81913 137 THnSparseF *GetRecTrackHist2() const {return fRecTrackHist2;}
985bdfd5 138
0aaa8b91 139private:
140
141 // analysis folder
142 TFolder *fAnalysisFolder; // folder for analysed histograms
00b81913 143 Bool_t fHistogramsOn; // switch on/off filling of control histograms
0aaa8b91 144
145 //
146 // correlation matrices (histograms)
147 //
148
149 // event rec. track vs true track multiplicity correlation matrix
150 THnSparseF *fEventMultCorrelationMatrix; //-> mult:mult_true_tracks
151
152 // rec. track pt vs true track pt correlation matrix for given eta
153 THnSparseF *fTrackPtCorrelationMatrix; //-> Pt:mcPt:mcEta
154
155 //
156 // event level correction
157 //
158
159 // all genertated
bad4ba69 160 THnSparseF *fGenEventMatrix; //-> mcZv:multMB (inelastic)
161 THnSparseF *fGenSDEventMatrix; //-> mcZv:multMB (single diffractive)
162 THnSparseF *fGenDDEventMatrix; //-> mcZv:multMB (single diffractive)
163 THnSparseF *fGenNDEventMatrix; //-> mcZv:multMB (non diffractive)
164 THnSparseF *fGenNSDEventMatrix; //-> mcZv:multMB (non single diffractive)
0aaa8b91 165
166 // trigger bias corrections (fTriggerEventMatrix / fGenEventMatrix)
bad4ba69 167 THnSparseF *fTriggerEventMatrix; //-> mcZv:multMB
168 THnSparseF *fTriggerSDEventMatrix; //-> mcZv:multMB
169 THnSparseF *fTriggerDDEventMatrix; //-> mcZv:multMB
170 THnSparseF *fTriggerNDEventMatrix; //-> mcZv:multMB
171 THnSparseF *fTriggerNSDEventMatrix; //-> mcZv:multMB
0aaa8b91 172
173 // event vertex rec. eff correction (fRecEventMatrix / fTriggerEventMatrix)
bad4ba69 174 THnSparseF *fRecEventMatrix; //-> mcZv:multMB
175 THnSparseF *fRecSDEventMatrix; //-> mcZv:multMB
176 THnSparseF *fRecDDEventMatrix; //-> mcZv:multMB
177 THnSparseF *fRecNDEventMatrix; //-> mcZv:multMB
178 THnSparseF *fRecNSDEventMatrix; //-> mcZv:multMB
0aaa8b91 179
180 //
181 // track-event level correction
182 //
183
184 THnSparseF *fGenTrackEventMatrix; //-> mcZv:mcPt:mcEta
185 THnSparseF *fGenTrackSDEventMatrix; //-> mcZv:mcPt:mcEta
186 THnSparseF *fGenTrackDDEventMatrix; //-> mcZv:mcPt:mcEta
187 THnSparseF *fGenTrackNDEventMatrix; //-> mcZv:mcPt:mcEta
188 THnSparseF *fGenTrackNSDEventMatrix; //-> mcZv:mcPt:mcEta
189
190 // trigger bias corrections (fTriggerTrackEventMatrix / fGenTrackEventMatrix)
191 THnSparseF *fTriggerTrackEventMatrix; //-> mcZv:mcPt:mcEta
192 THnSparseF *fTriggerTrackSDEventMatrix; //-> mcZv:mcPt:mcEta
193 THnSparseF *fTriggerTrackDDEventMatrix; //-> mcZv:mcPt:mcEta
194 THnSparseF *fTriggerTrackNDEventMatrix; //-> mcZv:mcPt:mcEta
195 THnSparseF *fTriggerTrackNSDEventMatrix; //-> mcZv:mcPt:mcEta
196
197 // event vertex rec. corrections (fRecTrackEventMatrix / fTriggerTrackEventMatrix)
198 THnSparseF *fRecTrackEventMatrix; //-> mcZv:Pt:mcEta
199 THnSparseF *fRecTrackSDEventMatrix; //-> mcZv:Pt:mcEta
200 THnSparseF *fRecTrackDDEventMatrix; //-> mcZv:Pt:mcEta
201 THnSparseF *fRecTrackNDEventMatrix; //-> mcZv:Pt:mcEta
202 THnSparseF *fRecTrackNSDEventMatrix; //-> mcZv:Pt:mcEta
203
204 //
205 // track level correction
206 //
207
208 // track rec. efficiency correction (fRecPrimTrackMatrix / fGenPrimTrackMatrix)
985bdfd5 209 THnSparseF *fGenTrackMatrix; //-> mcZv:mcPt:mcEta
0aaa8b91 210 THnSparseF *fGenPrimTrackMatrix; //-> mcZv:mcPt:mcEta
211 THnSparseF *fRecPrimTrackMatrix; //-> mcZv:mcPt:mcEta
212
213 // secondary track contamination correction (fRecSecTrackMatrix / fRecTrackMatrix)
214 THnSparseF *fRecTrackMatrix; //-> mcZv:mcPt:mcEta
215 THnSparseF *fRecSecTrackMatrix; //-> mcZv:mcPt:mcEta
216
217 // multiple rec. track corrections (fRecMultTrackMatrix / fRecTrackMatrix)
218 THnSparseF *fRecMultTrackMatrix; //-> mcZv:Pt:mcEta
219
220 //
221 // ESD and MC control analysis histograms
222 //
223
224 // THnSparse event histograms
225 THnSparseF *fMCEventHist1; //-> mcXv:mcYv:mcZv
226 THnSparseF *fRecEventHist1; //-> Xv:Yv:Zv
bad4ba69 227 THnSparseF *fRecEventHist2; //-> Zv:multMB:mult
0aaa8b91 228 THnSparseF *fRecMCEventHist1; //-> Xv-mcXv:Yv-mcYv:Zv-mcZv
bad4ba69 229 THnSparseF *fRecMCEventHist2; //-> Xv-mcXv:Zv-mcZv:mult
230 THnSparseF *fRecMCEventHist3; //-> mult:EventType (ND, DD, SD)
0aaa8b91 231
232 // THnSparse track histograms
233 // [0] - after charged track selection, [1] - after acceptance cuts, [2] - after esd track cuts
234
235 THnSparseF *fMCTrackHist1[AlidNdPtHelper::kCutSteps]; //-> mcPt:mcEta:mcPhi
236 THnSparseF *fMCPrimTrackHist1[AlidNdPtHelper::kCutSteps]; //-> mcPt:mcEta:pid:mech:mother
7f7dd416 237 THnSparseF *fMCPrimTrackHist2[AlidNdPtHelper::kCutSteps]; //-> pdg:mech:mother
0aaa8b91 238 THnSparseF *fMCSecTrackHist1[AlidNdPtHelper::kCutSteps]; //-> mcPt:mcEta:pid:mech:mother
239
240 THnSparseF *fRecTrackHist1[AlidNdPtHelper::kCutSteps]; //-> Pt:Eta:Phi
bad4ba69 241 THnSparseF *fRecTrackMultHist1[AlidNdPtHelper::kCutSteps]; //-> Pt:mult
0aaa8b91 242
243 THnSparseF *fRecMCTrackHist1; //-> mcPt:mcEta:(Pt-mcPt)/mcPt:(Eta-mcEta)
244
245 //multple reconstructed tracks
246 THnSparseF *fMCMultRecTrackHist1; //-> mcPt:mcEta:pid
247
985bdfd5 248 // track control histograms
249 THnSparseF *fRecTrackHist2; //-> nclust:chi2:Pt:Eta:Phi
250
0aaa8b91 251 AlidNdPtAnalysis(const AlidNdPtAnalysis&); // not implemented
252 AlidNdPtAnalysis& operator=(const AlidNdPtAnalysis&); // not implemented
253
7f7dd416 254 ClassDef(AlidNdPtAnalysis,2);
0aaa8b91 255};
256
257#endif