110 double d_alpha, d_beta;
122 double variation_func_max = 0.;
123 double variation_tim_max = 0.;
132 if (sigmas_sample > 0.)
133 un_sur_sigma = 1. / sigmas_sample;
139 for (
int iter = 0; iter <
fNb_iter; iter++) {
154 for (
int i = num_fit_min;
i < num_fit_max + 1;
i++) {
163 if (
dt > -alpha_beta) {
164 double dt_sur_beta =
dt /
fBeta;
166 double variable = (double)1. +
dt / alpha_beta;
167 double expo = TMath::Exp(-dt_sur_beta);
170 d_alpha = un_sur_sigma * puissance * expo;
178 d11 += d_alpha * d_alpha;
179 d12 += d_alpha * d_beta;
180 d22 += d_beta * d_beta;
182 delta = (adc_to_fit[
i] -
func) * un_sur_sigma;
184 z1 +=
delta * d_alpha;
188 double denom = d11 * d22 - d12 * d12;
193 if (nsamp_used < 3) {
198 variation_func_max = (z1 * d22 -
z2 * d12) /
denom;
199 variation_tim_max = (-z1 * d12 +
z2 * d11) /
denom;
200 chi2 =
chi2 / ((double)nsamp_used - 2.);
214 double func_electronic, dtsbeta,
variable, puiss;
217 return ((Double_t)0.);
223 func_electronic =
fFunc_max * puiss * TMath::Exp(-dtsbeta);
225 func_electronic = 0.;
227 return func_electronic;
233 double denom,
dt, amp1, amp2, amp3;
239 for (
k = nmin;
k < nmax;
k++) {
241 if (ampl[
k] > ampmax) {
246 amp1 = ampl[
imax - 1];
248 amp3 = ampl[
imax + 1];
249 denom = 2. * amp2 - amp1 - amp3;
252 dt = 0.5 * (amp3 - amp1) /
denom;
261 parout[0] = amp2 + (amp3 - amp1) *
dt * 0.25;
262 parout[1] = (double)
imax +
dt;
263 parout[2] = (double)
imax;