]>
Commit | Line | Data |
---|---|---|
f7cf81bd | 1 | #ifndef AliAnalysisTaskPi0v2_cxx |
2 | #define AliAnalysisTaskPi0v2_cxx | |
3 | ||
4 | #include "AliAnalysisTaskSE.h" | |
5 | #include "TH1.h" | |
6 | #include "TH2.h" | |
7 | #include "TH3.h" | |
8 | #include "AliLog.h" | |
9 | #include "AliConversionSelection.h" | |
ca91a3e1 | 10 | #include "AliConversionMesonCuts.h" |
f7cf81bd | 11 | #include "AliV0ReaderV1.h" |
12 | #include "AliEventplane.h" | |
13 | #include "TVector2.h" | |
14 | ||
15 | #include "TProfile.h" | |
16 | using namespace std; | |
17 | ||
18 | class AliAnalysisTaskPi0v2 : public AliAnalysisTaskSE{ | |
19 | ||
20 | public: | |
21 | ||
22 | enum EEventPlaneMethod{ | |
23 | kTPC=0, | |
24 | kTPCEtaGap=1, | |
25 | kV0A=2, | |
26 | kV0C=3, | |
27 | knEPMethod=4 | |
28 | }; | |
29 | ||
30 | enum EPDGCode{ | |
31 | kPi0=111, | |
32 | kEta=221 | |
33 | }; | |
34 | ||
35 | static const Int_t knBinsPhi=6; | |
36 | ||
37 | AliAnalysisTaskPi0v2(const char *name); | |
38 | virtual ~AliAnalysisTaskPi0v2(); | |
39 | ||
40 | virtual void UserCreateOutputObjects(); | |
41 | virtual void UserExec(Option_t *option); | |
42 | virtual void Terminate(Option_t *); | |
43 | ||
44 | void SetCentralityBins(Double_t *bins,Int_t nbins); | |
f7cf81bd | 45 | |
46 | void SetMeson(EPDGCode meson){fMesonPDGCode=meson;} | |
47 | ||
48 | void SetNBinsPhi(Int_t nbins){fNBinsPhi=nbins;} | |
49 | void SetV0Reader(AliV0ReaderV1 *v0Reader){fV0Reader=v0Reader;} | |
50 | void SetInvMassRange(Double_t range[2]){fInvMassRange[0]=range[0];fInvMassRange[1]=range[1];}; | |
51 | void SetEtaGap(Double_t gapsize){fEtaGap=gapsize;}; | |
52 | ||
53 | void SetMesonCuts(const TString cut); | |
54 | void SetCuts(TString *cutarray,Int_t ncuts); | |
ca91a3e1 | 55 | void SetMesonCutList(Int_t nCuts, TList *cutArray){ |
56 | fMesonCutList = cutArray; | |
57 | } | |
f7cf81bd | 58 | |
f7cf81bd | 59 | |
ca91a3e1 | 60 | void SetFillQA(Bool_t fill){fFillQA=fill;} |
f7cf81bd | 61 | |
62 | private: | |
63 | Bool_t InitEvent(); | |
64 | ||
65 | void ProcessGammas(Int_t iCut,EEventPlaneMethod iEP); | |
66 | void ProcessPi0s(Int_t iCut,EEventPlaneMethod iEP); | |
67 | void ProcessQA(); | |
68 | ||
69 | void InitConversionSelection(); | |
70 | Double_t GetPhiwrtRP(Double_t phi); | |
71 | Double_t GetPhotonPhiwrtRP(AliAODConversionPhoton *gamma,EEventPlaneMethod iEP); | |
72 | Double_t GetPi0PhiwrtRP(AliAODConversionMother *pi0,EEventPlaneMethod iEP); | |
73 | Double_t GetChargedPhiwrtRP(AliVTrack *charged,EEventPlaneMethod iEP); | |
74 | void GetPhotondNdPhi(Int_t *dNdPhi,Int_t iEP,Int_t iCut=0); | |
75 | void GetChargeddNdPhi(Int_t *dNdPhi,Int_t &ntot,Int_t iEP); | |
76 | Int_t GetPhiBin(Double_t phiwrt); | |
77 | Int_t GetPhotonPhiBin(AliAODConversionPhoton *gamma,Int_t iEP); | |
78 | Double_t GetMCPhotonPhiwrtRP(TParticle *gamma,EEventPlaneMethod iEP); | |
79 | TVector2 GetEPContribution(AliAODConversionPhoton *gamma); | |
80 | Double_t GetEventPlaneAngle(EEventPlaneMethod EPmethod,Double_t eta=0,AliAODConversionPhoton *gamma0=NULL,AliAODConversionPhoton *gamma1=NULL); | |
81 | Double_t GetTPCSubEPEta(Double_t etamin,Double_t etamax); | |
82 | Double_t GetCorrectedTPCEPAngle(AliAODConversionPhoton *gamma0=NULL,AliAODConversionPhoton *gamma1=NULL); | |
83 | Bool_t SetCentrality(); | |
84 | void ProcessEventPlane(); | |
85 | Int_t GetRadialBin(Double_t radius); | |
86 | Int_t GetRunIndex(Int_t run); | |
87 | ||
88 | // For V0 EP | |
89 | void GetV0EP(AliVEvent * event); | |
90 | void OpenInfoCalibration(Int_t run); | |
91 | ||
92 | Double_t ApplyFlatteningTPC(Double_t phi, Double_t c); | |
93 | Double_t ApplyFlatteningV0A(Double_t phi, Double_t c); | |
94 | Double_t ApplyFlatteningV0C(Double_t phi, Double_t c); | |
95 | ||
96 | ||
97 | // Constants | |
98 | ||
ca91a3e1 | 99 | enum Ebinsgamma{ |
100 | kGammaPt=0, | |
101 | kGammadPhi, | |
102 | kGammaCent, | |
103 | kGammaEPM, | |
104 | knbinsGamma | |
105 | }; | |
106 | ||
107 | enum Ebinspi0{ | |
108 | kPi0Pt=0, | |
109 | kPi0Mass, | |
110 | kPi0dPhi, | |
111 | kPi0Cent, | |
112 | kPi0EPM, | |
113 | knbinsPi0 | |
114 | }; | |
f7cf81bd | 115 | |
ca91a3e1 | 116 | static const Int_t knbinsGammaMult=3; |
117 | ||
f7cf81bd | 118 | static const Int_t kGCnYBinsSpectra = 80; |
119 | static const Double_t kGCfirstYBinSpectra = 0.; | |
120 | static const Double_t kGClastYBinSpectra = 8.; | |
121 | ||
122 | // Class variables and pointer | |
123 | ||
124 | AliV0ReaderV1 *fV0Reader; // V0Reader | |
125 | AliConversionSelection **fConversionSelection; // Selection of Particles for given Cut | |
126 | TClonesArray *fConversionGammas; //Reconstructed Photons; | |
127 | Int_t fNCentralityBins; // Number of Centrality Bins | |
128 | Double_t *fCentralityBins; // CentralityBins for Analysis | |
129 | Float_t fCentrality; //Event Centrality | |
130 | Int_t fCentralityBin; // Event Centrality Bin | |
f7cf81bd | 131 | Int_t fNBinsPhi; // Number of Phi wrt RP bins |
132 | AliEventplane *fEP; // Event Plane Pointer | |
133 | Bool_t fWeightMultiplicity; // Use Multiplicity Weight | |
134 | Double_t fEtaMax; // Eta Max for analysis; | |
135 | Double_t fEtaGap; // Eta Gap | |
136 | Double_t fRPTPCEtaA; // TPCEtaA event plane | |
137 | Double_t fRPTPCEtaC; // TPCEtaC event plane | |
138 | Double_t fRPV0A; // V0A event plane | |
139 | Double_t fRPV0C; // V0C event plane | |
140 | Int_t fNCuts; // NUmber of Photon Cuts for v2 analysis | |
141 | TList *fCutList; // Cuts for Photon v2 analysis | |
142 | AliConversionCuts *fConversionCuts; // Cuts used by the V0Reader | |
ca91a3e1 | 143 | TList *fMesonCutList; // Cuts for Photon v2 analysis |
144 | AliConversionMesonCuts *fMesonCuts; // Cuts used by the V0Reader | |
f7cf81bd | 145 | TRandom3 *fRandomizer; // Randomizer for Event Plane Randomisation |
146 | TList *fOutputList; // List for Output (Histograms etc.) | |
147 | EPDGCode fMesonPDGCode; // PDG Code of the processed Meson (for MC truth) | |
f7cf81bd | 148 | Double_t *fInvMassRange; // Inv Mass Range |
149 | Double_t fDeltaPsiRP; // Difference between subEventPlane angles | |
150 | Int_t fRunNumber; // current run number | |
151 | Int_t fRunIndex; // current internal run index | |
152 | Int_t fNEPMethods; // number of EP methods | |
153 | Bool_t fFillQA; // Fill QA Histograms | |
154 | ||
155 | // Histograms | |
156 | ||
157 | TH1F *hNEvents; | |
158 | ||
159 | // RP | |
160 | TH2F *hRPTPC; | |
161 | TH2F *hRPV0A; | |
162 | TH2F *hRPV0C; | |
163 | TH2F *hRPTPCAC; | |
164 | TH2F *hRPV0ATPC; | |
165 | TH2F *hRPV0CTPC; | |
166 | TH2F *hRPV0AC; | |
167 | TH2F *hCos2TPC; | |
168 | TH2F *hCos2V0ATPC; | |
169 | TH2F *hCos2V0CTPC; | |
170 | TH2F *hCos2V0AC; | |
171 | TH2F *hRPTPCEtaA; | |
172 | TH2F *hRPTPCEtaC; | |
173 | TH2F *hRPTPCEtaAC; | |
174 | TH2F *hCos2TPCEta; | |
175 | ||
ca91a3e1 | 176 | TH2F *hCos2TPCWeightedPhoton; |
177 | TH2F *hCos2TPCEtaWeightedPhoton; | |
178 | TH2F *hCos2V0ATPCWeightedPhoton; | |
179 | TH2F *hCos2V0CTPCWeightedPhoton; | |
180 | TH2F *hCos2V0ACWeightedPhoton; | |
181 | ||
182 | TH2F *hCos2TPCWeightedCharged; | |
183 | TH2F *hCos2TPCEtaWeightedCharged; | |
184 | TH2F *hCos2V0ATPCWeightedCharged; | |
185 | TH2F *hCos2V0CTPCWeightedCharged; | |
186 | TH2F *hCos2V0ACWeightedCharged; | |
187 | ||
188 | TH2F *hCos2TPCWeightedV0Mult; | |
189 | TH2F *hCos2TPCEtaWeightedV0Mult; | |
190 | TH2F *hCos2V0ATPCWeightedV0Mult; | |
191 | TH2F *hCos2V0CTPCWeightedV0Mult; | |
192 | TH2F *hCos2V0ACWeightedV0Mult; | |
193 | ||
f7cf81bd | 194 | |
195 | // Gamma | |
196 | TH2F *hGammaMultCent; | |
ca91a3e1 | 197 | TH2F **hGammaPhi; |
f7cf81bd | 198 | TH2F *hMultChargedvsNGamma; |
199 | TH2F *hMultChargedvsVZERO; | |
200 | TH2F *hMultChargedvsSPD; | |
201 | ||
202 | THnSparseF *hGammadNdPhi; | |
203 | THnSparseF *hGammaMultdPhiTRUE; | |
204 | THnSparseF *hGammaMultdPhiRECOTRUE; | |
205 | THnSparseF *hGammaMultTRUE; | |
206 | THnSparseF *hGammaMultRECOTRUE; | |
207 | THnSparseF **hGammaMultdPhi; | |
208 | THnSparseF **hGammaMult; | |
209 | ||
210 | THnSparseF **hGamma; | |
ca91a3e1 | 211 | THnSparseF *hGammaFull; |
f7cf81bd | 212 | |
213 | THnSparseF *hCharged; | |
214 | ||
215 | // Pi0 | |
216 | THnSparseF **hPi0; | |
217 | THnSparseF **hPi0BG; | |
218 | ||
219 | //V0 Calibration | |
220 | ||
221 | static const Int_t nCentrBinV0 = 9; // # cenrality bins | |
222 | TProfile *fMultV0; // object containing VZERO calibration information | |
223 | Float_t fV0Cpol,fV0Apol; // loaded by OADB | |
224 | Float_t fMeanQ[nCentrBinV0][2][2]; // and recentering | |
225 | Float_t fWidthQ[nCentrBinV0][2][2]; // ... | |
226 | ||
ca91a3e1 | 227 | //Event Plane |
228 | THnSparse *hEPVertex; | |
f7cf81bd | 229 | |
230 | AliAnalysisTaskPi0v2(const AliAnalysisTaskPi0v2&); // not implemented | |
231 | AliAnalysisTaskPi0v2& operator=(const AliAnalysisTaskPi0v2&); // not implemented | |
232 | ||
233 | ClassDef(AliAnalysisTaskPi0v2, 3); // example of analysis | |
234 | }; | |
235 | ||
236 | #endif | |
237 |