2 // Calculate the flow in the forward regions using the Q cumulants method
4 #ifndef ALIFORWARDFLOWTASKQC_H
5 #define ALIFORWARDFLOWTASKQC_H
7 * @file AliForwardFlowTaskQC.h
8 * @author Alexander Hansen
9 * @date Tue Feb 14 2012
14 * @ingroup pwglf_forward_flow
16 #include "AliAnalysisTaskSE.h"
17 class AliAODForwardMult;
23 * @defgroup pwglf_forward_tasks_flow Flow tasks
24 * @ingroup pwglf_forward_tasks
27 * Calculate the flow in the forward regions using the Q cumulants method
33 * - AnalysisResults.root
35 * @ingroup pwglf_forward_tasks_flow
36 * @ingroup pwglf_forward_flow
40 class AliForwardFlowTaskQC : public AliAnalysisTaskSE
46 AliForwardFlowTaskQC();
50 * @param name Name of task
52 AliForwardFlowTaskQC(const char* name);
56 virtual ~AliForwardFlowTaskQC() {}
59 * @name Task interface methods
62 * Create output objects
64 virtual void UserCreateOutputObjects();
68 virtual void Init() {}
72 * @param option Not used
74 virtual void UserExec(Option_t *option);
78 * @param option Not used
80 virtual void Terminate(Option_t *option);
83 * Returns the outputlist
87 TList* GetOutputList() { return fOutputList; }
89 * Check AODForwardMult object for trigger, vertex and centrality
90 * returns true if event is OK
96 Bool_t AODCheck(const AliAODForwardMult* aodfm);
98 * Set which harmonics to calculate. @f$ v_{1}@f$ to @f$ v_{4}@f$ is
99 * available and calculated as default
101 * @param v1 Do @f$ v_{1}$f$
102 * @param v2 Do @f$ v_{2}$f$
103 * @param v3 Do @f$ v_{3}$f$
104 * @param v4 Do @f$ v_{4}$f$
105 * @param v5 Do @f$ v_{5}$f$
106 * @param v6 Do @f$ v_{6}$f$
110 void SetDoHarmonics(Bool_t v1 = kTRUE, Bool_t v2 = kTRUE,
111 Bool_t v3 = kTRUE, Bool_t v4 = kTRUE,
112 Bool_t v5 = kTRUE, Bool_t v6 = kTRUE) {
113 fv[1] = v1; fv[2] = v2; fv[3] = v3; fv[4] = v4; fv[5] = v5; fv[6] = v6;}
115 * Nested class to handle cumulant calculations in vertex bins
117 class VertexBin : public TNamed
127 * @param vLow Min vertex z-coordinate
128 * @param vHigh Max vertex z-coordinate
129 * @param moment Flow moment
130 * @param type Data type (FMD/SPD/FMDTR/SPDTR/MC)
132 VertexBin(const Int_t vLow, const Int_t vHigh,
133 const Int_t moment, const Char_t* type);
137 * @param o Object to copy from
141 VertexBin(const VertexBin& o);
143 * Assignment operator
149 VertexBin& operator=(const VertexBin&);
155 * Add vertex bin output to list
157 * @param list Histograms are added to this list
161 virtual void AddOutput(TList* list);
163 * Check if vertex vZ is in range for this bin
165 * @param vZ z-coordinate of vertex to check
169 Bool_t CheckVertex(Double_t vZ);
171 * Fill reference and differential flow histograms for analysis
173 * @param dNdetadphi 2D data histogram
175 * @return false if bad event (det. hotspot)
177 Bool_t FillHists(TH2D dNdetadphi);
179 * Do cumulants calculations for current event with
182 * @param cent Event centrality
186 void CumulantsAccumulate(Double_t cent);
188 * Finish cumulants calculations. Takes input and
189 * output lists in case Terminate is called separately
191 * @param inlist List with input histograms
192 * @param outlist List with output histograms
196 void CumulantsTerminate(TList* inlist, TList* outlist);
200 * Enumeration for ref/diff histograms
202 enum { kHmult = 1, kHQnRe, kHQnIm, kHQ2nRe, kHQ2nIm };
204 * Enumeration for cumulant histogram
206 enum { kW2Two = 1, kW2, kW4Four, kW4, kQnRe, kQnIm, kM,
207 kCosphi1phi2, kSinphi1phi2, kCosphi1phi2phi3m, kSinphi1phi2phi3m, kMm1m2,
208 kw2two, kw2, kw4four, kw4, kpnRe, kpnIm, kmp,
209 kCospsi1phi2, kSinpsi1phi2, kCospsi1phi2phi3m, kSinpsi1phi2phi3m,
210 kmpmq, kCospsi1phi2phi3p, kSinpsi1phi2phi3p };
212 const Int_t fMoment; // flow moment
213 const Int_t fVzMin; // z-vertex min
214 const Int_t fVzMax; // z-vertex max
215 const Char_t* fType; // data type
216 TH2D* fCumuRef; // histogram for reference flow
217 TH2D* fCumuDiff; // histogram for differential flow
218 TH3D* fCumuHist; // histogram for cumulants calculations
219 TH3D* fHistTwoCorr; // Diagnostics histogram for <2>
220 TH3D* fHistW2; // Diagnostics histogram for w_<2>
221 TH3D* fHistFourCorr; // Diagnostics histogram for <4>
222 TH3D* fHistW4; // Diagnostics histogram for w_<4>
223 TH2D* fdNdedpAcc; // Diagnostics histogram to make acc. maps
225 ClassDef(VertexBin, 1); // object for cumulants ananlysis in FMD
232 * @param o Object to copy from
234 AliForwardFlowTaskQC(const AliForwardFlowTaskQC& o);
236 * Assignment operator
238 * @return Reference to this object
240 AliForwardFlowTaskQC& operator=(const AliForwardFlowTaskQC&);
242 * Initiate vertex bin objects
244 virtual void InitVertexBins();
246 * Initiate diagnostics histograms
248 virtual void InitHists();
252 virtual Bool_t Analyze();
256 virtual void Finalize();
258 TList fBinsFMD; // list with FMD VertexBin objects
259 TList fBinsSPD; // list with SPD VertexBin objects
260 TList* fSumList; // sum list
261 TList* fOutputList; // Output list
262 AliAODEvent* fAOD; // AOD event
263 Bool_t fv[7]; // Calculate v_{n} flag
264 Float_t fZvertex; // Z vertex bin
265 Double_t fCent; // Centrality
266 TH1D* fHistCent; // Diagnostics hist for centrality
267 TH1D* fHistVertexSel; // Diagnostics hist for selected vertices
268 TH1D* fHistVertexAll; // Diagnostics hist for all vertices
270 ClassDef(AliForwardFlowTaskQC, 1); // Analysis task for FMD analysis