fix of an accidentally carried out wrong cleanup.

This commit is contained in:
2018-08-17 16:16:08 +02:00
parent 927eb75a90
commit dc437c9f25

View File

@ -73,21 +73,13 @@ double SExpRlx::operator()(double x, const vector<double> &par) const {
// par[1] is the relaxation rate
// par[2] is the exponent
double y;
if ( x >= 0 && x <= par[0] ) {
TF1 sexp("sexp", "exp(-([0]-x)/[3])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 10000.0);
sexp.SetParameters(x, par[1], par[2],tau_Li);
sexp.SetNpx(1000);
y=sexp.Integral(0.0,x)/(1-exp(-x/tau_Li))/tau_Li;
if ( x >= 0 && x <= par[0] ) {
sexp1.SetParameters(x, par[1], par[2],tau_Li);
return sexp1.Integral(0.0,x)/(1-exp(-x/tau_Li))/tau_Li;
} else if ( x > par[0] ) {
TF1 sexp("sexp", "exp(-([3]-x)/[4])*exp(-pow(([1]*([0]-x)),[2]))", 0.0, 10000.0);
sexp.SetParameters(x, par[1], par[2], par[0],tau_Li);
sexp.SetNpx(1000);
y=sexp.Integral(0.0,par[0])/(1-exp(-x/tau_Li))/tau_Li;
} else {
y = 0;
sexp2.SetParameters(x, par[1], par[2], par[0],tau_Li);
return sexp2.Integral(0.0,par[0])/(1-exp(-par[0]/tau_Li))/tau_Li;
}
return 0;
}