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