Port of CERNLIB routines vvidis/vviden (G116) to calculate higher quality Vavilov density and distribution functions
Definition at line 24 of file VVIObjF.h.
VVIObjF::VVIObjF |
( |
float |
kappa = 0.01 , |
|
|
float |
beta2 = 1. , |
|
|
int |
mode = 0 |
|
) |
| |
Constructor.
Constructor Set Vavilov parameters kappa and beta2 and define whether to calculate density fcn or distribution fcn
- Parameters
-
kappa | - (input) Vavilov kappa parameter [0.01 (Landau-like) < kappa < 10. (Gaussian-like)] |
beta2 | - (input) Vavilov beta2 parameter (square of particle speed in v/c units) |
mode | - (input) set to 0 to calculate the density function and to 1 to calculate the distribution function |
Definition at line 41 of file VVIObjF.cc.
References a_, funct::abs(), b_, c, alignmentValidation::c1, ztail::d, d1, VVIObjFDetails::dzero(), alignCSCRings::e, VVIObjFDetails::expint(), validate-o2o-wbm::f, validate-o2o-wbm::f1, validate-o2o-wbm::f2, myMath::fast_expf(), myMath::fast_logf(), isotrackApplyRegressor::k, cmsLHEtoEOSManager::l, mode_, dqmiodumpmetadata::n, omega_, submitPVResolutionJobs::q, alignCSCRings::s, VVIObjFDetails::sincosint(), t0_, t1_, t_, x, and x0_.
42 const float xp[9] = {9.29, 2.47, .89, .36, .15, .07, .03, .02, 0.0};
43 const float xq[7] = {.012, .03, .08, .26, .87, 3.83, 11.0};
45 float q, u,
x,
c1, c2, c3, c4,
d1, h4, h5, h6, q2, x1,
d, ll, ul, xf1, xf2, rv;
59 float invKappa = 1.f / kappa;
60 h_[4] = 1.f - beta2 * 0.42278433999999998f + (7.6f * invKappa);
63 h4 = -(7.6f * invKappa) - (beta2 * .57721566
f + 1.
f);
72 for (lp = 0; lp < 9; ++lp) {
76 ll = -float(lp) - 1.5f;
77 for (lq = 0; lq < 7; ++lq) {
82 auto f2 = [h_](
float x) {
91 h_[0] = kappa * (beta2 * .57721566f + 2.f) + 9.9166128600000008
f;
95 h_[1] = beta2 * kappa;
97 h_[3] = omega_ * 1.5707963250000001f;
98 auto f1 = [h_](
float x) {
return h_[0] + h_[1] *
vdt::fast_logf(h_[2] * x) - h_[3] *
x; };
101 d =
vdt::fast_expf(kappa * (beta2 * (.57721566
f - h5) + 1.
f)) * .31830988654751274f;
104 a_[n - 1] = omega_ * .31830988654751274f;
108 for (k = 1; k <
n; ++
k) {
114 vdt::fast_sincosf(x1, c3, c4);
115 xf1 = kappa * (beta2 * c1 - c4) - x * c2;
116 xf2 = x * c1 + kappa * (c3 + beta2 * c2) + t0_ * x;
118 vdt::fast_sincosf(xf2, s, c);
127 a_[n - 1] += q2 *
a_[l - 1];
const edm::EventSetup & c
const int mode_
returns the limits on the non-zero (mode=0) or normalized region (mode=1)
void sincosint(float x, float &sint, float &cint)
Abs< T >::type abs(const T &t)
int dzero(float a, float b, float &x0, float &rv, float eps, int mxf, F func)
Private version of the exponential integral.
float expint(float x)
Private version of the cosine and sine integral.
static constexpr float d1
float VVIObjF::fcn |
( |
float |
x | ) |
const |
Vavilov function method Returns density fcn (mode=0) or distribution fcn (mode=1)
- Parameters
-
x | - (input) Argument of function [typically defined as (Q-mpv)/sigma] |
Definition at line 141 of file VVIObjF.cc.
References a0, isotrackTrainRegressor::a1, isotrackTrainRegressor::a2, a_, b0, b1, b2, b_, validate-o2o-wbm::f, isotrackApplyRegressor::k, mode_, dqmiodumpmetadata::n, omega_, t0_, t1_, t_, x0_, and y.
Referenced by SiPixelTemplateReco::PixelTempReco1D(), and SiPixelTemplateReco2D::PixelTempReco2D().
152 }
else if (
x <=
t1_) {
154 u =
omega_ * y - 3.141592653589793f;
156 vdt::fast_sincosf(u, su, cu);
161 for (k = 2; k <= n1; ++
k) {
164 a0 =
a_[k - 1] + cof * a1 -
a2;
168 for (k = 2; k <=
n; ++
k) {
171 b0 =
b_[k - 1] + cof * b1 -
b2;
173 f = (a0 -
a2) * .5f + b0 * su;
const int mode_
returns the limits on the non-zero (mode=0) or normalized region (mode=1)
static constexpr float a0
static constexpr float b2
static constexpr float b0
static constexpr float b1