#ifndef ALIBWFUNC_H
#define ALIBWFUNC_H
#if !defined(__CINT__) || defined(__MAKECINT__)
#include "TObject.h"
class TF1;
class TH1;
class TGraph;
#endif
class AliPWGFunc : public TObject {
public:
typedef enum {kdNdpt,kOneOverPtdNdpt,kOneOverMtdNdmt,kdNdmt,kOneOverMtdNdmtMinusM} VarType_t;
AliPWGFunc();
~AliPWGFunc();
TF1 * GetBGBW(Double_t mass, Double_t beta, Double_t T, Double_t n,
Double_t norm, const char * name = "fBGBW");
TF1 * GetBoltzmann(Double_t mass, Double_t T, Double_t norm, const char * name ="fBoltzmann");
TF1 * GetTsallisBW(Double_t mass, Double_t beta, Double_t T, Double_t q,
Double_t norm, Double_t ymax = 0.5, const char * name = "fTsallisBW");
TF1 * GetMTExp(Double_t mass, Double_t T, Double_t norm, const char * name ="fMtExp");
TF1 * GetPTExp(Double_t T, Double_t norm, const char * name ="fPtExp");
TF1 * GetTsallis(Double_t mass, Double_t T, Double_t q, Double_t norm, const char * name="fTsallis")
{return GetLevi (mass,T,1/(q-1),norm,name);}
TF1 * GetLevi(Double_t mass, Double_t T, Double_t n, Double_t norm, const char * name="fLevi");
TF1 * GetUA1(Double_t mass, Double_t p0star, Double_t pt0, Double_t n, Double_t T, Double_t norm, const char * name="fUA1");
TF1 * GetHistoFunc(TH1 * h, const char * name = "fHisto");
TF1 * GetGraphFunc(TGraph * h, const char * name = "fHisto");
TF1 * GetPowerLaw(Double_t pt0, Double_t n, Double_t norm, const char * name="fPowerLaw");
TF1 * GetBoseEinstein(Double_t mass, Double_t T, Double_t norm, const char * name="fBoseEinstein");
TF1 * GetFermiDirac(Double_t mass, Double_t T, Double_t norm, const char * name="fFermiDirac");
void SetVarType(VarType_t tp) {fVarType=tp;}
protected:
TF1 * GetBGBWdNdpt(Double_t mass, Double_t beta, Double_t temp,
Double_t n, Double_t norm, const char * name= "fBGBW");
TF1 * GetTsallisBWdNdpt(Double_t mass, Double_t beta, Double_t T, Double_t q,
Double_t norm, Double_t ymax = 0.5, const char * name = "fTsallisBW");
TF1 * GetMTExpdNdpt(Double_t mass, Double_t T, Double_t norm, const char * name ="fExp");
TF1 * GetBoseEinsteindNdpt(Double_t mass, Double_t T, Double_t norm, const char * name="fBoseEinstein");
TF1 * GetFermiDiracdNdpt(Double_t mass, Double_t T, Double_t norm, const char * name="fFermiDirac");
TF1 * GetTsallisdNdpt(Double_t mass, Double_t T, Double_t q, Double_t norm, const char * name="fTsallis");
TF1 * GetLevidNdpt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char * name="fLevi");
TF1 * GetPowerLawdNdpt(Double_t pt0, Double_t n, Double_t norm, const char * name="fLevi");
TF1 * GetUA1dNdpt(Double_t pt0, Double_t n, Double_t norm, const char * name="fLevi");
TF1 * GetBGBWdNdptTimesPt(Double_t mass, Double_t beta, Double_t T, Double_t n,
Double_t norm, const char * name = "fBGBWTimesPt");
TF1 * GetBGBWdNdptTimesMt(Double_t mass, Double_t beta, Double_t T, Double_t n,
Double_t norm, const char * name = "fBGBWTimesMt");
TF1 * GetTsallisBWdNdptTimesPt(Double_t mass, Double_t beta, Double_t T, Double_t q,
Double_t norm, Double_t ymax = 0.5, const char * name = "fTsallisBWTimesPt");
TF1 * GetLevidNdptTimesPt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char * name="fLevi");
TF1 * GetUA1dNdptTimesPt(Double_t pt0, Double_t n, Double_t norm, const char * name="fLevi");
TF1 * GetPowerLawdNdptTimesPt(Double_t pt0, Double_t n, Double_t norm, const char * name="fLevi");
TF1 * GetMTExpdNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char * name ="fMtExpTimesPt");
TF1 * GetBoseEinsteindNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char * name="fBoseEinstein");
TF1 * GetFermiDiracdNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char * name="fFermiDirac");
TF1 * GetPTExpdNdptTimesPt(Double_t T, Double_t norm, const char * name ="fPtExpTimesPt");
TF1 * GetBoltzmanndNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char * name ="fBoltzmannTimesPt");
TF1 * GetTsallisdNdptTimesPt(Double_t mass, Double_t T, Double_t q, Double_t norm, const char * name="fTsallisTimesPt");
TF1 * GetLevidNdmt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char * name = "fLeviMt", VarType_t var = kOneOverMtdNdmt);
TF1 * GetMTExpdNdmt(Double_t mass, Double_t temp, Double_t norm, const char * name, VarType_t var);
void SetLineWidth(Width_t width) { fLineWidth = width;}
TF1 * GetTestFunc(Double_t mass, Double_t T, Double_t norm, Double_t ymax, const char * name ="fTest") ;
static Double_t StaticBGdNdPt(const double * x, const double* p);
static Double_t StaticBGdNdPtTimesPt(const double * x, const double* p);
static Double_t StaticBGdNdMtTimesMt(const double * x, const double* p);
static Double_t StaticTsallisdNdPt(const double * x, const double* p);
static Double_t StaticTsallisdNdPtTimesPt(const double * x, const double* p);
static Double_t IntegrandBG(const double * x, const double* p);
static Double_t IntegrandTsallis(const double * x, const double* p);
static Double_t StaticTest(const double * x, const double* p);
static Double_t IntegrandTest(const double * x, const double* p);
static Double_t StaticHistoFunc(const double * x, const double* p);
static Double_t StaticUA1Func(const double * x, const double* p);
static Double_t StaticUA1FuncOneOverPt(const double * x, const double* p) ;
private:
TF1 * fLastFunc;
Width_t fLineWidth;
VarType_t fVarType;
AliPWGFunc(const AliPWGFunc&);
AliPWGFunc& operator=(const AliPWGFunc&);
ClassDef(AliPWGFunc, 1)
};
#endif