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