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 and implementation of classes to deal with a
21 well-known event plane @f$ \Psi_R@f$. */
22 //____________________________________________________________________
25 // A specialised AliFMDFlowBin of flow in case the event plane is
28 // A specialised AliFMDFlowBinned1D histogram in case the event
29 // plane is well-known.
31 #ifndef ALIFMDFLOWTRUE_H
32 #define ALIFMDFLOWTRUE_H
33 #include <flow/AliFMDFlowStat.h>
34 #include <flow/AliFMDFlowBin.h>
35 #include <flow/AliFMDFlowBinned1D.h>
38 /** @defgroup x_true Classes for handling Flow when the event plane is
40 /** @class TrueBin flow/True.h <flow/True.h>
41 @brief A specialised Bin of flow in case the event plane is
44 class AliFMDFlowTrueBin : public AliFMDFlowBin
47 /** Default constructor - do not use */
48 AliFMDFlowTrueBin() : AliFMDFlowBin(), fPsiR(), fResReal() {}
50 AliFMDFlowTrueBin(UShort_t order) :
51 AliFMDFlowBin(order, 1),
55 /** Set the well-known event plane angle @f$ \Psi_R@f$ for this
57 @param psi @f$ \Psi_R@f$ */
58 void SetPsi(Double_t psi) { fPsiR = psi; }
59 /** Should be called at the end of an event */
61 /** Add a contribution @f$ \cos(n(\varphi-\Psi_R))@f$ where
62 @f$ \Psi_R@f$ is the previously set, well-known event plane
64 @param wp Weight of @a phi (only used in the calculation of
66 @param wh Weight if the @f$ \varphi@f$ observation
67 @param phi @f$ \varphi@f$ */
68 void AddToHarmonic(Double_t phi, Double_t wp, Double_t wh=1);
69 /** Get the value in this bin
70 @param t Which type of correction
71 @return the value of the harmonic */
72 virtual Double_t Value(CorType t=kNone) const;
73 /** Get the value in this bin
74 @param e2 On return, the square error.
75 @param t Which type of correction
76 @return the value of the harmonic */
77 Double_t Value(Double_t& e2, CorType t=kNone) const;
78 /** Get the value in this bin
79 @param e2 On return, the square error.
80 @param t Which type of correction
81 @return the value of the harmonic */
82 Double_t Correction(Double_t& e2, CorType t=kNone) const;
83 /** Print to standard out. */
84 void Print(Option_t* option="s") const;
85 /** get the event plane */
86 Double_t Psi() const { return fPsiR; }
88 /** The well-known event plane */
89 Double_t fPsiR; // The well-known event plane
90 /** True resolution */
91 AliFMDFlowStat fResReal; // True resolution
92 /** define for ROOT I/O */
93 ClassDef(AliFMDFlowTrueBin,1);
96 /** @brief A "histogram" of objects of class TrueBin in case the
97 event plane angle @f$ \Psi_R@f$ is well known.
99 struct AliFMDFlowTrue1D : public AliFMDFlowBinned1D
102 /** Default constructor - do not use */
103 AliFMDFlowTrue1D() {}
105 AliFMDFlowTrue1D(const char* name, const char* title,
106 UShort_t order, const AliFMDFlowAxis& xaxis);
107 /** Set the well-known event plane angle @f$ \Psi_R@f$ for this
109 @param psi @f$ \Psi_R@f$ */
110 void SetPsi(Double_t psi);
111 /** Print to standard out */
112 virtual void Print(Option_t* option="") const;
113 /** define for ROOT I/O */
114 ClassDef(AliFMDFlowTrue1D,1);