20 double result1, result2, result3;
22 result1 = z * y *
exp(-t / y);
23 result1 /=
pow(y, 2) - (x +
z) * y + z * x;
25 result2 = z * x *
exp(-t / x);
26 result2 /=
pow(x, 2) - (x -
z) * y - z * x;
28 result3 =
pow(z, 2) *
exp(-t / z);
29 result3 /=
pow(z, 2) + (x -
z) * y - z * x;
31 return result1 + result2 + result3;
34 double pulse_x0(
double y,
double z,
double t) {
return z / (y -
z) * (
exp(-t / y) -
exp(-t / z)); }
37 double result1, result2;
39 result1 =
exp(-t / x) -
exp(-t / z);
40 result1 *= z * x / (z -
x);
42 result2 = t *
exp(-t / z);
44 return (result1 + result2) / (z -
x);
49 double pulse(
double x,
double y,
double z,
double t) {
56 if ((x == 0) && (y == z))
66 double fpeak(
double *
x,
double *par) {
73 double t = x[0] - t_0;
79 return a_0 + s *
pulse(xx, y, z, t);
86 double width = par[3];
88 return a_0 + s * TMath::Erf((x[0] - t_0) / width);
93 double c_exp = par[1];
94 double c_pow = par[2];
96 return s * TMath::Exp(x[0] * c_exp) * (1 + x[0] * c_pow);
99 double fdecay(
double *
x,
double *par);
102 double xm = par[6] * (x[0] - 25);
103 double xp = par[6] * (x[0] + 25);
104 double xz = par[6] * x[0];
105 return 1.2131 *
fpeak(&xp, par) - 1.4715 *
fpeak(&xz, par) + 0.4463 *
fpeak(&xm, par);
109 TF1
f(
"peak_convoluted",
fpeak, 0, 250, 4);
110 return f.IntegralError(x[0] - par[4] / 2., x[0] + par[4] / 2., par,
nullptr, 1.) / (par[4]);
114 double xm = (x[0] - 25);
115 double xp = (x[0] + 25);
double pulse_yz(double x, double z, double t)
double fdeconv_convoluted(double *x, double *par)
double fdecay(double *x, double *par)
Exp< T >::type exp(const T &t)
double pulse_x0(double y, double z, double t)
double fpeak_convoluted(double *x, double *par)
double fturnOn(double *x, double *par)
uint16_t const *__restrict__ x
double pulse(double x, double y, double z, double t)
double pulse_raw(double x, double y, double z, double t)
double fdeconv(double *x, double *par)
double fpeak(double *x, double *par)
double pulse_x0_yz(double z, double t)
Power< A, B >::type pow(const A &a, const B &b)