1 #ifndef ALILOCALRHOPARAMETER_H
2 #define ALILOCALRHOPARAMETER_H
8 #include <AliRhoParameter.h>
10 class AliLocalRhoParameter : public AliRhoParameter {
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);
21 Double_t GetLocalVal(Double_t phi, Double_t r) const {
22 return GetLocalVal(phi, r, GetVal());
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
30 Double_t GetLocalUncertainty(Double_t phi, Double_t r) const {
31 return GetLocalUncertainty(phi, r, GetVal());
34 TF1* fLocalRho; // ! rho as function of phi
36 AliLocalRhoParameter(const AliLocalRhoParameter&); // not implemented
37 AliLocalRhoParameter& operator=(const AliLocalRhoParameter&); // not implemented
39 ClassDef(AliLocalRhoParameter, 1); // Rho parameter for local (flow) variations