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