#include <flow/AliFMDFlowEventPlane.h>
#include <flow/AliFMDFlowHarmonic.h>
#include <flow/AliFMDFlowResolution.h>
+#include <TH2D.h>
+#include <TH1D.h>
#include <TObject.h>
//Forward declaration
class TBrowser;
+/** @defgroup FMD_flow Flow code
+ @brief Code to do flow analysis.
+*/
/** @defgroup c_binned Binned flow
@brief This group contains code for binned flow analysis. Two
kinds of "histograms" are defined - a 1 dimensional and a 2
dimensional set of binned objects of class AliFMDFlowBin.
- Objects of class AliFMDFlowBin contains all the code needed to compute
+ Objects of class hAliFMDFlowBin contains all the code needed to compute
flow in a given bin.
The class AliFMDFlowAxis encodes look-up of a object of class
AliFMDFlowBin in a flow "Histogram"
+
+ @ingroup FMD_flow
*/
//______________________________________________________
/** @class AliFMDFlowBin flow/AliFMDFlowBin.h <flow/AliFMDFlowBin.h>
AliFMDFlowResolution to calculate the event plane angle
resolution.
- @ingroup c_binned
*/
class AliFMDFlowBin : public TObject
{
/** Correction type */
enum CorType {
/** No correction */
- kNone,
+ kNone = 1,
/** Naive, using the formulas in Voloshins paper */
- kNaive,
+ kNaive = 2,
/** STARs way */
- kStar,
+ kStar = 4,
/** The way used in the TDR */
- kTdr
+ kTdr = 8
+ };
+ /** Types of things to draw */
+ enum DrawVar {
+ /** The harmonic */
+ kHarmonic,
+ /** The resolution */
+ kResolution,
+ /** The statistics */
+ kCounts
};
+ /** Default Ctor - do not use */
+ AliFMDFlowBin()
+ : fPsi(),
+ fPsiA(),
+ fPsiB(),
+ fRes(),
+ fResStar(),
+ fResTdr(),
+ fHarmonic(),
+ fSplit(),
+ fPhi(),
+ fNA(0),
+ fNB(0),
+ fN(0),
+ fAB()
+ {}
/** Constructor
@param order Order of harmonic.
@param k Factor of event plane order=k * m */
- AliFMDFlowBin(UShort_t order=0, UShort_t k=1)
- : fPsi(order / k),
- fPsiA(order / k),
- fPsiB(order / k),
- fRes(order / k),
- fResStar(order / k),
- fResTdr(order / k),
- fHarmonic(order)
- {}
+ AliFMDFlowBin(UShort_t order, UShort_t k=1);
/** Copy constructor
@param o Object top copy from */
AliFMDFlowBin(const AliFMDFlowBin& o);
/** Destructor */
virtual ~AliFMDFlowBin() {}
+
+ /** @{
+ @name Processing */
/** Should be called at the start of an event */
virtual void Begin();
/** Called to add a contribution to the event plane
virtual void AddToEventPlane(Double_t phi, Double_t w=1, Bool_t a=kTRUE);
/** Called to add a contribution to the harmonic.
@param phi The angle @f$ \varphi \in[0,2\pi]@f$
- @param w Weight of @a phi (only used in the calculation of
- the event plane). */
- virtual void AddToHarmonic(Double_t phi, Double_t w=1);
+ @param wp Weight of @a phi (only used in the calculation of
+ the event plane).
+ @param wh Weight if the @f$ \varphi@f$ observation */
+ virtual void AddToHarmonic(Double_t phi, Double_t wp=1, Double_t wh=1);
/** Should be called at the end of an event */
virtual void End();
/** Analyse events
+ @param n Size of @a phis and possibly @a ws
@param phis @f$ (\varphi_i, \ldots, \varphi_n)@f$
- @param ws Weights (optional)
- @param n Size of @a phis and possibly @a ws */
- virtual void Event(Double_t* phis, Double_t* ws, UInt_t n);
+ @param wp Weights for event plane (optional)
+ @param wh Weights for harmonic (optional - can be the same as @a ws) */
+ virtual void Event(UInt_t n, Double_t* phis, Double_t* wp=0, Double_t* wh=0);
/** Finish run */
virtual void Finish();
+ /** @} */
+
+ /** @{
+ @name Orders */
+ /** Get the harmonic order
+ @return The harmonic order */
+ virtual UShort_t Order() const { return fHarmonic.Order(); }
+ /** Get the harmonic order
+ @return The harmonic order */
+ virtual UShort_t PsiOrder() const { return fPsi.Order(); }
+ /** @} */
+
+ /** @{
+ @name Values */
/** Get the value in this bin
@param t Which type of correction
@return the value of the harmonic */
@param t Which type of correction
@return the value of the event plane correction */
virtual Double_t Correction(Double_t& e2, CorType t=kTdr) const;
+ /** Get the number of counts used in this.
+ @return The number of counts used in this bin */
+ virtual ULong_t Counts() const;
+ /** @} */
+
+ /** @{
+ @name Utility */
/** Print summary to standard output */
virtual void Print(Option_t* option="") const; //*MENU*
/** Return true */
virtual Double_t PsiA() const { return fPsiA.Psi(); }
/** Get the sub-event B plane angle */
virtual Double_t PsiB() const { return fPsiB.Psi(); }
+ /** @} */
+ /** @{
+ @name histograms */
+ /** @return Split histogram */
+ const TH2& SplitHistogram() const { return fSplit; }
+ /** @return Phi histogram */
+ const TH1& PhiHistogram() const { return fPhi; }
+ /** @} */
protected:
/** Major event plane */
AliFMDFlowEventPlane fPsi; // Major event plane
AliFMDFlowResolutionTDR fResTdr; // Resolution
/** The harmonic */
AliFMDFlowHarmonic fHarmonic; // Harmonic
+ /** Histogram of the relative split between A and B */
+ TH2D fSplit;
+ /** Histogram of relative phi's */
+ TH1D fPhi;
+ /** Counter of number of observations in sub-A */
+ ULong_t fNA;
+ /** Counter of number of observations in sub-B */
+ ULong_t fNB;
+ /** Counter of number of observations */
+ ULong_t fN;
+ /** Psi from A vs from B */
+ TH2D fAB;
+
/** Define for ROOT I/O */
ClassDef(AliFMDFlowBin,1); // A flow analysis
};