]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/flow/AliFMDFlowHarmonic.h
Misalignment-related bug fixed
[u/mrichter/AliRoot.git] / FMD / flow / AliFMDFlowHarmonic.h
CommitLineData
39eefe19 1// -*- mode: C++ -*-
97e94238 2/* Copyright (C) 2007 Christian Holm Christensen <cholm@nbi.dk>
3 *
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.
8 *
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.
13 *
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
17 * USA
18 */
39eefe19 19/** @file
20 @brief Declaration of a Harmonic class */
97e94238 21//____________________________________________________________________
22//
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
39eefe19 30#include <flow/AliFMDFlowStat.h>
31
32/** @defgroup a_basic Basic classes for doing Flow analysis.
33 @brief This group of class handles the low-level stuff to do
34 flow analysis. */
35//______________________________________________________
36/** @class AliFMDFlowHarmonic flow/AliFMDFlowHarmonic.h <flow/AliFMDFlowHarmonic.h>
37 @brief Calculate the @f$ n^{th}@f$ order harmonic
38 @ingroup a_basic
39
40 Calculate the @f$ n^{th}@f$ order harmonic, given by
41 @f{eqnarray*}
42 v_n &=& \frac{v_n^{obs}}{R}\\
43 v_n^{obs} &=& \frac1M\sum_i^M\cos(n (\varphi_i - \Psi))
44 @f}
45 where @f$ R@f$ is the resolution, @f$ i@f$ runs over all @f$
46 M@f$ observations of @f$ \varphi_i@f$ in all events, and
47 @f$\Psi@f$ is the estimated event plane.
48
49 The error on the corrected value is given by
50 @f{eqnarray*}
51 \delta^2v_n & = & \left(\frac{dv_n}{dv_n^{obs}}\right)^2\delta^2
52 v_n^{obs} + \left(\frac{dv_n}{dR}\right)^2\delta^2R \\
53 & = & \frac{\delta^2v_n^{obs} R^2 + \delta^2R (v_n^{obs})^2}
54 {R^4}
55 @f}
56*/
57class AliFMDFlowHarmonic : public AliFMDFlowStat
58{
59public:
60 /** Constructor
61 @param n Order of the harmonic */
97e94238 62 AliFMDFlowHarmonic(UShort_t n=0) : fOrder(n) {}
39eefe19 63 /** Destructor */
64 virtual ~AliFMDFlowHarmonic() {}
97e94238 65 /** Copy constructor
66 @param o Object to copy from. */
67 AliFMDFlowHarmonic(const AliFMDFlowHarmonic& o);
68 /** Assignment operator
69 @param o Object to assign from
70 @return Reference to this object. */
71 AliFMDFlowHarmonic& operator=(const AliFMDFlowHarmonic& o);
72
39eefe19 73 /** Add a data point
74 @param phi The absolute angle @f$ \varphi \in[0,2\pi]@f$
75 @param psi The event plane angle @f$ \Psi \in[0,2\pi] @f$ */
76 void Add(Double_t phi, Double_t psi);
77 /** Get the harmonic.
78 @param r Event plane resolution
79 @param er2 Square error on event plane resolution
80 @param e2 On return the square error
81 @return The harmonic value */
82 Double_t Value(Double_t r, Double_t er2, Double_t& e2) const;
83 /** Get the order of the harmonic */
84 UShort_t Order() const { return fOrder; }
85protected:
86 /** the order */
97e94238 87 UShort_t fOrder; // Order
39eefe19 88 /** Define for ROOT I/O */
89 ClassDef(AliFMDFlowHarmonic,1);
90};
91
92
93#endif
94//
95// EOF
96//
97