46 return dx*dx + dy*dy + dz*
dz;
68 float dS = x * ex + y * ey;
74 float &xp,
float &yp,
float &zp,
86 float ax = dx * k + ey;
87 float ay = dy * k - ex;
88 float a =
sqrt( ax * ax + ay * ay );
89 xp = x0 + ( dx - ey * ( ( dx * dx + dy *
dy ) * k - 2 * ( -dx * ey + dy * ex ) ) / ( a + 1 ) ) / a;
90 yp = y0 + ( dy + ex * ( ( dx * dx + dy *
dy ) * k - 2 * ( -dx * ey + dy * ex ) ) / ( a + 1 ) ) / a;
91 float s =
GetS( x, y, Bz );
115 const float ex = cosPhi0;
116 const float ey = sinPhi0;
117 const float dx = x -
X();
120 const float exi = 1. / ex;
122 const float dxBz = dx * Bz;
123 const float dS = dx * exi;
124 const float h2 = dS * exi * exi;
125 const float h4 = .5 * h2 * dxBz;
133 const float sinPhi =
SinPhi() + dxBz *
QPt();
134 if ( maxSinPhi > 0 &&
CAMath::Abs( sinPhi ) > maxSinPhi )
return 0;
137 fP[0] += dS * ey + h2 * (
SinPhi() - ey ) + h4 *
QPt();
141 const float c00 =
fC[0];
142 const float c10 =
fC[1];
143 const float c11 =
fC[2];
144 const float c20 =
fC[3];
145 const float c21 =
fC[4];
146 const float c22 =
fC[5];
147 const float c30 =
fC[6];
148 const float c31 =
fC[7];
149 const float c32 =
fC[8];
150 const float c33 =
fC[9];
151 const float c40 =
fC[10];
152 const float c41 =
fC[11];
153 const float c42 =
fC[12];
154 const float c43 =
fC[13];
155 const float c44 =
fC[14];
158 fC[0] = ( c00 + h2 * h2 * c22 + h4 * h4 * c44
159 + 2 * ( h2 * c20 + h4 * c40 + h2 * h4 * c42 ) );
161 fC[1] = c10 + h2 * c21 + h4 * c41 + dS * ( c30 + h2 * c32 + h4 * c43 );
162 fC[2] = c11 + 2 * dS * c31 + dS * dS * c33;
164 fC[3] = c20 + h2 * c22 + h4 * c42 + dxBz * ( c40 + h2 * c42 + h4 * c44 );
165 fC[4] = c21 + dS * c32 + dxBz * ( c41 + dS * c43 );
166 fC[5] = c22 + 2 * dxBz * c42 + dxBz * dxBz * c44;
168 fC[6] = c30 + h2 * c32 + h4 * c43;
169 fC[7] = c31 + dS * c33;
170 fC[8] = c32 + dxBz * c43;
173 fC[10] = c40 + h2 * c42 + h4 * c44;
174 fC[11] = c41 + dS * c43;
175 fC[12] = c42 + dxBz * c44;
227 const float mK = 0.307075e-3;
228 const float me = 0.511e-3;
229 const float rho = kp0;
230 const float x0 = kp1 * 2.303;
231 const float x1 = kp2 * 2.303;
232 const float mI = kp3;
233 const float mZA = kp4;
234 const float maxT = 2 * me * bg2;
242 }
else if ( x > x0 ) {
243 const float r = ( x1 -
x ) / ( x1 - x0 );
244 d2 = lhwI + x - 0.5 + ( 0.5 - lhwI -
x0 ) * r * r * r;
247 return mK*mZA*( 1 + bg2 ) / bg2*( 0.5*
CAMath::Log( 2*me*bg2*maxT / ( mI*mI ) ) - bg2 / ( 1 + bg2 ) - d2 );
271 const float rho = 0.9e-3;
274 const float mI = 140.e-9;
275 const float mZA = 0.49555;
297 const float cosPhi = cP * cA + sP * sA;
298 const float sinPhi = -cP * sA + sP * cA;
302 if (
fabs(alpha) > 3.1415 * 0.25 )
return 0;
304 const float j0 = cP / cosPhi;
305 const float j2 = cosPhi / cP;
308 SetY( -x*sA +
y*cA );
345 const float cosPhi = cP * cA + sP * sA;
346 const float sinPhi = -cP * sA + sP * cA;
350 if (
fabs(alpha) > 3.1415 * 0.25 )
return 0;
358 const float j0 = cP / cosPhi;
359 const float j2 = cosPhi / cP;
363 SetY( -x0*sA +
y0*cA + j0*d[0] );
453 #if !defined(HLTCA_GPUCODE)
461 #if !defined(HLTCA_GPUCODE)
void GetDCAPoint(float x, float y, float z, float &px, float &py, float &pz, float Bz) const
float GetErr2SinPhi() const
static float BetheBlochSolid(float bg)
float GetKappa(float Bz) const
bool Rotate(float alpha, float maxSinPhi=.999)
friend F32vec4 sqrt(const F32vec4 &a)
static T Sqrt(const T &x)
PndCATrackParam GetGlobalParam(float alpha) const
float GetSignCosPhi() const
void SetSignCosPhi(float v)
float GetErr2DzDs() const
bool TransportToXWithMaterial(float x, float Bz, float maxSinPhi=.999)
float GetDistXZ2(const PndCATrackParam &t) const
static T ATan2(const T &y, const T &x)
float GetS(float x, float y, float Bz) const
float GetDist2(const PndCATrackParam &t) const
static float BetheBlochGeant(float bg, float kp0=2.33, float kp1=0.20, float kp2=3.00, float kp3=173e-9, float kp4=0.49848)
friend F32vec4 fabs(const F32vec4 &a)
bool TransportToX(float x, float Bz, float maxSinPhi=.999)
static float BetheBlochGas(float bg)
void CalculateFitParameters(PndCATrackFitParam &par, float mass=0.13957)