53 fLastFunc->SetParNames(
"norm",
"pointer to histo");
69 fLastFunc->SetParNames(
"norm",
"pointer to histo");
90 AliFatal(
"Not implemented");
93 AliFatal(
"Not implemented");
107 AliFatal(
"Not implemented");
110 AliFatal(
"Not implemented");
113 AliFatal(
"Not implemented");
133 AliFatal(
"Not implemented");
136 AliFatal(
"Not implemented");
164 AliFatal(
"Not implemented");
184 AliFatal(
"Not implemented");
187 AliFatal(
"Not implemented");
206 AliFatal(
"Not implemented");
209 AliFatal(
"Not implemented");
226 AliFatal(
"Not implemented");
229 AliFatal(
"Not implemented");
232 AliFatal(
"Not implemented");
260 AliFatal(
"Not implemented");
280 AliFatal(
"Not Implemented");
284 AliFatal(
"Not implemented");
309 fLastFunc->SetParNames(
"mass",
"p0star",
"pt0",
"n",
"T",
"norm");
327 fLastFunc->SetParNames(
"mass",
"p0star",
"pt0",
"n",
"T",
"norm");
334 AliFatal(
"Not Implemented");
338 AliFatal(
"Not implemented");
369 if(h->InheritsFrom(
"TH1")) {
370 if ( ((
TH1*)h)->FindBin(x[0]) > ((
TH1*)h)->GetNbinsX())
return 0;
371 spl=
new TSpline3((
TH1*)h);
373 else if(h->InheritsFrom(
"TGraph")) spl=
new TSpline3(
"fGraph",(
TGraph*)h);
375 Printf(
"AliPWGFunc::StaticHistoFunc: Unsupported type");
379 double value = spl->Eval(x[0]);
400 static TF1 * fPLaw =
self->GetPowerLawdNdptTimesPt(pt0, n, norm,
"fLocalPLawUA1");
401 static TF1 * fPMTExp =
self->GetMTExpdNdptTimesPt (mass, temp, norm,
"fLocalMTexpUA1");
403 fPLaw->SetParameters(norm,pt0,n);
404 fPMTExp->SetParameters(1,temp);
407 Double_t normMT =fPMTExp->Eval(p0star) >0 ? fPLaw->Eval(p0star) / fPMTExp->Eval(p0star) * fPMTExp->GetParameter(0) : 1;
408 fPMTExp->SetParameter(0,normMT);
411 if (TMath::Abs(fPMTExp->Eval(p0star) - fPLaw->Eval(p0star)) > 0.0001 ) {
412 Printf(
"AliPWGFunc::StaticUA1Func - Wrong norm") ;
413 Printf(
" p0* %f NMT: %f N: %f PL: %f MT: %f", p0star, normMT, norm, fPLaw->Eval(p0star), fPMTExp->Eval(p0star));
416 if (xx > p0star)
return fPLaw->Eval(xx);
417 return fPMTExp->Eval(xx);
436 static TF1 * fPLaw =
self->GetPowerLawdNdpt(pt0, n, norm,
"fLocalPLawUA1");
437 static TF1 * fPMTExp =
self->GetMTExpdNdpt (mass, temp, norm,
"fLocalMTexpUA1");
439 fPLaw->SetParameters(norm,pt0,n);
440 fPMTExp->SetParameters(1,temp);
443 Double_t normMT =fPMTExp->Eval(p0star) >0 ? fPLaw->Eval(p0star) / fPMTExp->Eval(p0star) * fPMTExp->GetParameter(0) : 1;
444 fPMTExp->SetParameter(0,normMT);
447 if (TMath::Abs(fPMTExp->Eval(p0star) - fPLaw->Eval(p0star)) > 0.0001 ) {
448 Printf(
"AliPWGFunc::StaticUA1Func - Wrong norm") ;
449 Printf(
" p0* %f NMT: %f N: %f PL: %f MT: %f", p0star, normMT, norm, fPLaw->Eval(p0star), fPMTExp->Eval(p0star));
452 if (xx > p0star)
return fPLaw->Eval(xx);
453 return fPMTExp->Eval(xx);
474 double beta_max = p[2];
479 Double_t beta = beta_max * TMath::Power(x0, n);
480 if (beta > 0.9999999999999999) beta = 0.9999999999999999;
482 double mT = TMath::Sqrt(mass*mass+pT*pT);
484 double rho0 = TMath::ATanH(beta);
485 double arg00 = pT*TMath::SinH(rho0)/temp;
486 if (arg00 > 700.) arg00 = 700.;
487 double arg01 = mT*TMath::CosH(rho0)/temp;
488 double f0 = x0*mT*TMath::BesselI0(arg00)*TMath::BesselK1(arg01);
510 static TF1 * fIntBG = 0;
514 fIntBG->SetParameters(mass, pT, beta, temp,n);
515 double result = fIntBG->Integral(0,1);
529 Double_t pt = TMath::Sqrt(x[0]*x[0]-p[0]*p[0]);
540 fLastFunc->SetParameters(mass,beta,temp,n,norm);
542 fLastFunc->SetParNames(
"mass",
"#beta",
"T",
"n",
"norm");
566 Double_t mt = TMath::Sqrt(mass*mass+pt*pt);
568 Double_t rho = TMath::ATanH(beta*r);
571 r*TMath::CosH(y) *TMath::Power( (
573 mt*TMath::CosH(y)*TMath::CosH(rho) -
574 pt*TMath::SinH(rho)*TMath::Cos(phi)
601 static TF3 * fInt = 0;
603 fInt =
new TF3 (
"fIntTsa",
IntegrandTsallis, 0, 1, -TMath::Pi(), TMath::Pi(), -ymax, ymax, 5);
609 fInt->SetParameters(mass, pT, beta, temp, q);
610 double result = fInt->Integral(0,1, -TMath::Pi(), TMath::Pi(), -ymax, ymax);
631 fLastFunc->SetParameters(mass,beta,temp,q,norm,ymax);
635 fLastFunc->SetParNames(
"mass",
"#beta",
"temp",
"q",
"norm",
"ymax");
649 fLastFunc->SetParameters(mass,beta,temp,n,norm);
651 fLastFunc->SetParNames(
"mass",
"#beta",
"temp",
"n",
"norm");
665 fLastFunc->SetParameters(mass,beta,temp,n,norm);
667 fLastFunc->SetParNames(
"mass",
"#beta",
"temp",
"n",
"norm");
680 fLastFunc->SetParameters(mass,beta,temp,q,norm,ymax);
681 fLastFunc->SetParNames(
"mass",
"#beta",
"temp",
"q",
"norm",
"ymax");
694 snprintf(formula,500,
"[0]*x*exp(-sqrt(x**2+%f**2)/[1])", mass);
709 snprintf(formula,500,
"[0]*x*1./(exp(sqrt(x**2+%f**2)/[1])-1)", mass);
724 snprintf(formula,500,
"[0]*x*1./(exp(sqrt(x**2+%f**2)/[1])+1)", mass);
741 snprintf(formula,500,
"[0]*x*exp(-x/[1])");
756 snprintf(formula,500,
"[0]*x*sqrt(x**2+%f**2)*exp(-sqrt(x**2+%f**2)/[1])", mass,mass);
791 snprintf(formula,500,
"( x*[0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (sqrt([3]*[3]+x*x) -[3])/([1]*[2]) )^(-[1])");
794 fLastFunc->SetParameters(norm, n, temp,mass);
796 fLastFunc->SetParNames(
"norm (dN/dy)",
"n",
"T",
"mass");
809 snprintf(formula,500,
"x*[0]*( 1 + x/[1] )^(-[2])");
814 fLastFunc->SetParNames(
"norm",
"pt0",
"n");
826 snprintf(formula,500,
" [0]*( 1 + x/[1] )^(-[2])");
830 fLastFunc->SetParNames(
"norm",
"pt0",
"n");
843 snprintf(formula,500,
"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (sqrt([3]*[3]+x*x) -[3])/([1]*[2]) )^(-[1])");
845 fLastFunc->SetParameters(norm, n, temp,mass);
847 fLastFunc->SetParNames(
"norm (dN/dy)",
"n",
"T",
"mass");
860 snprintf(formula,500,
"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x -[3])/([1]*[2]) )^(-[1])");
862 snprintf(formula,500,
"( x*[0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x-[3])/([1]*[2]) )^(-[1])");
864 snprintf(formula,500,
"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x)/([1]*[2]) )^(-[1])");
869 fLastFunc->SetParameters(norm, n, temp,mass);
871 fLastFunc->SetParNames(
"norm",
"n",
"T",
"mass");
893 Double_t mt = TMath::Sqrt(mass*mass+pt*pt);
895 return mt*TMath::CosH(y)*TMath::Exp(-mt*TMath::CosH(y)/temp);
911 static TF3 * fIntTest = 0;
913 fIntTest =
new TF3 (
"fIntTest",
IntegrandTest, 0, 1, -TMath::Pi(), TMath::Pi(), -ymax, ymax, 5);
917 fIntTest->SetParameters(mass, pT, temp);
918 double result = fIntTest->Integral(-ymax, ymax);
929 fLastFunc->SetParameters(mass,temp,norm,ymax);
930 fLastFunc->SetParNames(
"mass",
"#beta",
"T",
"q",
"norm",
"ymax");
944 snprintf(formula,500,
"[0]*exp(-sqrt(x**2+%f**2)/[1])", mass);
959 snprintf(formula,500,
"[0] * exp (-x/[1]) + %f ", mass);
961 snprintf(formula,500,
"[0] * x * exp (-x/[1]) + %f ", mass);
963 snprintf(formula,500,
"[0] * exp (-x/[1])");
982 snprintf(formula,500,
"[0]*1./(exp(sqrt(x**2+%f**2)/[1])-1)", mass);
994 snprintf(formula,500,
"[0]*1./(exp(sqrt(x**2+%f**2)/[1])+1)", mass);
TF1 * GetBGBWdNdpt(Double_t mass, Double_t beta, Double_t temp, Double_t n, Double_t norm, const char *name="fBGBW")
static Double_t IntegrandTsallis(const double *x, const double *p)
TF1 * GetMTExp(Double_t mass, Double_t T, Double_t norm, const char *name="fMtExp")
TF1 * GetBoseEinsteindNdpt(Double_t mass, Double_t T, Double_t norm, const char *name="fBoseEinstein")
static Double_t StaticUA1FuncOneOverPt(const double *x, const double *p)
TF1 * GetPowerLawdNdptTimesPt(Double_t pt0, Double_t n, Double_t norm, const char *name="fLevi")
TF1 * GetMTExpdNdmt(Double_t mass, Double_t temp, Double_t norm, const char *name, VarType_t var)
TF1 * GetBoseEinstein(Double_t mass, Double_t T, Double_t norm, const char *name="fBoseEinstein")
TF1 * GetPTExpdNdptTimesPt(Double_t T, Double_t norm, const char *name="fPtExpTimesPt")
static Double_t StaticUA1Func(const double *x, const double *p)
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 * GetFermiDiracdNdpt(Double_t mass, Double_t T, Double_t norm, const char *name="fFermiDirac")
TF1 * GetBoseEinsteindNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char *name="fBoseEinstein")
TF1 * GetGraphFunc(TGraph *h, const char *name="fHisto")
TF1 * GetLevidNdptTimesPt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char *name="fLevi")
static Double_t StaticTsallisdNdPtTimesPt(const double *x, const double *p)
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 * GetBGBWdNdptTimesPt(Double_t mass, Double_t beta, Double_t T, Double_t n, Double_t norm, const char *name="fBGBWTimesPt")
UShort_t T(UShort_t m, UShort_t t)
static Double_t StaticBGdNdMtTimesMt(const double *x, const double *p)
TF1 * GetHistoFunc(TH1 *h, const char *name="fHisto")
static Double_t IntegrandTest(const double *x, const double *p)
TF1 * GetPowerLaw(Double_t pt0, Double_t n, Double_t norm, const char *name="fPowerLaw")
TF1 * GetBGBW(Double_t mass, Double_t beta, Double_t T, Double_t n, Double_t norm, const char *name="fBGBW")
TF1 * GetLevidNdmt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char *name="fLeviMt", VarType_t var=kOneOverMtdNdmt)
static Double_t StaticBGdNdPt(const double *x, const double *p)
TF1 * GetBGBWdNdptTimesMt(Double_t mass, Double_t beta, Double_t T, Double_t n, Double_t norm, const char *name="fBGBWTimesMt")
TF1 * GetMTExpdNdpt(Double_t mass, Double_t T, Double_t norm, const char *name="fExp")
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 * GetFermiDiracdNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char *name="fFermiDirac")
TF1 * GetPTExp(Double_t T, Double_t norm, const char *name="fPtExp")
TF1 * GetMTExpdNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char *name="fMtExpTimesPt")
static Double_t StaticTsallisdNdPt(const double *x, const double *p)
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 * GetLevi(Double_t mass, Double_t T, Double_t n, Double_t norm, const char *name="fLevi")
ClassImp(AliPWGFunc) AliPWGFunc
TF1 * GetPowerLawdNdpt(Double_t pt0, Double_t n, Double_t norm, const char *name="fLevi")
TF1 * GetFermiDirac(Double_t mass, Double_t T, Double_t norm, const char *name="fFermiDirac")
TF1 * GetTestFunc(Double_t mass, Double_t T, Double_t norm, Double_t ymax, const char *name="fTest")
TF1 * GetBoltzmanndNdptTimesPt(Double_t mass, Double_t T, Double_t norm, const char *name="fBoltzmannTimesPt")
static Double_t StaticHistoFunc(const double *x, const double *p)
static Double_t StaticBGdNdPtTimesPt(const double *x, const double *p)
static Double_t IntegrandBG(const double *x, const double *p)
TF1 * GetBoltzmann(Double_t mass, Double_t T, Double_t norm, const char *name="fBoltzmann")
TF1 * GetLevidNdpt(Double_t mass, Double_t T, Double_t n, Double_t norm, const char *name="fLevi")
static Double_t StaticTest(const double *x, const double *p)