]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/flow/AliFMDFlowTrue.h
Compilation of the ITS upgrade libraries (Annalisa, Stefan)
[u/mrichter/AliRoot.git] / FMD / flow / AliFMDFlowTrue.h
1 // -*- mode: C++ -*-
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  */
19 /** @file 
20     @brief Declaration and implementation of classes to deal with a
21     well-known event plane @f$ \Psi_R@f$. */
22 //____________________________________________________________________
23 //
24 //  AliFMDFlowTrueBin: 
25 //    A specialised AliFMDFlowBin of flow in case the event plane is
26 //    well-known.  
27 //  AliFMDFlowTrue1D: 
28 //    A specialised AliFMDFlowBinned1D histogram in case the event
29 //    plane is well-known.   
30 //
31 #ifndef ALIFMDFLOWTRUE_H
32 #define ALIFMDFLOWTRUE_H
33 #include <flow/AliFMDFlowStat.h>
34 #include <flow/AliFMDFlowBin.h>
35 #include <flow/AliFMDFlowBinned1D.h>
36
37
38 /** @defgroup x_true Classes for handling Flow when the event plane is
39     known. 
40
41     @ingroup FMD_flow */
42 /** @class TrueBin flow/True.h <flow/True.h>
43     @brief A specialised Bin of flow in case the event plane is 
44     well-known. 
45     @ingroup x_true */
46 class AliFMDFlowTrueBin : public AliFMDFlowBin
47 {
48 public:
49   /** Default constructor - do not use */
50   AliFMDFlowTrueBin() : AliFMDFlowBin(), fPsiR(), fResReal() {}
51   /** Constructor */ 
52   AliFMDFlowTrueBin(UShort_t order) : 
53     AliFMDFlowBin(order, 1), 
54     fPsiR(0), 
55     fResReal()
56   {}
57   /** Set the well-known event plane angle @f$ \Psi_R@f$ for this
58       event. 
59       @param psi @f$ \Psi_R@f$ */ 
60   void SetPsi(Double_t psi) { fPsiR = psi; } 
61   /** Should be called at the end of an event */ 
62   virtual void End();
63   /** Add a contribution @f$ \cos(n(\varphi-\Psi_R))@f$ where   
64       @f$ \Psi_R@f$ is the previously set, well-known event plane
65       angle. 
66       @param wp  Weight of @a phi (only used in the calculation of
67                  the event plane). 
68       @param wh  Weight if the @f$ \varphi@f$ observation 
69       @param phi @f$ \varphi@f$ */ 
70   void AddToHarmonic(Double_t phi, Double_t wp, Double_t wh=1);
71   /** Get the value in this bin 
72       @param t  Which type of correction
73       @return the value of the harmonic */
74   virtual Double_t Value(CorType t=kNone) const;
75   /** Get the value in this bin 
76       @param e2 On return, the square error. 
77       @param t  Which type of correction
78       @return the value of the harmonic */
79   Double_t Value(Double_t& e2, CorType t=kNone) const;
80   /** Get the value in this bin 
81       @param e2 On return, the square error. 
82       @param t  Which type  of correction
83       @return the value of the harmonic */
84   Double_t Correction(Double_t& e2, CorType t=kNone) const;
85   /** Print to standard out. */ 
86   void Print(Option_t* option="s") const;
87   /** get the event plane */ 
88   Double_t Psi() const { return fPsiR; }
89 protected:
90   /** The well-known event plane */ 
91   Double_t fPsiR;  // The well-known event plane 
92   /** True resolution */ 
93   AliFMDFlowStat fResReal; // True resolution
94   /** define for ROOT I/O */
95   ClassDef(AliFMDFlowTrueBin,1);
96   
97 }; 
98 /** @brief A "histogram" of objects of class TrueBin in case the
99     event plane angle @f$ \Psi_R@f$ is well known. 
100     @ingroup x_true */
101 struct AliFMDFlowTrue1D : public AliFMDFlowBinned1D
102 {
103 public:
104   /** Default constructor - do not use */
105   AliFMDFlowTrue1D() {}
106   /** Constructor */ 
107   AliFMDFlowTrue1D(const char* name, const char* title, 
108                    UShort_t order, const AliFMDFlowAxis& xaxis);
109   /** Set the well-known event plane angle @f$ \Psi_R@f$ for this
110       event. 
111       @param psi @f$ \Psi_R@f$ */ 
112   void SetPsi(Double_t psi);
113   /** Print to standard out */ 
114   virtual void Print(Option_t* option="") const;
115   /** define for ROOT I/O */
116   ClassDef(AliFMDFlowTrue1D,1);
117 };
118
119
120 #endif
121 //
122 // EOF
123 //