14 #define cnv_ref(a_1,a_2) cnv[(a_2)*6 + (a_1) - 7]
16 void xyztrp(
const long int ich,
double *vrt0,
double *pv0,
double *covi,
double BMAG,
double *paro,
double *errt)
18 double covd[15],
par[5], cnv[36];
41 double pt = sqrt(pv0[0]*pv0[0] + pv0[1]*pv0[1]);
42 double pp =
pt*
pt + pv0[2]*pv0[2];
43 double cs = pv0[0] /
pt;
44 double sn = pv0[1] /
pt;
45 double ctg = pv0[2] /
pt;
46 double rho = ich * constBF /
pt;
47 if (ich == 0)
rho = constBF /
pt;
51 par[2] = acos(pv0[2] / sqrt(pp));
54 par[3] = atan2(pv0[1], pv0[0]);
56 if (ich == 0)
par[4] = constBF /
pt;
58 double dTheta_dPx = pv0[0]*pv0[2]/(
pt*pp);
59 double dTheta_dPy = pv0[1]*pv0[2]/(
pt*pp);
60 double dTheta_dPz = -
pt/pp;
61 double dPhi_dPx = -pv0[1]/(
pt*
pt);
62 double dPhi_dPy = pv0[0]/(
pt*
pt);
64 double dRho_dPx = -pv0[0]/(
pt*
pt) *
rho;
65 double dRho_dPy = -pv0[1]/(
pt*
pt) *
rho;
107 double Ref0[3]={0.,0.,0.};
113 void combinedTrack(
long int ICH,
double *pv0,
double *covi,
double BMAG,
double *
par,
double *covo)
136 double pt = sqrt(pv0[0]*pv0[0] + pv0[1]*pv0[1]);
137 double pp =
pt*
pt + pv0[2]*pv0[2];
138 double cs = pv0[0] /
pt;
139 double sn = pv0[1] /
pt;
140 double ctg = pv0[2] /
pt;
141 double rho = ICH * constBF /
pt;
142 if ( ICH==0 )
rho = constBF /
pt;
146 par[2] = acos(pv0[2] / sqrt(pp));
149 par[3] = atan2(pv0[1], pv0[0]);
151 if ( ICH==0 )
par[4] = constBF /
pt;
153 double dTheta_dPx = pv0[0]*pv0[2]/(
pt*pp);
154 double dTheta_dPy = pv0[1]*pv0[2]/(
pt*pp);
155 double dTheta_dPz = -
pt/pp;
156 double dPhi_dPx = -pv0[1]/(
pt*
pt);
157 double dPhi_dPy = pv0[0]/(
pt*
pt);
159 double dRho_dPx = -pv0[0]/(
pt*
pt) *
rho;
160 double dRho_dPy = -pv0[1]/(
pt*
pt) *
rho;
161 double dRho_dPz = 0.;