22 double result1, result2, result3;
24 result1 = z * y *
exp(-t / y);
25 result1/=
pow(y,2) - (x +
z) * y + z * x;
27 result2 = z * x *
exp(-t / x);
28 result2/=
pow(x,2) - (x -
z) * y - z * x;
30 result3 =
pow(z,2) *
exp(-t / z);
31 result3/=
pow(z,2) + (x -
z) * y - z * x;
33 return result1 + result2 + result3;
37 return z / (y -
z) * (
exp(-t / y) -
exp(-t / z));
41 double result1, result2;
43 result1 =
exp(-t / x) -
exp(-t / z);
44 result1*= z * x / (z -
x);
46 result2 = t *
exp(-t / z);
48 return (result1 + result2) / (z -
x);
52 return t / z *
exp(-t / z);
55 double pulse(
double x,
double y,
double z,
double t){
64 else if(x == 0)
return pulse_x0(y, z, t);
65 else if(y == z)
return pulse_yz(x, z, t);
69 double fpeak(
double *
x,
double *par){
77 double t = x[0] - t_0;
80 if(x[0] < t_0)
return a_0;
82 return a_0 + s *
pulse(xx, y, z, t);
90 double width = par[3];
92 return a_0+s*TMath::Erf((x[0]-t_0)/width);
98 double c_exp = par[1];
99 double c_pow = par[2];
101 return s*TMath::Exp(x[0]*c_exp)*(1+x[0]*c_pow);
104 double fdecay(
double *
x,
double *par);
108 double xm = par[6]*(x[0]-25);
109 double xp = par[6]*(x[0]+25);
110 double xz = par[6]*x[0];
111 return 1.2131 *
fpeak(&xp,par) - 1.4715 *
fpeak(&xz,par) + 0.4463 *
fpeak(&xm,par);
115 TF1
f(
"peak_convoluted",
fpeak,0,250,4);
116 return f.IntegralError(x[0]-par[4]/2.,x[0]+par[4]/2.,par,
nullptr,1.)/(par[4]);
120 double xm = (x[0]-25);
121 double xp = (x[0]+25);
double fdeconv_convoluted(double *x, double *par)
double pulse_x0(double y, double z, double t)
double fdecay(double *x, double *par)
double fpeak_convoluted(double *x, double *par)
double pulse_yz(double x, double z, double t)
double pulse(double x, double y, double z, double t)
double fdeconv(double *x, double *par)
double pulse_raw(double x, double y, double z, double t)
double fpeak(double *x, double *par)
double fturnOn(double *x, double *par)
double pulse_x0_yz(double z, double t)
Power< A, B >::type pow(const A &a, const B &b)