]>
Commit | Line | Data |
---|---|---|
2b556440 | 1 | // This task finds the eventplane |
2 | // using the FMD | |
3 | // | |
4 | #ifndef ALIFMDEVENTPLANEFINDER_H | |
5 | #define ALIFMDEVENTPLANEFINDER_H | |
6 | /** | |
7 | * @file AliFMDEventPlaneFinder.h | |
8 | * @author Alexander Hansen | |
9 | * @date Tue Feb 14 2012 | |
10 | * | |
11 | * @brief | |
12 | * | |
13 | * | |
14 | * @ingroup pwglf_forward | |
15 | */ | |
16 | #include <TNamed.h> | |
17 | #include <TVector2.h> | |
18 | #include "AliForwardUtil.h" | |
19 | class AliVEvent; | |
20 | class TH1D; | |
21 | class TH2F; | |
22 | class TH2D; | |
23 | class TString; | |
24 | class AliOADBContainer; | |
25 | class AliAODForwardEP; | |
26 | ||
27 | class AliFMDEventPlaneFinder : public TNamed | |
28 | { | |
29 | public: | |
30 | /** | |
31 | * Constructor | |
32 | */ | |
33 | AliFMDEventPlaneFinder(); | |
34 | /** | |
35 | * Constructor | |
36 | * | |
37 | * @param name Name of object | |
38 | */ | |
39 | AliFMDEventPlaneFinder(const char* name); | |
40 | /** | |
41 | * Copy constructor | |
42 | * | |
43 | * @param o Object to copy from | |
44 | */ | |
45 | AliFMDEventPlaneFinder(const AliFMDEventPlaneFinder& o); | |
46 | /** | |
47 | * Destructor | |
48 | */ | |
49 | virtual ~AliFMDEventPlaneFinder(); | |
50 | /** | |
51 | * Assignement operator | |
52 | * | |
53 | * @param o Object to assign from | |
54 | * | |
55 | * @return Reference to this object | |
56 | */ | |
57 | AliFMDEventPlaneFinder& operator=(const AliFMDEventPlaneFinder& o); | |
58 | /** | |
59 | * Initialize this sub-algorithm | |
60 | * | |
61 | */ | |
62 | virtual void Init(const TAxis& etaAxis); | |
63 | /** | |
64 | * Do the calculations | |
65 | * | |
66 | * @param hists Histogram cache | |
67 | * | |
68 | * @return true on successs | |
69 | */ | |
70 | Bool_t FindEventplane(AliVEvent* esd, | |
71 | AliAODForwardEP& aodEp, | |
72 | TH2D* h, | |
73 | AliForwardUtil::Histos* hists); | |
74 | /** | |
75 | * Output diagnostic histograms to directory | |
76 | * | |
77 | * @param dir List to write in | |
78 | */ | |
79 | virtual void DefineOutput(TList* dir); | |
80 | /** | |
81 | * Print information | |
82 | * | |
83 | * @param option Print options | |
84 | * - max Print max weights | |
85 | */ | |
86 | void Print(Option_t* option="") const; | |
87 | /** | |
88 | * Set the debug level. The higher the value the more output | |
89 | * | |
90 | * @param dbg Debug level | |
91 | */ | |
92 | void SetDebug(Int_t dbg=1) { fDebug = dbg; } | |
93 | /* | |
94 | * Calculate Q vectors | |
95 | * | |
96 | * @param h dN/detadphi histogram | |
97 | * @param eHist histogram for ep vs. eta | |
98 | */ | |
99 | void CalcQVectors(TH2D* h, TH1D* eHist); | |
100 | /* | |
101 | * Calculate the eventplane from a vector | |
102 | * | |
103 | * @param v TVector2 of Q-vectors | |
104 | * | |
105 | * @return the eventplane as a double | |
106 | */ | |
107 | Double_t CalcEventplane(TVector2 v) const; | |
108 | /* | |
109 | * Set the run number, used for OADB object | |
110 | * | |
111 | * @param run Run number | |
112 | */ | |
113 | void SetRunNumber(Int_t run); | |
114 | /* | |
115 | * Get the run number | |
116 | * | |
117 | * @return returns the run number | |
118 | */ | |
119 | Int_t GetRunNumber() { return fRunNumber; } | |
120 | /* | |
121 | * Get the OADB phi distribution for flattening | |
122 | */ | |
123 | void GetPhiDist(); | |
124 | /* | |
125 | * Flag for setting the use of phi weights for flattening | |
126 | * | |
127 | * @param use true or false | |
128 | */ | |
129 | void SetUsePhiWeights(Bool_t use = kTRUE) { fUsePhiWeights = use; } | |
130 | /* | |
131 | * Fill diagnostics hists | |
132 | * | |
133 | * @param fmdEP Object containing results of FMD EP calculations | |
134 | */ | |
135 | void FillHists(AliAODForwardEP* fmdEP); | |
136 | /* | |
137 | * Set the OADB path, for using a custom OADB path and file | |
138 | * | |
139 | * @param fname Name of the custom OADB file, including path | |
140 | */ | |
141 | void SetOADBPath(Char_t* fname) { fOADBFileName = fname; } | |
142 | ||
143 | protected: | |
144 | /* | |
145 | * Get the phi weight from OADB histogram for the ep flattening | |
146 | * | |
147 | * @param etaBin which eta bin | |
148 | * @param phiBin which phi bin | |
149 | * | |
150 | * @return phi weight for etaBin, phiBin as double | |
151 | */ | |
152 | Double_t GetPhiWeight(Int_t etaBin, Int_t phiBin) const; | |
153 | ||
154 | TList* fList; // List for diag. hists. | |
155 | AliVEvent* fEvent; // Current event | |
156 | TVector2 fQt; // Q vector for total ep | |
157 | TVector2 fQa; // Q vector for sub-ep A | |
158 | TVector2 fQc; // Q vector for sub-ep C | |
159 | TVector2 fQ1; // Q vector for sub-ep 1 | |
160 | TVector2 fQ2; // Q vector for sub-ep 2 | |
161 | TVector2 fQeta; // Q vector for psi eta-dependence | |
162 | TH1D* fHistFMDEventplane; // Diagnostics histogram | |
163 | TH1D* fHistFMDEventplaneA;// Diagnostics histogram | |
164 | TH1D* fHistFMDEventplaneC;// Diagnostics histogram | |
165 | TH1D* fHistFMDEventplane1;// Diagnostics histogram | |
166 | TH1D* fHistFMDEventplane2;// Diagnostics histogram | |
167 | TH2D* fHistPhiDist; // Diagnostics histogram | |
168 | TH1D* fHistFMDmTPCep; // Diagnostics histogram | |
169 | TH2F* fHistFMDvsTPCep; // Diagnostics histogram | |
170 | TH1D* fHistFMDmVZEROep; // Diagnostics histogram | |
171 | TH2F* fHistFMDvsVZEROep; // Diagnostics histogram | |
172 | Int_t fDebug; // Debug flag | |
173 | TString fOADBFileName; // Path to OADB container | |
174 | AliOADBContainer* fOADBContainer; // OADBContainer object | |
175 | TH2D* fPhiDist; // Phi dist. for phi weights | |
176 | Int_t fRunNumber; // Run number supplied | |
177 | Bool_t fUsePhiWeights; // Flag for phi weights | |
178 | ||
179 | ClassDef(AliFMDEventPlaneFinder,1); // | |
180 | }; | |
181 | ||
182 | #endif | |
183 | // Local Variables: | |
184 | // mode: C++ | |
185 | // End: | |
186 |