1 // This task finds the eventplane
4 #ifndef ALIFMDEVENTPLANEFINDER_H
5 #define ALIFMDEVENTPLANEFINDER_H
7 * @file AliFMDEventPlaneFinder.h
8 * @author Alexander Hansen
9 * @date Tue Feb 14 2012
14 * @ingroup pwglf_forward
18 #include "AliForwardUtil.h"
24 class AliOADBContainer;
25 class AliAODForwardEP;
27 class AliFMDEventPlaneFinder : public TNamed
33 AliFMDEventPlaneFinder();
37 * @param name Name of object
39 AliFMDEventPlaneFinder(const char* name);
43 * @param o Object to copy from
45 AliFMDEventPlaneFinder(const AliFMDEventPlaneFinder& o);
49 virtual ~AliFMDEventPlaneFinder();
51 * Assignement operator
53 * @param o Object to assign from
55 * @return Reference to this object
57 AliFMDEventPlaneFinder& operator=(const AliFMDEventPlaneFinder& o);
59 * Initialize this sub-algorithm
62 virtual void Init(const TAxis& etaAxis);
66 * @param hists Histogram cache
68 * @return true on successs
70 Bool_t FindEventplane(AliVEvent* esd,
71 AliAODForwardEP& aodEp,
73 AliForwardUtil::Histos* hists);
75 * Output diagnostic histograms to directory
77 * @param dir List to write in
79 virtual void DefineOutput(TList* dir);
83 * @param option Print options
84 * - max Print max weights
86 void Print(Option_t* option="") const;
88 * Set the debug level. The higher the value the more output
90 * @param dbg Debug level
92 void SetDebug(Int_t dbg=1) { fDebug = dbg; }
96 * @param h dN/detadphi histogram
97 * @param eHist histogram for ep vs. eta
99 void CalcQVectors(TH2D* h, TH1D* eHist);
101 * Calculate the eventplane from a vector
103 * @param v TVector2 of Q-vectors
105 * @return the eventplane as a double
107 Double_t CalcEventplane(TVector2 v) const;
109 * Set the run number, used for OADB object
111 * @param run Run number
113 void SetRunNumber(Int_t run);
117 * @return returns the run number
119 Int_t GetRunNumber() { return fRunNumber; }
121 * Get the OADB phi distribution for flattening
125 * Flag for setting the use of phi weights for flattening
127 * @param use true or false
129 void SetUsePhiWeights(Bool_t use = kTRUE) { fUsePhiWeights = use; }
131 * Fill diagnostics hists
133 * @param fmdEP Object containing results of FMD EP calculations
135 void FillHists(AliAODForwardEP* fmdEP);
137 * Set the OADB path, for using a custom OADB path and file
139 * @param fname Name of the custom OADB file, including path
141 void SetOADBPath(Char_t* fname) { fOADBFileName = fname; }
145 * Get the phi weight from OADB histogram for the ep flattening
147 * @param etaBin which eta bin
148 * @param phiBin which phi bin
150 * @return phi weight for etaBin, phiBin as double
152 Double_t GetPhiWeight(Int_t etaBin, Int_t phiBin) const;
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
179 ClassDef(AliFMDEventPlaneFinder,1); //