]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardMCFlowTaskQC.h
75cdec0701d6354832b91659a9d819eaff3234ab
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardMCFlowTaskQC.h
1 //
2 // Calculate the flow in the forward regions using the Q cumulants method
3 //
4 #ifndef ALIFORWARDMCFLOWTASKQC_H
5 #define ALIFORWARDMCFLOWTASKQC_H
6 /**
7  * @file   AliForwardMCFlowTaskQC.h
8  * @author Alexander Hansen alexander.hansen@cern.ch
9  * @date   Tue Feb 14 2012
10  * 
11  * @brief  
12  * 
13  * 
14  * @ingroup pwglf_forward_flow
15  */
16 #include "AliForwardFlowTaskQC.h"
17 #include <TH2D.h>
18 class TGraph;
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  *
37  */
38 class AliForwardMCFlowTaskQC : public AliForwardFlowTaskQC
39 {
40 public:
41   /**
42    * Constructor
43    */
44   AliForwardMCFlowTaskQC();
45   /*
46    * Constructor
47    *
48    * @param name Name of task
49    */
50   AliForwardMCFlowTaskQC(const char* name);
51   /**
52    * Destructor 
53    */
54   virtual ~AliForwardMCFlowTaskQC() {}
55   /**
56    * Check for centrality in AliAODForwardMult object, 
57    * if present return true - also sets fCent value
58    * can be used to get centrality from impact parameter
59    *
60    * @param aodfm AliAODForwardMultObject
61    * 
62    * @return Bool_t 
63    */
64   virtual Bool_t GetCentrality(const AliAODForwardMult* aodfm);
65   /*
66    * Set use parametrization from impact parameter for centrality
67    *
68    * @param use Use impact par
69    */
70   void SetUseImpactParameter(Bool_t use) { fUseImpactPar = use; }
71   /*
72    * Set string to add flow to MC truth particles
73    *
74    * @param type String
75    */
76   void AddFlow(TString type = "") { fAddFlow = type; }
77   /*
78    * Set which function fAddFlow should use
79    *
80    * @param type of AddFlow 
81    */
82   void AddFlowType(Int_t number = 0) { fAddType = number; }
83   /*
84    * Set which order of flow to add
85    *
86    * @param order Flow order 
87    */
88   void AddFlowOrder(Int_t order = 2) { fAddOrder = order; }
89  
90 protected:
91   /*
92    * Copy constructor
93    *
94    * @param o Object to copy from
95    */
96   AliForwardMCFlowTaskQC(const AliForwardMCFlowTaskQC& o);
97   /** 
98    * Assignment operator 
99    * 
100    * @return Reference to this object 
101    */
102   AliForwardMCFlowTaskQC& operator=(const AliForwardMCFlowTaskQC& o);
103   /*
104    * Initiate vertex bin objects
105    */
106   void InitVertexBins();
107    /*
108    * Initiate diagnostics histograms
109    */
110   void InitHists();
111   /*
112    * Analyze event
113    */
114   Bool_t Analyze();
115   /*
116    * Finalize analysis
117    */
118   void Finalize();
119   /**
120    * Loop over AliAODMCParticle branch object and fill d^2N/detadphi histograms
121    * add flow if arguments are set
122    * 
123    * @return true on success
124    */
125   Bool_t LoopAODMC();
126   /**
127    * Add pt dependent flow factor
128    *
129    * @param Pt   @f$ p_T@f$
130    * @param type Type of flow 
131    */
132   Double_t AddptFlow(Double_t pt) const;
133   /**
134    * Add pid dependent flow factor
135    *
136    * @param ID   Particle ID 
137    * @param type Type of flow
138    */
139   Double_t AddpidFlow(Int_t id) const;
140   /**
141    * Add eta dependent flow factor
142    * 
143    * @param Eta  @f$\eta@f$ 
144    * @param type Type of flow 
145    */
146   Double_t AddetaFlow(Double_t eta) const;
147   /**
148    * Get centrality form MC impact parameter
149    */
150   Double_t GetCentFromB() const;
151   
152   TList         fBinsFMDTR;         //  List with FMDTR VertexBin objects
153   TList         fBinsSPDTR;         //  List with SPDTR VertexBin objects
154   TList         fBinsMC;            //  List with MC VertexBin objects
155   TH2D          fdNdedpMC;          //  d^2N/detadphi MC truth histogram
156   TGraph*       fAliceCent4th;      //  Parametrization of ALICE QC4 vs. cent. data
157   TGraph*       fAlicePt2nd4050;    //  Parametrization of ALICE QC2 vs. pT data
158   TGraph*       fAlicePt4th3040;    //  Parametrization of ALICE QC4 vs. pT data
159   TGraph*       fAlicePt4th4050;    //  Parametrization of ALICE QC4 vs. pT data
160   TGraph*       fImpactParToCent;   //  Parametrization of b to centrality datapoints
161   Bool_t       fUseImpactPar;      //  Flag to use impact parameter for cent
162   TString       fAddFlow;           //  Add flow string
163   Int_t         fAddType;           //  Add flow type #
164   Int_t         fAddOrder;          //  Add flow order
165
166   ClassDef(AliForwardMCFlowTaskQC, 1); // FMD MC analysis task 
167 };
168  
169 #endif
170 // Local Variables:
171 //   mode: C++ 
172 // End: