BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
HTrackParameter Class Reference

#include <HTrackParameter.h>

Public Member Functions

 HTrackParameter ()
 
 ~HTrackParameter ()
 
 HTrackParameter (const HTrackParameter &htrk)
 
HTrackParameteroperator= (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)
 

Detailed Description

Definition at line 28 of file HTrackParameter.h.

Constructor & Destructor Documentation

◆ HTrackParameter() [1/6]

HTrackParameter::HTrackParameter ( )

Definition at line 9 of file HTrackParameter.cxx.

9 {
10 m_trackID = -1;
11 m_partID = -1;
12 m_hel = HepVector(5, 0);
13 m_eHel = HepSymMatrix(5, 0);
14}

◆ ~HTrackParameter()

HTrackParameter::~HTrackParameter ( )
inline

Definition at line 32 of file HTrackParameter.h.

32{;}

◆ HTrackParameter() [2/6]

HTrackParameter::HTrackParameter ( const HTrackParameter htrk)

Definition at line 16 of file HTrackParameter.cxx.

16 {
17 m_trackID = htrk.m_trackID;
18 m_partID = htrk.m_partID;
19 m_hel = htrk.m_hel;
20 m_eHel = htrk.m_eHel;
21}

◆ HTrackParameter() [3/6]

HTrackParameter::HTrackParameter ( const HepVector  helix,
const HepSymMatrix  eMatrix,
const int  trackid,
const int  partid 
)

Definition at line 36 of file HTrackParameter.cxx.

37 {
38
39 m_hel = HepVector(5, 0);
40 m_eHel = HepSymMatrix(5, 0);
41
42 m_trackID = trackid;
43 m_partID = partid;
44 m_hel = h;
45 m_eHel = eH;
46
47}

◆ HTrackParameter() [4/6]

HTrackParameter::HTrackParameter ( const HepVector  helix,
const double  error[],
const int  trackid,
const int  partid 
)

Definition at line 54 of file HTrackParameter.cxx.

55 {
56
57 m_hel = HepVector(5, 0);
58 m_eHel = HepSymMatrix(5, 0);
59
60 m_trackID = trackid;
61 m_partID = partid;
62 m_hel = h;
63 int k = 0;
64 for(int i = 0; i < 5; i++){
65 for(int j = 0; j < 5; j++) {
66 m_eHel[i][j] = eH[k];
67 m_eHel[j][i] = eH[k];
68 k++;
69 }
70 }
71}

◆ HTrackParameter() [5/6]

HTrackParameter::HTrackParameter ( const WTrackParameter  wtrk)

Definition at line 77 of file HTrackParameter.cxx.

77 {
78
79 HepVector p(3, 0);
80 HepVector x(3, 0);
81 for(int i = 0; i < 3; i++) {
82 p[i] = wtrk.w()[i];
83 x[i] = wtrk.w()[i+4];
84 }
85
86 HTrackParameter htrk(wtrk.charge(), p, x);
87 HepMatrix A(5, 3, 0);
88 HepMatrix B(5, 3, 0);
89
90 A = htrk.dHdx(p, x);
91 B = htrk.dHdp(p, x);
92 HepMatrix T(5, 7, 0);
93 for(int i = 0; i < 5; i++) {
94 for(int j = 0; j < 3; j++){
95 T[i][j] = B[i][j];
96 T[i][j+4] = A[i][j];
97 }
98 }
99
100 HepSymMatrix eH(5, 0);
101 eH = (wtrk.Ew()).similarity(T);
102 int m_trackID = -1;
103 double mass = (wtrk.p()).m();
104 int m_partID = -1;
105 for(int i = 0; i < 5; i++) {
106 if(fabs(mass - xmass(i)) < 0.01) {
107 m_partID = i;
108 break;
109 }
110 }
111 // htrk.setTrackID(trackID);
112 // htrk.setPartID(partID);
113 htrk.setEHel(eH);
114 m_hel = htrk.hel();
115 m_eHel = htrk.eHel();
116}
double mass
const double xmass[5]
Definition: Gam4pikp.cxx:50
HepVector p() const
HepVector x() const
int charge() const
HepLorentzVector p() const
HepVector w() const
HepSymMatrix Ew() const

◆ HTrackParameter() [6/6]

HTrackParameter::HTrackParameter ( const int  charge,
const HepVector  p,
const HepVector  x 
)

Definition at line 146 of file HTrackParameter.cxx.

146 {
147 m_trackID = -1;
148 m_partID = -1;
149 m_hel = HepVector(5, 0);
150 m_eHel = HepSymMatrix(5, 0);
151
152 HepPoint3D xyz(vx[0], vx[1], vx[2]);
153 double bField = VertexFitBField::instance()->getBFieldZ(xyz);
154 //std::cout << "bField in HTrackParameter(charge,p,vx) = " << bField << std::endl;
155
156 double a = alpha * bField * charge;
157 double px = p[0];
158 double py = p[1];
159 double pz = p[2];
160
161 double x = vx[0];
162 double y = vx[1];
163 double z = vx[2];
164
165 double pxy = sqrt(px*px+py*py);
166 double T = sqrt((px+a*y)*(px+a*y)+(py-a*x)*(py-a*x));
167 double J= (x*px+y*py)/T*a/pxy;
168
169 double drho = (pxy/a)-(T/a);
170 double phi0 = fmod((4*CLHEP::pi)+atan2(0-px-a*y, py-a*x), (2*CLHEP::pi));
171 double kappa = charge/pxy;
172 double dz = z - (pz/a) *asin(J);
173 double lambda = pz/pxy;
174
175 m_hel[0] = drho; m_hel[1] = phi0; m_hel[2] = kappa;
176 m_hel[3] = dz; m_hel[4] = lambda;
177}
const double alpha
double lambda() const
double kappa() const
double phi0() const
double drho() const
int charge() const
double dz() const
double pxy() const
double y[1000]

Member Function Documentation

◆ center()

HepPoint3D HTrackParameter::center ( ) const

Definition at line 130 of file HTrackParameter.cxx.

130 {
131 double bField = VertexFitBField::instance()->getBFieldZ(x3());
132 int charge = m_hel[2] > 0 ? +1: -1;
133 double a = alpha * bField * charge;
134 double pxy = charge/m_hel[2];
135 double rad = pxy/a;
136 double x = (m_hel[0] + rad) * cos(m_hel[1]);
137 double y = (m_hel[0] + rad) * sin(m_hel[1]);
138 double z = 0.0;
139 return HepPoint3D(x, y, z);
140}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
HepGeom::Point3D< double > HepPoint3D
HepPoint3D x3() const
const float rad
Definition: vector3.h:134

Referenced by positionTwoHelix().

◆ charge()

int HTrackParameter::charge ( ) const
inline

Definition at line 107 of file HTrackParameter.h.

107 {
108 return (m_hel[2]>0 ? +1 :-1);
109}

Referenced by center(), dHdp(), dHdx(), HTrackParameter(), positionTwoHelix(), radius(), and wTrack().

◆ dHdp()

HepMatrix HTrackParameter::dHdp ( const HepVector  p,
const HepVector  x 
)

Definition at line 218 of file HTrackParameter.cxx.

218 {
219 HepPoint3D xyz(vx[0], vx[1], vx[2]);
220 double bField = VertexFitBField::instance()->getBFieldZ(xyz);
221
222 double a = alpha * bField * charge();
223 double px = p[0];
224 double py = p[1];
225 double pz = p[2];
226
227 double x = vx[0];
228 double y = vx[1];
229 // double z = vx[2];
230
231 double pxy = sqrt(px*px+py*py);
232 double T = sqrt((px+a*y)*(px+a*y)+(py-a*x)*(py-a*x));
233 double J= (x*px+y*py)/T*a/pxy;
234
235 HepMatrix m_B(5, 3, 0);
236
237 m_B[0][0] = (px/pxy - (px+a*y)/T)/a;
238 m_B[0][1] = (py/pxy - (py-a*x)/T)/a;
239 m_B[1][0] = 0 -(py-a*x)/T/T;
240 m_B[1][1] = (px + a*y)/T/T;
241 m_B[2][0] = 0-charge() *px/pxy/pxy/pxy;
242 m_B[2][1] = 0-charge() *py/pxy/pxy/pxy;
243 m_B[3][0] = (pz/a)*(py/pxy/pxy-(py-a*x)/T/T);
244 m_B[3][1] = 0-(pz/a)*(px/pxy/pxy-(px+a*y)/T/T);
245 m_B[3][2] = 0 - asin(J)/a;
246 m_B[4][0] = 0 - (px/pxy)*(pz/pxy)/pxy;
247 m_B[4][1] = 0 - (py/pxy)*(pz/pxy)/pxy;
248 m_B[4][2] = 1/pxy;
249
250 return m_B;
251}

Referenced by HTrackParameter().

◆ dHdx()

HepMatrix HTrackParameter::dHdx ( const HepVector  p,
const HepVector  x 
)

Definition at line 183 of file HTrackParameter.cxx.

183 {
184 HepPoint3D xyz(vx[0], vx[1], vx[2]);
185 double bField = VertexFitBField::instance()->getBFieldZ(xyz);
186 //std::cout << "bField in dHdx(p,vx) = " << bField << std::endl;
187
188 double a = alpha * bField * charge();
189 double px = p[0];
190 double py = p[1];
191 double pz = p[2];
192
193 double x = vx[0];
194 double y = vx[1];
195 // double z = vx[2];
196
197 // double pxy = sqrt(px*px+py*py);
198 double T = sqrt((px+a*y)*(px+a*y)+(py-a*x)*(py-a*x));
199 // double J= (x*px+y*py)/T*a/pxy;
200
201 HepMatrix m_A(5, 3, 0);
202
203 m_A[0][0] = (py-a*x)/T;
204 m_A[0][1] = 0 -(px + a*y)/T;
205 m_A[1][0] = 0- a*(px + a*y)/T/T;
206 m_A[1][1] = 0 - a * (py - a*x)/T/T;
207 m_A[3][0] = 0 - (pz/T)*(px + a*y)/T;
208 m_A[3][1] = 0 - (pz/T)*(py - a*x)/T;
209 m_A[3][2] = 1;
210
211 return m_A;
212}

Referenced by HTrackParameter().

◆ drho()

double HTrackParameter::drho ( ) const
inline

Definition at line 67 of file HTrackParameter.h.

67{return m_hel[0];}

Referenced by HTrackParameter().

◆ dz()

double HTrackParameter::dz ( ) const
inline

Definition at line 70 of file HTrackParameter.h.

70{return m_hel[3];}

Referenced by HTrackParameter().

◆ eHel()

HepSymMatrix HTrackParameter::eHel ( ) const
inline

◆ hel()

HepVector HTrackParameter::hel ( ) const
inline

Definition at line 49 of file HTrackParameter.h.

49{return m_hel;}

Referenced by HTrackParameter(), KalmanKinematicFit::pull(), and KinematicFit::pull().

◆ helix()

HepVector HTrackParameter::helix ( ) const
inline

Definition at line 50 of file HTrackParameter.h.

50{return m_hel;}

Referenced by VertexFit::pull().

◆ kappa()

double HTrackParameter::kappa ( ) const
inline

Definition at line 69 of file HTrackParameter.h.

69{return m_hel[2];}

Referenced by HTrackParameter(), and wTrack().

◆ lambda()

double HTrackParameter::lambda ( ) const
inline

Definition at line 71 of file HTrackParameter.h.

71{return m_hel[4];}

Referenced by HTrackParameter(), minDistanceTwoHelix(), and wTrack().

◆ minDistanceTwoHelix()

double HTrackParameter::minDistanceTwoHelix ( const HTrackParameter  G,
HepPoint3D pos 
)

Definition at line 427 of file HTrackParameter.cxx.

427 {
428 int ifail;
429 double h = radius();
430 double g = G.radius();
431 double phiH0 = fmod((4*CLHEP::pi)+atan2(p3().y(), p3().x()), (2*CLHEP::pi));
432 double phiG0 = fmod((4*CLHEP::pi)+atan2(G.p3().y(), G.p3().x()), (2*CLHEP::pi));
433 double lamH = lambda();
434 double lamG = G.lambda();
435 double a = x3().x() - G.x3().x() + g*sin(phiG0) - h*sin(phiH0);
436 double b = x3().y() - G.x3().y() - g*cos(phiG0) + h*cos(phiH0);
437 double c1 = h*lamH*lamH;
438 double c2 = 0 - g*lamG*lamG;
439 double d1 = 0 - g*lamG*lamH;
440 double d2 = h*lamG*lamH;
441 double e1 = lamH*(x3().z() - G.x3().z() - h*phiH0*lamH + g*phiG0*lamG);
442 double e2 = lamG*(x3().z() - G.x3().z() - h*phiH0*lamH + g*phiG0*lamG);
443
444 HepVector phiE(2, 0);
445 phiE[0] = phiH0;
446 phiE[1] = phiG0;
447 for(int iter = 0; iter < 100; iter++) {
448 HepVector z(2, 0);
449 HepSymMatrix Omega(2, 0);
450 double phiH = phiE[0];
451 double phiG = phiE[1];
452 z[0] = cos(phiH)*(a-g*sin(phiG))+sin(phiH)*(b+g*cos(phiG))+c1*phiH+d1*phiG+e1;
453 z[1] = cos(phiG)*(a+h*sin(phiH))+sin(phiG)*(b-h*cos(phiH))+c2*phiG+d2*phiH+e2;
454 Omega[0][0] = 0-sin(phiH)*(a-g*sin(phiG))+cos(phiH)*(b+g*cos(phiG))+c1;
455 Omega[0][1] = -g*cos(phiH)*cos(phiG)-g*sin(phiH)*sin(phiG)+d1;
456 Omega[1][0] =h*cos(phiH)*cos(phiG)+h*sin(phiG)*sin(phiH)+d2;
457 Omega[1][1] = -sin(phiG)*(a+h*sin(phiH))+cos(phiG)*(b-h*cos(phiH))+c2;
458 HepVector phi(2, 0);
459 phi = phiE - Omega.inverse(ifail) * z;
460 if((fabs(phi[0]-phiE[0])<1E-3) && (fabs(phi[1]-phiE[1])<1E-3)) {
461 phiE = phi;
462 // std::cout << "number of iteration = " << iter <<std::endl;
463 break;
464 }
465 phiE = phi;
466 }
467
468 double phiH = phiE[0];
469 double phiG = phiE[1];
470 HepPoint3D posH = HepPoint3D(x3().x()+h*(sin(phiH)-sin(phiH0)), x3().y()+h*(cos(phiH0)-cos(phiH)), x3().z()+lamH*(phiH-phiH0));
471 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));
472 double dis = (posH-posG).rho();
473 mpos = 0.5*(posH+posG);
474 return dis;
475}
Double_t e1
Double_t e2
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
double radius() const
Hep3Vector p3() const
const double b
Definition: slope.cxx:9

Referenced by BeamParams::execute().

◆ operator=()

HTrackParameter & HTrackParameter::operator= ( const HTrackParameter htrk)

Definition at line 23 of file HTrackParameter.cxx.

23 {
24 m_trackID = htrk.m_trackID;
25 m_partID = htrk.m_partID;
26 m_hel = htrk.m_hel;
27 m_eHel = htrk.m_eHel;
28 return (*this);
29}

◆ p() [1/2]

HepVector HTrackParameter::p ( ) const
inline

Definition at line 115 of file HTrackParameter.h.

115 {
116 HepVector p0(3, 0);
117 double pxy = 1./fabs(m_hel[2]);
118 p0[0] = 0 - pxy*sin(m_hel[1]);
119 p0[1] = pxy*cos(m_hel[1]);
120 p0[2] = pxy * m_hel[4];
121 return p0;
122}

Referenced by KalmanVertexFit::addTrack(), dHdp(), dHdx(), and HTrackParameter().

◆ p() [2/2]

HepLorentzVector HTrackParameter::p ( const double  mass) const
inline

Definition at line 142 of file HTrackParameter.h.

142 {
143// // xum 2007-12-28
144// //Hep3Vector ptrk = (p3()).rho();
145// Hep3Vector ptrk = (p3()).r();
146// double e = sqrt(ptrk*ptrk+mass*mass);
147// return HepLorentzVector(p3(), e);
148
149 // nefedov 2011-11-17
150 Hep3Vector p3tmp = p3();
151 double ptrk = p3tmp.r();
152 double e = sqrt(ptrk*ptrk+mass*mass);
153 return HepLorentzVector(p3tmp, e);
154}
float ptrk

◆ p3()

Hep3Vector HTrackParameter::p3 ( ) const
inline

Definition at line 137 of file HTrackParameter.h.

137 {
138 double pxy = 1./fabs(m_hel[2]);
139 return Hep3Vector(0-pxy*sin(m_hel[1]), pxy*cos(m_hel[1]), pxy*m_hel[4]);
140}

Referenced by minDistanceTwoHelix(), p(), positionTwoHelix(), and wTrack().

◆ partID()

int HTrackParameter::partID ( ) const
inline

Definition at line 53 of file HTrackParameter.h.

53{return m_partID;}

Referenced by setPartID().

◆ phi0()

double HTrackParameter::phi0 ( ) const
inline

Definition at line 68 of file HTrackParameter.h.

68{return m_hel[1];}

Referenced by HTrackParameter(), and wTrack().

◆ positionCone()

HepPoint3D HTrackParameter::positionCone ( ) const

Definition at line 419 of file HTrackParameter.cxx.

419 {
420 return HepPoint3D(999,999,999);
421}

◆ positionCylinder()

HepPoint3D HTrackParameter::positionCylinder ( const double  R) const

Definition at line 411 of file HTrackParameter.cxx.

411 {
412 return HepPoint3D(999,999,999);
413}

◆ positionPlane()

HepPoint3D HTrackParameter::positionPlane ( const double  zp) const

Definition at line 403 of file HTrackParameter.cxx.

403 {
404 return HepPoint3D(999,999,999);
405}

◆ positionTwoHelix()

HepPoint3D HTrackParameter::positionTwoHelix ( const HTrackParameter  htrk) const

Definition at line 311 of file HTrackParameter.cxx.

311 {
312 double bField1 = VertexFitBField::instance()->getBFieldZ(x3());
313 double bField2 = VertexFitBField::instance()->getBFieldZ(htrk.x3());
314
315 HepPoint3D pos1 = x3();
316 HepPoint3D pos2 = htrk.x3();
317 double rad1 = radius();
318 double rad2 = htrk.radius();
319 HepPoint3D xc1 = center();
320 HepPoint3D xc2 = htrk.center();
321 //
322 // requires the solution of
323 // a * y**2 + b*y + c = 0
324 // and
325 // x = (rt - 2*yt * y) / (2 * xt)
326 // where
327 // xt = xc2.x() - xc1.x()
328 // yt = xc2.y() - xc1.y()
329 // rt = rad1*rad1-rad2*rad2-xc1.perp2()+xc2.perp2()
330 // a = 1 + yt*yt/(xt*xt);
331 // b = 2*xc1.x()*yt/xt-yt*rt/(xt*xt)-2*xc1.y();
332 // c = rt*rt/(4*xt*xt)-xc1.x()*rt/xt-rad1*rad1+xc1.perp2();
333 //
334
335 double xt = xc2.x() - xc1.x();
336 double yt = xc2.y() - xc1.y();
337 if(xt == 0 && yt == 0) return HepPoint3D(999,999,999);
338 double rt = rad1*rad1-rad2*rad2-xc1.perp2()+xc2.perp2();
339 double x1, y1, x2, y2;
340 if( xt != 0) {
341 double a = 1 + yt*yt/(xt*xt);
342 if(a == 0) return HepPoint3D(999,999,999);
343 double b = 2*xc1.x()*yt/xt-yt*rt/(xt*xt)-2*xc1.y();
344 double c = rt*rt/(4*xt*xt)-xc1.x()*rt/xt-rad1*rad1+xc1.perp2();
345 double d = b*b - 4 * a * c;
346 if( d < 0) return HepPoint3D(999,999,999);
347 d = sqrt(d);
348 // two solution of intersection points
349
350 y1 = (-b + d)/(2*a);
351 x1 = (rt - 2 * yt * y1)/(2*xt);
352
353 y2 = (-b - d)/(2*a);
354 x2 = (rt - 2 * yt * y2)/(2*xt);
355 } else {
356 double a = 1 + xt*xt/(yt*yt);
357 if(a == 0) return HepPoint3D(999,999,999);
358 double b = 2*xc1.y()*xt/yt-xt*rt/(yt*yt)-2*xc1.x();
359 double c = rt*rt/(4*yt*yt)-xc1.y()*rt/yt-rad1*rad1+xc1.perp2();
360 double d = b*b - 4 * a * c;
361 if( d < 0) return HepPoint3D(999,999,999);
362 d = sqrt(d);
363 // two solution of intersection points
364
365 x1 = (-b + d)/(2*a);
366 y1 = (rt - 2 * xt * x1)/(2*yt);
367
368 x2 = (-b - d)/(2*a);
369 y2 = (rt - 2 * xt * x2)/(2*yt);
370 }
371
372 double z1[2], z2[2], J1[2], J2[2];
373
374
375 double a1 = alpha * bField1 * charge();
376 double a2 = alpha * bField2 * htrk.charge();
377 // z for solotion one
378 J1[0] = a1*((x1-x3().x())*p3().x()+(y1-x3().y())*p3().y())/p3().perp2();
379 J1[1] = a2*((x1-htrk.x3().x())*htrk.p3().x()+(y1-htrk.x3().y())*htrk.p3().y())/htrk.p3().perp2();
380 z1[0] = x3().z()+p3().z()/a1*asin(J1[0]);
381 z1[1] = htrk.x3().z()+htrk.p3().z()/a2*asin(J1[1]);
382 // z for solotion two
383 J2[0] = a1*((x2-x3().x())*p3().x()+(y2-x3().y())*p3().y())/p3().perp2();
384 J2[1] = a2*((x2-htrk.x3().x())*htrk.p3().x()+(y2-htrk.x3().y())*htrk.p3().y())/htrk.p3().perp2();
385 z2[0] = x3().z()+p3().z()/a2*asin(J2[0]);
386 z2[1] = htrk.x3().z()+htrk.p3().z()/a2*asin(J2[1]);
387
388 // take the solution if delta z is small
389
390 if(fabs(z1[0]-z1[1]) < fabs(z2[0]-z2[1])) {
391 return HepPoint3D(x1, y1, 0.5*(z1[0]+z1[1]));
392 } else {
393 return HepPoint3D(x2, y2, 0.5*(z2[0]+z2[1]));
394 }
395}
HepPoint3D center() const

◆ pxy()

double HTrackParameter::pxy ( ) const
inline

Definition at line 111 of file HTrackParameter.h.

111 {
112 return fabs(1/m_hel[2]);
113}

Referenced by center(), dHdp(), HTrackParameter(), p(), p3(), and radius().

◆ radius()

double HTrackParameter::radius ( ) const

Definition at line 122 of file HTrackParameter.cxx.

122 {
123 double bField = VertexFitBField::instance()->getBFieldZ(x3());
124 int charge = m_hel[2] > 0 ? +1: -1;
125 double a = alpha * bField * charge;
126 double pxy = charge/m_hel[2];
127 return (pxy/a);
128}

Referenced by minDistanceTwoHelix(), and positionTwoHelix().

◆ setEHel()

void HTrackParameter::setEHel ( const HepSymMatrix  eH)
inline

Definition at line 83 of file HTrackParameter.h.

83{m_eHel = eH;}

Referenced by HTrackParameter().

◆ setHel()

void HTrackParameter::setHel ( const HepVector  he)
inline

Definition at line 82 of file HTrackParameter.h.

82{m_hel = he;}

◆ setPartID()

void HTrackParameter::setPartID ( const int  partID)
inline

Definition at line 80 of file HTrackParameter.h.

80{ m_partID = partID;}
int partID() const

◆ setTrackID()

void HTrackParameter::setTrackID ( const int  trackID)
inline

Definition at line 79 of file HTrackParameter.h.

79{m_trackID = trackID;}
int trackID() const

◆ trackID()

int HTrackParameter::trackID ( ) const
inline

Definition at line 52 of file HTrackParameter.h.

52{return m_trackID;}

Referenced by setTrackID().

◆ wTrack() [1/2]

WTrackParameter HTrackParameter::wTrack ( ) const

Definition at line 288 of file HTrackParameter.cxx.

288 {
289 WTrackParameter wtrk;
290 if(m_partID > -1 && m_partID < 5) {
291 double mass = xmass(m_partID);
292 wtrk = wTrack(mass);
293 }
294 return wtrk;
295}
WTrackParameter wTrack() const

Referenced by wTrack().

◆ wTrack() [2/2]

WTrackParameter HTrackParameter::wTrack ( const double  mass) const

Definition at line 257 of file HTrackParameter.cxx.

257 {
258
259 WTrackParameter wtrk;
260 wtrk.setCharge(charge());
261 HepVector w(7,0);
262 HepMatrix dWdh(7, 5, 0);
263
264 double ptrk = p3().rho(); double E = sqrt(ptrk*ptrk + mass * mass);
265 double px = p3().x();
266 double py = p3().y();
267 double pz = p3().z();
268 double x0 = x3().x();
269 double y0 = x3().y();
270 double z0 = x3().z();
271 w[0] = px; w[1] = py; w[2] = pz; w[3] = E;
272 w[4] = x0; w[5] = y0; w[6] = z0;
273 wtrk.setW(w);
274 dWdh[0][1] = -py; dWdh[0][2] = 0 - px/kappa();
275 dWdh[1][1] = px; dWdh[1][2] = 0 - py/kappa();
276 dWdh[2][2] = 0 - pz/kappa(); dWdh[2][4] = charge()/kappa();
277 dWdh[3][2] = 0 - (1 + lambda() * lambda())/ E / kappa() / kappa() / kappa();
278 dWdh[3][4] = lambda() / E / kappa() / kappa();
279 dWdh[4][0] = cos(phi0()); dWdh[4][1] = 0 - y0;
280 dWdh[5][0] = sin(phi0()); dWdh[5][1] = x0;
281 dWdh[6][3] = 1;
282 HepSymMatrix Ew(7, 0);
283 Ew = m_eHel.similarity(dWdh);
284 wtrk.setEw(Ew);
285 return wtrk;
286}
void setEw(const HepSymMatrix &Ew)
void setCharge(const int charge)
void setW(const HepVector &w)

◆ x()

HepVector HTrackParameter::x ( ) const
inline

Definition at line 125 of file HTrackParameter.h.

125 {
126 HepVector v0(3, 0);
127 v0[0] = m_hel[0]*cos(m_hel[1]);
128 v0[1] = m_hel[0]*sin(m_hel[1]);
129 v0[2] = m_hel[3];
130 return v0;
131}

Referenced by center(), dHdp(), dHdx(), HTrackParameter(), and minDistanceTwoHelix().

◆ x3()

HepPoint3D HTrackParameter::x3 ( ) const
inline

Definition at line 133 of file HTrackParameter.h.

133 {
134 return HepPoint3D(m_hel[0]*cos(m_hel[1]), m_hel[0]*sin(m_hel[1]), m_hel[3]);
135}

Referenced by center(), minDistanceTwoHelix(), positionTwoHelix(), radius(), and wTrack().

◆ xmass()

double HTrackParameter::xmass ( const int  i) const

Definition at line 301 of file HTrackParameter.cxx.

301 {
302 double mass[5] = {0.000511, 0.105658, 0.139570,0.493677, 0.938272};
303 if(n < 0 || n >=5) return 0.0;
304 return mass[n];
305}
const Int_t n

The documentation for this class was generated from the following files: