]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardMCFlowTaskQC.h
Moved calculations of flow weights (after burner) into a
[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 "AliForwardFlowWeights.h"
18 #include <TH2D.h>
19 class TGraph;
20
21  /**
22  * @defgroup pwg2_forward_tasks_flow Flow tasks 
23  * @ingroup pwg2_forward_tasks
24  */
25 /**
26  * Calculate the flow in the forward regions using the Q cumulants method
27  *
28  * @par Inputs:
29  *   - AliAODEvent
30  *
31  * Outputs:
32  *   - AnalysisResults.root
33  *
34  * @ingroup pwg2_forward_tasks_flow
35  * @ingroup pwg2_forward_flow
36  *
37  *
38  */
39 class AliForwardMCFlowTaskQC : public AliForwardFlowTaskQC
40 {
41 public:
42   /**
43    * Constructor
44    */
45   AliForwardMCFlowTaskQC();
46   /*
47    * Constructor
48    *
49    * @param name Name of task
50    */
51   AliForwardMCFlowTaskQC(const char* name);
52   /**
53    * Destructor 
54    */
55   virtual ~AliForwardMCFlowTaskQC() {}
56   /**
57    * Check for centrality in AliAODForwardMult object, 
58    * if present return true - also sets fCent value
59    * can be used to get centrality from impact parameter
60    *
61    * @param aodfm AliAODForwardMultObject
62    * 
63    * @return Bool_t 
64    */
65   virtual Bool_t GetCentrality(const AliAODForwardMult* aodfm);
66   /*
67    * Set use parametrization from impact parameter for centrality
68    *
69    * @param use Use impact par
70    */
71   void SetUseImpactParameter(Bool_t use) { fUseImpactPar = use; }
72   /*
73    * Set string to add flow to MC truth particles
74    *
75    * @param type String
76    */
77   void AddFlow(TString type = "") { fAddFlow = type; }
78   /*
79    * Set which function fAddFlow should use
80    *
81    * @param type of AddFlow 
82    */
83   void AddFlowType(Int_t number = 0) { fAddType = number; }
84   /*
85    * Set which order of flow to add
86    *
87    * @param order Flow order 
88    */
89   void AddFlowOrder(Int_t order = 2) { fAddOrder = order; }
90  
91 protected:
92   /*
93    * Copy constructor
94    *
95    * @param o Object to copy from
96    */
97   AliForwardMCFlowTaskQC(const AliForwardMCFlowTaskQC& o);
98   /** 
99    * Assignment operator 
100    * 
101    * @return Reference to this object 
102    */
103   AliForwardMCFlowTaskQC& operator=(const AliForwardMCFlowTaskQC& o);
104   /*
105    * Initiate vertex bin objects
106    */
107   void InitVertexBins();
108    /*
109    * Initiate diagnostics histograms
110    */
111   void InitHists();
112   /*
113    * Analyze event
114    */
115   Bool_t Analyze();
116   /*
117    * Finalize analysis
118    */
119   void Finalize();
120   /**
121    * Loop over AliAODMCParticle branch object and fill d^2N/detadphi histograms
122    * add flow if arguments are set
123    * 
124    * @return true on success
125    */
126   Bool_t LoopAODMC();
127   /**
128    * Get centrality form MC impact parameter
129    */
130   Double_t GetCentFromB() const;
131   
132   TList         fBinsFMDTR;         //  List with FMDTR VertexBin objects
133   TList         fBinsSPDTR;         //  List with SPDTR VertexBin objects
134   TList         fBinsMC;            //  List with MC VertexBin objects
135   TH2D          fdNdedpMC;          //  d^2N/detadphi MC truth histogram
136   AliForwardFlowWeights fWeights;   //  Flow after burner 
137   TGraph*       fImpactParToCent;   //  Parametrization of b to centrality
138   Bool_t        fUseImpactPar;      //  Flag to use impact parameter for cent
139   TString       fAddFlow;           //  Add flow string
140   Int_t         fAddType;           //  Add flow type #
141   Int_t         fAddOrder;          //  Add flow order
142
143   ClassDef(AliForwardMCFlowTaskQC, 2); // FMD MC analysis task 
144 };
145  
146 #endif
147 // Local Variables:
148 //   mode: C++ 
149 // End: