]>
Commit | Line | Data |
---|---|---|
a6c5a2e9 | 1 | #ifndef ALIVERTEXINGHFUTILS_H |
2 | #define ALIVERTEXINGHFUTILS_H | |
3 | ||
4 | ||
5 | /* $Id: $ */ | |
6 | ||
7 | /////////////////////////////////////////////////////////////////// | |
8 | // // | |
9 | // Class with functions useful for different D2H analyses // | |
10 | // - event plane resolution // | |
11 | // - <pt> calculation with side band subtraction // | |
12 | // - tracklet multiplcity calculation // | |
13 | // Origin: F.Prino, Torino, prino@to.infn.it // | |
14 | // // | |
15 | /////////////////////////////////////////////////////////////////// | |
16 | ||
17 | #include "TObject.h" | |
18 | #include "TH1F.h" | |
86d84fa4 | 19 | #include "TH2F.h" |
20 | #include "TF1.h" | |
a6c5a2e9 | 21 | |
22 | class AliVertexingHFUtils : public TObject{ | |
23 | public: | |
24 | AliVertexingHFUtils(); | |
25 | AliVertexingHFUtils(Int_t k); | |
26 | virtual ~AliVertexingHFUtils() {}; | |
27 | ||
28 | // Functions for Event plane resolution | |
29 | void SetK(Int_t k){fK=k;} | |
30 | void SetSubEvResol(Double_t res){fSubRes=res;} | |
31 | void SetSubEventHisto(const TH1F* hSub){ | |
32 | fSubRes=GetSubEvResol(hSub); | |
33 | } | |
34 | Int_t GetK() const {return fK;} | |
35 | Double_t GetSubEvResol() const {return fSubRes;} | |
36 | Double_t Pol(Double_t x) const {return Pol(x,fK);} | |
37 | Double_t FindChi() const {return FindChi(fSubRes,fK);} | |
38 | Double_t GetFullEvResol() const {return GetFullEvResol(fSubRes,fK);} | |
39 | static Double_t FindChi(Double_t res, Int_t k=1); | |
40 | static Double_t Pol(Double_t x, Int_t k); | |
41 | static Double_t ResolK1(Double_t x); | |
42 | static Double_t GetSubEvResol(const TH1F* hSubEvCorr){ | |
43 | if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()); | |
44 | else return 1.; | |
45 | } | |
46 | static Double_t GetSubEvResolLowLim(const TH1F* hSubEvCorr){ | |
47 | if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()-hSubEvCorr->GetMeanError()); | |
48 | else return 1.; | |
49 | } | |
50 | static Double_t GetSubEvResolHighLim(const TH1F* hSubEvCorr){ | |
51 | if(hSubEvCorr) return TMath::Sqrt(hSubEvCorr->GetMean()+hSubEvCorr->GetMeanError()); | |
52 | else return 1.; | |
53 | } | |
54 | static Double_t GetFullEvResol(Double_t resSub, Int_t k=1); | |
55 | static Double_t GetFullEvResol(const TH1F* hSubEvCorr, Int_t k=1); | |
56 | static Double_t GetFullEvResolLowLim(const TH1F* hSubEvCorr, Int_t k=1); | |
57 | static Double_t GetFullEvResolHighLim(const TH1F* hSubEvCorr, Int_t k=1); | |
58 | ||
59 | // Functions for tracklet multiplcity calculation | |
60 | void SetEtaRangeForTracklets(Double_t mineta, Double_t maxeta){ | |
61 | fMinEtaForTracklets=mineta; | |
62 | fMaxEtaForTracklets=maxeta; | |
63 | } | |
64 | static Int_t GetNumberOfTrackletsInEtaRange(AliAODEvent* ev, Double_t mineta, Double_t maxeta); | |
65 | Int_t GetNumberOfTrackletsInEtaRange(AliAODEvent* ev) const { | |
66 | return GetNumberOfTrackletsInEtaRange(ev,fMinEtaForTracklets,fMaxEtaForTracklets); | |
67 | } | |
68 | ||
86d84fa4 | 69 | // Functions for computing average pt |
70 | static void AveragePt(Float_t& averagePt, Float_t& errorPt, Float_t ptmin, Float_t ptmax, TH2F* hMassD, Float_t massFromFit, Float_t sigmaFromFit, TF1* funcB2, Float_t sigmaRangeForSig=2.5, Float_t sigmaRangeForBkg=4.5, Int_t rebin=4); | |
71 | ||
72 | ||
a6c5a2e9 | 73 | private: |
74 | ||
75 | Int_t fK; // ratio of measured harmonic to event plane harmonic | |
76 | Double_t fSubRes; // sub-event resolution = sqrt(<cos[n(phiA-phiB)] >) | |
77 | Double_t fMinEtaForTracklets; // min eta for counting tracklets | |
78 | Double_t fMaxEtaForTracklets; // min eta for counting tracklets | |
79 | ||
80 | ClassDef(AliVertexingHFUtils,0) | |
81 | }; | |
82 | #endif |