]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGJE/EMCALJetTasks/AliLocalRhoParameter.h
from Chris
[u/mrichter/AliRoot.git] / PWGJE / EMCALJetTasks / AliLocalRhoParameter.h
CommitLineData
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
10class 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 }
21 private:
22 TF1* fLocalRho; // ! rho as function of phi
23
24 AliLocalRhoParameter(const AliLocalRhoParameter&); // not implemented
25 AliLocalRhoParameter& operator=(const AliLocalRhoParameter&); // not implemented
26
27 ClassDef(AliLocalRhoParameter, 1); // Rho parameter for local (flow) variations
28};
29#endif