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