1 #include <goofit/PDFs/basic/NovosibirskPdf.h>
5 __device__ fptype device_Novosibirsk(fptype *evt, fptype *p, unsigned int *indices) {
6 fptype _Mean = p[indices[1]];
7 fptype _Sigma = p[indices[2]];
8 fptype _Tail = p[indices[3]];
9 fptype x = evt[indices[2 + indices[0]]];
17 if(fabs(_Tail) < 1.e-7) {
18 qc = 0.5 * POW2((x - _Mean) / _Sigma);
20 qa = _Tail * sqrt(log(4.));
22 qx = (x - _Mean) / _Sigma * qb;
25 //---- Cutting curve from right side
28 qc = 0.5 * (POW2(log(qy) / _Tail) + _Tail * _Tail);
33 //---- Normalize the result
37 __device__ device_function_ptr ptr_to_Novosibirsk = device_Novosibirsk;
39 __host__ NovosibirskPdf::NovosibirskPdf(std::string n, Observable _x, Variable mean, Variable sigma, Variable tail)
41 std::vector<unsigned int> pindices;
42 pindices.push_back(registerParameter(mean));
43 pindices.push_back(registerParameter(sigma));
44 pindices.push_back(registerParameter(tail));
45 GET_FUNCTION_ADDR(ptr_to_Novosibirsk);