]>
Commit | Line | Data |
---|---|---|
a8f6c03f | 1 | #ifndef ALIEVENTPLANERESOLUTION_H |
2 | #define ALIEVENTPLANERESOLUTION_H | |
3 | ||
4 | ||
f829c4f7 | 5 | /* $Id$ */ |
a8f6c03f | 6 | |
7 | /////////////////////////////////////////////////////////////////// | |
8 | // // | |
9 | // Class to compute event plane resolution for flow analyses // | |
10 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "TObject.h" | |
15 | #include "TH1F.h" | |
16 | ||
17 | class AliEventPlaneResolution : public TObject{ | |
18 | public: | |
19 | AliEventPlaneResolution(); | |
20 | AliEventPlaneResolution(Int_t k); | |
21 | virtual ~AliEventPlaneResolution() {}; | |
22 | ||
23 | void SetK(Int_t k){fK=k;} | |
24 | void SetSubEvResol(Double_t res){fSubRes=res;} | |
25 | void SetSubEventHisto(const TH1F* hSub){ | |
26 | fSubRes=GetSubEvResol(hSub); | |
27 | } | |
28 | ||
29 | Int_t GetK() const {return fK;} | |
30 | Double_t GetSubEvResol() const {return fSubRes;} | |
31 | ||
32 | Double_t Pol(Double_t x) const {return Pol(x,fK);} | |
33 | Double_t FindChi() const {return FindChi(fSubRes,fK);} | |
34 | Double_t GetFullEvResol() const {return GetFullEvResol(fSubRes,fK);} | |
35 | ||
36 | static Double_t FindChi(Double_t res, Int_t k=1); | |
37 | static Double_t Pol(Double_t x, Int_t k); | |
38 | static Double_t ResolK1(Double_t x); | |
39 | static Double_t GetSubEvResol(const TH1F* hSubEvCorr){ | |
40 | if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()); | |
41 | else return 1.; | |
42 | } | |
07515723 | 43 | static Double_t GetSubEvResolLowLim(const TH1F* hSubEvCorr){ |
44 | if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()-hSubEvCorr->GetMeanError()); | |
45 | else return 1.; | |
46 | } | |
47 | static Double_t GetSubEvResolHighLim(const TH1F* hSubEvCorr){ | |
48 | if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()+hSubEvCorr->GetMeanError()); | |
49 | else return 1.; | |
50 | } | |
51 | ||
a8f6c03f | 52 | static Double_t GetFullEvResol(Double_t resSub, Int_t k=1); |
53 | static Double_t GetFullEvResol(const TH1F* hSubEvCorr, Int_t k=1); | |
07515723 | 54 | static Double_t GetFullEvResolLowLim(const TH1F* hSubEvCorr, Int_t k=1); |
55 | static Double_t GetFullEvResolHighLim(const TH1F* hSubEvCorr, Int_t k=1); | |
a8f6c03f | 56 | |
57 | private: | |
58 | ||
59 | Int_t fK; // ratio of measured harmonic to event plane harmonic | |
60 | Double_t fSubRes; // sub-event resolution = sqrt(<cos[n(phiA-phiB)] >) | |
61 | ||
62 | ClassDef(AliEventPlaneResolution,0) | |
63 | }; | |
64 | #endif |