#include <Dedx_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 |
Dedx_Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge) | |
Constructor with position, momentum, and charge. | |
Dedx_Helix (const HepPoint3D &pivot, const HepVector &a) | |
Constructor without error matrix. | |
Dedx_Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea) | |
Constructor with pivot, helix parameter a, and its error matrix. | |
Dedx_Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge) | |
Constructor with position, momentum, and charge. | |
Dedx_Helix (const HepPoint3D &pivot, const HepVector &a) | |
Constructor without error matrix. | |
Dedx_Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea) | |
Constructor with pivot, helix parameter a, and its error matrix. | |
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. | |
Dedx_Helix & | operator= (const Dedx_Helix &) |
Copy operator. | |
Dedx_Helix & | operator= (const Dedx_Helix &) |
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 |
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 | ~Dedx_Helix () |
Destructor. | |
virtual | ~Dedx_Helix () |
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 |
IMagneticFieldSvc * | m_pmgnIMF |
IMagneticFieldSvc * | m_pmgnIMF |
double | m_pt |
double | m_r |
double | m_sp |
|
Constructor with pivot, helix parameter a, and its error matrix.
00122 : //m_bField(10.0), 00123 //m_alpha(333.564095), 00124 m_pivot(pivot), 00125 m_a(a), 00126 m_matrixValid(true), 00127 m_Ea(Ea) { 00128 //ISvcLocator * SvcLocator = Gaudi::SvcLocator(); 00129 StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF); 00130 if(scmgn!=StatusCode::SUCCESS) { 00131 // log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq; 00132 std::cout<< "Unable to open Magnetic field service"<<std::endl; 00133 } 00134 m_bField = 10000*(m_pmgnIMF->getReferField()); 00135 m_alpha = 10000. / 2.99792458 / m_bField; 00136 // m_alpha = 222.376063; 00137 updateCache(); 00138 }
|
|
Constructor without error matrix.
00142 : //m_bField(10.0), 00143 //m_alpha(333.564095), 00144 m_pivot(pivot), 00145 m_a(a), 00146 m_matrixValid(false), 00147 m_Ea(HepSymMatrix(5,0)) { 00148 StatusCode scmgn = Gaudi::svcLocator()->service ("MagneticFieldSvc",m_pmgnIMF); 00149 if(scmgn!=StatusCode::SUCCESS) { 00150 // log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq; 00151 std::cout<< "Unable to open Magnetic field service"<<std::endl; 00152 } 00153 m_bField = 10000*(m_pmgnIMF->getReferField()); 00154 m_alpha = 10000. / 2.99792458 / m_bField; 00155 //cout<<"m_bField is = "<<m_bField<<" m_alpha is = "<<m_alpha<<endl; 00156 // m_alpha = 222.376063; 00157 updateCache(); 00158 }
|
|
Constructor with position, momentum, and charge.
00163 : //m_bField(10.0), 00164 //m_alpha(333.564095), 00165 m_pivot(position), 00166 m_a(HepVector(5,0)), 00167 m_matrixValid(false), 00168 m_Ea(HepSymMatrix(5,0)) { 00169 StatusCode scmgn = Gaudi::svcLocator()->service ("MagneticFieldSvc",m_pmgnIMF); 00170 if(scmgn!=StatusCode::SUCCESS) { 00171 // log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq; 00172 std::cout<< "Unable to open Magnetic field service"<<std::endl; 00173 } 00174 m_bField = 10000*(m_pmgnIMF->getReferField()); 00175 m_alpha = 10000. / 2.99792458 / m_bField; 00176 00177 m_a[0] = 0.; 00178 m_a[1] = fmod(atan2(- momentum.x(), momentum.y()) 00179 + M_PI4, M_PI2); 00180 m_a[3] = 0.; 00181 double perp(momentum.perp()); 00182 if (perp != 0.0) { 00183 m_a[2] = charge / perp; 00184 m_a[4] = momentum.z() / perp; 00185 } 00186 else { 00187 m_a[2] = charge * (DBL_MAX); 00188 if (momentum.z() >= 0) { 00189 m_a[4] = (DBL_MAX); 00190 } else { 00191 m_a[4] = -(DBL_MAX); 00192 } 00193 } 00194 // m_alpha = 222.376063; 00195 updateCache(); 00196 }
|
|
Destructor.
00198 { 00199 }
|
|
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.
00250 { 00251 m_a = i; 00252 updateCache(); 00253 return m_a; 00254 }
|
|
returns helix parameters.
00238 {
00239 return m_a;
00240 }
|
|
|
|
sets/returns z componet of the magnetic field.
|
|
00273 {
00274 return m_bField;
00275 }
|
|
sets/returns z componet of the magnetic field.
00264 { 00265 m_bField = a; 00266 m_alpha = 10000. / 2.99792458 / m_bField; 00267 updateCache(); 00268 return m_bField; 00269 }
|
|
returns position of helix center(z = 0.);
|
|
returns position of helix center(z = 0.);
00178 {
00179 return m_center;
00180 }
|
|
|
|
00285 {
00286 return m_cp;
00287 }
|
|
|
|
00232 {
00233 return m_r;
00234 }
|
|
|
|
00674 { 00675 // 00676 // Calculate Jacobian (@4m/@a) 00677 // Vector a is helix parameters and phi is internal parameter. 00678 // Vector 4m is 4 momentum. 00679 // 00680 00681 HepMatrix d4MDA(4,5,0); 00682 00683 double phi0 = m_ac[1]; 00684 double cpa = m_ac[2]; 00685 double tnl = m_ac[4]; 00686 00687 double cosf0phi = cos(phi0+phi); 00688 double sinf0phi = sin(phi0+phi); 00689 00690 double rho; 00691 if(cpa != 0.)rho = 1./cpa; 00692 else rho = (DBL_MAX); 00693 00694 double charge = 1.; 00695 if(cpa < 0.)charge = -1.; 00696 00697 double E = sqrt(rho*rho*(1.+tnl*tnl)+mass*mass); 00698 00699 d4MDA[0][1] = -fabs(rho)*cosf0phi; 00700 d4MDA[0][2] = charge*rho*rho*sinf0phi; 00701 00702 d4MDA[1][1] = -fabs(rho)*sinf0phi; 00703 d4MDA[1][2] = -charge*rho*rho*cosf0phi; 00704 00705 d4MDA[2][2] = -charge*rho*rho*tnl; 00706 d4MDA[2][4] = fabs(rho); 00707 00708 if (cpa != 0.0 && E != 0.0) { 00709 d4MDA[3][2] = (-1.-tnl*tnl)/(cpa*cpa*cpa*E); 00710 d4MDA[3][4] = tnl/(cpa*cpa*E); 00711 } else { 00712 d4MDA[3][2] = (DBL_MAX); 00713 d4MDA[3][4] = (DBL_MAX); 00714 } 00715 return d4MDA; 00716 }
|
|
|
|
00720 { 00721 // 00722 // Calculate Jacobian (@4mx/@a) 00723 // Vector a is helix parameters and phi is internal parameter. 00724 // Vector 4xm is 4 momentum and position. 00725 // 00726 00727 HepMatrix d4MXDA(7,5,0); 00728 00729 const double & dr = m_ac[0]; 00730 const double & phi0 = m_ac[1]; 00731 const double & cpa = m_ac[2]; 00732 const double & dz = m_ac[3]; 00733 const double & tnl = m_ac[4]; 00734 00735 double cosf0phi = cos(phi0+phi); 00736 double sinf0phi = sin(phi0+phi); 00737 00738 double rho; 00739 if(cpa != 0.)rho = 1./cpa; 00740 else rho = (DBL_MAX); 00741 00742 double charge = 1.; 00743 if(cpa < 0.)charge = -1.; 00744 00745 double E = sqrt(rho * rho * (1. + tnl * tnl) + mass * mass); 00746 00747 d4MXDA[0][1] = - fabs(rho) * cosf0phi; 00748 d4MXDA[0][2] = charge * rho * rho * sinf0phi; 00749 00750 d4MXDA[1][1] = - fabs(rho) * sinf0phi; 00751 d4MXDA[1][2] = - charge * rho * rho * cosf0phi; 00752 00753 d4MXDA[2][2] = - charge * rho * rho * tnl; 00754 d4MXDA[2][4] = fabs(rho); 00755 00756 if (cpa != 0.0 && E != 0.0) { 00757 d4MXDA[3][2] = (- 1. - tnl * tnl) / (cpa * cpa * cpa * E); 00758 d4MXDA[3][4] = tnl / (cpa * cpa * E); 00759 } else { 00760 d4MXDA[3][2] = (DBL_MAX); 00761 d4MXDA[3][4] = (DBL_MAX); 00762 } 00763 00764 d4MXDA[4][0] = m_cp; 00765 d4MXDA[4][1] = - dr * m_sp + m_r * (- m_sp + sinf0phi); 00766 if (cpa != 0.0) { 00767 d4MXDA[4][2] = - (m_r / cpa) * (m_cp - cosf0phi); 00768 } else { 00769 d4MXDA[4][2] = (DBL_MAX); 00770 } 00771 00772 d4MXDA[5][0] = m_sp; 00773 d4MXDA[5][1] = dr * m_cp + m_r * (m_cp - cosf0phi); 00774 if (cpa != 0.0) { 00775 d4MXDA[5][2] = - (m_r / cpa) * (m_sp - sinf0phi); 00776 00777 d4MXDA[6][2] = (m_r / cpa) * tnl * phi; 00778 } else { 00779 d4MXDA[5][2] = (DBL_MAX); 00780 00781 d4MXDA[6][2] = (DBL_MAX); 00782 } 00783 00784 d4MXDA[6][3] = 1.; 00785 d4MXDA[6][4] = - m_r * phi; 00786 00787 return d4MXDA; 00788 }
|
|
|
|
00515 { 00516 // 00517 // Calculate Jacobian (@ap/@a) 00518 // Vector ap is new helix parameters and a is old helix parameters. 00519 // 00520 00521 HepMatrix dApDA(5,5,0); 00522 00523 const double & dr = m_ac[0]; 00524 const double & phi0 = m_ac[1]; 00525 const double & cpa = m_ac[2]; 00526 const double & dz = m_ac[3]; 00527 const double & tnl = m_ac[4]; 00528 00529 double drp = ap[0]; 00530 double phi0p = ap[1]; 00531 double cpap = ap[2]; 00532 double dzp = ap[3]; 00533 double tnlp = ap[4]; 00534 00535 double rdr = m_r + dr; 00536 double rdrpr; 00537 if ((m_r + drp) != 0.0) { 00538 rdrpr = 1. / (m_r + drp); 00539 } else { 00540 rdrpr = (DBL_MAX); 00541 } 00542 // double csfd = cos(phi0)*cos(phi0p) + sin(phi0)*sin(phi0p); 00543 // double snfd = cos(phi0)*sin(phi0p) - sin(phi0)*cos(phi0p); 00544 double csfd = cos(phi0p - phi0); 00545 double snfd = sin(phi0p - phi0); 00546 double phid = fmod(phi0p - phi0 + M_PI8, M_PI2); 00547 if (phid > M_PI) phid = phid - M_PI2; 00548 00549 dApDA[0][0] = csfd; 00550 dApDA[0][1] = rdr*snfd; 00551 if(cpa!=0.0) { 00552 dApDA[0][2] = (m_r/cpa)*( 1.0 - csfd ); 00553 } else { 00554 dApDA[0][2] = (DBL_MAX); 00555 } 00556 00557 dApDA[1][0] = - rdrpr*snfd; 00558 dApDA[1][1] = rdr*rdrpr*csfd; 00559 if(cpa!=0.0) { 00560 dApDA[1][2] = (m_r/cpa)*rdrpr*snfd; 00561 } else { 00562 dApDA[1][2] = (DBL_MAX); 00563 } 00564 00565 dApDA[2][2] = 1.0; 00566 00567 dApDA[3][0] = m_r*rdrpr*tnl*snfd; 00568 dApDA[3][1] = m_r*tnl*(1.0 - rdr*rdrpr*csfd); 00569 if(cpa!=0.0) { 00570 dApDA[3][2] = (m_r/cpa)*tnl*(phid - m_r*rdrpr*snfd); 00571 } else { 00572 dApDA[3][2] = (DBL_MAX); 00573 } 00574 dApDA[3][3] = 1.0; 00575 dApDA[3][4] = - m_r*phid; 00576 00577 dApDA[4][4] = 1.0; 00578 00579 return dApDA; 00580 }
|
|
|
|
00637 { 00638 // 00639 // Calculate Jacobian (@m/@a) 00640 // Vector a is helix parameters and phi is internal parameter. 00641 // Vector m is momentum. 00642 // 00643 00644 HepMatrix dMDA(3,5,0); 00645 00646 const double & phi0 = m_ac[1]; 00647 const double & cpa = m_ac[2]; 00648 const double & tnl = m_ac[4]; 00649 00650 double cosf0phi = cos(phi0+phi); 00651 double sinf0phi = sin(phi0+phi); 00652 00653 double rho; 00654 if(cpa != 0.)rho = 1./cpa; 00655 else rho = (DBL_MAX); 00656 00657 double charge = 1.; 00658 if(cpa < 0.)charge = -1.; 00659 00660 dMDA[0][1] = -fabs(rho)*cosf0phi; 00661 dMDA[0][2] = charge*rho*rho*sinf0phi; 00662 00663 dMDA[1][1] = -fabs(rho)*sinf0phi; 00664 dMDA[1][2] = -charge*rho*rho*cosf0phi; 00665 00666 dMDA[2][2] = -charge*rho*rho*tnl; 00667 dMDA[2][4] = fabs(rho); 00668 00669 return dMDA; 00670 }
|
|
|
|
00583 { 00584 // 00585 // Calculate Jacobian (@x/@a) 00586 // Vector a is helix parameters and phi is internal parameter 00587 // which specifys the point to be calculated for Ex(phi). 00588 // 00589 00590 HepMatrix dXDA(3,5,0); 00591 00592 const double & dr = m_ac[0]; 00593 const double & phi0 = m_ac[1]; 00594 const double & cpa = m_ac[2]; 00595 const double & dz = m_ac[3]; 00596 const double & tnl = m_ac[4]; 00597 00598 double cosf0phi = cos(phi0 + phi); 00599 double sinf0phi = sin(phi0 + phi); 00600 00601 dXDA[0][0] = m_cp; 00602 dXDA[0][1] = - dr * m_sp + m_r * (- m_sp + sinf0phi); 00603 if(cpa!=0.0) { 00604 dXDA[0][2] = - (m_r / cpa) * (m_cp - cosf0phi); 00605 } else { 00606 dXDA[0][2] = (DBL_MAX); 00607 } 00608 // dXDA[0][3] = 0.0; 00609 // dXDA[0][4] = 0.0; 00610 00611 dXDA[1][0] = m_sp; 00612 dXDA[1][1] = dr * m_cp + m_r * (m_cp - cosf0phi); 00613 if(cpa!=0.0) { 00614 dXDA[1][2] = - (m_r / cpa) * (m_sp - sinf0phi); 00615 } else { 00616 dXDA[1][2] = (DBL_MAX); 00617 } 00618 // dXDA[1][3] = 0.0; 00619 // dXDA[1][4] = 0.0; 00620 00621 // dXDA[2][0] = 0.0; 00622 // dXDA[2][1] = 0.0; 00623 if(cpa!=0.0) { 00624 dXDA[2][2] = (m_r / cpa) * tnl * phi; 00625 } else { 00626 dXDA[2][2] = (DBL_MAX); 00627 } 00628 dXDA[2][3] = 1.0; 00629 dXDA[2][4] = - m_r * phi; 00630 00631 return dXDA; 00632 }
|
|
returns direction vector after rotating angle dPhi in phi direction.
|
|
returns direction vector after rotating angle dPhi in phi direction.
00196 { 00197 return momentum(phi).unit(); 00198 }
|
|
returns an element of parameters.
|
|
returns an element of parameters.
00202 { 00203 return m_ac[0]; 00204 }
|
|
|
|
00220 { 00221 return m_ac[3]; 00222 }
|
|
sets helix paramters and error matrix.
|
|
returns error matrix.
|
|
sets helix paramters and error matrix.
00258 { 00259 return m_Ea = i; 00260 }
|
|
returns error matrix.
00244 {
00245 return m_Ea;
00246 }
|
|
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.
00791 { 00792 m_matrixValid = false; 00793 m_Ea *= 0.; 00794 }
|
|
|
|
00214 { 00215 return m_ac[2]; 00216 }
|
|
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.
00355 { 00356 // 00357 // Calculate momentum. 00358 // 00359 // Pt = | 1/kappa | (GeV/c) 00360 // 00361 // Px = -Pt * sin(phi0 + phi) 00362 // Py = Pt * cos(phi0 + phi) 00363 // Pz = Pt * tan(lambda) 00364 // 00365 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass ) 00366 00367 double pt = fabs(m_pt); 00368 double px = - pt * sin(m_ac[1] + phi); 00369 double py = pt * cos(m_ac[1] + phi); 00370 double pz = pt * m_ac[4]; 00371 double E = sqrt(pt * pt * (1. + m_ac[4] * m_ac[4]) + mass * mass); 00372 00373 x.setX(m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi))); 00374 x.setY(m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi))); 00375 x.setZ(m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi); 00376 00377 if (m_matrixValid) Emx = m_Ea.similarity(del4MXDelA(phi,mass)); 00378 else Emx = m_Ea; 00379 00380 return HepLorentzVector(px, py, pz, E); 00381 }
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
00327 { 00328 // 00329 // Calculate momentum. 00330 // 00331 // Pt = | 1/kappa | (GeV/c) 00332 // 00333 // Px = -Pt * sin(phi0 + phi) 00334 // Py = Pt * cos(phi0 + phi) 00335 // Pz = Pt * tan(lambda) 00336 // 00337 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass ) 00338 00339 double pt = fabs(m_pt); 00340 double px = - pt * sin(m_ac[1] + phi); 00341 double py = pt * cos(m_ac[1] + phi); 00342 double pz = pt * m_ac[4]; 00343 double E = sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass); 00344 00345 if (m_matrixValid) Em = m_Ea.similarity(del4MDelA(phi,mass)); 00346 else Em = m_Ea; 00347 00348 return HepLorentzVector(px, py, pz, E); 00349 }
|
|
returns 4momentum vector after rotating angle dPhi in phi direction.
00304 { 00305 // 00306 // Calculate momentum. 00307 // 00308 // Pt = | 1/kappa | (GeV/c) 00309 // 00310 // Px = -Pt * sin(phi0 + phi) 00311 // Py = Pt * cos(phi0 + phi) 00312 // Pz = Pt * tan(lambda) 00313 // 00314 // E = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass ) 00315 00316 double pt = fabs(m_pt); 00317 double px = - pt * sin(m_ac[1] + phi); 00318 double py = pt * cos(m_ac[1] + phi); 00319 double pz = pt * m_ac[4]; 00320 double E = sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass); 00321 00322 return HepLorentzVector(px, py, pz, E); 00323 }
|
|
returns momentum vector after rotating angle dPhi in phi direction.
00281 { 00282 // 00283 // Calculate momentum. 00284 // 00285 // Pt = | 1/kappa | (GeV/c) 00286 // 00287 // Px = -Pt * sin(phi0 + phi) 00288 // Py = Pt * cos(phi0 + phi) 00289 // Pz = Pt * tan(lambda) 00290 // 00291 00292 double pt = fabs(m_pt); 00293 double px = - pt * sin(m_ac[1] + phi); 00294 double py = pt * cos(m_ac[1] + phi); 00295 double pz = pt * m_ac[4]; 00296 00297 if (m_matrixValid) Em = m_Ea.similarity(delMDelA(phi)); 00298 else Em = m_Ea; 00299 00300 return Hep3Vector(px, py, pz); 00301 }
|
|
returns momentum vector after rotating angle dPhi in phi direction.
00261 { 00262 // 00263 // Calculate momentum. 00264 // 00265 // Pt = | 1/kappa | (GeV/c) 00266 // 00267 // Px = -Pt * sin(phi0 + phi) 00268 // Py = Pt * cos(phi0 + phi) 00269 // Pz = Pt * tan(lambda) 00270 // 00271 00272 double pt = fabs(m_pt); 00273 double px = - pt * sin(m_ac[1] + phi); 00274 double py = pt * cos(m_ac[1] + phi); 00275 double pz = pt * m_ac[4]; 00276 00277 return Hep3Vector(px, py, pz); 00278 }
|
|
Copy operator.
|
|
Copy operator.
00457 { 00458 if (this == & i) return * this; 00459 00460 m_bField = i.m_bField; 00461 m_alpha = i.m_alpha; 00462 m_pivot = i.m_pivot; 00463 m_a = i.m_a; 00464 m_Ea = i.m_Ea; 00465 m_matrixValid = i.m_matrixValid; 00466 00467 m_center = i.m_center; 00468 m_cp = i.m_cp; 00469 m_sp = i.m_sp; 00470 m_pt = i.m_pt; 00471 m_r = i.m_r; 00472 m_ac[0] = i.m_ac[0]; 00473 m_ac[1] = i.m_ac[1]; 00474 m_ac[2] = i.m_ac[2]; 00475 m_ac[3] = i.m_ac[3]; 00476 m_ac[4] = i.m_ac[4]; 00477 00478 return * this; 00479 }
|
|
|
|
00208 { 00209 return m_ac[1]; 00210 }
|
|
sets pivot position.
|
|
returns pivot position.
|
|
sets pivot position.
00385 { 00386 const double & dr = m_ac[0]; 00387 const double & phi0 = m_ac[1]; 00388 const double & kappa = m_ac[2]; 00389 const double & dz = m_ac[3]; 00390 const double & tanl = m_ac[4]; 00391 00392 double rdr = dr + m_r; 00393 double phi = fmod(phi0 + M_PI4, M_PI2); 00394 double csf0 = cos(phi); 00395 double snf0 = (1. - csf0) * (1. + csf0); 00396 snf0 = sqrt((snf0 > 0.) ? snf0 : 0.); 00397 if(phi > M_PI) snf0 = - snf0; 00398 00399 double xc = m_pivot.x() + rdr * csf0; 00400 double yc = m_pivot.y() + rdr * snf0; 00401 double csf, snf; 00402 if(m_r != 0.0) { 00403 csf = (xc - newPivot.x()) / m_r; 00404 snf = (yc - newPivot.y()) / m_r; 00405 double anrm = sqrt(csf * csf + snf * snf); 00406 if(anrm != 0.0) { 00407 csf /= anrm; 00408 snf /= anrm; 00409 phi = atan2(snf, csf); 00410 } else { 00411 csf = 1.0; 00412 snf = 0.0; 00413 phi = 0.0; 00414 } 00415 } else { 00416 csf = 1.0; 00417 snf = 0.0; 00418 phi = 0.0; 00419 } 00420 double phid = fmod(phi - phi0 + M_PI8, M_PI2); 00421 if(phid > M_PI) phid = phid - M_PI2; 00422 double drp = (m_pivot.x() + dr * csf0 + m_r * (csf0 - csf) - newPivot.x()) 00423 * csf 00424 + (m_pivot.y() + dr * snf0 + m_r * (snf0 - snf) - newPivot.y()) * snf; 00425 double dzp = m_pivot.z() + dz - m_r * tanl * phid - newPivot.z(); 00426 00427 HepVector ap(5); 00428 ap[0] = drp; 00429 ap[1] = fmod(phi + M_PI4, M_PI2); 00430 ap[2] = kappa; 00431 ap[3] = dzp; 00432 ap[4] = tanl; 00433 00434 // if (m_matrixValid) m_Ea.assign(delApDelA(ap) * m_Ea * delApDelA(ap).T()); 00435 if (m_matrixValid) m_Ea = m_Ea.similarity(delApDelA(ap)); 00436 00437 m_a = ap; 00438 m_pivot = newPivot; 00439 00440 //...Are these needed?...iw... 00441 updateCache(); 00442 return m_pivot; 00443 }
|
|
returns pivot position.
00184 {
00185 return m_pivot;
00186 }
|
|
returns radious of helix.
|
|
returns radious of helix.
00190 {
00191 return m_r;
00192 }
|
|
sets helix pivot position, parameters, and error matrix.
|
|
sets helix pivot position, parameters, and error matrix.
00448 { 00449 m_pivot = pivot; 00450 m_a = a; 00451 m_Ea = Ea; 00452 m_matrixValid = true; 00453 updateCache(); 00454 }
|
|
|
|
00279 {
00280 return m_sp;
00281 }
|
|
|
|
00226 { 00227 return m_ac[4]; 00228 }
|
|
|
|
00482 { 00483 // 00484 // Calculate Helix center( xc, yc ). 00485 // 00486 // xc = x0 + (dr + (alpha / kappa)) * cos(phi0) (cm) 00487 // yc = y0 + (dr + (alpha / kappa)) * sin(phi0) (cm) 00488 // 00489 00490 m_ac[0] = m_a[0]; 00491 m_ac[1] = m_a[1]; 00492 m_ac[2] = m_a[2]; 00493 m_ac[3] = m_a[3]; 00494 m_ac[4] = m_a[4]; 00495 00496 m_cp = cos(m_ac[1]); 00497 m_sp = sin(m_ac[1]); 00498 if (m_ac[2] != 0.0) { 00499 m_pt = 1. / m_ac[2]; 00500 m_r = m_alpha / m_ac[2]; 00501 } 00502 else { 00503 m_pt = (DBL_MAX); 00504 m_r = (DBL_MAX); 00505 } 00506 00507 double x = m_pivot.x() + (m_ac[0] + m_r) * m_cp; 00508 double y = m_pivot.y() + (m_ac[0] + m_r) * m_sp; 00509 m_center.setX(x); 00510 m_center.setY(y); 00511 m_center.setZ(0.); 00512 }
|
|
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.
00240 { 00241 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi)); 00242 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi)); 00243 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi; 00244 00245 // 00246 // Calculate position error matrix. 00247 // Ex(phi) = (@x/@a)(Ea)(@x/@a)^T, phi is deflection angle to specify the 00248 // point to be calcualted. 00249 // 00250 // HepMatrix dXDA(3, 5, 0); 00251 // dXDA = delXDelA(phi); 00252 // Ex.assign(dXDA * m_Ea * dXDA.T()); 00253 00254 if (m_matrixValid) Ex = m_Ea.similarity(delXDelA(phi)); 00255 else Ex = m_Ea; 00256 00257 return HepPoint3D(x, y, z); 00258 }
|
|
00223 { 00224 // 00225 // Calculate position (x,y,z) along helix. 00226 // 00227 // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi)) 00228 // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi)) 00229 // z = z0 + dz - (alpha / kappa) * tan(lambda) * phi 00230 // 00231 00232 p[0] = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi)); 00233 p[1] = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi)); 00234 p[2] = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi; 00235 00236 return p; 00237 }
|
|
returns position after rotating angle dPhi in phi direction.
00202 { 00203 // 00204 // Calculate position (x,y,z) along helix. 00205 // 00206 // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi)) 00207 // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi)) 00208 // z = z0 + dz - (alpha / kappa) * tan(lambda) * phi 00209 // 00210 // m_ac[0] = m_ac[0] *(-1); 00211 // cout<<"m_bField is = "<<m_bField<<" m_alpha is = "<<m_alpha<<endl; 00212 // cout<<"m_pivot is = "<<m_pivot<<" m_ac is = ("<<m_ac[0]<<" , "<<m_ac[1]<<" , "<<m_ac[2]<<" , "<<m_ac[3]<<" , "<<m_ac[4]<<" )"<<endl; 00213 //cout<<"m_cp is = "<<m_cp<<" "<<" m_sp is = "<<m_sp<<" m_r is = "<<m_r<<endl; 00214 //cout<<" m_r + m_ac[0] = "<<m_ac[0] +m_r<<endl; 00215 double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi)); 00216 double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi)); 00217 double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi; 00218 00219 return HepPoint3D(x, y, z); 00220 }
|
|
Constant alpha for uniform field.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|