]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FORWARD/analysis2/AliForwardFlowUtil.h
fecd7f5a89856e29ae33396a63ca10741d0e783e
[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 #include "TNamed.h"
8 class AliAODForwardMult;
9 class AliAODEvent;
10 class TList;
11
12 /**
13  * 
14  * Class used to handle the input from AODs and put it into histograms
15  * the Forward Flow tasks can run on.
16  *
17  * @ingroup pwg2_forward_tasks
18  */
19 class AliForwardFlowUtil : public TNamed
20 {
21 public:
22   /**
23    * Constructor
24    */
25   AliForwardFlowUtil();
26   /*
27    * Constructor
28    *
29    * @param fList list of histograms for flow analysis
30    */
31   AliForwardFlowUtil(TList* fList);
32   /*
33    * Copy constructor
34    *
35    * @param o Object to copy from
36    */
37   AliForwardFlowUtil(const AliForwardFlowUtil& o) : TNamed(),
38                                                     fList(o.fList),
39                                                     fZvertex(o.fZvertex) {}
40   /** 
41    * Assignment operator 
42    * 
43    * @param o Object to assign from 
44    * 
45    * @return Reference to this object 
46    */
47   AliForwardFlowUtil& operator=(const AliForwardFlowUtil&) { return *this; }
48   /**
49    * Check that AOD event meet trigger requirements
50    */
51   Bool_t AODCheck(const AliAODForwardMult* aodfm) const;
52   /**
53    * Loop over AliAODForwardMult object and fill flow histograms
54    */
55   Bool_t LoopAODFMD(const AliAODEvent* AODevent) const;
56   /*
57    * Loop over AliAODForwardCentral object and fill flow histograms
58    */
59   Bool_t LoopAODSPD(const AliAODEvent* AODevent) const;
60   /**
61    * Loop over AliAODForwardMult object and fill flow histograms from
62    * track refs
63    */
64   Bool_t LoopAODtrrefHits(const AliAODEvent* AODevent) const;
65  /**
66    * Loop over AliAODMCParticle branch object and fill flow histograms
67    * add flow if arguments are set
68    */
69   Bool_t LoopAODmc(const AliAODEvent* AODevent, TString addFlow, Int_t type, Int_t order) const;
70  /**
71    * Set Z vertex range - Used by flow task
72    */
73   void SetVertexRange(Int_t vertex = 2) { fZvertex = vertex; }
74    
75 protected:
76   /**
77    * Add pt dependent flow factor
78    */
79   Double_t AddptFlow(Double_t Pt, Int_t type) const;
80   /**
81    * Add pid dependent flow factor
82    */
83   Double_t AddpidFlow(Int_t ID, Int_t type) const;
84   /**
85    * Add eta dependent flow factor
86    */
87   Double_t AddetaFlow(Double_t Eta, Int_t type) const;
88   /**
89    * Get centrality form MC impact parameter
90    */
91   Double_t GetCentFromMC(const AliAODEvent* AODevent) const;
92
93   TList*        fList;  // List of flow histograms
94   Int_t         fZvertex; // Z vertex range
95
96   ClassDef(AliForwardFlowUtil, 1); 
97 };
98  
99 #endif
100 // Local Variables:
101 //   mode: C++ 
102 // End: