]>
Commit | Line | Data |
---|---|---|
aad3da32 | 1 | #ifndef ALILOCALRHOPARAMETER_H |
2 | #define ALILOCALRHOPARAMETER_H | |
3 | ||
4 | // $Id$ | |
5 | ||
6 | #include <TMath.h> | |
7 | #include <TF1.h> | |
8 | #include <AliRhoParameter.h> | |
9 | ||
10 | class AliLocalRhoParameter : public AliRhoParameter { | |
11 | public: | |
12 | AliLocalRhoParameter(); | |
13 | AliLocalRhoParameter(const char* name, Double_t val); | |
14 | void SetLocalRho(TF1* f) { fLocalRho = f; } | |
15 | TF1* GetLocalRho() const { return fLocalRho; } | |
16 | Double_t GetLocalVal(Double_t phi, Double_t r, Double_t n) const { | |
17 | if(!fLocalRho) return GetVal(); | |
18 | Double_t denom(2*r*fLocalRho->GetParameter(0)); | |
19 | return (denom <= 0.) ? GetVal() : n*(fLocalRho->Integral(phi-r, phi+r)/denom); | |
20 | } | |
51e48ddc | 21 | Double_t GetLocalVal(Double_t phi, Double_t r) const { |
22 | return GetLocalVal(phi, r, GetVal()); | |
23 | } | |
7dd1eeea | 24 | Double_t GetLocalUncertainty(Double_t phi, Double_t r, Double_t n) const { |
25 | if(!fLocalRho) return 999.; | |
26 | Double_t intError(fLocalRho->IntegralError(phi-r,phi+r)); | |
27 | Double_t absConst(TMath::Abs(n/(2*r*fLocalRho->GetParameter(0)))); | |
28 | return intError*absConst; // absolute error on local rho | |
29 | } | |
30 | Double_t GetLocalUncertainty(Double_t phi, Double_t r) const { | |
31 | return GetLocalUncertainty(phi, r, GetVal()); | |
32 | } | |
aad3da32 | 33 | private: |
34 | TF1* fLocalRho; // ! rho as function of phi | |
35 | ||
36 | AliLocalRhoParameter(const AliLocalRhoParameter&); // not implemented | |
37 | AliLocalRhoParameter& operator=(const AliLocalRhoParameter&); // not implemented | |
38 | ||
39 | ClassDef(AliLocalRhoParameter, 1); // Rho parameter for local (flow) variations | |
40 | }; | |
41 | #endif |