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