5#include "CLHEP/GenericFunctions/Landau.hh"
6#include "CLHEP/GenericFunctions/Variable.hh"
17 _peak("Peak", 5.0 ,0, 10),
18 _width("Width",1.0,0, 10)
34 double xs = x0 + 0.222782*s;
35 return _denlan((x-xs)/s)/s;
54double Landau::_denlan(
double x)
const {
57 static float p1[5] = { (float).4259894875,(
float)-.124976255,(float)
58 .039842437,(
float)-.006298287635,(float).001511162253 };
59 static float q5[5] = { (float)1.,(
float)156.9424537,(float)3745.310488,(
60 float)9834.698876,(float)66924.28357 };
61 static float p6[5] = { (float)1.000827619,(
float)664.9143136,(float)
62 62972.92665,(
float)475554.6998,(float)-5743609.109 };
63 static float q6[5] = { (float)1.,(
float)651.4101098,(float)56974.73333,(
64 float)165917.4725,(float)-2815759.939 };
65 static float a1[3] = { (float).04166666667,(
float)-.01996527778,(float)
67 static float a2[2] = { (float)-1.84556867,(
float)-4.284640743 };
68 static float q1[5] = { (float)1.,(
float)-.3388260629,(float).09594393323,(
69 float)-.01608042283,(float).003778942063 };
70 static float p2[5] = { (float).1788541609,(
float).1173957403,(float)
71 .01488850518,(
float)-.001394989411,(float)1.283617211e-4 };
72 static float q2[5] = { (float)1.,(
float).7428795082,(float).3153932961,(
73 float).06694219548,(float).008790609714 };
74 static float p3[5] = { (float).1788544503,(
float).09359161662,(float)
75 .006325387654,(
float)6.611667319e-5,(float)-2.031049101e-6 };
76 static float q3[5] = { (float)1.,(
float).6097809921,(float).2560616665,(
77 float).04746722384,(float).006957301675 };
78 static float p4[5] = { (float).9874054407,(
float)118.6723273,(float)
79 849.279436,(
float)-743.7792444,(float)427.0262186 };
80 static float q4[5] = { (float)1.,(
float)106.8615961,(float)337.6496214,(
81 float)2016.712389,(float)1597.063511 };
82 static float p5[5] = { (float)1.003675074,(
float)167.5702434,(float)
83 4789.711289,(
float)21217.86767,(float)-22324.9491 };
91 if (v < (
float)-5.5) {
92 u = exp(v + (
float)1.);
93 ret_val = exp(-1 / u) / sqrt(u) * (float).3989422803 * ((a1[0] + (a1[
94 1] + a1[2] * u) * u) * u + 1);
95 }
else if (v < (
float)-1.) {
97 ret_val = exp(-u) * sqrt(u) * (p1[0] + (p1[1] + (p1[2] + (p1[3] + p1[
98 4] * v) * v) * v) * v) / (q1[0] + (q1[1] + (q1[2] + (q1[3] +
99 q1[4] * v) * v) * v) * v);
100 }
else if (v < (
float)1.) {
101 ret_val = (p2[0] + (p2[1] + (p2[2] + (p2[3] + p2[4] * v) * v) * v) *
102 v) / (q2[0] + (q2[1] + (q2[2] + (q2[3] + q2[4] * v) * v) * v)
104 }
else if (v < (
float)5.) {
105 ret_val = (p3[0] + (p3[1] + (p3[2] + (p3[3] + p3[4] * v) * v) * v) *
106 v) / (q3[0] + (q3[1] + (q3[2] + (q3[3] + q3[4] * v) * v) * v)
108 }
else if (v < (
float)12.) {
112 ret_val = r__1 * r__1 * (p4[0] + (p4[1] + (p4[2] + (p4[3] + p4[4] * u)
113 * u) * u) * u) / (q4[0] + (q4[1] + (q4[2] + (q4[3] + q4[4] *
115 }
else if (v < (
float)50.) {
119 ret_val = r__1 * r__1 * (p5[0] + (p5[1] + (p5[2] + (p5[3] + p5[4] * u)
120 * u) * u) * u) / (q5[0] + (q5[1] + (q5[2] + (q5[3] + q5[4] *
122 }
else if (v < (
float)300.) {
126 ret_val = r__1 * r__1 * (p6[0] + (p6[1] + (p6[2] + (p6[3] + p6[4] * u)
127 * u) * u) * u) / (q6[0] + (q6[1] + (q6[2] + (q6[3] + q6[4] *
130 u = 1 / (v - v * log(v) / (v + 1));
133 ret_val = r__1 * r__1 * ((a2[0] + a2[1] * u) * u + 1);
#define FUNCTION_OBJECT_IMP(classname)
virtual double operator()(double argument) const override
virtual double getValue() const