#include <HTrackParameter.h>
Public Member Functions | |
HTrackParameter () | |
~HTrackParameter () | |
HTrackParameter (const HTrackParameter &htrk) | |
HTrackParameter & | operator= (const HTrackParameter &htrk) |
HTrackParameter (const HepVector helix, const HepSymMatrix eMatrix, const int trackid, const int partid) | |
HTrackParameter (const HepVector helix, const double error[], const int trackid, const int partid) | |
HTrackParameter (const WTrackParameter wtrk) | |
HTrackParameter (const int charge, const HepVector p, const HepVector x) | |
HepMatrix | dHdx (const HepVector p, const HepVector x) |
HepMatrix | dHdp (const HepVector p, const HepVector x) |
HepVector | hel () const |
HepVector | helix () const |
HepSymMatrix | eHel () const |
int | trackID () const |
int | partID () const |
int | charge () const |
double | pxy () const |
HepVector | p () const |
HepVector | x () const |
Hep3Vector | p3 () const |
HepPoint3D | x3 () const |
HepLorentzVector | p (const double mass) const |
HepPoint3D | center () const |
double | radius () const |
double | drho () const |
double | phi0 () const |
double | kappa () const |
double | dz () const |
double | lambda () const |
WTrackParameter | wTrack () const |
WTrackParameter | wTrack (const double mass) const |
void | setTrackID (const int trackID) |
void | setPartID (const int partID) |
void | setHel (const HepVector he) |
void | setEHel (const HepSymMatrix eH) |
double | xmass (const int i) const |
HepPoint3D | positionTwoHelix (const HTrackParameter) const |
HepPoint3D | positionPlane (const double) const |
HepPoint3D | positionCylinder (const double) const |
HepPoint3D | positionCone () const |
double | minDistanceTwoHelix (const HTrackParameter G, HepPoint3D &pos) |
Private Attributes | |
int | m_trackID |
int | m_partID |
HepVector | m_hel |
HepSymMatrix | m_eHel |
Definition at line 28 of file HTrackParameter.h.
HTrackParameter::HTrackParameter | ( | ) |
HTrackParameter::~HTrackParameter | ( | ) | [inline] |
HTrackParameter::HTrackParameter | ( | const HTrackParameter & | htrk | ) |
HTrackParameter::HTrackParameter | ( | const HepVector | helix, | |
const HepSymMatrix | eMatrix, | |||
const int | trackid, | |||
const int | partid | |||
) |
HTrackParameter::HTrackParameter | ( | const HepVector | helix, | |
const double | error[], | |||
const int | trackid, | |||
const int | partid | |||
) |
Definition at line 54 of file HTrackParameter.cxx.
References genRecEmupikp::i, ganga-rec::j, m_eHel, m_hel, m_partID, and m_trackID.
00055 { 00056 00057 m_hel = HepVector(5, 0); 00058 m_eHel = HepSymMatrix(5, 0); 00059 00060 m_trackID = trackid; 00061 m_partID = partid; 00062 m_hel = h; 00063 int k = 0; 00064 for(int i = 0; i < 5; i++){ 00065 for(int j = 0; j < 5; j++) { 00066 m_eHel[i][j] = eH[k]; 00067 m_eHel[j][i] = eH[k]; 00068 k++; 00069 } 00070 } 00071 }
HTrackParameter::HTrackParameter | ( | const WTrackParameter | wtrk | ) |
Definition at line 77 of file HTrackParameter.cxx.
References EvtCyclic3::A, EvtCyclic3::B, WTrackParameter::charge(), WTrackParameter::Ew(), genRecEmupikp::i, ganga-rec::j, m_eHel, m_hel, m_partID, m_trackID, mass, WTrackParameter::p(), p(), T, WTrackParameter::w(), x(), and xmass().
00077 { 00078 00079 HepVector p(3, 0); 00080 HepVector x(3, 0); 00081 for(int i = 0; i < 3; i++) { 00082 p[i] = wtrk.w()[i]; 00083 x[i] = wtrk.w()[i+4]; 00084 } 00085 00086 HTrackParameter htrk(wtrk.charge(), p, x); 00087 HepMatrix A(5, 3, 0); 00088 HepMatrix B(5, 3, 0); 00089 00090 A = htrk.dHdx(p, x); 00091 B = htrk.dHdp(p, x); 00092 HepMatrix T(5, 7, 0); 00093 for(int i = 0; i < 5; i++) { 00094 for(int j = 0; j < 3; j++){ 00095 T[i][j] = B[i][j]; 00096 T[i][j+4] = A[i][j]; 00097 } 00098 } 00099 00100 HepSymMatrix eH(5, 0); 00101 eH = (wtrk.Ew()).similarity(T); 00102 int m_trackID = -1; 00103 double mass = (wtrk.p()).m(); 00104 int m_partID = -1; 00105 for(int i = 0; i < 5; i++) { 00106 if(fabs(mass - xmass(i)) < 0.01) { 00107 m_partID = i; 00108 break; 00109 } 00110 } 00111 // htrk.setTrackID(trackID); 00112 // htrk.setPartID(partID); 00113 htrk.setEHel(eH); 00114 m_hel = htrk.hel(); 00115 m_eHel = htrk.eHel(); 00116 }
HTrackParameter::HTrackParameter | ( | const int | charge, | |
const HepVector | p, | |||
const HepVector | x | |||
) |
Definition at line 146 of file HTrackParameter.cxx.
References alpha, drho(), dz(), VertexFitBField::getBFieldZ(), VertexFitBField::instance(), kappa(), lambda(), m_eHel, m_hel, m_partID, m_trackID, phi0(), pi, pxy(), T, and x().
00146 { 00147 m_trackID = -1; 00148 m_partID = -1; 00149 m_hel = HepVector(5, 0); 00150 m_eHel = HepSymMatrix(5, 0); 00151 00152 HepPoint3D xyz(vx[0], vx[1], vx[2]); 00153 double bField = VertexFitBField::instance()->getBFieldZ(xyz); 00154 //std::cout << "bField in HTrackParameter(charge,p,vx) = " << bField << std::endl; 00155 00156 double a = alpha * bField * charge; 00157 double px = p[0]; 00158 double py = p[1]; 00159 double pz = p[2]; 00160 00161 double x = vx[0]; 00162 double y = vx[1]; 00163 double z = vx[2]; 00164 00165 double pxy = sqrt(px*px+py*py); 00166 double T = sqrt((px+a*y)*(px+a*y)+(py-a*x)*(py-a*x)); 00167 double J= (x*px+y*py)/T*a/pxy; 00168 00169 double drho = (pxy/a)-(T/a); 00170 double phi0 = fmod((4*CLHEP::pi)+atan2(0-px-a*y, py-a*x), (2*CLHEP::pi)); 00171 double kappa = charge/pxy; 00172 double dz = z - (pz/a) *asin(J); 00173 double lambda = pz/pxy; 00174 00175 m_hel[0] = drho; m_hel[1] = phi0; m_hel[2] = kappa; 00176 m_hel[3] = dz; m_hel[4] = lambda; 00177 }
HepPoint3D HTrackParameter::center | ( | ) | const |
Definition at line 130 of file HTrackParameter.cxx.
References alpha, charge(), cos(), VertexFitBField::getBFieldZ(), VertexFitBField::instance(), m_hel, pxy(), rad, sin(), x(), and x3().
Referenced by positionTwoHelix().
00130 { 00131 double bField = VertexFitBField::instance()->getBFieldZ(x3()); 00132 int charge = m_hel[2] > 0 ? +1: -1; 00133 double a = alpha * bField * charge; 00134 double pxy = charge/m_hel[2]; 00135 double rad = pxy/a; 00136 double x = (m_hel[0] + rad) * cos(m_hel[1]); 00137 double y = (m_hel[0] + rad) * sin(m_hel[1]); 00138 double z = 0.0; 00139 return HepPoint3D(x, y, z); 00140 }
int HTrackParameter::charge | ( | ) | const [inline] |
Definition at line 107 of file HTrackParameter.h.
References m_hel.
Referenced by center(), dHdp(), dHdx(), positionTwoHelix(), radius(), and wTrack().
00107 { 00108 return (m_hel[2]>0 ? +1 :-1); 00109 }
HepMatrix HTrackParameter::dHdp | ( | const HepVector | p, | |
const HepVector | x | |||
) |
Definition at line 218 of file HTrackParameter.cxx.
References alpha, charge(), VertexFitBField::getBFieldZ(), VertexFitBField::instance(), pxy(), T, and x().
Referenced by KalmanVertexFit::updateMatrices().
00218 { 00219 HepPoint3D xyz(vx[0], vx[1], vx[2]); 00220 double bField = VertexFitBField::instance()->getBFieldZ(xyz); 00221 00222 double a = alpha * bField * charge(); 00223 double px = p[0]; 00224 double py = p[1]; 00225 double pz = p[2]; 00226 00227 double x = vx[0]; 00228 double y = vx[1]; 00229 // double z = vx[2]; 00230 00231 double pxy = sqrt(px*px+py*py); 00232 double T = sqrt((px+a*y)*(px+a*y)+(py-a*x)*(py-a*x)); 00233 double J= (x*px+y*py)/T*a/pxy; 00234 00235 HepMatrix m_B(5, 3, 0); 00236 00237 m_B[0][0] = (px/pxy - (px+a*y)/T)/a; 00238 m_B[0][1] = (py/pxy - (py-a*x)/T)/a; 00239 m_B[1][0] = 0 -(py-a*x)/T/T; 00240 m_B[1][1] = (px + a*y)/T/T; 00241 m_B[2][0] = 0-charge() *px/pxy/pxy/pxy; 00242 m_B[2][1] = 0-charge() *py/pxy/pxy/pxy; 00243 m_B[3][0] = (pz/a)*(py/pxy/pxy-(py-a*x)/T/T); 00244 m_B[3][1] = 0-(pz/a)*(px/pxy/pxy-(px+a*y)/T/T); 00245 m_B[3][2] = 0 - asin(J)/a; 00246 m_B[4][0] = 0 - (px/pxy)*(pz/pxy)/pxy; 00247 m_B[4][1] = 0 - (py/pxy)*(pz/pxy)/pxy; 00248 m_B[4][2] = 1/pxy; 00249 00250 return m_B; 00251 }
HepMatrix HTrackParameter::dHdx | ( | const HepVector | p, | |
const HepVector | x | |||
) |
Definition at line 183 of file HTrackParameter.cxx.
References alpha, charge(), VertexFitBField::getBFieldZ(), VertexFitBField::instance(), T, and x().
Referenced by KalmanVertexFit::updateMatrices().
00183 { 00184 HepPoint3D xyz(vx[0], vx[1], vx[2]); 00185 double bField = VertexFitBField::instance()->getBFieldZ(xyz); 00186 //std::cout << "bField in dHdx(p,vx) = " << bField << std::endl; 00187 00188 double a = alpha * bField * charge(); 00189 double px = p[0]; 00190 double py = p[1]; 00191 double pz = p[2]; 00192 00193 double x = vx[0]; 00194 double y = vx[1]; 00195 // double z = vx[2]; 00196 00197 // double pxy = sqrt(px*px+py*py); 00198 double T = sqrt((px+a*y)*(px+a*y)+(py-a*x)*(py-a*x)); 00199 // double J= (x*px+y*py)/T*a/pxy; 00200 00201 HepMatrix m_A(5, 3, 0); 00202 00203 m_A[0][0] = (py-a*x)/T; 00204 m_A[0][1] = 0 -(px + a*y)/T; 00205 m_A[1][0] = 0- a*(px + a*y)/T/T; 00206 m_A[1][1] = 0 - a * (py - a*x)/T/T; 00207 m_A[3][0] = 0 - (pz/T)*(px + a*y)/T; 00208 m_A[3][1] = 0 - (pz/T)*(py - a*x)/T; 00209 m_A[3][2] = 1; 00210 00211 return m_A; 00212 }
double HTrackParameter::drho | ( | ) | const [inline] |
Definition at line 67 of file HTrackParameter.h.
References m_hel.
Referenced by HTrackParameter().
00067 {return m_hel[0];}
double HTrackParameter::dz | ( | void | ) | const [inline] |
Definition at line 70 of file HTrackParameter.h.
References m_hel.
Referenced by HTrackParameter().
00070 {return m_hel[3];}
HepSymMatrix HTrackParameter::eHel | ( | ) | const [inline] |
Definition at line 51 of file HTrackParameter.h.
References m_eHel.
Referenced by KalmanVertexFit::addTrack(), VertexFit::pull(), KinematicFit::pull(), and KalmanKinematicFit::pull().
00051 {return m_eHel;}
HepVector HTrackParameter::hel | ( | ) | const [inline] |
Definition at line 49 of file HTrackParameter.h.
References m_hel.
Referenced by KinematicFit::pull(), KalmanKinematicFit::pull(), and KalmanVertexFit::updateMatrices().
00049 {return m_hel;}
HepVector HTrackParameter::helix | ( | ) | const [inline] |
Definition at line 50 of file HTrackParameter.h.
References m_hel.
Referenced by VertexFit::pull().
00050 {return m_hel;}
double HTrackParameter::kappa | ( | void | ) | const [inline] |
Definition at line 69 of file HTrackParameter.h.
References m_hel.
Referenced by HTrackParameter(), and wTrack().
00069 {return m_hel[2];}
double HTrackParameter::lambda | ( | ) | const [inline] |
Definition at line 71 of file HTrackParameter.h.
References m_hel.
Referenced by HTrackParameter(), minDistanceTwoHelix(), and wTrack().
00071 {return m_hel[4];}
double HTrackParameter::minDistanceTwoHelix | ( | const HTrackParameter | G, | |
HepPoint3D & | pos | |||
) |
Definition at line 427 of file HTrackParameter.cxx.
References cos(), iter(), lambda(), p3(), pi, radius(), sin(), x(), and x3().
Referenced by BeamParams::execute().
00427 { 00428 int ifail; 00429 double h = radius(); 00430 double g = G.radius(); 00431 double phiH0 = fmod((4*CLHEP::pi)+atan2(p3().y(), p3().x()), (2*CLHEP::pi)); 00432 double phiG0 = fmod((4*CLHEP::pi)+atan2(G.p3().y(), G.p3().x()), (2*CLHEP::pi)); 00433 double lamH = lambda(); 00434 double lamG = G.lambda(); 00435 double a = x3().x() - G.x3().x() + g*sin(phiG0) - h*sin(phiH0); 00436 double b = x3().y() - G.x3().y() - g*cos(phiG0) + h*cos(phiH0); 00437 double c1 = h*lamH*lamH; 00438 double c2 = 0 - g*lamG*lamG; 00439 double d1 = 0 - g*lamG*lamH; 00440 double d2 = h*lamG*lamH; 00441 double e1 = lamH*(x3().z() - G.x3().z() - h*phiH0*lamH + g*phiG0*lamG); 00442 double e2 = lamG*(x3().z() - G.x3().z() - h*phiH0*lamH + g*phiG0*lamG); 00443 00444 HepVector phiE(2, 0); 00445 phiE[0] = phiH0; 00446 phiE[1] = phiG0; 00447 for(int iter = 0; iter < 100; iter++) { 00448 HepVector z(2, 0); 00449 HepSymMatrix Omega(2, 0); 00450 double phiH = phiE[0]; 00451 double phiG = phiE[1]; 00452 z[0] = cos(phiH)*(a-g*sin(phiG))+sin(phiH)*(b+g*cos(phiG))+c1*phiH+d1*phiG+e1; 00453 z[1] = cos(phiG)*(a+h*sin(phiH))+sin(phiG)*(b-h*cos(phiH))+c2*phiG+d2*phiH+e2; 00454 Omega[0][0] = 0-sin(phiH)*(a-g*sin(phiG))+cos(phiH)*(b+g*cos(phiG))+c1; 00455 Omega[0][1] = -g*cos(phiH)*cos(phiG)-g*sin(phiH)*sin(phiG)+d1; 00456 Omega[1][0] =h*cos(phiH)*cos(phiG)+h*sin(phiG)*sin(phiH)+d2; 00457 Omega[1][1] = -sin(phiG)*(a+h*sin(phiH))+cos(phiG)*(b-h*cos(phiH))+c2; 00458 HepVector phi(2, 0); 00459 phi = phiE - Omega.inverse(ifail) * z; 00460 if((fabs(phi[0]-phiE[0])<1E-3) && (fabs(phi[1]-phiE[1])<1E-3)) { 00461 phiE = phi; 00462 // std::cout << "number of iteration = " << iter <<std::endl; 00463 break; 00464 } 00465 phiE = phi; 00466 } 00467 00468 double phiH = phiE[0]; 00469 double phiG = phiE[1]; 00470 HepPoint3D posH = HepPoint3D(x3().x()+h*(sin(phiH)-sin(phiH0)), x3().y()+h*(cos(phiH0)-cos(phiH)), x3().z()+lamH*(phiH-phiH0)); 00471 HepPoint3D posG = HepPoint3D(G.x3().x()+g*(sin(phiG)-sin(phiG0)), G.x3().y()+g*(cos(phiG0)-cos(phiG)), G.x3().z()+lamG*(phiG-phiG0)); 00472 double dis = (posH-posG).rho(); 00473 mpos = 0.5*(posH+posG); 00474 return dis; 00475 }
HTrackParameter & HTrackParameter::operator= | ( | const HTrackParameter & | htrk | ) |
HepLorentzVector HTrackParameter::p | ( | const double | mass | ) | const [inline] |
Definition at line 142 of file HTrackParameter.h.
References p3().
00142 { 00143 // // xum 2007-12-28 00144 // //Hep3Vector ptrk = (p3()).rho(); 00145 // Hep3Vector ptrk = (p3()).r(); 00146 // double e = sqrt(ptrk*ptrk+mass*mass); 00147 // return HepLorentzVector(p3(), e); 00148 00149 // nefedov 2011-11-17 00150 Hep3Vector p3tmp = p3(); 00151 double ptrk = p3tmp.r(); 00152 double e = sqrt(ptrk*ptrk+mass*mass); 00153 return HepLorentzVector(p3tmp, e); 00154 }
HepVector HTrackParameter::p | ( | ) | const [inline] |
Definition at line 115 of file HTrackParameter.h.
References cos(), m_hel, pxy(), and sin().
Referenced by KalmanVertexFit::addTrack(), and HTrackParameter().
00115 { 00116 HepVector p0(3, 0); 00117 double pxy = 1./fabs(m_hel[2]); 00118 p0[0] = 0 - pxy*sin(m_hel[1]); 00119 p0[1] = pxy*cos(m_hel[1]); 00120 p0[2] = pxy * m_hel[4]; 00121 return p0; 00122 }
Hep3Vector HTrackParameter::p3 | ( | ) | const [inline] |
Definition at line 137 of file HTrackParameter.h.
References cos(), m_hel, pxy(), and sin().
Referenced by minDistanceTwoHelix(), p(), positionTwoHelix(), and wTrack().
00137 { 00138 double pxy = 1./fabs(m_hel[2]); 00139 return Hep3Vector(0-pxy*sin(m_hel[1]), pxy*cos(m_hel[1]), pxy*m_hel[4]); 00140 }
int HTrackParameter::partID | ( | ) | const [inline] |
double HTrackParameter::phi0 | ( | void | ) | const [inline] |
Definition at line 68 of file HTrackParameter.h.
References m_hel.
Referenced by HTrackParameter(), and wTrack().
00068 {return m_hel[1];}
HepPoint3D HTrackParameter::positionCone | ( | ) | const |
Definition at line 419 of file HTrackParameter.cxx.
00419 { 00420 return HepPoint3D(999,999,999); 00421 }
HepPoint3D HTrackParameter::positionCylinder | ( | const | double | ) | const |
Definition at line 411 of file HTrackParameter.cxx.
00411 { 00412 return HepPoint3D(999,999,999); 00413 }
HepPoint3D HTrackParameter::positionPlane | ( | const | double | ) | const |
Definition at line 403 of file HTrackParameter.cxx.
00403 { 00404 return HepPoint3D(999,999,999); 00405 }
HepPoint3D HTrackParameter::positionTwoHelix | ( | const | HTrackParameter | ) | const |
Definition at line 311 of file HTrackParameter.cxx.
References alpha, center(), charge(), VertexFitBField::getBFieldZ(), VertexFitBField::instance(), p3(), radius(), and x3().
00311 { 00312 double bField1 = VertexFitBField::instance()->getBFieldZ(x3()); 00313 double bField2 = VertexFitBField::instance()->getBFieldZ(htrk.x3()); 00314 00315 HepPoint3D pos1 = x3(); 00316 HepPoint3D pos2 = htrk.x3(); 00317 double rad1 = radius(); 00318 double rad2 = htrk.radius(); 00319 HepPoint3D xc1 = center(); 00320 HepPoint3D xc2 = htrk.center(); 00321 // 00322 // requires the solution of 00323 // a * y**2 + b*y + c = 0 00324 // and 00325 // x = (rt - 2*yt * y) / (2 * xt) 00326 // where 00327 // xt = xc2.x() - xc1.x() 00328 // yt = xc2.y() - xc1.y() 00329 // rt = rad1*rad1-rad2*rad2-xc1.perp2()+xc2.perp2() 00330 // a = 1 + yt*yt/(xt*xt); 00331 // b = 2*xc1.x()*yt/xt-yt*rt/(xt*xt)-2*xc1.y(); 00332 // c = rt*rt/(4*xt*xt)-xc1.x()*rt/xt-rad1*rad1+xc1.perp2(); 00333 // 00334 00335 double xt = xc2.x() - xc1.x(); 00336 double yt = xc2.y() - xc1.y(); 00337 if(xt == 0 && yt == 0) return HepPoint3D(999,999,999); 00338 double rt = rad1*rad1-rad2*rad2-xc1.perp2()+xc2.perp2(); 00339 double x1, y1, x2, y2; 00340 if( xt != 0) { 00341 double a = 1 + yt*yt/(xt*xt); 00342 if(a == 0) return HepPoint3D(999,999,999); 00343 double b = 2*xc1.x()*yt/xt-yt*rt/(xt*xt)-2*xc1.y(); 00344 double c = rt*rt/(4*xt*xt)-xc1.x()*rt/xt-rad1*rad1+xc1.perp2(); 00345 double d = b*b - 4 * a * c; 00346 if( d < 0) return HepPoint3D(999,999,999); 00347 d = sqrt(d); 00348 // two solution of intersection points 00349 00350 y1 = (-b + d)/(2*a); 00351 x1 = (rt - 2 * yt * y1)/(2*xt); 00352 00353 y2 = (-b - d)/(2*a); 00354 x2 = (rt - 2 * yt * y2)/(2*xt); 00355 } else { 00356 double a = 1 + xt*xt/(yt*yt); 00357 if(a == 0) return HepPoint3D(999,999,999); 00358 double b = 2*xc1.y()*xt/yt-xt*rt/(yt*yt)-2*xc1.x(); 00359 double c = rt*rt/(4*yt*yt)-xc1.y()*rt/yt-rad1*rad1+xc1.perp2(); 00360 double d = b*b - 4 * a * c; 00361 if( d < 0) return HepPoint3D(999,999,999); 00362 d = sqrt(d); 00363 // two solution of intersection points 00364 00365 x1 = (-b + d)/(2*a); 00366 y1 = (rt - 2 * xt * x1)/(2*yt); 00367 00368 x2 = (-b - d)/(2*a); 00369 y2 = (rt - 2 * xt * x2)/(2*yt); 00370 } 00371 00372 double z1[2], z2[2], J1[2], J2[2]; 00373 00374 00375 double a1 = alpha * bField1 * charge(); 00376 double a2 = alpha * bField2 * htrk.charge(); 00377 // z for solotion one 00378 J1[0] = a1*((x1-x3().x())*p3().x()+(y1-x3().y())*p3().y())/p3().perp2(); 00379 J1[1] = a2*((x1-htrk.x3().x())*htrk.p3().x()+(y1-htrk.x3().y())*htrk.p3().y())/htrk.p3().perp2(); 00380 z1[0] = x3().z()+p3().z()/a1*asin(J1[0]); 00381 z1[1] = htrk.x3().z()+htrk.p3().z()/a2*asin(J1[1]); 00382 // z for solotion two 00383 J2[0] = a1*((x2-x3().x())*p3().x()+(y2-x3().y())*p3().y())/p3().perp2(); 00384 J2[1] = a2*((x2-htrk.x3().x())*htrk.p3().x()+(y2-htrk.x3().y())*htrk.p3().y())/htrk.p3().perp2(); 00385 z2[0] = x3().z()+p3().z()/a2*asin(J2[0]); 00386 z2[1] = htrk.x3().z()+htrk.p3().z()/a2*asin(J2[1]); 00387 00388 // take the solution if delta z is small 00389 00390 if(fabs(z1[0]-z1[1]) < fabs(z2[0]-z2[1])) { 00391 return HepPoint3D(x1, y1, 0.5*(z1[0]+z1[1])); 00392 } else { 00393 return HepPoint3D(x2, y2, 0.5*(z2[0]+z2[1])); 00394 } 00395 }
double HTrackParameter::pxy | ( | ) | const [inline] |
Definition at line 111 of file HTrackParameter.h.
References m_hel.
Referenced by center(), dHdp(), HTrackParameter(), p(), p3(), and radius().
00111 { 00112 return fabs(1/m_hel[2]); 00113 }
double HTrackParameter::radius | ( | ) | const |
Definition at line 122 of file HTrackParameter.cxx.
References alpha, charge(), VertexFitBField::getBFieldZ(), VertexFitBField::instance(), m_hel, pxy(), and x3().
Referenced by minDistanceTwoHelix(), and positionTwoHelix().
00122 { 00123 double bField = VertexFitBField::instance()->getBFieldZ(x3()); 00124 int charge = m_hel[2] > 0 ? +1: -1; 00125 double a = alpha * bField * charge; 00126 double pxy = charge/m_hel[2]; 00127 return (pxy/a); 00128 }
void HTrackParameter::setEHel | ( | const HepSymMatrix | eH | ) | [inline] |
void HTrackParameter::setHel | ( | const HepVector | he | ) | [inline] |
void HTrackParameter::setPartID | ( | const int | partID | ) | [inline] |
void HTrackParameter::setTrackID | ( | const int | trackID | ) | [inline] |
int HTrackParameter::trackID | ( | ) | const [inline] |
WTrackParameter HTrackParameter::wTrack | ( | const double | mass | ) | const |
Definition at line 257 of file HTrackParameter.cxx.
References charge(), cos(), kappa(), lambda(), m_eHel, p3(), phi0(), WTrackParameter::setCharge(), WTrackParameter::setEw(), WTrackParameter::setW(), sin(), w, and x3().
00257 { 00258 00259 WTrackParameter wtrk; 00260 wtrk.setCharge(charge()); 00261 HepVector w(7,0); 00262 HepMatrix dWdh(7, 5, 0); 00263 00264 double ptrk = p3().rho(); double E = sqrt(ptrk*ptrk + mass * mass); 00265 double px = p3().x(); 00266 double py = p3().y(); 00267 double pz = p3().z(); 00268 double x0 = x3().x(); 00269 double y0 = x3().y(); 00270 double z0 = x3().z(); 00271 w[0] = px; w[1] = py; w[2] = pz; w[3] = E; 00272 w[4] = x0; w[5] = y0; w[6] = z0; 00273 wtrk.setW(w); 00274 dWdh[0][1] = -py; dWdh[0][2] = 0 - px/kappa(); 00275 dWdh[1][1] = px; dWdh[1][2] = 0 - py/kappa(); 00276 dWdh[2][2] = 0 - pz/kappa(); dWdh[2][4] = charge()/kappa(); 00277 dWdh[3][2] = 0 - (1 + lambda() * lambda())/ E / kappa() / kappa() / kappa(); 00278 dWdh[3][4] = lambda() / E / kappa() / kappa(); 00279 dWdh[4][0] = cos(phi0()); dWdh[4][1] = 0 - y0; 00280 dWdh[5][0] = sin(phi0()); dWdh[5][1] = x0; 00281 dWdh[6][3] = 1; 00282 HepSymMatrix Ew(7, 0); 00283 Ew = m_eHel.similarity(dWdh); 00284 wtrk.setEw(Ew); 00285 return wtrk; 00286 }
WTrackParameter HTrackParameter::wTrack | ( | ) | const |
HepVector HTrackParameter::x | ( | ) | const [inline] |
Definition at line 125 of file HTrackParameter.h.
References cos(), m_hel, and sin().
Referenced by center(), dHdp(), dHdx(), HTrackParameter(), and minDistanceTwoHelix().
00125 { 00126 HepVector v0(3, 0); 00127 v0[0] = m_hel[0]*cos(m_hel[1]); 00128 v0[1] = m_hel[0]*sin(m_hel[1]); 00129 v0[2] = m_hel[3]; 00130 return v0; 00131 }
HepPoint3D HTrackParameter::x3 | ( | ) | const [inline] |
Definition at line 133 of file HTrackParameter.h.
References cos(), m_hel, and sin().
Referenced by center(), minDistanceTwoHelix(), positionTwoHelix(), radius(), and wTrack().
00133 { 00134 return HepPoint3D(m_hel[0]*cos(m_hel[1]), m_hel[0]*sin(m_hel[1]), m_hel[3]); 00135 }
double HTrackParameter::xmass | ( | const int | i | ) | const |
Definition at line 301 of file HTrackParameter.cxx.
References mass.
Referenced by HTrackParameter(), and wTrack().
00301 { 00302 double mass[5] = {0.000511, 0.105658, 0.139570,0.493677, 0.938272}; 00303 if(n < 0 || n >=5) return 0.0; 00304 return mass[n]; 00305 }
HepSymMatrix HTrackParameter::m_eHel [private] |
Definition at line 104 of file HTrackParameter.h.
Referenced by eHel(), HTrackParameter(), operator=(), setEHel(), and wTrack().
HepVector HTrackParameter::m_hel [private] |
int HTrackParameter::m_partID [private] |
Definition at line 102 of file HTrackParameter.h.
Referenced by HTrackParameter(), operator=(), partID(), setPartID(), and wTrack().
int HTrackParameter::m_trackID [private] |
Definition at line 101 of file HTrackParameter.h.
Referenced by HTrackParameter(), operator=(), setTrackID(), and trackID().