]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/AliForwardFlowTaskQC.h
removed ZDC-V0 outliers cleaning
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardFlowTaskQC.h
CommitLineData
d2bea14e 1//
2// Calculate the flow in the forward regions using the Q cumulants method
3//
4#ifndef ALIFORWARDFLOWTASKQC_H
5#define ALIFORWARDFLOWTASKQC_H
ffca499d 6/**
7 * @file AliForwardFlowTaskQC.h
8 * @author Alexander Hansen
9 * @date Wed Mar 23 14:05:06 2011
10 *
11 * @brief
12 *
13 *
14 * @ingroup pwg2_forward_flow
15 */
d2bea14e 16#include "AliAnalysisTaskSE.h"
58f5fae2 17#include "AliForwardFlowUtil.h"
18class AliAODEvent;
d2bea14e 19
ffca499d 20/**
21 * @defgroup pwg2_forward_traks_flow Flow tasks
22 * @ingroup pwg2_forward_tasks
23 */
d2bea14e 24/**
25 * Calculate the flow in the forward regions using the Q cumulants method
26 *
27 * @par Inputs:
28 * - AliAODEvent
29 *
30 * Outputs:
31 * - AnalysisResults.root
32 *
ffca499d 33 * @ingroup pwg2_forward_tasks_flow
34 * @ingroup pwg2_forward_flow
d2bea14e 35 *
9d05ffeb 36 * @todo Add centrality stuff
37 *
d2bea14e 38 */
39class AliForwardFlowTaskQC : public AliAnalysisTaskSE
40{
41public:
42 /**
43 * Constructor
44 */
9d05ffeb 45 AliForwardFlowTaskQC();
d2bea14e 46 /**
47 * Constructor
48 *
49 * @param name Name of task
50 */
9d05ffeb 51 AliForwardFlowTaskQC(const char* name);
d2bea14e 52 /**
53 * Destructor
54 */
ffca499d 55 virtual ~AliForwardFlowTaskQC() {}
9d05ffeb 56 /**
d2bea14e 57 * @{
ffca499d 58 * @name Task interface methods
d2bea14e 59 */
60 /**
61 * Create output objects
62 *
ffca499d 63 * @todo Check if this shouldn't be UserCreateOutputObjects!
d2bea14e 64 */
9d05ffeb 65 virtual void CreateOutputObjects();
d2bea14e 66 /**
67 * Initialize the task
68 *
69 */
9d05ffeb 70 virtual void Init() {}
d2bea14e 71 /**
72 * Process each event
73 *
74 * @param option Not used
75 */
9d05ffeb 76 virtual void UserExec(Option_t *option);
d2bea14e 77 /**
78 * End of job
79 *
80 * @param option Not used
81 */
9d05ffeb 82 virtual void Terminate(Option_t *option);
ffca499d 83 /* @} */
d2bea14e 84 /*
85 * Returns the outputlist
86 *
ffca499d 87 * @return output list
d2bea14e 88 */
9d05ffeb 89 TList* GetOutputList() { return fOutputList; }
d2bea14e 90 /*
ffca499d 91 * Set Number of @f$ \eta@f$ bins to be used in flow analysis
d2bea14e 92 *
ffca499d 93 * @param nbins Number of @f$ \eta@f$ bins
d2bea14e 94 */
9d05ffeb 95 void SetUseNEtaBins(Int_t nbins) { fEtaBins = nbins; }
d2bea14e 96 /*
ffca499d 97 * Set which harmonics to calculate. @f$ v_{1}@f$ to @f$ v_{4}@f$ is
98 * available and calculated as default
d2bea14e 99 *
ffca499d 100 * @param v1 Do @f$ v_{1}@f$
101 * @param v2 Do @f$ v_{2}@f$
102 * @param v3 Do @f$ v_{3}@f$
103 * @param v4 Do @f$ v_{4}@f$
d2bea14e 104 */
9d05ffeb 105 void SetDoHarmonics(Bool_t v1 = kTRUE, Bool_t v2 = kTRUE,
106 Bool_t v3 = kTRUE, Bool_t v4 = kTRUE) {
107 fv[1] = v1; fv[2] = v2; fv[3] = v3; fv[4] = v4; }
58f5fae2 108 /*
109 * Set string to add flow to MC truth particles
ffca499d 110 *
111 * @param type String
58f5fae2 112 */
113 void AddFlow(TString type = "") { fAddFlow = type; }
114 /*
115 * Set which function fAddFlow should use
ffca499d 116 *
117 * @param number Type of AddFlow
58f5fae2 118 */
119 void AddFlowType(Int_t number = 0) { fAddType = number; }
120 /*
121 * Set which order of flow to add
ffca499d 122 *
123 * @param order Flow order
58f5fae2 124 */
125 void AddFlowOrder(Int_t order = 2) { fAddOrder = order; }
126 /**
127 * Set Z vertex range - Used by flow task
ffca499d 128 *
129 * @param vertex Vertex range
58f5fae2 130 */
131 void SetVertexRange(Int_t vertex = 2) { fZvertex = vertex; }
ffca499d 132protected:
d2bea14e 133 /**
ffca499d 134 * Copy constructor
135 *
136 * @param o Object to copy from
d2bea14e 137 */
ffca499d 138 AliForwardFlowTaskQC(const AliForwardFlowTaskQC& o);
139 /**
140 * Assignment operator
141 *
142 * @return Reference to this object
143 */
144 AliForwardFlowTaskQC& operator=(const AliForwardFlowTaskQC&) { return *this; }
d2bea14e 145 /*
9d05ffeb 146 * if MC information is available do analysis on Monte Carlo truth
147 * and track references
d2bea14e 148 *
149 */
9d05ffeb 150 void ProcessPrimary();
151 /**
152 * Calculate Q cumulant
ffca499d 153 *
154 * @param type Determines which histograms should be used
155 * - "" = data histograms
156 * - "TrRef" = track reference histograms
157 * - "MC" = MC truth histograms
158 * @param harmonic Which harmonic to calculate
9d05ffeb 159 */
160 void CumulantsMethod(TString type, Int_t harmonic);
161 /**
162 * Caclulate the variance of x squared - used to finalize
163 * calculations in Terminate()
164 *
ffca499d 165 * @param wxx2 Weight of @f$ x^2@f$
166 * @param x @f$ x@f$
167 * @param wx Weight of @f$ x@f$
168 * @param wxx Weight of @f$ x^2@f$
169 * @param sqrtwx2 @f$ \sqrt{wx^2}@f$
170 *
171 * @return Variance squared
9d05ffeb 172 */
173 Double_t VarSQ(Double_t wxx2, Double_t x, Double_t wx,
58f5fae2 174 Double_t wxx, Double_t sqrtwx2) const ;
ffca499d 175 /**
9d05ffeb 176 * Caclulate the covariance between x and y - used to finalize
177 * calculations in Terminate()
ffca499d 178 *
179 * @param wxwyxy @f$ w_x w_y x y@f$
180 * @param wxwy @f$ w_x w_y@f$
181 * @param XY @f$ xy@f$
182 * @param wx @f$ w_x@f$
183 * @param wy @f$ w_y@f$
184 *
185 * @return
d2bea14e 186 */
9d05ffeb 187 Double_t CovXY(Double_t wxwyxy, Double_t wxwy, Double_t XY,
58f5fae2 188 Double_t wx, Double_t wy) const;
d2bea14e 189
9d05ffeb 190 TList* fOutputList; // Output list
58f5fae2 191 AliForwardFlowUtil* fFlowUtil;// AliForwardFlowUtil
9d05ffeb 192 AliAODEvent* fAOD; // AOD event
193 Bool_t fMC; // Is MC flags
194 Int_t fEtaBins; // Number of eta bins in histograms
195 Bool_t fv[5]; // Calculate v_{n} flag
58f5fae2 196 TString fAddFlow; // Add flow string
197 Int_t fAddType; // Add flow type #
198 Int_t fAddOrder; // Add flow order
199 Int_t fZvertex; // Z vertex range
200 Double_t fCent; // Centrality
201
202
9d05ffeb 203 ClassDef(AliForwardFlowTaskQC, 1); // Analysis task for FMD analysis
d2bea14e 204};
205
206#endif
207// Local Variables:
208// mode: C++
209// End: