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