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