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

double HankelK0 ( double  x)

Definition at line 147 of file HankelFunction.cc.

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

Referenced by HankelKn().

147  {
148  const double p1 = k0Coefficient[0][0];
149  const double p2 = k0Coefficient[1][0];
150  const double p3 = k0Coefficient[2][0];
151  const double p4 = k0Coefficient[3][0];
152  const double p5 = k0Coefficient[4][0];
153  const double p6 = k0Coefficient[5][0];
154  const double p7 = k0Coefficient[6][0];
155 
156  const double q1 = k0Coefficient[0][1];
157  const double q2 = k0Coefficient[1][1];
158  const double q3 = k0Coefficient[2][1];
159  const double q4 = k0Coefficient[3][1];
160  const double q5 = k0Coefficient[4][1];
161  const double q6 = k0Coefficient[5][1];
162  const double q7 = k0Coefficient[6][1];
163 
164  double k0 = 0.;
165  if(x <= 2.0) {
166  double y = x * x / 4.0;
167  k0 = (-TMath::Log(x/2.0)*BesselI0(x)) + (p1 + y*(p2 + y*(p3 + y*(p4 + y*(p5 + y*(p6 + y*p7))))));
168  }
169  else {
170  double y = (2.0 / x);
171  k0 = (TMath::Exp(-x)/TMath::Sqrt(x))*(q1 + y*(q2 + y*(q3 + y*(q4 + y*(q5 + y*(q6 + y*q7))))));
172  }
173 
174  return k0;
175 }
double BesselI0(double x)
double q2[4]
Definition: TauolaWrapper.h:88
const double k0Coefficient[kNCoeff][kNe]
T x() const
Cartesian x coordinate.
double p4[4]
Definition: TauolaWrapper.h:92
double p2[4]
Definition: TauolaWrapper.h:90
double q1[4]
Definition: TauolaWrapper.h:87
double p1[4]
Definition: TauolaWrapper.h:89
double p3[4]
Definition: TauolaWrapper.h:91
double HankelK1 ( double  x)

Definition at line 177 of file HankelFunction.cc.

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

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

177  {
178  // (C) Copr. 1986-92 Numerical Recipes Software +7.
179  // compute modified Hankel function of the first order
180  const double p1 = k1Coefficient[0][0];
181  const double p2 = k1Coefficient[1][0];
182  const double p3 = k1Coefficient[2][0];
183  const double p4 = k1Coefficient[3][0];
184  const double p5 = k1Coefficient[4][0];
185  const double p6 = k1Coefficient[5][0];
186  const double p7 = k1Coefficient[6][0];
187 
188  const double q1 = k1Coefficient[0][1];
189  const double q2 = k1Coefficient[1][1];
190  const double q3 = k1Coefficient[2][1];
191  const double q4 = k1Coefficient[3][1];
192  const double q5 = k1Coefficient[4][1];
193  const double q6 = k1Coefficient[5][1];
194  const double q7 = k1Coefficient[6][1];
195 
196  double k1 = 0.;
197 
198  if(x <= 2.0) {
199  double y = x * x / 4.0;
200  k1 = (TMath::Log(x/2.0)*BesselI1(x)) + (1.0/x)*(p1 + y*(p2 + y*(p3 + y*(p4 + y*(p5 + y*(p6 + y*p7))))));
201  }
202  else {
203  double y = 2.0 / x;
204  k1 = (TMath::Exp(-x)/TMath::Sqrt(x))*(q1 + y*(q2 + y*(q3 + y*(q4 + y*(q5 + y*(q6 + y*q7))))));
205  }
206 
207  return k1;
208 }
double q2[4]
Definition: TauolaWrapper.h:88
T x() const
Cartesian x coordinate.
double p4[4]
Definition: TauolaWrapper.h:92
const double k1Coefficient[kNCoeff][kNe]
double p2[4]
Definition: TauolaWrapper.h:90
double q1[4]
Definition: TauolaWrapper.h:87
double p1[4]
Definition: TauolaWrapper.h:89
double BesselI1(double x)
double p3[4]
Definition: TauolaWrapper.h:91
double HankelKn ( int  n,
double  x 
)

Definition at line 210 of file HankelFunction.cc.

References EnergyCorrector::c, HankelK0(), HankelK1(), gen::k, kp, and x().

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

210  {
211  // (C) Copr. 1986-92 Numerical Recipes Software +7.
212  // compute modified Hankel function of the first order
213  if(n < 2) throw "Bad argument n in Kn";
214 
215  double tox = 2.0 / x;
216  double km = HankelK0(x);
217  double k = HankelK1(x);
218  double kp = 0.;
219 
220  for(int c = 1; c <= n-1; ++c) {
221  kp = km + c * tox * k;
222  km = k;
223  k = kp;
224  }
225 
226  return k;
227 }
int kp
T x() const
Cartesian x coordinate.
double HankelK1(double x)
int k[5][pyjets_maxn]
double HankelK0(double x)