Port of CERNLIB routines vvidis/vviden (G116) to calculate higher quality Vavilov density and distribution functions
Definition at line 25 of file VVIObjF.h.
VVIObjF::VVIObjF |
( |
float |
kappa, |
|
|
float |
beta2, |
|
|
int |
mode |
|
) |
| |
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 43 of file VVIObjF.cc.
References a_, funct::abs(), b_, c, alignmentValidation::c1, ztail::d, d1, VVIObjFDetails::dzero(), MillePedeFileConverter_cfg::e, VVIObjFDetails::expint(), f, DeadROC_duringRun::f1, DeadROC_duringRun::f2, myMath::fast_expf(), myMath::fast_logf(), dqmMemoryStats::float, dqmdumpme::k, hgcalLayerClusters_cfi::kappa, MainPageGenerator::l, mode_, dqmiodumpmetadata::n, omega_, submitPVResolutionJobs::q, alignCSCRings::s, VVIObjFDetails::sincosint(), t0_, t1_, t_, x, x0_, and testProducerWithPsetDescEmpty_cfi::x1.
44 const float xp[9] = {9.29, 2.47, .89, .36, .15, .07, .03, .02, 0.0};
45 const float xq[7] = {.012, .03, .08, .26, .87, 3.83, 11.0};
47 float q, u,
x,
c1, c2, c3, c4,
d1, h4, h5, h6, q2,
x1,
d, ll, ul, xf1, xf2, rv;
61 float invKappa = 1.f /
kappa;
62 h_[4] = 1.f - beta2 * 0.42278433999999998f + (7.6f * invKappa);
65 h4 = -(7.6f * invKappa) - (beta2 * .57721566
f + 1.
f);
74 for (lp = 0; lp < 9; ++lp) {
78 ll = -
float(lp) - 1.5f;
79 for (lq = 0; lq < 7; ++lq) {
84 auto f2 = [h_](
float x) {
93 h_[0] =
kappa * (beta2 * .57721566f + 2.f) + 9.9166128600000008
f;
97 h_[1] = beta2 *
kappa;
99 h_[3] =
omega_ * 1.5707963250000001f;
106 a_[
n - 1] =
omega_ * .31830988654751274f;
110 for (
k = 1;
k <
n; ++
k) {
116 vdt::fast_sincosf(
x1, c3, c4);
117 xf1 =
kappa * (beta2 *
c1 - c4) -
x * c2;
120 vdt::fast_sincosf(xf2,
s,
c);
129 a_[
n - 1] += q2 *
a_[
l - 1];
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
VVIObjF::VVIObjF |
( |
float |
kappa | ) |
|
Constructor with kappa only.
Constructor Set Vavilov parameter kappa and calculate the distribution fcn
- Parameters
-
kappa | - (input) Vavilov kappa parameter [0.01 (Landau-like) < kappa < 10. (Gaussian-like)] |
Definition at line 144 of file VVIObjF.cc.
References a_, funct::abs(), b_, c, alignmentValidation::c1, ztail::d, d1, VVIObjFDetails::dzero(), MillePedeFileConverter_cfg::e, VVIObjFDetails::expint(), f, DeadROC_duringRun::f1, DeadROC_duringRun::f2, myMath::fast_expf(), myMath::fast_logf(), dqmMemoryStats::float, dqmdumpme::k, hgcalLayerClusters_cfi::kappa, MainPageGenerator::l, dqmiodumpmetadata::n, omega_, submitPVResolutionJobs::q, alignCSCRings::s, VVIObjFDetails::sincosint(), t0_, t1_, t_, x, x0_, and testProducerWithPsetDescEmpty_cfi::x1.
145 const float xp[9] = {9.29, 2.47, .89, .36, .15, .07, .03, .02, 0.0};
146 const float xq[7] = {.012, .03, .08, .26, .87, 3.83, 11.0};
148 float q, u,
x,
c1, c2, c3, c4,
d1, h4, h5, h6, q2,
x1,
d, ll, ul, xf1, xf2, rv;
158 float invKappa = 1.f /
kappa;
159 h_[4] = 0.57721566f + (7.6f * invKappa);
160 h4 = -(7.6f * invKappa) - 1.57721566
f;
169 for (lp = 0; lp < 9; ++lp) {
173 ll = -
float(lp) - 1.5f;
174 for (lq = 0; lq < 7; ++lq) {
185 h_[0] =
kappa * 2.57721566f + 9.9166128600000008f;
187 h_[0] += 6.90775527f;
191 h_[3] =
omega_ * 1.5707963250000001f;
199 for (
k = 1;
k <
n; ++
k) {
205 vdt::fast_sincosf(
x1, c3, c4);
209 vdt::fast_sincosf(xf2,
s,
c);
213 a_[
n - 1] += q2 *
a_[
l - 1];
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 226 of file VVIObjF.cc.
References a0, testProducerWithPsetDescEmpty_cfi::a2, a_, b0, b1, b2, b_, f, dqmdumpme::k, mode_, dqmiodumpmetadata::n, omega_, t0_, t1_, t_, x, x0_, and y.
Referenced by SiPixelTemplateReco::PixelTempReco1D(), and SiPixelTemplateReco2D::PixelTempReco2D().
229 float f, u,
y,
a0, a1;
237 }
else if (
x <=
t1_) {
239 u =
omega_ *
y - 3.141592653589793f;
241 vdt::fast_sincosf(u, su, cu);
246 for (
k = 2;
k <= n1; ++
k) {
249 a0 =
a_[
k - 1] + cof * a1 -
a2;
253 for (
k = 2;
k <=
n; ++
k) {
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