2 /* Copyright (C) 2007 Christian Holm Christensen <cholm@nbi.dk>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public License
6 * as published by the Free Software Foundation; either version 2.1 of
7 * the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 @brief Declaration of a Harmonic class */
21 //____________________________________________________________________
23 // Calculate the nth order harmonic.
24 // Input is the phis of the observations,
25 // and the resolution of the event plane.
26 // The class derives from AliFMDFlowStat to easy calculating the mean
27 // and the square variance of the harmonic.
28 #ifndef ALIFMDFLOWHARMONIC_H
29 #define ALIFMDFLOWHARMONIC_H
30 #include <flow/AliFMDFlowStat.h>
34 /** @defgroup a_basic Basic classes for doing Flow analysis.
35 @brief This group of class handles the low-level stuff to do
37 //______________________________________________________
38 /** @class AliFMDFlowHarmonic flow/AliFMDFlowHarmonic.h <flow/AliFMDFlowHarmonic.h>
39 @brief Calculate the @f$ n^{th}@f$ order harmonic
42 Calculate the @f$ n^{th}@f$ order harmonic, given by
44 v_n &=& \frac{v_n^{obs}}{R}\\
45 v_n^{obs} &=& \frac1M\sum_i^M\cos(n (\varphi_i - \Psi))
47 where @f$ R@f$ is the resolution, @f$ i@f$ runs over all @f$
48 M@f$ observations of @f$ \varphi_i@f$ in all events, and
49 @f$\Psi@f$ is the estimated event plane.
51 The error on the corrected value is given by
53 \delta^2v_n & = & \left(\frac{dv_n}{dv_n^{obs}}\right)^2\delta^2
54 v_n^{obs} + \left(\frac{dv_n}{dR}\right)^2\delta^2R \\
55 & = & \frac{\delta^2v_n^{obs} R^2 + \delta^2R (v_n^{obs})^2}
59 class AliFMDFlowHarmonic : public AliFMDFlowStat
63 @param n Order of the harmonic */
64 AliFMDFlowHarmonic(UShort_t n=0);
66 virtual ~AliFMDFlowHarmonic() {}
68 @param o Object to copy from. */
69 AliFMDFlowHarmonic(const AliFMDFlowHarmonic& o);
70 /** Assignment operator
71 @param o Object to assign from
72 @return Reference to this object. */
73 AliFMDFlowHarmonic& operator=(const AliFMDFlowHarmonic& o);
78 @param phi The absolute angle @f$ \varphi \in[0,2\pi]@f$
79 @param psi The event plane angle @f$ \Psi \in[0,2\pi] @f$
80 @param weight The weight of the observation */
81 void Add(Double_t phi, Double_t psi, Double_t weight=1);
87 @param r Event plane resolution
88 @param er2 Square error on event plane resolution
89 @param e2 On return the square error
90 @return The harmonic value */
91 Double_t Value(Double_t r, Double_t er2, Double_t& e2) const;
92 /** Get the order of the harmonic */
93 UShort_t Order() const { return fOrder; }
98 /** This is a folder */
99 Bool_t IsFolder() const { return kTRUE; }
100 /** Browse this object */
101 void Browse(TBrowser* b);
103 void Print(Option_t* option="") const;
108 /** @return Contrib histogram */
109 const TH1& ContribHistogram() const { return fContrib; }
110 /** @return Phi histogram */
111 const TH1& PhiHistogram() const { return fPhi; }
112 /** @return Nphi histogram */
113 const TH1& NPhiHistogram() const { return fNPhi; }
114 /** @return Weight histogram */
115 const TH1& WeightHistogram() const { return fWeight; }
119 UShort_t fOrder; // Order
120 /** Histogram of angles */
122 /** Histogram of angles */
124 /** Histogram of weights */
126 /** cos(n(phi-psi)) vs (phi-psi) */
128 /** Define for ROOT I/O */
129 ClassDef(AliFMDFlowHarmonic,1);