#include <Helix.h>
Public Member Functions | |
const HepVector & | a (const HepVector &newA) |
sets helix parameters. | |
const HepVector & | a (void) const |
returns helix parameters. | |
const HepVector & | a (const HepVector &newA) |
sets helix parameters. | |
const HepVector & | a (void) const |
returns helix parameters. | |
double | bFieldZ (void) const |
double | bFieldZ (double) |
sets/returns z componet of the magnetic field. | |
double | bFieldZ (void) const |
double | bFieldZ (double) |
sets/returns z componet of the magnetic field. | |
const HepPoint3D & | center (void) const |
returns position of helix center(z = 0.); | |
const HepPoint3D & | center (void) const |
returns position of helix center(z = 0.); | |
double | cosPhi0 (void) const |
double | cosPhi0 (void) const |
double | curv (void) const |
double | curv (void) const |
HepMatrix | del4MDelA (double phi, double mass) const |
HepMatrix | del4MDelA (double phi, double mass) const |
HepMatrix | del4MXDelA (double phi, double mass) const |
HepMatrix | del4MXDelA (double phi, double mass) const |
HepMatrix | delApDelA (const HepVector &ap) const |
HepMatrix | delApDelA (const HepVector &ap) const |
HepMatrix | delMDelA (double phi) const |
HepMatrix | delMDelA (double phi) const |
HepMatrix | delXDelA (double phi) const |
HepMatrix | delXDelA (double phi) const |
Hep3Vector | direction (double dPhi=0.) const |
returns direction vector after rotating angle dPhi in phi direction. | |
Hep3Vector | direction (double dPhi=0.) const |
returns direction vector after rotating angle dPhi in phi direction. | |
double | dr (void) const |
returns an element of parameters. | |
double | dr (void) const |
returns an element of parameters. | |
double | dz (void) const |
double | dz (void) const |
const HepSymMatrix & | Ea (const HepSymMatrix &newdA) |
sets helix paramters and error matrix. | |
const HepSymMatrix & | Ea (void) const |
returns error matrix. | |
const HepSymMatrix & | Ea (const HepSymMatrix &newdA) |
sets helix paramters and error matrix. | |
const HepSymMatrix & | Ea (void) const |
returns error matrix. | |
void | ignoreErrorMatrix (void) |
unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix. | |
void | ignoreErrorMatrix (void) |
unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix. | |
double | kappa (void) const |
double | kappa (void) const |
HepLorentzVector | momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const |
returns 4momentum vector after rotating angle dPhi in phi direction. | |
HepLorentzVector | momentum (double dPhi, double mass, HepSymMatrix &Em) const |
returns 4momentum vector after rotating angle dPhi in phi direction. | |
HepLorentzVector | momentum (double dPhi, double mass) const |
returns 4momentum vector after rotating angle dPhi in phi direction. | |
Hep3Vector | momentum (double dPhi, HepSymMatrix &Em) const |
returns momentum vector after rotating angle dPhi in phi direction. | |
Hep3Vector | momentum (double dPhi=0.) const |
returns momentum vector after rotating angle dPhi in phi direction. | |
HepLorentzVector | momentum (double dPhi, double mass, HepPoint3D &x, HepSymMatrix &Emx) const |
returns 4momentum vector after rotating angle dPhi in phi direction. | |
HepLorentzVector | momentum (double dPhi, double mass, HepSymMatrix &Em) const |
returns 4momentum vector after rotating angle dPhi in phi direction. | |
HepLorentzVector | momentum (double dPhi, double mass) const |
returns 4momentum vector after rotating angle dPhi in phi direction. | |
Hep3Vector | momentum (double dPhi, HepSymMatrix &Em) const |
returns momentum vector after rotating angle dPhi in phi direction. | |
Hep3Vector | momentum (double dPhi=0.) const |
returns momentum vector after rotating angle dPhi in phi direction. | |
VFHelix & | operator= (const VFHelix &) |
Copy operator. | |
VFHelix & | operator= (const VFHelix &) |
Copy operator. | |
double | phi0 (void) const |
double | phi0 (void) const |
const HepPoint3D & | pivot (const HepPoint3D &newPivot) |
sets pivot position. | |
const HepPoint3D & | pivot (void) const |
returns pivot position. | |
const HepPoint3D & | pivot (const HepPoint3D &newPivot) |
sets pivot position. | |
const HepPoint3D & | pivot (void) const |
returns pivot position. | |
double | radius (void) const |
returns radious of helix. | |
double | radius (void) const |
returns radious of helix. | |
void | set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea) |
sets helix pivot position, parameters, and error matrix. | |
void | set (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea) |
sets helix pivot position, parameters, and error matrix. | |
double | sinPhi0 (void) const |
double | sinPhi0 (void) const |
double | tanl (void) const |
double | tanl (void) const |
VFHelix (const HepPoint3D &position, const Hep3Vector &momentum, double charge) | |
Constructor with position, momentum, and charge. | |
VFHelix (const HepPoint3D &pivot, const HepVector &a) | |
Constructor without error matrix. | |
VFHelix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea) | |
Constructor with pivot, helix parameter a, and its error matrix. | |
VFHelix (const HepPoint3D &position, const Hep3Vector &momentum, double charge) | |
Constructor with position, momentum, and charge. | |
VFHelix (const HepPoint3D &pivot, const HepVector &a) | |
Constructor without error matrix. | |
VFHelix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea) | |
Constructor with pivot, helix parameter a, and its error matrix. | |
HepPoint3D | x (double dPhi, HepSymMatrix &Ex) const |
returns position and convariance matrix(Ex) after rotation. | |
double * | x (double dPhi, double p[3]) const |
HepPoint3D | x (double dPhi=0.) const |
returns position after rotating angle dPhi in phi direction. | |
HepPoint3D | x (double dPhi, HepSymMatrix &Ex) const |
returns position and convariance matrix(Ex) after rotation. | |
double * | x (double dPhi, double p[3]) const |
HepPoint3D | x (double dPhi=0.) const |
returns position after rotating angle dPhi in phi direction. | |
virtual | ~VFHelix () |
Destructor. | |
virtual | ~VFHelix () |
Destructor. | |
Static Public Attributes | |
const double | ConstantAlpha = 333.564095 |
Constant alpha for uniform field. | |
Private Member Functions | |
void | updateCache (void) |
void | updateCache (void) |
Private Attributes | |
HepVector | m_a |
double | m_ac [5] |
double | m_alpha |
double | m_bField |
HepPoint3D | m_center |
double | m_cp |
HepSymMatrix | m_Ea |
bool | m_matrixValid |
HepPoint3D | m_pivot |
double | m_pt |
double | m_r |
double | m_sp |
|
Constructor with pivot, helix parameter a, and its error matrix.
00041 : m_bField(10.0), 00042 m_alpha(333.564095), 00043 m_pivot(pivot), 00044 m_a(a), 00045 m_matrixValid(true), 00046 m_Ea(Ea) { 00047 // m_alpha = 10000. / 2.99792458 / m_bField; 00048 // m_alpha = 333.564095; 00049 m_bField = 10 * VertexFitBField::instance()->getBFieldZRef(); 00050 m_alpha = 10000. / 2.99792458 / m_bField; 00051 //std::cout << "m_bField = " << m_bField << " m_alpha = " << m_alpha << std::endl; 00052 updateCache(); 00053 }
|
|
Constructor without error matrix.
00057 : m_bField(10.0), 00058 m_alpha(333.564095), 00059 m_pivot(pivot), 00060 m_a(a), 00061 m_matrixValid(false), 00062 m_Ea(HepSymMatrix(5,0)) { 00063 // m_alpha = 333.564095; 00064 m_bField = 10 * VertexFitBField::instance()->getBFieldZRef(); 00065 m_alpha = 10000. / 2.99792458 / m_bField; 00066 00067 updateCache(); 00068 }
|
|
Constructor with position, momentum, and charge.
00073 : m_bField(10.0), 00074 m_alpha(333.564095), 00075 m_pivot(position), 00076 m_a(HepVector(5,0)), 00077 m_matrixValid(false), 00078 m_Ea(HepSymMatrix(5,0)) { 00079 00080 m_bField = 10 * VertexFitBField::instance()->getBFieldZRef(); 00081 m_alpha = 10000. / 2.99792458 / m_bField; 00082 00083 m_a[0] = 0.; 00084 m_a[1] = fmod(atan2(- momentum.x(), momentum.y()) 00085 + M_PI4, M_PI2); 00086 m_a[3] = 0.; 00087 double perp(momentum.perp()); 00088 if (perp != 0.0) { 00089 m_a[2] = charge / perp; 00090 m_a[4] = momentum.z() / perp; 00091 } 00092 else { 00093 m_a[2] = charge * (DBL_MAX); 00094 if (momentum.z() >= 0) { 00095 m_a[4] = (DBL_MAX); 00096 } else { 00097 m_a[4] = -(DBL_MAX); 00098 } 00099 } 00100 // m_alpha = 333.564095; 00101 updateCache(); 00102 }
|
|
Destructor.
00104 { 00105 }
|
|
Constructor with pivot, helix parameter a, and its error matrix.
|
|
Constructor without error matrix.
|
|
Constructor with position, momentum, and charge.
|
|
Destructor.
|
|
sets helix parameters.
|
|
returns helix parameters.
|
|
sets helix parameters.
00253 { 00254 m_a = i; 00255 updateCache(); 00256 return m_a; 00257 }
|
|
returns helix parameters.
00241 {
00242 return m_a;
00243 }
|
|
|
|
sets/returns z componet of the magnetic field.
|
|
00276 {
00277 return m_bField;
00278 }
|
|
sets/returns z componet of the magnetic field.
00267 { 00268 m_bField = a; 00269 m_alpha = 10000. / 2.99792458 / m_bField; 00270 updateCache(); 00271 return m_bField; 00272 }
|
|
returns position of helix center(z = 0.);
|
|
returns position of helix center(z = 0.);
00181 {
00182 return m_center;
00183 }
|
|
|
|
00288 {
00289 return m_cp;
00290 }
|
|
|
|
00235 {
00236 return m_r;
00237 }
|
|
|
|
00576 { 00577 // 00578 // Calculate Jacobian (@4m/@a) 00579 // Vector a is helix parameters and phi is internal parameter. 00580 // Vector 4m is 4 momentum. 00581 // 00582 00583 HepMatrix d4MDA(4,5,0); 00584 00585 double phi0 = m_ac[1]; 00586 double cpa = m_ac[2]; 00587 double tnl = m_ac[4]; 00588 00589 double cosf0phi = cos(phi0+phi); 00590 double sinf0phi = sin(phi0+phi); 00591 00592 double rho; 00593 if(cpa != 0.)rho = 1./cpa; 00594 else rho = (DBL_MAX); 00595 00596 double charge = 1.; 00597 if(cpa < 0.)charge = -1.; 00598 00599 double E = sqrt(rho*rho*(1.+tnl*tnl)+mass*mass); 00600 00601 d4MDA[0][1] = -fabs(rho)*cosf0phi; 00602 d4MDA[0][2] = charge*rho*rho*sinf0phi; 00603 00604 d4MDA[1][1] = -fabs(rho)*sinf0phi; 00605 d4MDA[1][2] = -charge*rho*rho*cosf0phi; 00606 00607 d4MDA[2][2] = -charge*rho*rho*tnl; 00608 d4MDA[2][4] = fabs(rho); 00609 00610 if (cpa != 0.0 && E != 0.0) { 00611 d4MDA[3][2] = (-1.-tnl*tnl)/(cpa*cpa*cpa*E); 00612 d4MDA[3][4] = tnl/(cpa*cpa*E); 00613 } else { 00614 d4MDA[3][2] = (DBL_MAX); 00615 d4MDA[3][4] = (DBL_MAX); 00616 } 00617 return d4MDA; 00618 }
|
|
|
|
00622 { 00623 // 00624 // Calculate Jacobian (@4mx/@a) 00625 // Vector a is helix parameters and phi is internal parameter. 00626 // Vector 4xm is 4 momentum and position. 00627 // 00628 00629 HepMatrix d4MXDA(7,5,0); 00630 00631 const double & dr = m_ac[0]; 00632 const double & phi0 = m_ac[1]; 00633 const double & cpa = m_ac[2]; 00634 const double & dz = m_ac[3]; 00635 const double & tnl = m_ac[4]; 00636 00637 double cosf0phi = cos(phi0+phi); 00638 double sinf0phi = sin(phi0+phi); 00639 00640 double rho; 00641 if(cpa != 0.)rho = 1./cpa; 00642 else rho = (DBL_MAX); 00643 00644 double charge = 1.; 00645 if(cpa < 0.)charge = -1.; 00646 00647 double E = sqrt(rho * rho * (1. + tnl * tnl) + mass * mass); 00648 00649 d4MXDA[0][1] = - fabs(rho) * cosf0phi; 00650 d4MXDA[0][2] = charge * rho * rho * sinf0phi; 00651 00652 d4MXDA[1][1] = - fabs(rho) * sinf0phi; 00653 d4MXDA[1][2] = - charge * rho * rho * cosf0phi; 00654 00655 d4MXDA[2][2] = - charge * rho * rho * tnl; 00656 d4MXDA[2][4] = fabs(rho); 00657 00658 if (cpa != 0.0 && E != 0.0) { 00659 d4MXDA[3][2] = (- 1. - tnl * tnl) / (cpa * cpa * cpa * E); 00660 d4MXDA[3][4] = tnl / (cpa * cpa * E); 00661 } else { 00662 d4MXDA[3][2] = (DBL_MAX); 00663 d4MXDA[3][4] = (DBL_MAX); 00664 } 00665 00666 d4MXDA[4][0] = m_cp; 00667 d4MXDA[4][1] = - dr * m_sp + m_r * (- m_sp + sinf0phi); 00668 if (cpa != 0.0) { 00669 d4MXDA[4][2] = - (m_r / cpa) * (m_cp - cosf0phi); 00670 } else { 00671 d4MXDA[4][2] = (DBL_MAX); 00672 } 00673 00674 d4MXDA[5][0] = m_sp; 00675 d4MXDA[5][1] = dr * m_cp + m_r * (m_cp - cosf0phi); 00676 if (cpa != 0.0) { 00677 d4MXDA[5][2] = - (m_r / cpa) * (m_sp - sinf0phi); 00678 00679 d4MXDA[6][2] = (m_r / cpa) * tnl * phi; 00680 } else { 00681 d4MXDA[5][2] = (DBL_MAX); 00682 00683 d4MXDA[6][2] = (DBL_MAX); 00684 } 00685 00686 d4MXDA[6][3] = 1.; 00687 d4MXDA[6][4] = - m_r * phi; 00688 00689 return d4MXDA; 00690 }
|
|
|
|
00417 { 00418 // 00419 // Calculate Jacobian (@ap/@a) 00420 // Vector ap is new helix parameters and a is old helix parameters. 00421 // 00422 00423 HepMatrix dApDA(5,5,0); 00424 00425 const double & dr = m_ac[0]; 00426 const double & phi0 = m_ac[1]; 00427 const double & cpa = m_ac[2]; 00428 const double & dz = m_ac[3]; 00429 const double & tnl = m_ac[4]; 00430 00431 double drp = ap[0]; 00432 double phi0p = ap[1]; 00433 double cpap = ap[2]; 00434 double dzp = ap[3]; 00435 double tnlp = ap[4]; 00436 00437 double rdr = m_r + dr; 00438 double rdrpr; 00439 if ((m_r + drp) != 0.0) { 00440 rdrpr = 1. / (m_r + drp); 00441 } else { 00442 rdrpr = (DBL_MAX); 00443 } 00444 // double csfd = cos(phi0)*cos(phi0p) + sin(phi0)*sin(phi0p); 00445 // double snfd = cos(phi0)*sin(phi0p) - sin(phi0)*cos(phi0p); 00446 double csfd = cos(phi0p - phi0); 00447 double snfd = sin(phi0p - phi0); 00448 double phid = fmod(phi0p - phi0 + M_PI8, M_PI2); 00449 if (phid > M_PI) phid = phid - M_PI2; 00450 00451 dApDA[0][0] = csfd; 00452 dApDA[0][1] = rdr*snfd; 00453 if(cpa!=0.0) { 00454 dApDA[0][2] = (m_r/cpa)*( 1.0 - csfd ); 00455 } else { 00456 dApDA[0][2] = (DBL_MAX); 00457 } 00458 00459 dApDA[1][0] = - rdrpr*snfd; 00460 dApDA[1][1] = rdr*rdrpr*csfd; 00461 if(cpa!=0.0) { 00462 dApDA[1][2] = (m_r/cpa)*rdrpr*snfd; 00463 } else { 00464 dApDA[1][2] = (DBL_MAX); 00465 } 00466 00467 dApDA[2][2] = 1.0; 00468 00469 dApDA[3][0] = m_r*rdrpr*tnl*snfd; 00470 dApDA[3][1] = m_r*tnl*(1.0 - rdr*rdrpr*csfd); 00471 if(cpa!=0.0) { 00472 dApDA[3][2] = (m_r/cpa)*tnl*(phid - m_r*rdrpr*snfd); 00473 } else { 00474 dApDA[3][2] = (DBL_MAX); 00475 } 00476 dApDA[3][3] = 1.0; 00477 dApDA[3][4] = - m_r*phid; 00478 00479 dApDA[4][4] = 1.0; 00480 00481 return dApDA; 00482 }
|
|
|
|
00539 { 00540 // 00541 // Calculate Jacobian (@m/@a) 00542 // Vector a is helix parameters and phi is internal parameter. 00543 // Vector m is momentum. 00544 // 00545 00546 HepMatrix dMDA(3,5,0); 00547 00548 const double & phi0 = m_ac[1]; 00549 const double & cpa = m_ac[2]; 00550 const double & tnl = m_ac[4]; 00551 00552 double cosf0phi = cos(phi0+phi); 00553 double sinf0phi = sin(phi0+phi); 00554 00555 double rho; 00556 if(cpa != 0.)rho = 1./cpa; 00557 else rho = (DBL_MAX); 00558 00559 double charge = 1.; 00560 if(cpa < 0.)charge = -1.; 00561 00562 dMDA[0][1] = -fabs(rho)*cosf0phi; 00563 dMDA[0][2] = charge*rho*rho*sinf0phi; 00564 00565 dMDA[1][1] = -fabs(rho)*sinf0phi; 00566 dMDA[1][2] = -charge*rho*rho*cosf0phi; 00567 00568 dMDA[2][2] = -charge*rho*rho*tnl; 00569 dMDA[2][4] = fabs(rho); 00570 00571 return dMDA; 00572 }
|
|
|
|
00485 { 00486 // 00487 // Calculate Jacobian (@x/@a) 00488 // Vector a is helix parameters and phi is internal parameter 00489 // which specifys the point to be calculated for Ex(phi). 00490 // 00491 00492 HepMatrix dXDA(3,5,0); 00493 00494 const double & dr = m_ac[0]; 00495 const double & phi0 = m_ac[1]; 00496 const double & cpa = m_ac[2]; 00497 const double & dz = m_ac[3]; 00498 const double & tnl = m_ac[4]; 00499 00500 double cosf0phi = cos(phi0 + phi); 00501 double sinf0phi = sin(phi0 + phi); 00502 00503 dXDA[0][0] = m_cp; 00504 dXDA[0][1] = - dr * m_sp + m_r * (- m_sp + sinf0phi); 00505 if(cpa!=0.0) { 00506 dXDA[0][2] = - (m_r / cpa) * (m_cp - cosf0phi); 00507 } else { 00508 dXDA[0][2] = (DBL_MAX); 00509 } 00510 // dXDA[0][3] = 0.0; 00511 // dXDA[0][4] = 0.0; 00512 00513 dXDA[1][0] = m_sp; 00514 dXDA[1][1] = dr * m_cp + m_r * (m_cp - cosf0phi); 00515 if(cpa!=0.0) { 00516 dXDA[1][2] = - (m_r / cpa) * (m_sp - sinf0phi); 00517 } else { 00518 dXDA[1][2] = (DBL_MAX); 00519 } 00520 // dXDA[1][3] = 0.0; 00521 // dXDA[1][4] = 0.0; 00522 00523 // dXDA[2][0] = 0.0; 00524 // dXDA[2][1] = 0.0; 00525 if(cpa!=0.0) { 00526 dXDA[2][2] = (m_r / cpa) * tnl * phi; 00527 } else { 00528 dXDA[2][2] = (DBL_MAX); 00529 } 00530 dXDA[2][3] = 1.0; 00531 dXDA[2][4] = - m_r * phi; 00532 00533 return dXDA; 00534 }
|
|
returns direction vector after rotating angle dPhi in phi direction.
|
|
returns direction vector after rotating angle dPhi in phi direction.
00199 { 00200 return momentum(phi).unit(); 00201 }
|
|
returns an element of parameters.
|
|
returns an element of parameters.
00205 { 00206 return m_ac[0]; 00207 }
|
|
|
|
00223 { 00224 return m_ac[3]; 00225 }
|
|
sets helix paramters and error matrix.
|
|
returns error matrix.
|
|
sets helix paramters and error matrix.
00261 { 00262 return m_Ea = i; 00263 }
|
|
returns error matrix.
00247 {
00248 return m_Ea;
00249 }
|
|
unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
|
|
unsets error matrix. Error calculations will be ignored after this function call until an error matrix be set again. 0 matrix will be return as a return value for error matrix when you call functions which returns an error matrix.
00693 { 00694 m_matrixValid = false; 00695 m_Ea *= 0.; 00696 }
|
|
|
|
00217 { 00218 return m_ac[2]; 00219 }
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
|
|
returns momentum vector after rotating angle dPhi in phi direction.
|
|
returns momentum vector after rotating angle dPhi in phi direction.
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
00257 { 00258 // 00259 // Calculate momentum. 00260 // 00261 // Pt = | 1/kappa | (GeV/c) 00262 // 00263 // Px = -Pt * sin(phi0 + phi) 00264 // Py = Pt * cos(phi0 + phi) 00265 // Pz = Pt * tan(lambda) 00266 // 00267 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass ) 00268 00269 double pt = fabs(m_pt); 00270 double px = - pt * sin(m_ac[1] + phi); 00271 double py = pt * cos(m_ac[1] + phi); 00272 double pz = pt * m_ac[4]; 00273 double E = sqrt(pt * pt * (1. + m_ac[4] * m_ac[4]) + mass * mass); 00274 00275 x.setX(m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi))); 00276 x.setY(m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi))); 00277 x.setZ(m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi); 00278 00279 if (m_matrixValid) Emx = m_Ea.similarity(del4MXDelA(phi,mass)); 00280 else Emx = m_Ea; 00281 00282 return HepLorentzVector(px, py, pz, E); 00283 }
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
00229 { 00230 // 00231 // Calculate momentum. 00232 // 00233 // Pt = | 1/kappa | (GeV/c) 00234 // 00235 // Px = -Pt * sin(phi0 + phi) 00236 // Py = Pt * cos(phi0 + phi) 00237 // Pz = Pt * tan(lambda) 00238 // 00239 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass ) 00240 00241 double pt = fabs(m_pt); 00242 double px = - pt * sin(m_ac[1] + phi); 00243 double py = pt * cos(m_ac[1] + phi); 00244 double pz = pt * m_ac[4]; 00245 double E = sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass); 00246 00247 if (m_matrixValid) Em = m_Ea.similarity(del4MDelA(phi,mass)); 00248 else Em = m_Ea; 00249 00250 return HepLorentzVector(px, py, pz, E); 00251 }
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
00206 { 00207 // 00208 // Calculate momentum. 00209 // 00210 // Pt = | 1/kappa | (GeV/c) 00211 // 00212 // Px = -Pt * sin(phi0 + phi) 00213 // Py = Pt * cos(phi0 + phi) 00214 // Pz = Pt * tan(lambda) 00215 // 00216 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass ) 00217 00218 double pt = fabs(m_pt); 00219 double px = - pt * sin(m_ac[1] + phi); 00220 double py = pt * cos(m_ac[1] + phi); 00221 double pz = pt * m_ac[4]; 00222 double E = sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass); 00223 00224 return HepLorentzVector(px, py, pz, E); 00225 }
|
|
returns momentum vector after rotating angle dPhi in phi direction.
00183 { 00184 // 00185 // Calculate momentum. 00186 // 00187 // Pt = | 1/kappa | (GeV/c) 00188 // 00189 // Px = -Pt * sin(phi0 + phi) 00190 // Py = Pt * cos(phi0 + phi) 00191 // Pz = Pt * tan(lambda) 00192 // 00193 00194 double pt = fabs(m_pt); 00195 double px = - pt * sin(m_ac[1] + phi); 00196 double py = pt * cos(m_ac[1] + phi); 00197 double pz = pt * m_ac[4]; 00198 00199 if (m_matrixValid) Em = m_Ea.similarity(delMDelA(phi)); 00200 else Em = m_Ea; 00201 00202 return Hep3Vector(px, py, pz); 00203 }
|
|
returns momentum vector after rotating angle dPhi in phi direction.
00163 { 00164 // 00165 // Calculate momentum. 00166 // 00167 // Pt = | 1/kappa | (GeV/c) 00168 // 00169 // Px = -Pt * sin(phi0 + phi) 00170 // Py = Pt * cos(phi0 + phi) 00171 // Pz = Pt * tan(lambda) 00172 // 00173 00174 double pt = fabs(m_pt); 00175 double px = - pt * sin(m_ac[1] + phi); 00176 double py = pt * cos(m_ac[1] + phi); 00177 double pz = pt * m_ac[4]; 00178 00179 return Hep3Vector(px, py, pz); 00180 }
|
|
Copy operator.
|
|
Copy operator.
00359 { 00360 if (this == & i) return * this; 00361 00362 m_bField = i.m_bField; 00363 m_alpha = i.m_alpha; 00364 m_pivot = i.m_pivot; 00365 m_a = i.m_a; 00366 m_Ea = i.m_Ea; 00367 m_matrixValid = i.m_matrixValid; 00368 00369 m_center = i.m_center; 00370 m_cp = i.m_cp; 00371 m_sp = i.m_sp; 00372 m_pt = i.m_pt; 00373 m_r = i.m_r; 00374 m_ac[0] = i.m_ac[0]; 00375 m_ac[1] = i.m_ac[1]; 00376 m_ac[2] = i.m_ac[2]; 00377 m_ac[3] = i.m_ac[3]; 00378 m_ac[4] = i.m_ac[4]; 00379 00380 return * this; 00381 }
|
|
|
|
00211 { 00212 return m_ac[1]; 00213 }
|
|
sets pivot position.
|
|
returns pivot position.
|
|
sets pivot position.
00287 { 00288 const double & dr = m_ac[0]; 00289 const double & phi0 = m_ac[1]; 00290 const double & kappa = m_ac[2]; 00291 const double & dz = m_ac[3]; 00292 const double & tanl = m_ac[4]; 00293 00294 double rdr = dr + m_r; 00295 double phi = fmod(phi0 + M_PI4, M_PI2); 00296 double csf0 = cos(phi); 00297 double snf0 = (1. - csf0) * (1. + csf0); 00298 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.); 00299 if(phi > M_PI) snf0 = - snf0; 00300 00301 double xc = m_pivot.x() + rdr * csf0; 00302 double yc = m_pivot.y() + rdr * snf0; 00303 double csf, snf; 00304 if(m_r != 0.0) { 00305 csf = (xc - newPivot.x()) / m_r; 00306 snf = (yc - newPivot.y()) / m_r; 00307 double anrm = sqrt(csf * csf + snf * snf); 00308 if(anrm != 0.0) { 00309 csf /= anrm; 00310 snf /= anrm; 00311 phi = atan2(snf, csf); 00312 } else { 00313 csf = 1.0; 00314 snf = 0.0; 00315 phi = 0.0; 00316 } 00317 } else { 00318 csf = 1.0; 00319 snf = 0.0; 00320 phi = 0.0; 00321 } 00322 double phid = fmod(phi - phi0 + M_PI8, M_PI2); 00323 if(phid > M_PI) phid = phid - M_PI2; 00324 double drp = (m_pivot.x() + dr * csf0 + m_r * (csf0 - csf) - newPivot.x()) 00325 * csf 00326 + (m_pivot.y() + dr * snf0 + m_r * (snf0 - snf) - newPivot.y()) * snf; 00327 double dzp = m_pivot.z() + dz - m_r * tanl * phid - newPivot.z(); 00328 00329 HepVector ap(5); 00330 ap[0] = drp; 00331 ap[1] = fmod(phi + M_PI4, M_PI2); 00332 ap[2] = kappa; 00333 ap[3] = dzp; 00334 ap[4] = tanl; 00335 00336 // if (m_matrixValid) m_Ea.assign(delApDelA(ap) * m_Ea * delApDelA(ap).T()); 00337 if (m_matrixValid) m_Ea = m_Ea.similarity(delApDelA(ap)); 00338 00339 m_a = ap; 00340 m_pivot = newPivot; 00341 00342 //...Are these needed?...iw... 00343 updateCache(); 00344 return m_pivot; 00345 }
|
|
returns pivot position.
00187 {
00188 return m_pivot;
00189 }
|
|
returns radious of helix.
|
|
returns radious of helix.
00193 {
00194 return m_r;
00195 }
|
|
sets helix pivot position, parameters, and error matrix.
|
|
sets helix pivot position, parameters, and error matrix.
00350 { 00351 m_pivot = pivot; 00352 m_a = a; 00353 m_Ea = Ea; 00354 m_matrixValid = true; 00355 updateCache(); 00356 }
|
|
|
|
00282 {
00283 return m_sp;
00284 }
|
|
|
|
00229 { 00230 return m_ac[4]; 00231 }
|
|
|
|
00384 { 00385 // 00386 // Calculate VFHelix center( xc, yc ). 00387 // 00388 // xc = x0 + (dr + (alpha / kappa)) * cos(phi0) (cm) 00389 // yc = y0 + (dr + (alpha / kappa)) * sin(phi0) (cm) 00390 // 00391 00392 m_ac[0] = m_a[0]; 00393 m_ac[1] = m_a[1]; 00394 m_ac[2] = m_a[2]; 00395 m_ac[3] = m_a[3]; 00396 m_ac[4] = m_a[4]; 00397 00398 m_cp = cos(m_ac[1]); 00399 m_sp = sin(m_ac[1]); 00400 if (m_ac[2] != 0.0) { 00401 m_pt = 1. / m_ac[2]; 00402 m_r = m_alpha / m_ac[2]; 00403 } 00404 else { 00405 m_pt = (DBL_MAX); 00406 m_r = (DBL_MAX); 00407 } 00408 00409 double x = m_pivot.x() + (m_ac[0] + m_r) * m_cp; 00410 double y = m_pivot.y() + (m_ac[0] + m_r) * m_sp; 00411 m_center.setX(x); 00412 m_center.setY(y); 00413 m_center.setZ(0.); 00414 }
|
|
returns position and convariance matrix(Ex) after rotation.
|
|
|
|
returns position after rotating angle dPhi in phi direction.
|
|
returns position and convariance matrix(Ex) after rotation.
00142 { 00143 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi)); 00144 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi)); 00145 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi; 00146 00147 // 00148 // Calculate position error matrix. 00149 // Ex(phi) = (@x/@a)(Ea)(@x/@a)^T, phi is deflection angle to specify the 00150 // point to be calcualted. 00151 // 00152 // HepMatrix dXDA(3, 5, 0); 00153 // dXDA = delXDelA(phi); 00154 // Ex.assign(dXDA * m_Ea * dXDA.T()); 00155 00156 if (m_matrixValid) Ex = m_Ea.similarity(delXDelA(phi)); 00157 else Ex = m_Ea; 00158 00159 return HepPoint3D(x, y, z); 00160 }
|
|
00125 { 00126 // 00127 // Calculate position (x,y,z) along helix. 00128 // 00129 // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi)) 00130 // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi)) 00131 // z = z0 + dz - (alpha / kappa) * tan(lambda) * phi 00132 // 00133 00134 p[0] = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi)); 00135 p[1] = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi)); 00136 p[2] = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi; 00137 00138 return p; 00139 }
|
|
returns position after rotating angle dPhi in phi direction.
00108 { 00109 // 00110 // Calculate position (x,y,z) along helix. 00111 // 00112 // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi)) 00113 // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi)) 00114 // z = z0 + dz - (alpha / kappa) * tan(lambda) * phi 00115 // 00116 00117 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi)); 00118 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi)); 00119 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi; 00120 00121 return HepPoint3D(x, y, z); 00122 }
|
|
Constant alpha for uniform field.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|