9 #include "TDirectory.h"
23 Double_t invsq2pi = 1.0 / (std::sqrt(2 *
M_PI));
24 Double_t twoPi = 2 *
M_PI;
26 Double_t delta_value =
par[3] / (std::sqrt(1. +
par[3] *
par[3]));
27 Double_t omega_square = (
par[2] *
par[2]) / (1. - 4. * delta_value * delta_value / (twoPi));
28 Double_t omega_value = std::sqrt(omega_square);
29 Double_t xi_value =
par[1] - delta_value * omega_value * 2. * invsq2pi;
31 (invsq2pi / omega_value) *
std::exp(-((
x[0] - xi_value) * (
x[0] - xi_value)) / (2.0 * omega_square));
33 Double_t Erf_part = 0.5 * (1 + std::erf(
par[3] * (
x[0] - xi_value) / (omega_value)));
35 Double_t SkewNormal_Value =
par[0] * 2. * Gauss_part * Erf_part;
37 Double_t MyGaussFuncValue = SkewNormal_Value;
39 return (MyGaussFuncValue);
52 snprintf(buf, 100,
"adc_spec_%d",
id);
54 snprintf(buf, 100,
"adc_spec_%s",
hname);
66 m_adc_fit->SetParNames(
"Max",
"Mean",
"Sigma",
"Skew_factor");
70 m_adc->Fit(
"adc_fun",
"Q+",
"", 50, 320);