]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliForwardFlowTaskQC.h
Change to raw OCDB in case not yet set
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / AliForwardFlowTaskQC.h
1 //
2 // Calculate the flow in the forward regions using the Q cumulants method
3 //
4 #ifndef ALIFORWARDFLOWTASKQC_H
5 #define ALIFORWARDFLOWTASKQC_H
6 /**
7  * @file   AliForwardFlowTaskQC.h
8  * @author Alexander Hansen alexander.hansen@cern.ch
9  * @date   Fri Mar 25 13:53:00 2011
10  * 
11  * @brief  
12  * 
13  * 
14  * @ingroup pwg2_forward_flow
15  */
16 #include "AliAnalysisTaskSE.h"
17 #include "AliForwardFlowUtil.h"
18 class AliAODEvent;
19
20  /**
21  * @defgroup pwg2_forward_tasks_flow Flow tasks 
22  * @ingroup pwg2_forward_tasks
23  */
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  *
33  * @ingroup pwg2_forward_tasks_flow
34  * @ingroup pwg2_forward_flow
35  *
36  * @todo Add centrality stuff
37  *
38  */
39 class AliForwardFlowTaskQC : public AliAnalysisTaskSE
40 {
41 public:
42   /** 
43    * Constructor 
44    */
45   AliForwardFlowTaskQC();
46   /** 
47    * Constructor
48    * 
49    * @param name Name of task 
50    */
51   AliForwardFlowTaskQC(const char* name);
52   /**
53    * Destructor
54    */
55   virtual ~AliForwardFlowTaskQC() {}
56   /** 
57    * @{ 
58    * @name Task interface methods 
59    */
60   /** 
61    * Create output objects 
62    * 
63    */
64   virtual void UserCreateOutputObjects();
65   /**
66    * Initialize the task
67    *
68    */
69   virtual void Init() {}
70   /** 
71    * Process each event 
72    *
73    * @param option Not used
74    */  
75   virtual void UserExec(Option_t *option);
76   /** 
77    * End of job
78    * 
79    * @param option Not used 
80    */
81   virtual void Terminate(Option_t *option);
82   /* @} */
83   /*
84    * Returns the outputlist
85    *
86    */
87   TList* GetOutputList() { return fOutputList; }
88   /* 
89    * Set Number of @f$ \eta@f$ bins to be used in flow analysis
90    *
91    */
92   void SetUseNEtaBins(Int_t nbins) { fEtaBins = nbins; }
93   /*
94    * Set which harmonics to calculate. @f$ v_{1}@f$ to @f$ v_{4}@f$ is
95    * available and calculated as default
96    *
97    * @param v1  Do @f$ v_{1}@f$ 
98    * @param v2  Do @f$ v_{2}@f$ 
99    * @param v3  Do @f$ v_{3}@f$ 
100    * @param v4  Do @f$ v_{4}@f$ 
101    */
102   void SetDoHarmonics(Bool_t v1 = kTRUE, Bool_t v2 = kTRUE, 
103                       Bool_t v3 = kTRUE, Bool_t v4 = kTRUE,
104                       Bool_t v5 = kTRUE, Bool_t v6 = kTRUE) { 
105     fv[1] = v1; fv[2] = v2; fv[3] = v3; fv[4] = v4; fv[5] = v5; fv[6] = v6;}
106   /*
107    * Set string to add flow to MC truth particles
108    *
109    * @param type String
110    */
111   void AddFlow(TString type = "") { fAddFlow = type; }
112   /*
113    * Set which function fAddFlow should use
114    *
115    * @param type of AddFlow 
116    */
117   void AddFlowType(Int_t number = 0) { fAddType = number; }
118   /*
119    * Set which order of flow to add
120    *
121    * @param order Flow order 
122    */
123   void AddFlowOrder(Int_t order = 2) { fAddOrder = order; }
124   /*
125    *
126    * Set MC input flag
127    *
128    * @param mc MC input
129    */
130   void SetMCinput(Bool_t mc = kTRUE) { fMC = mc; }
131   /*
132    * Set number of eta bins to be used in reference flow
133    *
134    * @param bins Ref Eta Bins
135    */
136   void SetRefEtaBins(Int_t bins) { fEtaRef = bins; } 
137 protected:
138   /** 
139    * Copy constructor 
140    * 
141    * @param o Object to copy from 
142    */
143   AliForwardFlowTaskQC(const AliForwardFlowTaskQC& o);
144   /** 
145    * Assignment operator 
146    * 
147    * @return Reference to this object 
148    */
149   AliForwardFlowTaskQC& operator=(const AliForwardFlowTaskQC&) { return *this; }
150   /*
151    * if MC information is available do analysis on Monte Carlo truth
152    * and track references
153    *
154    */
155   void ProcessPrimary();
156   /**
157    * Calculate Q cumulant
158    * 
159    * @param type     Determines which histograms should be used
160    *                 - "FMD" = FMD data histograms
161    *                 - "SPD" = SPD data histograms
162    *                 - "TR" = track reference histograms
163    *                 - "MC" = MC truth histograms
164    * @param harmonic Which harmonic to calculate
165    */
166   void CumulantsMethod(TString type, Int_t harmonic);
167
168   TList*         fOutputList;   //  Output list
169   AliForwardFlowUtil* fFlowUtil;//  AliForwardFlowUtil
170   AliAODEvent*   fAOD;          //  AOD event
171   Bool_t         fMC;           //  Is MC flags
172   Int_t          fEtaBins;      //  Number of eta bins in histograms
173   Int_t          fEtaRef;       //  Number of eta bins for reference flow
174   Bool_t         fv[7];         //  Calculate v_{n} flag
175   TString        fAddFlow;      //  Add flow string
176   Int_t          fAddType;      //  Add flow type #
177   Int_t          fAddOrder;     //  Add flow order
178   Float_t        fZvertex;      //  Z vertex bin
179   Double_t       fCent;         //  Centrality
180   
181
182   ClassDef(AliForwardFlowTaskQC, 2); // Analysis task for FMD analysis
183 };
184  
185 #endif
186 // Local Variables:
187 //   mode: C++ 
188 // End: