// Simple exponential in 1/mt*MT, as a function of dNdpt
char formula[500];
- sprintf(formula,"[0]*x*exp(-sqrt(x**2+%f**2)/[1])", mass);
+ snprintf(formula,500,"[0]*x*exp(-sqrt(x**2+%f**2)/[1])", mass);
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, temp);
fLastFunc->SetParLimits(1, 0.01, 10);
// Simple exponential in 1/pt*dNdpT, as a function of dNdpt
char formula[500];
- sprintf(formula,"[0]*x*exp(-x/[1])");
+ snprintf(formula,500,"[0]*x*exp(-x/[1])");
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, temp);
fLastFunc->SetParLimits(1, 0.01, 10);
TF1 * AliBWFunc::GetBoltzmanndNdptTimesPt(Double_t mass, Double_t temp, Double_t norm, const char * name){
// Boltzmann (exp in 1/mt*dNdmT times mt) as a function of dNdpt
char formula[500];
- sprintf(formula,"[0]*x*sqrt(x**2+%f**2)*exp(-sqrt(x**2+%f**2)/[1])", mass,mass);
+ snprintf(formula,500,"[0]*x*sqrt(x**2+%f**2)*exp(-sqrt(x**2+%f**2)/[1])", mass,mass);
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, temp);
fLastFunc->SetParLimits(1, 0.01, 10);
// Levi function, dNdpt
char formula[500];
- sprintf(formula,"( x*[0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (sqrt([3]*[3]+x*x) -[3])/([1]*[2]) )^(-[1])");
+ 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])");
// sprintf(formula,"( x*[0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (sqrt([3]*[3]+x*x))/([1]*[2]) )^(-[1])");
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, n, temp,mass);
// PowerLaw function, dNdpt
char formula[500];
- sprintf(formula,"x*[0]*( 1 + x/[1] )^(-[2])");
+ snprintf(formula,500,"x*[0]*( 1 + x/[1] )^(-[2])");
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, pt0, n);
fLastFunc->SetParLimits(1, 0.01, 10);
// PowerLaw function, 1/pt dNdpt
char formula[500];
- sprintf(formula," [0]*( 1 + x/[1] )^(-[2])");
+ snprintf(formula,500," [0]*( 1 + x/[1] )^(-[2])");
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, pt0, n);
// fLastFunc->SetParLimits(2, 0.01, 10);
// Levi function, dNdpt
char formula[500];
- sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (sqrt([3]*[3]+x*x) -[3])/([1]*[2]) )^(-[1])");
+ 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])");
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, n, temp,mass);
fLastFunc->SetParLimits(2, 0.01, 10);
// Levi function, 1/mt dNdmt
char formula[500];
if (var == kOneOverMtdNdmt)
- sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x -[3])/([1]*[2]) )^(-[1])");
+ snprintf(formula,500,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x -[3])/([1]*[2]) )^(-[1])");
else if (var == kdNdmt)
- sprintf(formula,"( x*[0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x-[3])/([1]*[2]) )^(-[1])");
+ snprintf(formula,500,"( x*[0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x-[3])/([1]*[2]) )^(-[1])");
if (var == kOneOverMtdNdmtMinusM)
- sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x)/([1]*[2]) )^(-[1])");
+ snprintf(formula,500,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + (x)/([1]*[2]) )^(-[1])");
//sprintf(formula,"( [0]*([1]-1)*([1]-2) )/( [1]*[2]*( [1]*[2]+[3]*([1]-2) ) ) * ( 1 + x/([1]*[2]) )^(-[1])");
// sprintf(formula,"[0] * ( 1 + x/([1]*[2]) )^(-[1])");
// Simple exp in 1/mt dNdmt, as a function of dNdpt
// mt scaling
char formula[500];
- sprintf(formula,"[0]*exp(-sqrt(x**2+%f**2)/[1])", mass);
+ snprintf(formula,500,"[0]*exp(-sqrt(x**2+%f**2)/[1])", mass);
fLastFunc=new TF1(name,formula,0,10);
fLastFunc->SetParameters(norm, temp);
fLastFunc->SetParLimits(1, 0.01, 10);