#ifndef ALILOCALRHOPARAMETER_H
#define ALILOCALRHOPARAMETER_H
#include <TMath.h>
#include <TF1.h>
#include <AliRhoParameter.h>
class AliLocalRhoParameter : public AliRhoParameter {
public:
AliLocalRhoParameter();
AliLocalRhoParameter(const char* name, Double_t val);
void SetLocalRho(TF1* f) { fLocalRho = f; }
TF1* GetLocalRho() const { return fLocalRho; }
Double_t GetLocalVal(Double_t phi, Double_t r, Double_t n) const {
if(!fLocalRho) return GetVal();
Double_t denom(2*r*fLocalRho->GetParameter(0));
return (denom <= 0.) ? GetVal() : n*(fLocalRho->Integral(phi-r, phi+r)/denom);
}
Double_t GetLocalVal(Double_t phi, Double_t r) const {
return GetLocalVal(phi, r, GetVal());
}
Double_t GetLocalUncertainty(Double_t phi, Double_t r, Double_t n) const {
if(!fLocalRho) return 999.;
Double_t intError(fLocalRho->IntegralError(phi-r,phi+r));
Double_t absConst(TMath::Abs(n/(2*r*fLocalRho->GetParameter(0))));
return intError*absConst;
}
Double_t GetLocalUncertainty(Double_t phi, Double_t r) const {
return GetLocalUncertainty(phi, r, GetVal());
}
private:
TF1* fLocalRho;
AliLocalRhoParameter(const AliLocalRhoParameter&);
AliLocalRhoParameter& operator=(const AliLocalRhoParameter&);
ClassDef(AliLocalRhoParameter, 1);
};
#endif
AliLocalRhoParameter.h:10 AliLocalRhoParameter.h:11 AliLocalRhoParameter.h:12 AliLocalRhoParameter.h:13 AliLocalRhoParameter.h:14 AliLocalRhoParameter.h:15 AliLocalRhoParameter.h:16 AliLocalRhoParameter.h:17 AliLocalRhoParameter.h:18 AliLocalRhoParameter.h:19 AliLocalRhoParameter.h:20 AliLocalRhoParameter.h:21 AliLocalRhoParameter.h:22 AliLocalRhoParameter.h:23 AliLocalRhoParameter.h:24 AliLocalRhoParameter.h:25 AliLocalRhoParameter.h:26 AliLocalRhoParameter.h:27 AliLocalRhoParameter.h:28 AliLocalRhoParameter.h:29 AliLocalRhoParameter.h:30 AliLocalRhoParameter.h:31 AliLocalRhoParameter.h:32 AliLocalRhoParameter.h:33 AliLocalRhoParameter.h:34 AliLocalRhoParameter.h:35 AliLocalRhoParameter.h:36 AliLocalRhoParameter.h:37 AliLocalRhoParameter.h:38 AliLocalRhoParameter.h:39 AliLocalRhoParameter.h:40 AliLocalRhoParameter.h:41