35(
double D0,
double Phi0,
double Omega,
double Z0,
double Tanl,
36 double T0,
int Code,
int Mode,
double X,
double Y) :
37d0(D0), phi0(Phi0), omega(Omega), z0(Z0), tanl(Tanl), t0(T0),
38xref(X), yref(Y), code(
Code), mode(Mode), omin(0.000005) {
41 double m_2pi = 2.0*
M_PI;
145 double rmax = 1.0/fabs(
omega);
146 double dmax = fabs(
d0) + 2.0*rmax;
200 int& i3,
int& i4,
int& i5,
int& i6,
int& n)
203 temp=temp/1000000; temp=
code-1000000*temp;
204 i6=temp/100000; temp=temp-100000*i6;
205 i5=temp/10000; temp=temp-10000*i5;
206 i4=temp/1000; temp=temp-1000*i4;
207 i3=temp/100; temp=temp-100*i3;
208 i2=temp/10; i1=temp-10*i2;
210 if(i6 == 1) n++;
else i6 = 0;
211 if(i5 == 1) n++;
else i5 = 0;
212 if(i4 == 1) n++;
else i4 = 0;
213 if(i3 == 1) n++;
else i3 = 0;
214 if(i2 == 1) n++;
else i2 = 0;
215 if(i1 == 1) n++;
else i1 = 0;
240 double xi,
double yi,
double zi )
242 double m_2pi = 2.0*
M_PI;
245 Hep3Vector ivec(xi, yi, zi);
246 wvec = Hep3Vector(wx, wy, wz);
249 double zd, xd = xi, yd = yi;
251 double lnew,t1,t2,dphi,dlen=1000.0;
256 double circut, circum = 10000.;
258 circut = 0.50 * circum;
262 t1 = -
xc + xd; t2 =
yc - yd;
phi = atan2(t1, t2);
267 if (dphi > 0.0) dphi -= m_2pi;
268 if (dphi < -m_2pi) dphi += m_2pi;
270 if (dphi < 0.0) dphi += m_2pi;
271 if (dphi > m_2pi) dphi -= m_2pi;
276 if ((lnew>circut)&&(
turnflag)) lnew -= circum;
279 xd=xi+(
zh-zi)*wx/wz; yd=yi+(
zh-zi)*wy/wz; zd=
zh;
282 dlen=fabs(lnew-
len);
len=lnew;
287 if ( (0.0==wx) && (0.0==wy) )
break;
if (dlen < 0.000001)
break; itry--;
297 Hep3Vector hvec(
xh,
yh,
zh);
299 double lamb = atan(
tanl);
310 f0 = (f1 - f2*f3) / (1.0 - f2*f2);
311 samb = (doca > 0.0) ? -1 : +1;
312 double wirephi = atan2(yd, xd);
326 double doca =
Doca(hit);
327 std::vector<float> temp(
nfree+1);
330 if((
mode==0) && (doca<0.0)) fac = -fac;
331 if(
mode == 0) temp[0] = fabs(temp[0]);
339 temp[++bump] = dddp0*fac;
349 temp[++bump] = dddom * fac;
351 if (
qz0) temp[++bump] =
vz * fac;
353 if (
qt0) temp[++bump] = -hit.
v();
363 cout <<
tanl<<
")"<<endl;
364 cout <<
" t0 = " <<
t0 ;
365 cout <<
" nfree = " <<
nfree ;
366 cout <<
" (x0,y0) " <<
x0<<
","<<
y0;
367 cout <<
" (xc,yc) " <<
xc<<
","<<
yc;
368 cout <<
" (xref,yref) " <<
xref<<
","<<
yref;
369 cout <<
" code = " <<
code;
370 cout <<
" mode = " <<
mode;
371 cout <<
" ominfl = " <<
ominfl;
376 double m_2pi = 2.0*
M_PI;
378 if ( (fabs(
d0) + 2.0/fabs(
omega)) > 80.0 )
return;
379 double lturn = m_2pi/fabs(
omega);
380 double zturn =
Zh(lturn);
382 if (fabs(zturn) < fabs(
z0)) {
double sin(const BesAngle a)
double cos(const BesAngle a)
void SetRef(double x, double y)
double Py(double l=0.0) const
double Px(double l=0.0) const
double Ptot(double l=0.0) const
double Pz(double l=0.0) const
void decode(const int i, int &i1, int &i2, int &i3, int &i4, int &i5, int &i6, int &n)
double Doca(double WX, double WY, double WZ, double X, double Y, double Z=0.0)
double Yh(double l) const
double Zh(double l) const
void copy(const MdcxHel &hel)
int deltaq(int i, int j) const
double Xh(double l) const
std::vector< float > derivatives(const MdcxHit &h)
MdcxHel & operator=(const MdcxHel &)
static const double maxMdcZLen
static const double maxTrkLength
static const double maxMdcRadius
MDC Geometry.