]>
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" | |
10 | #include "AliV0ReaderV1.h" | |
11 | #include "AliEventplane.h" | |
12 | #include "TVector2.h" | |
13 | ||
14 | #include "TProfile.h" | |
15 | using namespace std; | |
16 | ||
17 | class AliAnalysisTaskPi0v2 : public AliAnalysisTaskSE{ | |
18 | ||
19 | public: | |
20 | ||
21 | enum EEventPlaneMethod{ | |
22 | kTPC=0, | |
23 | kTPCEtaGap=1, | |
24 | kV0A=2, | |
25 | kV0C=3, | |
26 | knEPMethod=4 | |
27 | }; | |
28 | ||
29 | enum EPDGCode{ | |
30 | kPi0=111, | |
31 | kEta=221 | |
32 | }; | |
33 | ||
34 | static const Int_t knBinsPhi=6; | |
35 | ||
36 | AliAnalysisTaskPi0v2(const char *name); | |
37 | virtual ~AliAnalysisTaskPi0v2(); | |
38 | ||
39 | virtual void UserCreateOutputObjects(); | |
40 | virtual void UserExec(Option_t *option); | |
41 | virtual void Terminate(Option_t *); | |
42 | ||
43 | void SetCentralityBins(Double_t *bins,Int_t nbins); | |
44 | void SetRadialBins(Float_t *bins,Int_t nbins); | |
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); | |
55 | ||
56 | void SetFillQA(Bool_t fill){fFillQA=fill;} | |
57 | ||
58 | void SetWeightMultiplicity(Bool_t b){fWeightMultiplicity=b;} | |
59 | ||
60 | private: | |
61 | Bool_t InitEvent(); | |
62 | ||
63 | void ProcessGammas(Int_t iCut,EEventPlaneMethod iEP); | |
64 | void ProcessPi0s(Int_t iCut,EEventPlaneMethod iEP); | |
65 | void ProcessQA(); | |
66 | ||
67 | void InitConversionSelection(); | |
68 | Double_t GetPhiwrtRP(Double_t phi); | |
69 | Double_t GetPhotonPhiwrtRP(AliAODConversionPhoton *gamma,EEventPlaneMethod iEP); | |
70 | Double_t GetPi0PhiwrtRP(AliAODConversionMother *pi0,EEventPlaneMethod iEP); | |
71 | Double_t GetChargedPhiwrtRP(AliVTrack *charged,EEventPlaneMethod iEP); | |
72 | void GetPhotondNdPhi(Int_t *dNdPhi,Int_t iEP,Int_t iCut=0); | |
73 | void GetChargeddNdPhi(Int_t *dNdPhi,Int_t &ntot,Int_t iEP); | |
74 | Int_t GetPhiBin(Double_t phiwrt); | |
75 | Int_t GetPhotonPhiBin(AliAODConversionPhoton *gamma,Int_t iEP); | |
76 | Double_t GetMCPhotonPhiwrtRP(TParticle *gamma,EEventPlaneMethod iEP); | |
77 | TVector2 GetEPContribution(AliAODConversionPhoton *gamma); | |
78 | Double_t GetEventPlaneAngle(EEventPlaneMethod EPmethod,Double_t eta=0,AliAODConversionPhoton *gamma0=NULL,AliAODConversionPhoton *gamma1=NULL); | |
79 | Double_t GetTPCSubEPEta(Double_t etamin,Double_t etamax); | |
80 | Double_t GetCorrectedTPCEPAngle(AliAODConversionPhoton *gamma0=NULL,AliAODConversionPhoton *gamma1=NULL); | |
81 | Bool_t SetCentrality(); | |
82 | void ProcessEventPlane(); | |
83 | Int_t GetRadialBin(Double_t radius); | |
84 | Int_t GetRunIndex(Int_t run); | |
85 | ||
86 | // For V0 EP | |
87 | void GetV0EP(AliVEvent * event); | |
88 | void OpenInfoCalibration(Int_t run); | |
89 | ||
90 | Double_t ApplyFlatteningTPC(Double_t phi, Double_t c); | |
91 | Double_t ApplyFlatteningV0A(Double_t phi, Double_t c); | |
92 | Double_t ApplyFlatteningV0C(Double_t phi, Double_t c); | |
93 | ||
94 | ||
95 | // Constants | |
96 | ||
97 | static const Int_t knbinsGamma=5; | |
98 | static const Int_t knbinsGammaMult=4; | |
99 | static const Int_t knbinsPi0=5; | |
100 | ||
101 | static const Int_t kGCnYBinsSpectra = 80; | |
102 | static const Double_t kGCfirstYBinSpectra = 0.; | |
103 | static const Double_t kGClastYBinSpectra = 8.; | |
104 | ||
105 | // Class variables and pointer | |
106 | ||
107 | AliV0ReaderV1 *fV0Reader; // V0Reader | |
108 | AliConversionSelection **fConversionSelection; // Selection of Particles for given Cut | |
109 | TClonesArray *fConversionGammas; //Reconstructed Photons; | |
110 | Int_t fNCentralityBins; // Number of Centrality Bins | |
111 | Double_t *fCentralityBins; // CentralityBins for Analysis | |
112 | Float_t fCentrality; //Event Centrality | |
113 | Int_t fCentralityBin; // Event Centrality Bin | |
114 | Int_t fNRadialBins; // Number of Radial Bins for Photon Conversion Point | |
115 | Double_t *fRadialBins; // Radial Bins for Photons Conversion Point | |
116 | Int_t fNBinsPhi; // Number of Phi wrt RP bins | |
117 | AliEventplane *fEP; // Event Plane Pointer | |
118 | Bool_t fWeightMultiplicity; // Use Multiplicity Weight | |
119 | Double_t fEtaMax; // Eta Max for analysis; | |
120 | Double_t fEtaGap; // Eta Gap | |
121 | Double_t fRPTPCEtaA; // TPCEtaA event plane | |
122 | Double_t fRPTPCEtaC; // TPCEtaC event plane | |
123 | Double_t fRPV0A; // V0A event plane | |
124 | Double_t fRPV0C; // V0C event plane | |
125 | Int_t fNCuts; // NUmber of Photon Cuts for v2 analysis | |
126 | TList *fCutList; // Cuts for Photon v2 analysis | |
127 | AliConversionCuts *fConversionCuts; // Cuts used by the V0Reader | |
128 | TRandom3 *fRandomizer; // Randomizer for Event Plane Randomisation | |
129 | TList *fOutputList; // List for Output (Histograms etc.) | |
130 | EPDGCode fMesonPDGCode; // PDG Code of the processed Meson (for MC truth) | |
f7cf81bd | 131 | Double_t *fInvMassRange; // Inv Mass Range |
132 | Double_t fDeltaPsiRP; // Difference between subEventPlane angles | |
133 | Int_t fRunNumber; // current run number | |
134 | Int_t fRunIndex; // current internal run index | |
135 | Int_t fNEPMethods; // number of EP methods | |
136 | Bool_t fFillQA; // Fill QA Histograms | |
137 | ||
138 | // Histograms | |
139 | ||
140 | TH1F *hNEvents; | |
141 | ||
142 | // RP | |
143 | TH2F *hRPTPC; | |
144 | TH2F *hRPV0A; | |
145 | TH2F *hRPV0C; | |
146 | TH2F *hRPTPCAC; | |
147 | TH2F *hRPV0ATPC; | |
148 | TH2F *hRPV0CTPC; | |
149 | TH2F *hRPV0AC; | |
150 | TH2F *hCos2TPC; | |
151 | TH2F *hCos2V0ATPC; | |
152 | TH2F *hCos2V0CTPC; | |
153 | TH2F *hCos2V0AC; | |
154 | TH2F *hRPTPCEtaA; | |
155 | TH2F *hRPTPCEtaC; | |
156 | TH2F *hRPTPCEtaAC; | |
157 | TH2F *hCos2TPCEta; | |
158 | ||
159 | ||
160 | // Gamma | |
161 | TH2F *hGammaMultCent; | |
162 | TH3F **hGammaPhi; | |
163 | TH2F *hMultChargedvsNGamma; | |
164 | TH2F *hMultChargedvsVZERO; | |
165 | TH2F *hMultChargedvsSPD; | |
166 | ||
167 | THnSparseF *hGammadNdPhi; | |
168 | THnSparseF *hGammaMultdPhiTRUE; | |
169 | THnSparseF *hGammaMultdPhiRECOTRUE; | |
170 | THnSparseF *hGammaMultTRUE; | |
171 | THnSparseF *hGammaMultRECOTRUE; | |
172 | THnSparseF **hGammaMultdPhi; | |
173 | THnSparseF **hGammaMult; | |
174 | ||
175 | THnSparseF **hGamma; | |
176 | ||
177 | THnSparseF *hCharged; | |
178 | ||
179 | // Pi0 | |
180 | THnSparseF **hPi0; | |
181 | THnSparseF **hPi0BG; | |
182 | ||
183 | //V0 Calibration | |
184 | ||
185 | static const Int_t nCentrBinV0 = 9; // # cenrality bins | |
186 | TProfile *fMultV0; // object containing VZERO calibration information | |
187 | Float_t fV0Cpol,fV0Apol; // loaded by OADB | |
188 | Float_t fMeanQ[nCentrBinV0][2][2]; // and recentering | |
189 | Float_t fWidthQ[nCentrBinV0][2][2]; // ... | |
190 | ||
191 | ||
192 | AliAnalysisTaskPi0v2(const AliAnalysisTaskPi0v2&); // not implemented | |
193 | AliAnalysisTaskPi0v2& operator=(const AliAnalysisTaskPi0v2&); // not implemented | |
194 | ||
195 | ClassDef(AliAnalysisTaskPi0v2, 3); // example of analysis | |
196 | }; | |
197 | ||
198 | #endif | |
199 |