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