]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/SPECTRA/PiKaPr/TestAOD/AliAnalysisTaskV2AllChAOD.h
coverity fixes - v2 task
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / PiKaPr / TestAOD / AliAnalysisTaskV2AllChAOD.h
CommitLineData
10a99a07 1#ifndef ALIANALYSISTASKV2ALLCHAOD_H
2#define ALIANALYSISTASKV2ALLCHAOD_H
3
4/* See cxx source for full Copyright notice */
5
6//-------------------------------------------------------------------------
7// AliAnalysisTaskV2AllChAOD
8//
9//
10//
11//
12// Author: Leonardo Milano, CERN
13//-------------------------------------------------------------------------
14
15class AliAODEvent;
16class AliSpectraAODTrackCuts;
17class AliSpectraAODEventCuts;
18
19#include "AliAnalysisTaskSE.h"
d0761d58 20#include "TFile.h"
21#include "TKey.h"
10a99a07 22#include <TProfile.h>
23
24class AliAnalysisTaskV2AllChAOD : public AliAnalysisTaskSE
25{
7272833e 26public:
10a99a07 27 // constructors
7272833e 28 AliAnalysisTaskV2AllChAOD() : AliAnalysisTaskSE(),
29 fAOD(0x0),
30 fTrackCuts(0x0),
31 fEventCuts(0x0),
32 fIsMC(0),
33 fCharge(0),
34 fVZEROside(0),
35 fOutput(0x0),
36 fOutput_lq(0x0),
37 fOutput_sq(0x0),
38 fnCentBins(20),
39 fnQvecBins(40),
40 fQvecUpperLim(100),
41 fCutLargeQperc(9.),
42 fCutSmallQperc(10.),
43 fEtaGapMin(-0.5),
44 fEtaGapMax(0.5),
45 fTrkBit(128),
46 fEtaCut(0.8),
47 fMinPt(0),
48 fMaxPt(20.0),
49 fMinTPCNcls(70),
50 fFillTHn(kTRUE),
51 fCentrality(0),
52 fQvector(0),
53 fQvector_lq(0),
54 fQvector_sq(0),
55 fResSP(0),
56 fResSP_vs_Cent(0),
57 f2partCumQA_vs_Cent(0),
58 f2partCumQB_vs_Cent(0),
59 fEta_vs_Phi_bef(0),
60 fEta_vs_PhiA(0),
61 fEta_vs_PhiB(0),
62 fResSP_lq(0),
63 fResSP_vs_Cent_lq(0),
64 f2partCumQA_vs_Cent_lq(0),
65 f2partCumQB_vs_Cent_lq(0),
66 fResSP_sq(0),
67 fResSP_vs_Cent_sq(0),
68 f2partCumQA_vs_Cent_sq(0),
69 f2partCumQB_vs_Cent_sq(0),
70 fResSP_inclusive(0),
71 fv2SPGap1A_inclusive_mb(0),
72 fv2SPGap1B_inclusive_mb(0),
73 fv2SPGap1A_inclusive_lq(0),
74 fv2SPGap1B_inclusive_lq(0),
75 fv2SPGap1A_inclusive_sq(0),
76 fv2SPGap1B_inclusive_sq(0),
77 fResSPmc_inclusive(0),
78 fv2SPGap1Amc_inclusive_mb(0),
79 fv2SPGap1Bmc_inclusive_mb(0),
80 fv2SPGap1Amc_inclusive_lq(0),
81 fv2SPGap1Bmc_inclusive_lq(0),
82 fv2SPGap1Amc_inclusive_sq(0),
83 fv2SPGap1Bmc_inclusive_sq(0),
84 fResGap1w(0),
85 fV2IntGap1w(0),
86 fIsRecoEff(0),
87 fRecoEffList(0),
88 fQvecGen(0),
89 fQgenType(0),
90 fnNchBins(400),
91 fDoCentrSystCentrality(0)
92{
93 for(Int_t j=0; j<9; j++){
94 fv2SPGap1A[j]=0x0;
95 fv2SPGap1B[j]=0x0;
96 fSinGap1Aq[j]=0x0;
97 fCosGap1Aq[j]=0x0;
98 fSinGap1Bq[j]=0x0;
99 fCosGap1Bq[j]=0x0;
100 fSinGap1A[j]=0x0;
101 fCosGap1A[j]=0x0;
102 fSinGap1B[j]=0x0;
103 fCosGap1B[j]=0x0;
104
105 fv2SPGap1A_lq[j]=0x0;
106 fv2SPGap1B_lq[j]=0x0;
107 fSinGap1Aq_lq[j]=0x0;
108 fCosGap1Aq_lq[j]=0x0;
109 fSinGap1Bq_lq[j]=0x0;
110 fCosGap1Bq_lq[j]=0x0;
111 fSinGap1A_lq[j]=0x0;
112 fCosGap1A_lq[j]=0x0;
113 fSinGap1B_lq[j]=0x0;
114 fCosGap1B_lq[j]=0x0;
115
116 fv2SPGap1A_sq[j]=0x0;
117 fv2SPGap1B_sq[j]=0x0;
118 fSinGap1Aq_sq[j]=0x0;
119 fCosGap1Aq_sq[j]=0x0;
120 fSinGap1Bq_sq[j]=0x0;
121 fCosGap1Bq_sq[j]=0x0;
122 fSinGap1A_sq[j]=0x0;
123 fCosGap1A_sq[j]=0x0;
124 fSinGap1B_sq[j]=0x0;
125 fCosGap1B_sq[j]=0x0;
126
127 fResSP_vs_Qvec[j]=0x0;
128 fV2IntGap1wq[j]=0x0;
129 }
130}
10a99a07 131 AliAnalysisTaskV2AllChAOD(const char *name);
132 virtual ~AliAnalysisTaskV2AllChAOD() {
133 Printf("calling detructor of AliAnalysisTaskV2AllChAOD - To be implemented");
134 }
7272833e 135
10a99a07 136 void SetIsMC(Bool_t isMC = kFALSE) {fIsMC = isMC; };
137 Bool_t GetIsMC() const { return fIsMC;};
7272833e 138
10a99a07 139 void SetCharge(Int_t charge = 0) {fCharge = charge; };
140 Int_t GetCharge() const { return fCharge;};
7272833e 141
10a99a07 142 void SetVZEROside(Int_t side = 0) {fVZEROside = side; };
143 Int_t GetVZEROside() const { return fVZEROside;};
7272833e 144
10a99a07 145 virtual void UserCreateOutputObjects();
146 virtual void UserExec(Option_t *option);
147 virtual void Terminate(Option_t *);
7272833e 148
10a99a07 149 AliSpectraAODTrackCuts * GetTrackCuts() { return fTrackCuts; }
150 AliSpectraAODEventCuts * GetEventCuts() { return fEventCuts; }
151 TList * GetOutputList() { return fOutput; }
7272833e 152
10a99a07 153 void SetTrackCuts(AliSpectraAODTrackCuts * tc) { fTrackCuts = tc; }
154 void SetEventCuts(AliSpectraAODEventCuts * vc) { fEventCuts = vc; }
155 void SetnCentBins(Int_t val) { fnCentBins = val; }
156 void SetnQvecBins(Int_t val) { fnQvecBins = val; }
10a99a07 157 void SetQvecUpperLimit(Double_t val) { fQvecUpperLim = val; }
7272833e 158
d64e71aa 159 void SetTrackBits(UInt_t TrackBits) {fTrkBit=TrackBits;}
160 void SetEtaCut(Double_t val) {fEtaCut=val;}
161 void SetMinPt(Double_t val) {fMinPt=val;}
162 void SetMaxPt(Double_t val) {fMaxPt=val;}
163 void SetMinTPCNcls(Double_t val) {fMinTPCNcls=val;}
7272833e 164
10a99a07 165 Bool_t GetDCA(const AliAODTrack* trk, Double_t * p);
29fbaf8a 166 void MCclosure(Double_t qvec);
7272833e 167
d0761d58 168 void EnableRecoEff (Bool_t val) { fIsRecoEff = val; }
169 Double_t GetRecoEff(Double_t pt, Int_t iC);
7272833e 170
d0761d58 171 void SetRecoEffFile(TFile *f) {
172 TIter next(f->GetListOfKeys());
173 TKey *key;
174 while ((key = (TKey*)next())) {
175 TH1D * h=(TH1D*)key->ReadObj();
176 fRecoEffList->Add(h);
177 }
178 };
10a99a07 179
180 void SetEtaGap(Float_t etamin,Float_t etamax) { fEtaGapMin = etamin; fEtaGapMax = etamax; }
962f3d11 181 void SetQvecCut(Float_t qmin,Float_t qmax) { fCutSmallQperc = qmin; fCutLargeQperc = qmax; }
182 void SetFillTHn (Bool_t val) { fFillTHn = val; }
7272833e 183
509a25f9 184 void SetQvecGen(Bool_t val) { fQvecGen = val; } //enable Qvec from generated
725da720 185 void SetQgenType(Int_t val) { fQgenType = val ; } // type==0 qgen from tracks - type==1 qgen from vzero
e3bcd147 186
187 void SetnNchBins(Int_t val) { fnNchBins = val; }
7272833e 188
509a25f9 189 void SetDoCentrSystCentrality(Bool_t val) { fDoCentrSystCentrality = val; } //enable systematic for centrality
190
7272833e 191private:
192
10a99a07 193 AliAODEvent * fAOD; //! AOD object
194 AliSpectraAODTrackCuts * fTrackCuts; // Track Cuts
195 AliSpectraAODEventCuts * fEventCuts; // Event Cuts
196 Bool_t fIsMC; // true if processing MC
197 Int_t fCharge; // charge to be selected
198 Int_t fVZEROside; // 0: VZERO-A 1: VZERO-C
199 TList * fOutput; // output list
200 TList * fOutput_lq; // output list large Q
201 TList * fOutput_sq; // output list small Q
202 Int_t fnCentBins; // number of bins for the centrality axis
203 Int_t fnQvecBins; // number of bins for the q vector axis
10a99a07 204 Double_t fQvecUpperLim; //Upper limit for Qvector
7272833e 205
10a99a07 206 Int_t fCutLargeQperc; // cut on 10% large Q-vec events
207 Int_t fCutSmallQperc; // cut on 10% small Q-vec events
7272833e 208
f02b044c 209 Double_t fEtaGapMin; // TBD
210 Double_t fEtaGapMax; // TBD
7272833e 211
f02b044c 212 UInt_t fTrkBit; // TBD
213 Double_t fEtaCut; // TBD
214 Double_t fMinPt; // TBD
215 Double_t fMaxPt; // TBD
216 Double_t fMinTPCNcls; // TBD
7272833e 217
f02b044c 218 Bool_t fFillTHn; // TBD
7272833e 219
f02b044c 220 TH1D * fCentrality; //! TBD
221 TH1D * fQvector; //! TBD
222 TH1D * fQvector_lq; //! TBD
223 TH1D * fQvector_sq; //! TBD
86f0713c 224
10a99a07 225 //output object
226 TProfile* fResSP; //! resolution
f02b044c 227 TProfile* fResSP_vs_Cent; //! TBD
f02b044c 228 TProfile* f2partCumQA_vs_Cent; //! TBD
229 TProfile* f2partCumQB_vs_Cent; //! TBD
2ba0e068 230 TH2D* fEta_vs_Phi_bef; //! eta vs phi distribution before sub events cut
231 TH2D* fEta_vs_PhiA; //! eta vs phi distribution after sub events cut
232 TH2D* fEta_vs_PhiB; //! eta vs phi distribution after sub events cut
10a99a07 233 TProfile* fv2SPGap1A[9]; //! v2{2} eta gap 1 for all events
10a99a07 234 TProfile* fv2SPGap1B[9]; //! v2{2} eta gap 1 for all events
10a99a07 235
bc76879c 236 TProfile* fSinGap1Aq[9]; //! <sin> vs pT gap 1
237 TProfile* fCosGap1Aq[9]; //! <cos> vs pT gap 1
238 TProfile* fSinGap1Bq[9]; //! <sin> vs pT gap 1
239 TProfile* fCosGap1Bq[9]; //! <cos> vs pT gap 1
7272833e 240
10a99a07 241 TProfile* fSinGap1A[9]; //! <sin> vs pT gap 1
242 TProfile* fCosGap1A[9]; //! <cos> vs pT gap 1
243 TProfile* fSinGap1B[9]; //! <sin> vs pT gap 1
244 TProfile* fCosGap1B[9]; //! <cos> vs pT gap 1
245
246 //large q
247 TProfile* fResSP_lq; //! resolution
f02b044c 248 TProfile* fResSP_vs_Cent_lq; //! TBD
249 TProfile* f2partCumQA_vs_Cent_lq; //! TBD
250 TProfile* f2partCumQB_vs_Cent_lq; //! TBD
10a99a07 251 TProfile* fv2SPGap1A_lq[9]; //! v2{2} eta gap 1 for all events
252 TProfile* fv2SPGap1B_lq[9]; //! v2{2} eta gap 1 for all events
bc76879c 253 TProfile* fSinGap1Aq_lq[9]; //! <sin> vs pT gap 1
254 TProfile* fCosGap1Aq_lq[9]; //! <cos> vs pT gap 1
255 TProfile* fSinGap1Bq_lq[9]; //! <sin> vs pT gap 1
256 TProfile* fCosGap1Bq_lq[9]; //! <cos> vs pT gap 1
10a99a07 257 TProfile* fSinGap1A_lq[9]; //! <sin> vs pT gap 1
258 TProfile* fCosGap1A_lq[9]; //! <cos> vs pT gap 1
259 TProfile* fSinGap1B_lq[9]; //! <sin> vs pT gap 1
260 TProfile* fCosGap1B_lq[9]; //! <cos> vs pT gap 1
7272833e 261
10a99a07 262 //small q
263 TProfile* fResSP_sq; //! resolution
f02b044c 264 TProfile* fResSP_vs_Cent_sq; //! TBD
265 TProfile* f2partCumQA_vs_Cent_sq; //! TBD
266 TProfile* f2partCumQB_vs_Cent_sq; //! TBD
10a99a07 267 TProfile* fv2SPGap1A_sq[9]; //! v2{2} eta gap 1 for all events
268 TProfile* fv2SPGap1B_sq[9]; //! v2{2} eta gap 1 for all events
bc76879c 269 TProfile* fSinGap1Aq_sq[9]; //! <sin> vs pT gap 1
270 TProfile* fCosGap1Aq_sq[9]; //! <cos> vs pT gap 1
271 TProfile* fSinGap1Bq_sq[9]; //! <sin> vs pT gap 1
272 TProfile* fCosGap1Bq_sq[9]; //! <cos> vs pT gap 1
10a99a07 273 TProfile* fSinGap1A_sq[9]; //! <sin> vs pT gap 1
274 TProfile* fCosGap1A_sq[9]; //! <cos> vs pT gap 1
275 TProfile* fSinGap1B_sq[9]; //! <sin> vs pT gap 1
276 TProfile* fCosGap1B_sq[9]; //! <cos> vs pT gap 1
7272833e 277
29fbaf8a 278 // MC closure test
7272833e 279
f02b044c 280 TProfile* fResSP_inclusive; //! TBD
281 TProfile* fv2SPGap1A_inclusive_mb; //! TBD
282 TProfile* fv2SPGap1B_inclusive_mb; //! TBD
283 TProfile* fv2SPGap1A_inclusive_lq; //! TBD
284 TProfile* fv2SPGap1B_inclusive_lq; //! TBD
285 TProfile* fv2SPGap1A_inclusive_sq; //! TBD
286 TProfile* fv2SPGap1B_inclusive_sq; //! TBD
7272833e 287
f02b044c 288 TProfile* fResSPmc_inclusive; //! TBD
289 TProfile* fv2SPGap1Amc_inclusive_mb; //! TBD
290 TProfile* fv2SPGap1Bmc_inclusive_mb; //! TBD
291 TProfile* fv2SPGap1Amc_inclusive_lq; //! TBD
292 TProfile* fv2SPGap1Bmc_inclusive_lq; //! TBD
293 TProfile* fv2SPGap1Amc_inclusive_sq; //! TBD
294 TProfile* fv2SPGap1Bmc_inclusive_sq; //! TBD
7272833e 295
52bfa7e6 296 // v2 vs qvec...
7272833e 297
52bfa7e6 298 TProfile* fResGap1w; //!
299 TProfile* fV2IntGap1w; //! integrated v2 for gap 0.8 w
300 TProfile* fResSP_vs_Qvec[9]; //! TBD
301 TProfile* fV2IntGap1wq[9]; //!
7272833e 302
f02b044c 303 Bool_t fIsRecoEff; // TBD
e4d189de 304 TList * fRecoEffList; // reconstruction efficiency file
7272833e 305
52bfa7e6 306 Bool_t fQvecGen; //enable Qvec from generated
307 Int_t fQgenType; // type==0 qgen from tracks - type==1 qgen from vzero
e3bcd147 308 Int_t fnNchBins; //Ncharged
7272833e 309
509a25f9 310 Bool_t fDoCentrSystCentrality; //systematic check on centrality estimation
311
7272833e 312
10a99a07 313 AliAnalysisTaskV2AllChAOD(const AliAnalysisTaskV2AllChAOD&);
314 AliAnalysisTaskV2AllChAOD& operator=(const AliAnalysisTaskV2AllChAOD&);
7272833e 315
e4d189de 316 ClassDef(AliAnalysisTaskV2AllChAOD, 16);
10a99a07 317};
318
319#endif