]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/flow/AliFMDFlowBin.h
Adding some protctions to CopyFromOldESD
[u/mrichter/AliRoot.git] / FMD / flow / AliFMDFlowBin.h
CommitLineData
39eefe19 1// -*- mode: C++ -*-
2/** @file
3 @brief Declaration of a Bin in a Flow "histogram" */
4#ifndef FLOW_BIN_H
5#define FLOW_BIN_H
6#include <flow/AliFMDFlowEventPlane.h>
7#include <flow/AliFMDFlowHarmonic.h>
8#include <flow/AliFMDFlowResolution.h>
9#include <TObject.h>
10
824e71c1 11//Forward declaration
12class TBrowser;
13
39eefe19 14/** @defgroup c_binned Binned flow
15 @brief This group contains code for binned flow analysis. Two
16 kinds of "histograms" are defined - a 1 dimensional and a 2
17 dimensional set of binned objects of class AliFMDFlowBin.
18
19 Objects of class AliFMDFlowBin contains all the code needed to compute
20 flow in a given bin.
21
22 The class AliFMDFlowAxis encodes look-up of a object of class
23 AliFMDFlowBin in a flow "Histogram"
24*/
25//______________________________________________________
26/** @class AliFMDFlowBin flow/AliFMDFlowBin.h <flow/AliFMDFlowBin.h>
27 @brief A bin of flow.
28
29 This contains an of class AliFMDFlowHarmonic and an object of
30 class AliFMDFlowEventPlane to calculate @f$ v_n@f$ and
31 @f$\Psi_k@f$. It contain two objects of class
32 AliFMDFlowEventPlane to calculate the sub-event event planes
33 @f$\Psi_A, \Psi_B@f$. It also contain 3 objects of class
34 AliFMDFlowResolution to calculate the event plane angle
35 resolution.
36
37 @ingroup c_binned
38*/
39class AliFMDFlowBin : public TObject
40{
41public:
42 /** Correction type */
43 enum CorType {
44 /** No correction */
45 none,
46 /** Naive, using the formulas in Voloshins paper */
47 naive,
48 /** STARs way */
49 star,
50 /** The way used in the TDR */
51 tdr
52 };
53 /** Constructor */
54 AliFMDFlowBin(UShort_t order, UShort_t k=1)
55 : fPsi(order / k),
56 fPsiA(order / k),
57 fPsiB(order / k),
58 fRes(order / k),
59 fResStar(order / k),
60 fResTdr(order / k),
61 fHarmonic(order)
62 {}
63 /** Destructor */
64 virtual ~AliFMDFlowBin() {}
65 /** Should be called at the start of an event */
66 virtual void Begin();
67 /** Called to add a contribution to the event plane
68 @param phi The angle @f$ \varphi \in[0,2\pi]@f$
69 @param w Weight
70 @param a If true, add to sub-event A, otherwise to sub-event
71 B. */
72 virtual void AddToEventPlane(Double_t phi, Double_t w=1, Bool_t a=kTRUE);
73 /** Called to add a contribution to the harmonic.
74 @param phi The angle @f$ \varphi \in[0,2\pi]@f$
75 @param w Weight of @a phi (only used in the calculation of
76 the event plane). */
77 virtual void AddToHarmonic(Double_t phi, Double_t w=1);
78 /** Should be called at the end of an event */
79 virtual void End();
80 /** Analyse events
81 @param phis @f$ (\varphi_i, \ldots, \varphi_n)@f$
82 @param ws Weights (optional)
83 @param n Size of @a phis and possibly @a ws */
84 virtual void Event(Double_t* phis, Double_t* ws, UInt_t n);
85 /** Finish run */
86 virtual void Finish();
87 /** Get the value in this bin
88 @param t Which type of correction
89 @return the value of the harmonic */
90 virtual Double_t Value(CorType t=naive) const;
91 /** Get the value in this bin
92 @param t Which type of correction
93 @return the error on the value of the harmonic */
94 virtual Double_t EValue(CorType t=naive) const;
95 /** Get the value in this bin
96 @param e2 On return, the square error.
97 @param t Which type of correction
98 @return the value of the harmonic */
99 virtual Double_t Value(Double_t& e2, CorType t=naive) const;
100 /** Get the value in this bin
101 @param e2 On return, the square error.
102 @param t Which type of correction
103 @return the value of the harmonic */
104 virtual Double_t Correction(Double_t& e2, CorType t=naive) const;
105 /** Print summary to standard output */
824e71c1 106 virtual void Print(Option_t* option="") const; //*MENU*
107 /** Return true */
108 virtual Bool_t IsFolder() const { return kTRUE; }
109 /** Browse this item */
110 virtual void Browse(TBrowser* b);
39eefe19 111 /** Get the event plane angle */
112 virtual Double_t Psi() const { return fPsi.Psi(); }
113 /** Get the sub-event A plane angle */
114 virtual Double_t PsiA() const { return fPsiA.Psi(); }
115 /** Get the sub-event B plane angle */
116 virtual Double_t PsiB() const { return fPsiB.Psi(); }
117
118protected:
119 /** Major event plane */
120 AliFMDFlowEventPlane fPsi;
121 /** Sub-event A event plane */
122 AliFMDFlowEventPlane fPsiA;
123 /** Sub-event B event plane */
124 AliFMDFlowEventPlane fPsiB;
125 /** Resolution */
126 AliFMDFlowResolution fRes;
127 /** Resolution */
128 AliFMDFlowResolutionStar fResStar;
129 /** Resolution */
130 AliFMDFlowResolutionTDR fResTdr;
131 /** The harmonic */
132 AliFMDFlowHarmonic fHarmonic;
133 /** Define for ROOT I/O */
134 ClassDef(AliFMDFlowBin,1);
135};
136
137
138#endif
139//
140// EOF
141//