]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/FORWARD/analysis2/AliForwardFlowUtil.h
Bug fix
[u/mrichter/AliRoot.git] / PWGLF / FORWARD / analysis2 / AliForwardFlowUtil.h
1 //
2 // Class used to handle the input from AODs and put it into histograms
3 // the Forward Flow tasks can run on
4 //
5 #ifndef ALIFORWARDFLOWUTIL_H
6 #define ALIFORWARDFLOWUTIL_H
7 /**
8  * @file   AliForwardFlowUtil.h
9  * @author Alexander Hansen alexander.hansen@cern.ch
10  * @date   Fri Mar 25 13:15:40 2011
11  * 
12  * @brief  
13  * 
14  * 
15  * @ingroup pwglf_forward_flow
16  */
17 #include "TNamed.h"
18 class AliAODForwardMult;
19 class AliAODEvent;
20 class TList;
21 class TGraph;
22
23 /**
24  * 
25  * Class used to handle the input from AODs and put it into histograms
26  * the Forward Flow tasks can run on.
27  *
28  * @ingroup pwglf_forward_tasks_flow
29  * @ingroup pwglf_forward_flow
30  */
31 class AliForwardFlowUtil : public TNamed
32 {
33 public:
34   /**
35    * Constructor
36    */
37   AliForwardFlowUtil();
38   /*
39    * Constructor
40    *
41    * @param l list of histograms for flow analysis
42    */
43   AliForwardFlowUtil(TList* l);
44   /**
45    * Check that AOD event meet trigger requirements
46    * 
47    * @param aodfm Forward multplicity AOD event structure 
48    * 
49    * @return true on success 
50    */
51   Bool_t AODCheck(const AliAODForwardMult* aodfm);
52   /**
53    * Loop over AliAODForwardMult object and fill flow histograms
54    * 
55    * @param AODevent AOD event structure 
56    * 
57    * @return true on success
58    */
59   Bool_t LoopAODFMD(const AliAODEvent* AODevent);
60   /*
61    * Loop over AliAODCentralMult object and fill flow histograms
62    * 
63    * @param AODevent AOD event structure 
64    * 
65    * @return true on success
66    */
67   Bool_t LoopAODSPD(const AliAODEvent* AODevent) const;
68   /**
69    * Loop over AliAODForwardMult object and fill flow histograms from
70    * track refs
71    * 
72    * @param AODevent AOD event structure 
73    * 
74    * @return true on success
75    */
76   Bool_t LoopAODFMDtrrefHits(const AliAODEvent* AODevent) const;
77   /**
78    * Loop over AliAODCentralMult object and fill flow histograms from
79    * track refs
80    * 
81    * @param AODevent AOD event structure 
82    * 
83    * @return true on success
84    */
85   Bool_t LoopAODSPDtrrefHits(const AliAODEvent* AODevent) const;
86   /**
87    * Loop over AliAODMCParticle branch object and fill flow histograms
88    * add flow if arguments are set
89    * 
90    * @param AODevent AOD event structure 
91    * @param addFlow  What to add flow to 
92    * @param type     Type of flow 
93    * @param order    Order of added flow 
94    * 
95    * @return true on success
96    */
97   Bool_t LoopAODmc(const AliAODEvent* AODevent, TString addFlow, 
98                   Int_t type, Int_t order) const;
99  /**
100    * Get centrality from newest processed event
101    */
102   Double_t GetCentrality() const { return fCent; }
103  /**
104    * Get z vertex coordinate from newest processed event
105    */
106   Float_t GetVertex() const { return fVertex; }
107  /**
108    * Parametrize ALICE data points
109    */
110    
111 protected:
112   /*
113    * Copy constructor
114    *
115    * @param o Object to copy from
116    */
117   AliForwardFlowUtil(const AliForwardFlowUtil& o) : TNamed(),
118                                                     fList(o.fList),
119                                                     fCent(o.fCent),
120                                                     fVertex(o.fVertex),
121                                                     fAliceCent4th(o.fAliceCent4th),
122                                                     fAlicePt2nd4050(o.fAlicePt2nd4050),
123                                                     fAlicePt4th3040(o.fAlicePt4th3040),
124                                                     fAlicePt4th4050(o.fAlicePt4th4050),
125                                                     fImpactParToCent(o.fImpactParToCent)
126                                                     {}
127   /** 
128    * Assignment operator 
129    * 
130    * @return Reference to this object 
131    */
132   AliForwardFlowUtil& operator=(const AliForwardFlowUtil&) { return *this; }
133   /**
134    * Add pt dependent flow factor
135    *
136    * @param Pt   @f$ p_T@f$
137    * @param type Type of flow 
138    */
139   Double_t AddptFlow(Double_t Pt, Int_t type) const;
140   /**
141    * Add pid dependent flow factor
142    *
143    * @param ID   Particle ID 
144    * @param type Type of flow
145    */
146   Double_t AddpidFlow(Int_t ID, Int_t type) const;
147   /**
148    * Add eta dependent flow factor
149    * 
150    * @param Eta  @f$\eta@f$ 
151    * @param type Type of flow 
152    */
153   Double_t AddetaFlow(Double_t Eta, Int_t type) const;
154   /**
155    * Get centrality form MC impact parameter
156    * 
157    * @param AODevent AOD event structure 
158    */
159   Double_t GetCentFromMC(const AliAODEvent* AODevent) const;
160
161   TList*        fList;   // List of flow histograms
162   Double_t      fCent;   // centrality
163   Float_t       fVertex; // z vertex coordinate
164   TGraph*       fAliceCent4th;
165   TGraph*       fAlicePt2nd4050;
166   TGraph*       fAlicePt4th3040;
167   TGraph*       fAlicePt4th4050;
168   TGraph*       fImpactParToCent;
169
170   ClassDef(AliForwardFlowUtil, 1); 
171 };
172  
173 #endif
174 // Local Variables:
175 //   mode: C++ 
176 // End: