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, h4, h5, h6, q2,
d, ll, ul, 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;
131 for (
k = 1;
k <
n; ++
k) {
135 for (
k = 1;
k <
n; ++
k) {
138 for (
k = 1;
k <
n; ++
k) {
141 for (
k = 1;
k <
n; ++
k) {
142 vdt::fast_sincosf(
x1[
k], c3[
k], c4[
k]);
146 for (
k = 1;
k <
n; ++
k) {
147 vdt::fast_sincosf(xf2[
k],
s[
k],
c[
k]);
152 for (
k = 1;
k <
n; ++
k) {
156 for (
k = 1;
k <
n; ++
k) {
162 for (
k = 1;
k <
n; ++
k) {
166 for (
k = 1;
k <
n; ++
k) {
170 for (
k = 1;
k <
n; ++
k) {
174 for (
k = 1;
k <
n; ++
k) {
176 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 189 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.
190 const float xp[9] = {9.29, 2.47, .89, .36, .15, .07, .03, .02, 0.0};
191 const float xq[7] = {.012, .03, .08, .26, .87, 3.83, 11.0};
193 float q, u, h4, h5, h6, q2,
d, ll, ul, rv;
203 float invKappa = 1.f /
kappa;
204 h_[4] = 0.57721566f + (7.6f * invKappa);
205 h4 = -(7.6f * invKappa) - 1.57721566
f;
214 for (lp = 0; lp < 9; ++lp) {
218 ll = -
float(lp) - 1.5f;
219 for (lq = 0; lq < 7; ++lq) {
230 h_[0] =
kappa * 2.57721566f + 9.9166128600000008f;
232 h_[0] += 6.90775527f;
236 h_[3] =
omega_ * 1.5707963250000001f;
265 for (
k = 1;
k <
n; ++
k) {
269 for (
k = 1;
k <
n; ++
k) {
272 for (
k = 1;
k <
n; ++
k) {
275 for (
k = 1;
k <
n; ++
k) {
276 vdt::fast_sincosf(
x1[
k], c3[
k], c4[
k]);
280 for (
k = 1;
k <
n; ++
k) {
281 vdt::fast_sincosf(xf2[
k],
s[
k],
c[
k]);
285 for (
k = 1;
k <
n; ++
k) {
289 for (
k = 1;
k <
n; ++
k) {
293 for (
k = 1;
k <
n; ++
k) {
297 for (
k = 1;
k <
n; ++
k) {
299 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 311 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().
314 float f, u,
y,
a0, a1;
322 }
else if (
x <=
t1_) {
324 u =
omega_ *
y - 3.141592653589793f;
326 vdt::fast_sincosf(u, su, cu);
331 for (
k = 2;
k <= n1; ++
k) {
334 a0 =
a_[
k - 1] + cof * a1 -
a2;
338 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 b0