]>
Commit | Line | Data |
---|---|---|
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 Bin in a Flow "histogram" */ | |
97e94238 | 21 | //____________________________________________________________________ |
22 | // | |
23 | // This contains an of class AliFMDFlowHarmonic and an object of | |
24 | // class AliFMDFlowEventPlane to calculate v_n and \Psi_k. It contain | |
25 | // two objects of class AliFMDFlowEventPlane to calculate the | |
26 | // sub-event event planes Psi_A, \Psi_B. It also contain 3 objects of | |
27 | // class AliFMDFlowResolution to calculate the event plane angle | |
28 | // resolution. | |
29 | // | |
30 | #ifndef ALIFMDFLOWBIN_H | |
31 | #define ALIFMDFLOWBIN_H | |
39eefe19 | 32 | #include <flow/AliFMDFlowEventPlane.h> |
33 | #include <flow/AliFMDFlowHarmonic.h> | |
34 | #include <flow/AliFMDFlowResolution.h> | |
35 | #include <TObject.h> | |
36 | ||
824e71c1 | 37 | //Forward declaration |
38 | class TBrowser; | |
39 | ||
39eefe19 | 40 | /** @defgroup c_binned Binned flow |
41 | @brief This group contains code for binned flow analysis. Two | |
42 | kinds of "histograms" are defined - a 1 dimensional and a 2 | |
43 | dimensional set of binned objects of class AliFMDFlowBin. | |
44 | ||
45 | Objects of class AliFMDFlowBin contains all the code needed to compute | |
46 | flow in a given bin. | |
47 | ||
48 | The class AliFMDFlowAxis encodes look-up of a object of class | |
49 | AliFMDFlowBin in a flow "Histogram" | |
50 | */ | |
51 | //______________________________________________________ | |
52 | /** @class AliFMDFlowBin flow/AliFMDFlowBin.h <flow/AliFMDFlowBin.h> | |
53 | @brief A bin of flow. | |
54 | ||
55 | This contains an of class AliFMDFlowHarmonic and an object of | |
56 | class AliFMDFlowEventPlane to calculate @f$ v_n@f$ and | |
57 | @f$\Psi_k@f$. It contain two objects of class | |
58 | AliFMDFlowEventPlane to calculate the sub-event event planes | |
59 | @f$\Psi_A, \Psi_B@f$. It also contain 3 objects of class | |
60 | AliFMDFlowResolution to calculate the event plane angle | |
61 | resolution. | |
62 | ||
63 | @ingroup c_binned | |
64 | */ | |
65 | class AliFMDFlowBin : public TObject | |
66 | { | |
67 | public: | |
68 | /** Correction type */ | |
69 | enum CorType { | |
70 | /** No correction */ | |
97e94238 | 71 | kNone, |
39eefe19 | 72 | /** Naive, using the formulas in Voloshins paper */ |
97e94238 | 73 | kNaive, |
39eefe19 | 74 | /** STARs way */ |
97e94238 | 75 | kStar, |
39eefe19 | 76 | /** The way used in the TDR */ |
97e94238 | 77 | kTdr |
39eefe19 | 78 | }; |
97e94238 | 79 | /** Constructor |
80 | @param order Order of harmonic. | |
81 | @param k Factor of event plane order=k * m */ | |
82 | AliFMDFlowBin(UShort_t order=0, UShort_t k=1) | |
39eefe19 | 83 | : fPsi(order / k), |
84 | fPsiA(order / k), | |
85 | fPsiB(order / k), | |
86 | fRes(order / k), | |
87 | fResStar(order / k), | |
88 | fResTdr(order / k), | |
89 | fHarmonic(order) | |
90 | {} | |
97e94238 | 91 | /** Copy constructor |
92 | @param o Object top copy from */ | |
93 | AliFMDFlowBin(const AliFMDFlowBin& o); | |
94 | /** Assignment operator | |
95 | @param o Object to assign from | |
96 | @return Reference to this object */ | |
97 | AliFMDFlowBin& operator=(const AliFMDFlowBin& o); | |
98 | ||
39eefe19 | 99 | /** Destructor */ |
100 | virtual ~AliFMDFlowBin() {} | |
101 | /** Should be called at the start of an event */ | |
102 | virtual void Begin(); | |
103 | /** Called to add a contribution to the event plane | |
104 | @param phi The angle @f$ \varphi \in[0,2\pi]@f$ | |
105 | @param w Weight | |
106 | @param a If true, add to sub-event A, otherwise to sub-event | |
107 | B. */ | |
108 | virtual void AddToEventPlane(Double_t phi, Double_t w=1, Bool_t a=kTRUE); | |
109 | /** Called to add a contribution to the harmonic. | |
110 | @param phi The angle @f$ \varphi \in[0,2\pi]@f$ | |
111 | @param w Weight of @a phi (only used in the calculation of | |
112 | the event plane). */ | |
113 | virtual void AddToHarmonic(Double_t phi, Double_t w=1); | |
114 | /** Should be called at the end of an event */ | |
115 | virtual void End(); | |
116 | /** Analyse events | |
117 | @param phis @f$ (\varphi_i, \ldots, \varphi_n)@f$ | |
118 | @param ws Weights (optional) | |
119 | @param n Size of @a phis and possibly @a ws */ | |
120 | virtual void Event(Double_t* phis, Double_t* ws, UInt_t n); | |
121 | /** Finish run */ | |
122 | virtual void Finish(); | |
123 | /** Get the value in this bin | |
124 | @param t Which type of correction | |
125 | @return the value of the harmonic */ | |
97e94238 | 126 | virtual Double_t Value(CorType t=kTdr) const; |
39eefe19 | 127 | /** Get the value in this bin |
128 | @param t Which type of correction | |
129 | @return the error on the value of the harmonic */ | |
97e94238 | 130 | virtual Double_t EValue(CorType t=kTdr) const; |
39eefe19 | 131 | /** Get the value in this bin |
132 | @param e2 On return, the square error. | |
133 | @param t Which type of correction | |
134 | @return the value of the harmonic */ | |
97e94238 | 135 | virtual Double_t Value(Double_t& e2, CorType t=kTdr) const; |
39eefe19 | 136 | /** Get the value in this bin |
137 | @param e2 On return, the square error. | |
138 | @param t Which type of correction | |
97e94238 | 139 | @return the value of the event plane correction */ |
140 | virtual Double_t Correction(Double_t& e2, CorType t=kTdr) const; | |
39eefe19 | 141 | /** Print summary to standard output */ |
824e71c1 | 142 | virtual void Print(Option_t* option="") const; //*MENU* |
143 | /** Return true */ | |
144 | virtual Bool_t IsFolder() const { return kTRUE; } | |
145 | /** Browse this item */ | |
146 | virtual void Browse(TBrowser* b); | |
39eefe19 | 147 | /** Get the event plane angle */ |
148 | virtual Double_t Psi() const { return fPsi.Psi(); } | |
149 | /** Get the sub-event A plane angle */ | |
150 | virtual Double_t PsiA() const { return fPsiA.Psi(); } | |
151 | /** Get the sub-event B plane angle */ | |
152 | virtual Double_t PsiB() const { return fPsiB.Psi(); } | |
153 | ||
154 | protected: | |
155 | /** Major event plane */ | |
97e94238 | 156 | AliFMDFlowEventPlane fPsi; // Major event plane |
39eefe19 | 157 | /** Sub-event A event plane */ |
97e94238 | 158 | AliFMDFlowEventPlane fPsiA; // Sub-event A event plane |
39eefe19 | 159 | /** Sub-event B event plane */ |
97e94238 | 160 | AliFMDFlowEventPlane fPsiB; // Sub-event B event plane |
39eefe19 | 161 | /** Resolution */ |
97e94238 | 162 | AliFMDFlowResolution fRes; // Resolution |
39eefe19 | 163 | /** Resolution */ |
97e94238 | 164 | AliFMDFlowResolutionStar fResStar; // Resolution |
39eefe19 | 165 | /** Resolution */ |
97e94238 | 166 | AliFMDFlowResolutionTDR fResTdr; // Resolution |
39eefe19 | 167 | /** The harmonic */ |
97e94238 | 168 | AliFMDFlowHarmonic fHarmonic; // Harmonic |
39eefe19 | 169 | /** Define for ROOT I/O */ |
97e94238 | 170 | ClassDef(AliFMDFlowBin,1); // A flow analysis |
39eefe19 | 171 | }; |
172 | ||
173 | ||
174 | #endif | |
175 | // | |
176 | // EOF | |
177 | // |