CMS 3D CMS Logo

Functions
HankelFunction.h File Reference
#include <Rtypes.h>

Go to the source code of this file.

Functions

double HankelK0 (double x)
 
double HankelK1 (double x)
 
double HankelKn (int n, double x)
 

Function Documentation

◆ HankelK0()

double HankelK0 ( double  x)

Definition at line 140 of file HankelFunction.cc.

140  {
141  const double p1 = k0Coefficient[0][0];
142  const double p2 = k0Coefficient[1][0];
143  const double p3 = k0Coefficient[2][0];
144  const double p4 = k0Coefficient[3][0];
145  const double p5 = k0Coefficient[4][0];
146  const double p6 = k0Coefficient[5][0];
147  const double p7 = k0Coefficient[6][0];
148 
149  const double q1 = k0Coefficient[0][1];
150  const double q2 = k0Coefficient[1][1];
151  const double q3 = k0Coefficient[2][1];
152  const double q4 = k0Coefficient[3][1];
153  const double q5 = k0Coefficient[4][1];
154  const double q6 = k0Coefficient[5][1];
155  const double q7 = k0Coefficient[6][1];
156 
157  double k0 = 0.;
158  if (x <= 2.0) {
159  double y = x * x / 4.0;
160  k0 = (-TMath::Log(x / 2.0) * BesselI0(x)) + (p1 + y * (p2 + y * (p3 + y * (p4 + y * (p5 + y * (p6 + y * p7))))));
161  } else {
162  double y = (2.0 / x);
163  k0 = (TMath::Exp(-x) / TMath::Sqrt(x)) * (q1 + y * (q2 + y * (q3 + y * (q4 + y * (q5 + y * (q6 + y * q7))))));
164  }
165 
166  return k0;
167 }

References BesselI0(), reco::ParticleMasses::k0, k0Coefficient, p1, p2, p3, p4, q1, q2, genVertex_cff::x, and detailsBasic3DVector::y.

Referenced by HankelKn().

◆ HankelK1()

double HankelK1 ( double  x)

Definition at line 169 of file HankelFunction.cc.

169  {
170  // (C) Copr. 1986-92 Numerical Recipes Software +7.
171  // compute modified Hankel function of the first order
172  const double p1 = k1Coefficient[0][0];
173  const double p2 = k1Coefficient[1][0];
174  const double p3 = k1Coefficient[2][0];
175  const double p4 = k1Coefficient[3][0];
176  const double p5 = k1Coefficient[4][0];
177  const double p6 = k1Coefficient[5][0];
178  const double p7 = k1Coefficient[6][0];
179 
180  const double q1 = k1Coefficient[0][1];
181  const double q2 = k1Coefficient[1][1];
182  const double q3 = k1Coefficient[2][1];
183  const double q4 = k1Coefficient[3][1];
184  const double q5 = k1Coefficient[4][1];
185  const double q6 = k1Coefficient[5][1];
186  const double q7 = k1Coefficient[6][1];
187 
188  double k1 = 0.;
189 
190  if (x <= 2.0) {
191  double y = x * x / 4.0;
192  k1 = (TMath::Log(x / 2.0) * BesselI1(x)) +
193  (1.0 / x) * (p1 + y * (p2 + y * (p3 + y * (p4 + y * (p5 + y * (p6 + y * p7))))));
194  } else {
195  double y = 2.0 / x;
196  k1 = (TMath::Exp(-x) / TMath::Sqrt(x)) * (q1 + y * (q2 + y * (q3 + y * (q4 + y * (q5 + y * (q6 + y * q7))))));
197  }
198 
199  return k1;
200 }

References BesselI1(), k1Coefficient, p1, p2, p3, p4, q1, q2, genVertex_cff::x, and detailsBasic3DVector::y.

Referenced by HankelKn(), and GrandCanonical::ParticleEnergyDensity().

◆ HankelKn()

double HankelKn ( int  n,
double  x 
)

Definition at line 202 of file HankelFunction.cc.

202  {
203  // (C) Copr. 1986-92 Numerical Recipes Software +7.
204  // compute modified Hankel function of the first order
205  if (n < 2)
206  throw "Bad argument n in Kn";
207 
208  double tox = 2.0 / x;
209  double km = HankelK0(x);
210  double k = HankelK1(x);
211  double kp = 0.;
212 
213  for (int c = 1; c <= n - 1; ++c) {
214  kp = km + c * tox * k;
215  km = k;
216  k = kp;
217  }
218 
219  return k;
220 }

References c, HankelK0(), HankelK1(), dqmdumpme::k, kp, dqmiodumpmetadata::n, and genVertex_cff::x.

Referenced by GrandCanonical::ParticleEnergyDensity(), NAStrangeDensity::ParticleNumberDensity(), and GrandCanonical::ParticleNumberDensity().

k1Coefficient
const double k1Coefficient[kNCoeff][kNe]
Definition: HankelFunction.cc:52
HankelK0
double HankelK0(double x)
Definition: HankelFunction.cc:140
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
reco::ParticleMasses::k0
const double k0
Definition: ParticleMasses.h:7
BesselI1
double BesselI1(double x)
Definition: HankelFunction.cc:101
p2
double p2[4]
Definition: TauolaWrapper.h:90
dqmdumpme.k
k
Definition: dqmdumpme.py:60
q2
double q2[4]
Definition: TauolaWrapper.h:88
q1
double q1[4]
Definition: TauolaWrapper.h:87
p4
double p4[4]
Definition: TauolaWrapper.h:92
p1
double p1[4]
Definition: TauolaWrapper.h:89
BesselI0
double BesselI0(double x)
Definition: HankelFunction.cc:64
genVertex_cff.x
x
Definition: genVertex_cff.py:12
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
p3
double p3[4]
Definition: TauolaWrapper.h:91
k0Coefficient
const double k0Coefficient[kNCoeff][kNe]
Definition: HankelFunction.cc:40
HankelK1
double HankelK1(double x)
Definition: HankelFunction.cc:169
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
kp
int kp
Definition: CascadeWrapper.h:13