switch to fill only events added
[u/mrichter/AliRoot.git] / ANALYSIS / AliCentralitySelectionTask.h
CommitLineData
dcd68d00 1#ifndef ALICENTRALITYSELECTIONTASK_H
2#define ALICENTRALITYSELECTIONTASK_H
3
4/* Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7//*****************************************************
8// Class AliCentralitySelectionTask
9// author: Alberica Toia
10//*****************************************************
11
12#include "AliAnalysisTaskSE.h"
13
14class TFile;
9f14d90a 15class TH1F;
36ee40df 16class TH2F;
68e344b7 17class TList;
9f14d90a 18class TString;
68e344b7 19
20class AliESDEvent;
05915818 21class AliESDtrackCuts;
dcd68d00 22
23class AliCentralitySelectionTask : public AliAnalysisTaskSE {
24
25 public:
26
27 AliCentralitySelectionTask();
28 AliCentralitySelectionTask(const char *name);
29 AliCentralitySelectionTask& operator= (const AliCentralitySelectionTask& ana);
30 AliCentralitySelectionTask(const AliCentralitySelectionTask& c);
31 virtual ~AliCentralitySelectionTask();
32
33 // Implementation of interface methods
34 virtual void UserCreateOutputObjects();
35 virtual void UserExec(Option_t *option);
36 virtual void Terminate(Option_t *option);
37
dcd68d00 38 void SetInput(const char* input) {fAnalysisInput = input;}
39 void SetMCInput() {fIsMCInput = kTRUE;}
a540a9d3 40 void DontUseScaling() {fUseScaling=kFALSE;}
d015c169 41 void DontUseCleaning() {fUseCleaning=kFALSE;}
9b55f3ac 42 void SetFillHistos() {fFillHistos=kTRUE; DefineOutput(1, TList::Class());
43}
a43ed687 44
dcd68d00 45 private:
68e344b7 46
377e5a61 47 Int_t SetupRun(const AliVEvent* const esd);
f690bf48 48 Bool_t IsOutlierV0MSPD(Float_t spd, Float_t v0, Int_t cent) const;
49 Bool_t IsOutlierV0MTPC(Int_t tracks, Float_t v0, Int_t cent) const;
50 Bool_t IsOutlierV0MZDC(Float_t zdc, Float_t v0) const;
51 Bool_t IsOutlierV0MZDCECal(Float_t zdc, Float_t v0) const;
68e344b7 52
dcd68d00 53 TString fAnalysisInput; // "ESD", "AOD"
54 Bool_t fIsMCInput; // true when input is MC
68e344b7 55 Int_t fCurrentRun; // current run number
d015c169 56 Bool_t fUseScaling; // flag to use scaling
a43ed687 57 Bool_t fUseCleaning; // flag to use cleaning
3e654564 58 Bool_t fFillHistos; // flag to fill the QA histos
a43ed687 59 Float_t fV0MScaleFactor; // scale factor V0M
60 Float_t fSPDScaleFactor; // scale factor SPD
61 Float_t fTPCScaleFactor; // scale factor TPC
62 Float_t fV0MScaleFactorMC; // scale factor V0M for MC
63 Float_t fV0MSPDOutlierPar0; // outliers parameter
64 Float_t fV0MSPDOutlierPar1; // outliers parameter
65 Float_t fV0MTPCOutlierPar0; // outliers parameter
66 Float_t fV0MTPCOutlierPar1; // outliers parameter
67 Float_t fV0MSPDSigmaOutlierPar0; // outliers parameter
68 Float_t fV0MSPDSigmaOutlierPar1; // outliers parameter
69 Float_t fV0MSPDSigmaOutlierPar2; // outliers parameter
70 Float_t fV0MTPCSigmaOutlierPar0; // outliers parameter
71 Float_t fV0MTPCSigmaOutlierPar1; // outliers parameter
72 Float_t fV0MTPCSigmaOutlierPar2; // outliers parameter
73 Float_t fV0MZDCOutlierPar0; // outliers parameter
74 Float_t fV0MZDCOutlierPar1; // outliers parameter
75 Float_t fV0MZDCEcalOutlierPar0; // outliers parameter
76 Float_t fV0MZDCEcalOutlierPar1; // outliers parameter
a540a9d3 77
78 AliESDtrackCuts* fTrackCuts; //! optional track cuts
2d27827d 79 AliESDtrackCuts* fEsdTrackCuts; //! optional track cuts
80 AliESDtrackCuts* fEsdTrackCutsExtra1; //! optional track cuts
81 AliESDtrackCuts* fEsdTrackCutsExtra2; //! optional track cuts
d15bf53f 82
a540a9d3 83 Float_t fZVCut; //! z-vertex cut (in cm)
84 Float_t fOutliersCut; //! outliers cut (in n-sigma)
85 Int_t fQuality; //! quality for centrality determination
05915818 86
3e654564 87 Bool_t fIsSelected; //! V0BG rejection
88
89 Bool_t fMSL; //!
90 Bool_t fMSH; //!
91 Bool_t fMUL; //!
92 Bool_t fMLL; //!
93
94 Bool_t fEJE; //!
95 Bool_t fEGA; //!
96 Bool_t fPHS; //!
97
13e74ee2 98 Bool_t fMB; //! if the event is MB
4fced115 99 Bool_t fCVHN; //! if the event is central trigger
100 Bool_t fCVLN; //! if the event is semicentral trigger
13e74ee2 101 Bool_t fCVHNbit; //! if the event is central trigger
102 Bool_t fCVLNbit; //! if the event is semicentral trigger
9448ffd1 103 Bool_t fCCENT; //! if the event is central trigger
104 Bool_t fCSEMI; //! if the event is semicentral trigger
105 Bool_t fCCENTbit; //! if the event is central trigger
106 Bool_t fCSEMIbit; //! if the event is semicentral trigger
4fced115 107
d15bf53f 108 Float_t fCentV0M; // percentile centrality from V0
13e74ee2 109 Float_t fCentV0A; // percentile centrality from V0A
2d12adde 110 Float_t fCentV0A123; // percentile centrality from V0A-123
13e74ee2 111 Float_t fCentV0C; // percentile centrality from V0C
f9a774f9 112 Float_t fCentV0MEq; // percentile centrality from V0 equalized channel
113 Float_t fCentV0AEq; // percentile centrality from V0A equalized channel
114 Float_t fCentV0CEq; // percentile centrality from V0C equalized channel
d15bf53f 115 Float_t fCentFMD; // percentile centrality from FMD
116 Float_t fCentTRK; // percentile centrality from tracks
117 Float_t fCentTKL; // percentile centrality from tracklets
118 Float_t fCentCL0; // percentile centrality from clusters in layer 0
13e74ee2 119 Float_t fCentCL1; // percentile centrality from clusters in layer 1
120 Float_t fCentCND; // percentile centrality from candle
99029fba 121 Float_t fCentZNA; // percentile centrality from ZNA
f9a774f9 122 Float_t fCentZNC; // percentile centrality from ZNC
3a19f64f 123 Float_t fCentZPA; // percentile centrality from ZPA
124 Float_t fCentZPC; // percentile centrality from ZPC
39a3e400 125 Float_t fCentNPA; // percentile centrality from Npart (MC)
d15bf53f 126 Float_t fCentV0MvsFMD; // percentile centrality from V0 vs FMD
127 Float_t fCentTKLvsV0M; // percentile centrality from tracklets vs V0
128 Float_t fCentZEMvsZDC; // percentile centrality from ZEM vs ZDC
129
39a3e400 130 Float_t fCentV0Mtrue; // percentile centrality from true (sim) V0A+V0C
131 Float_t fCentV0Atrue; // percentile centrality from true (sim) V0A
132 Float_t fCentV0Ctrue; // percentile centrality from true (sim) V0C
f9a774f9 133 Float_t fCentV0MEqtrue; // percentile centrality from true (sim) V0A+V0C equalized channel
134 Float_t fCentV0AEqtrue; // percentile centrality from true (sim) V0A equalized channel
135 Float_t fCentV0CEqtrue; // percentile centrality from true (sim) V0C equalized channel
39a3e400 136 Float_t fCentFMDtrue; // percentile centrality from true (sim) FMD
137 Float_t fCentTRKtrue; // percentile centrality from true (sim) tracks
138 Float_t fCentTKLtrue; // percentile centrality from true (sim) tracklets
139 Float_t fCentCL0true; // percentile centrality from true (sim) Clusters in layer 0
140 Float_t fCentCL1true; // percentile centrality from true (sim) Clusters in layer 1
141 Float_t fCentCNDtrue; // percentile centrality from true (sim) tracks (candle condition)
142 Float_t fCentZNAtrue; // percentile centrality from true (sim) ZNA
f9a774f9 143 Float_t fCentZNCtrue; // percentile centrality from true (sim) ZNC
3a19f64f 144 Float_t fCentZPAtrue; // percentile centrality from true (sim) ZPA
145 Float_t fCentZPCtrue; // percentile centrality from true (sim) ZPC
39a3e400 146
147
9f14d90a 148 TH1F *fHtempV0M; // histogram with centrality vs multiplicity using V0
13e74ee2 149 TH1F *fHtempV0A; // histogram with centrality vs multiplicity using V0A
2d12adde 150 TH1F *fHtempV0A123; // histogram with centrality vs multiplicity using V0A-123
13e74ee2 151 TH1F *fHtempV0C; // histogram with centrality vs multiplicity using V0C
f9a774f9 152 TH1F *fHtempV0MEq; // histogram with centrality vs multiplicity using V0 equalized channel
153 TH1F *fHtempV0AEq; // histogram with centrality vs multiplicity using V0A equalized channel
154 TH1F *fHtempV0CEq; // histogram with centrality vs multiplicity using V0C equalized channel
9f14d90a 155 TH1F *fHtempFMD; // histogram with centrality vs multiplicity using FMD
156 TH1F *fHtempTRK; // histogram with centrality vs multiplicity using tracks
157 TH1F *fHtempTKL; // histogram with centrality vs multiplicity using tracklets
158 TH1F *fHtempCL0; // histogram with centrality vs multiplicity using clusters in layer 0
13e74ee2 159 TH1F *fHtempCL1; // histogram with centrality vs multiplicity using clusters in layer 1
160 TH1F *fHtempCND; // histogram with centrality vs multiplicity using candle
99029fba 161 TH1F *fHtempZNA; // histogram with centrality vs multiplicity using ZNA
f9a774f9 162 TH1F *fHtempZNC; // histogram with centrality vs multiplicity using ZNC
3a19f64f 163 TH1F *fHtempZPA; // histogram with centrality vs multiplicity using ZPA
164 TH1F *fHtempZPC; // histogram with centrality vs multiplicity using ZPC
13e74ee2 165 TH1F *fHtempV0MvsFMD; // histogram with centrality vs multiplicity using V0 vs FMD
166 TH1F *fHtempTKLvsV0M; // histogram with centrality vs multiplicity using tracklets vs V0
167 TH2F *fHtempZEMvsZDC; // histogram with centrality vs multiplicity using ZEM vs ZDC
39a3e400 168 TH1F *fHtempNPA; // histogram with centrality vs multiplicity using Npart
169
170 TH1F *fHtempV0Mtrue; // histogram with centrality true (sim) vs multiplicity using V0
171 TH1F *fHtempV0Atrue; // histogram with centrality true (sim) vs multiplicity using V0A
172 TH1F *fHtempV0Ctrue; // histogram with centrality true (sim) vs multiplicity using V0C
f9a774f9 173 TH1F *fHtempV0MEqtrue; // histogram with centrality true (sim) vs multiplicity using V0 equalized channel
174 TH1F *fHtempV0AEqtrue; // histogram with centrality true (sim) vs multiplicity using V0A equalized channel
175 TH1F *fHtempV0CEqtrue; // histogram with centrality true (sim) vs multiplicity using V0C equalized channel
39a3e400 176 TH1F *fHtempFMDtrue; // histogram with centrality true (sim) vs multiplicity using FMD
177 TH1F *fHtempTRKtrue; // histogram with centrality true (sim) vs multiplicity using tracks
178 TH1F *fHtempTKLtrue; // histogram with centrality true (sim) vs multiplicity using tracklets
179 TH1F *fHtempCL0true; // histogram with centrality true (sim) vs multiplicity using clusters in layer 0
180 TH1F *fHtempCL1true; // histogram with centrality true (sim) vs multiplicity using clusters in layer 1
181 TH1F *fHtempCNDtrue; // histogram with centrality true (sim) vs multiplicity using candle
182 TH1F *fHtempZNAtrue; // histogram with centrality true (sim) vs multiplicity using ZNA
f9a774f9 183 TH1F *fHtempZNCtrue; // histogram with centrality true (sim) vs multiplicity using ZNC
3a19f64f 184 TH1F *fHtempZPAtrue; // histogram with centrality true (sim) vs multiplicity using ZPA
185 TH1F *fHtempZPCtrue; // histogram with centrality true (sim) vs multiplicity using ZPC
d15bf53f 186
36ee40df 187 TList *fOutputList; // output list
05915818 188
f9a774f9 189
13e74ee2 190 TH1F *fHOutCentV0M ; //control histogram for centrality
191 TH1F *fHOutCentV0A ; //control histogram for centrality
2d12adde 192 TH1F *fHOutCentV0A123 ; //control histogram for centrality
13e74ee2 193 TH1F *fHOutCentV0C ; //control histogram for centrality
f9a774f9 194 TH1F *fHOutCentV0MEq ; //control histogram for centrality
195 TH1F *fHOutCentV0AEq ; //control histogram for centrality
196 TH1F *fHOutCentV0CEq ; //control histogram for centrality
13e74ee2 197 TH1F *fHOutCentV0MCVHN; //control histogram for centrality
198 TH1F *fHOutCentV0MCVLN; //control histogram for centrality
199 TH1F *fHOutCentV0MCVHNinMB; //control histogram for centrality
200 TH1F *fHOutCentV0MCVLNinMB; //control histogram for centrality
201 TH1F *fHOutCentV0MCCENT; //control histogram for centrality
202 TH1F *fHOutCentV0MCSEMI; //control histogram for centrality
203 TH1F *fHOutCentV0MCCENTinMB; //control histogram for centrality
204 TH1F *fHOutCentV0MCSEMIinMB; //control histogram for centrality
205 TH1F *fHOutCentV0MMSL; //control histogram for centrality
206 TH1F *fHOutCentV0MMSH; //control histogram for centrality
207 TH1F *fHOutCentV0MMUL; //control histogram for centrality
208 TH1F *fHOutCentV0MMLL; //control histogram for centrality
209 TH1F *fHOutCentV0MEJE; //control histogram for centrality
210 TH1F *fHOutCentV0MEGA; //control histogram for centrality
211 TH1F *fHOutCentV0MPHS; //control histogram for centrality
39c6be2c 212 TH1F *fHOutCentV0MMSLinMB; //control histogram for centrality
213 TH1F *fHOutCentV0MMSHinMB; //control histogram for centrality
214 TH1F *fHOutCentV0MMULinMB; //control histogram for centrality
215 TH1F *fHOutCentV0MMLLinMB; //control histogram for centrality
216 TH1F *fHOutCentV0MEJEinMB; //control histogram for centrality
217 TH1F *fHOutCentV0MEGAinMB; //control histogram for centrality
218 TH1F *fHOutCentV0MPHSinMB; //control histogram for centrality
13e74ee2 219 TH1F *fHOutCentFMD ; //control histogram for centrality
220 TH1F *fHOutCentTRK ; //control histogram for centrality
221 TH1F *fHOutCentTKL ; //control histogram for centrality
222 TH1F *fHOutCentCL0 ; //control histogram for centrality
223 TH1F *fHOutCentCL1 ; //control histogram for centrality
224 TH1F *fHOutCentCND ; //control histogram for centrality
8432b617 225 TH1F *fHOutCentNPA ; //control histogram for centrality
99029fba 226 TH1F *fHOutCentZNA ; //control histogram for centrality
f9a774f9 227 TH1F *fHOutCentZNC ; //control histogram for centrality
3a19f64f 228 TH1F *fHOutCentZPA ; //control histogram for centrality
229 TH1F *fHOutCentZPC ; //control histogram for centrality
13e74ee2 230 TH1F *fHOutCentV0MvsFMD; //control histogram for centrality
231 TH1F *fHOutCentTKLvsV0M; //control histogram for centrality
232 TH1F *fHOutCentZEMvsZDC; //control histogram for centrality
233 TH2F *fHOutCentV0MvsCentCL1; //control histogram for centrality
234 TH2F *fHOutCentV0MvsCentTRK; //control histogram for centrality
235 TH2F *fHOutCentTRKvsCentCL1; //control histogram for centrality
236 TH2F *fHOutCentV0MvsCentZDC; //control histogram for centrality
237 TH2F *fHOutCentV0AvsCentV0C; //control histogram for centrality
238 TH2F *fHOutCentV0AvsCentTRK; //control histogram for centrality
239 TH2F *fHOutCentV0AvsCentCND; //control histogram for centrality
240 TH2F *fHOutCentV0AvsCentCL1; //control histogram for centrality
241 TH2F *fHOutCentV0CvsCentTRK; //control histogram for centrality
242 TH2F *fHOutCentV0CvsCentCND; //control histogram for centrality
243 TH2F *fHOutCentV0CvsCentCL1; //control histogram for centrality
8432b617 244 TH2F *fHOutCentNPAvsCentV0A; //control histogram for centrality
245 TH2F *fHOutCentNPAvsCentV0C; //control histogram for centrality
246 TH2F *fHOutCentNPAvsCentTRK; //control histogram for centrality
247 TH2F *fHOutCentNPAvsCentCND; //control histogram for centrality
248 TH2F *fHOutCentNPAvsCentCL1; //control histogram for centrality
99029fba 249 TH2F *fHOutCentZNAvsCentV0A; //control histogram for centrality
250 TH2F *fHOutCentZNAvsCentV0C; //control histogram for centrality
251 TH2F *fHOutCentZNAvsCentTRK; //control histogram for centrality
252 TH2F *fHOutCentZNAvsCentCND; //control histogram for centrality
253 TH2F *fHOutCentZNAvsCentCL1; //control histogram for centrality
bfbc1975 254 TH2F *fHOutCentZNAvsCentZPA; //control histogram for centrality
13e74ee2 255
256 TH2F *fHOutMultV0AC; //control histogram for multiplicity
257 TH1F *fHOutMultV0M ; //control histogram for multiplicity
258 TH1F *fHOutMultV0A ; //control histogram for multiplicity
2d12adde 259 TH1F *fHOutMultV0A123 ; //control histogram for multiplicity
13e74ee2 260 TH1F *fHOutMultV0C ; //control histogram for multiplicity
f9a774f9 261 TH1F *fHOutMultV0MEq ; //control histogram for multiplicity
262 TH1F *fHOutMultV0AEq ; //control histogram for multiplicity
263 TH1F *fHOutMultV0CEq ; //control histogram for multiplicity
7971b7c9 264 TH1F *fHOutMultV0Mnc ; //control histogram for multiplicity
265 TH1F *fHOutMultV0Anc ; //control histogram for multiplicity
266 TH1F *fHOutMultV0Cnc ; //control histogram for multiplicity
13e74ee2 267 TH1F *fHOutMultV0O ; //control histogram for multiplicity
1abba036 268 TH2F *fHOutMultV0Cells ; //control histogram for multiplicity
13e74ee2 269 TH1F *fHOutMultFMD ; //control histogram for multiplicity
270 TH1F *fHOutMultTRK ; //control histogram for multiplicity
271 TH1F *fHOutMultTKL ; //control histogram for multiplicity
272 TH1F *fHOutMultCL0 ; //control histogram for multiplicity
273 TH1F *fHOutMultCL1 ; //control histogram for multiplicity
274 TH1F *fHOutMultCND ; //control histogram for multiplicity
8432b617 275 TH1F *fHOutMultNPA ; //control histogram for multiplicity
99029fba 276 TH1F *fHOutMultZNA ; //control histogram for multiplicity
f9a774f9 277 TH1F *fHOutMultZNC ; //control histogram for multiplicity
3a19f64f 278 TH1F *fHOutMultZPA ; //control histogram for multiplicity
279 TH1F *fHOutMultZPC ; //control histogram for multiplicity
13e74ee2 280
281 TH2F *fHOutMultV0MvsZDN; //control histogram for multiplicity
282 TH2F *fHOutMultZEMvsZDN; //control histogram for multiplicity
283 TH2F *fHOutMultV0MvsZDC; //control histogram for multiplicity
284 TH2F *fHOutMultZEMvsZDC; //control histogram for multiplicity
285 TH2F *fHOutMultZEMvsZDCw; //control histogram for multiplicity
286 TH2F *fHOutMultV0MvsCL1; //control histogram for multiplicity
287 TH2F *fHOutMultV0MvsTRK; //control histogram for multiplicity
288 TH2F *fHOutMultTRKvsCL1; //control histogram for multiplicity
289 TH2F *fHOutMultV0MvsV0O; //control histogram for multiplicity
290 TH2F *fHOutMultV0OvsCL1; //control histogram for multiplicity
291 TH2F *fHOutMultV0OvsTRK; //control histogram for multiplicity
8432b617 292 TH2F *fHOutMultCL1vsTKL; //control histogram for multiplicity
bfbc1975 293 TH2F *fHOutMultZNAvsZPA; //control histogram for multiplicity
13e74ee2 294
295 TH1F *fHOutCentV0Mqual1 ; //control histogram for centrality quality 1
296 TH1F *fHOutCentTRKqual1 ; //control histogram for centrality quality 1
297 TH1F *fHOutCentCL1qual1 ; //control histogram for centrality quality 1
298 TH2F *fHOutMultV0MvsCL1qual1; //control histogram for multiplicity quality 1
299 TH2F *fHOutMultV0MvsTRKqual1; //control histogram for multiplicity quality 1
300 TH2F *fHOutMultTRKvsCL1qual1; //control histogram for multiplicity quality 1
301
302 TH1F *fHOutCentV0Mqual2 ; //control histogram for centrality quality 2
303 TH1F *fHOutCentTRKqual2 ; //control histogram for centrality quality 2
304 TH1F *fHOutCentCL1qual2 ; //control histogram for centrality quality 2
305 TH2F *fHOutMultV0MvsCL1qual2; //control histogram for multiplicity quality 2
306 TH2F *fHOutMultV0MvsTRKqual2; //control histogram for multiplicity quality 2
307 TH2F *fHOutMultTRKvsCL1qual2; //control histogram for multiplicity quality 2
308
309 TH1F *fHOutQuality ; //control histogram for quality
310 TH1F *fHOutVertex ; //control histogram for vertex SPD
311 TH1F *fHOutVertexT0 ; //control histogram for vertex T0
312
2d12adde 313 ClassDef(AliCentralitySelectionTask, 29);
dcd68d00 314};
315
316#endif
317