Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Helix Class Reference

Helix parameter class. More...

#include <Helix.h>

List of all members.

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 HepPoint3Dcenter (void) const
 returns position of helix center(z = 0.);
const HepPoint3Dcenter (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.
 Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 Helix (const HepPoint3D &pivot, const HepVector &a)
 Constructor without error matrix.
 Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its error matrix.
 Helix (const HepPoint3D &position, const Hep3Vector &momentum, double charge)
 Constructor with position, momentum, and charge.
 Helix (const HepPoint3D &pivot, const HepVector &a)
 Constructor without error matrix.
 Helix (const HepPoint3D &pivot, const HepVector &a, const HepSymMatrix &Ea)
 Constructor with pivot, helix parameter a, and its 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.
Helixoperator= (const Helix &)
 Copy operator.
Helixoperator= (const Helix &)
 Copy operator.
double phi0 (void) const
double phi0 (void) const
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 sets pivot position.
const HepPoint3Dpivot (void) const
 returns pivot position.
const HepPoint3Dpivot (const HepPoint3D &newPivot)
 sets pivot position.
const HepPoint3Dpivot (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 ~Helix ()
 Destructor.
virtual ~Helix ()
 Destructor.

Static Public Attributes

const double ConstantAlpha
 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
IMagneticFieldSvcm_pmgnIMF
IMagneticFieldSvcm_pmgnIMF
double m_pt
double m_r
double m_sp


Detailed Description

Helix parameter class.


Constructor & Destructor Documentation

Helix::Helix const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea
 

Constructor with pivot, helix parameter a, and its error matrix.

00051   : //m_bField(-10.0),
00052   //m_alpha(-333.564095),
00053   m_pivot(pivot),
00054   m_a(a),
00055   m_matrixValid(true),
00056   m_Ea(Ea) {
00057   StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF); 
00058   if(scmgn!=StatusCode::SUCCESS) { 
00059     std::cout<< "Unable to open Magnetic field service"<<std::endl;
00060   }
00061   m_bField = -10000*(m_pmgnIMF->getReferField());
00062   m_alpha = 10000. / 2.99792458 / m_bField;
00063   // m_alpha = 10000. / 2.99792458 / m_bField;
00064   // m_alpha = 333.564095;
00065   updateCache();
00066 }

Helix::Helix const HepPoint3D pivot,
const HepVector &  a
 

Constructor without error matrix.

00070   : //m_bField(-10.0),
00071   //m_alpha(-333.564095),
00072   m_pivot(pivot),
00073   m_a(a),
00074   m_matrixValid(false),
00075   m_Ea(HepSymMatrix(5,0)) {
00076   StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF); 
00077   if(scmgn!=StatusCode::SUCCESS) { 
00078     // log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq; 
00079     std::cout<< "Unable to open Magnetic field service"<<std::endl;
00080   }
00081   m_bField = -10000*(m_pmgnIMF->getReferField());
00082   m_alpha = 10000. / 2.99792458 / m_bField;
00083     // m_alpha = 333.564095;
00084  //cout<<"MdcFastTrakAlg:: bField,alpha: "<<m_bField<<" , "<<m_alpha<<endl;
00085     updateCache();
00086 }

Helix::Helix const HepPoint3D position,
const Hep3Vector &  momentum,
double  charge
 

Constructor with position, momentum, and charge.

00091   : //m_bField(-10.0),
00092   //m_alpha(-333.564095),
00093   m_pivot(position),
00094   m_a(HepVector(5,0)),
00095   m_matrixValid(false),
00096   m_Ea(HepSymMatrix(5,0)) {
00097   StatusCode scmgn = Gaudi::svcLocator()->service("MagneticFieldSvc",m_pmgnIMF); 
00098   if(scmgn!=StatusCode::SUCCESS) { 
00099     // log << MSG::ERROR << "Unable to open Magnetic field service"<<endreq; 
00100     std::cout<< "Unable to open Magnetic field service"<<std::endl;
00101   }
00102   m_bField = -10000*(m_pmgnIMF->getReferField());
00103   m_alpha = 10000. / 2.99792458 / m_bField;
00104   
00105   m_a[0] = 0.;
00106     m_a[1] = fmod(atan2(- momentum.x(), momentum.y())
00107                   + M_PI4, M_PI2);
00108     m_a[3] = 0.;
00109     double perp(momentum.perp());
00110     if (perp != 0.0) {
00111         m_a[2] = charge / perp;
00112         m_a[4] = momentum.z() / perp; 
00113     }
00114     else {
00115         m_a[2] = charge * (DBL_MAX);
00116         if (momentum.z() >= 0) {
00117             m_a[4] = (DBL_MAX);
00118         } else {
00119             m_a[4] = -(DBL_MAX);
00120         }
00121     }
00122     // m_alpha = 333.564095;
00123     updateCache();
00124 }

Helix::~Helix  )  [virtual]
 

Destructor.

00126               {
00127 }

Helix::Helix const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea
 

Constructor with pivot, helix parameter a, and its error matrix.

Helix::Helix const HepPoint3D pivot,
const HepVector &  a
 

Constructor without error matrix.

Helix::Helix const HepPoint3D position,
const Hep3Vector &  momentum,
double  charge
 

Constructor with position, momentum, and charge.

virtual Helix::~Helix  )  [virtual]
 

Destructor.


Member Function Documentation

const HepVector& Helix::a const HepVector &  newA  ) 
 

sets helix parameters.

const HepVector& Helix::a void   )  const
 

returns helix parameters.

const HepVector & Helix::a const HepVector &  newA  )  [inline]
 

sets helix parameters.

00270                             {
00271     m_a = i;
00272     updateCache();
00273     return m_a;
00274 }

const HepVector & Helix::a void   )  const [inline]
 

returns helix parameters.

00258                    {
00259     return m_a;
00260 }

double Helix::bFieldZ void   )  const
 

double Helix::bFieldZ double   ) 
 

sets/returns z componet of the magnetic field.

double Helix::bFieldZ void   )  const [inline]
 

00293                          {
00294     return m_bField;
00295 }

double Helix::bFieldZ double   )  [inline]
 

sets/returns z componet of the magnetic field.

00284                        {
00285     m_bField = a;
00286     m_alpha = 10000. / 2.99792458 / m_bField;
00287     updateCache();
00288     return m_bField;
00289 }

const HepPoint3D& Helix::center void   )  const
 

returns position of helix center(z = 0.);

const HepPoint3D & Helix::center void   )  const [inline]
 

returns position of helix center(z = 0.);

00198                         {
00199     return m_center;
00200 }

double Helix::cosPhi0 void   )  const
 

double Helix::cosPhi0 void   )  const [inline]
 

00305                          {
00306     return m_cp;
00307 }

double Helix::curv void   )  const
 

double Helix::curv void   )  const [inline]
 

00252                       {
00253     return m_r;
00254 }

HepMatrix Helix::del4MDelA double  phi,
double  mass
const
 

HepMatrix Helix::del4MDelA double  phi,
double  mass
const
 

00598                                               {
00599     //
00600     //   Calculate Jacobian (@4m/@a)
00601     //   Vector a  is helix parameters and phi is internal parameter.
00602     //   Vector 4m is 4 momentum.
00603     //
00604 
00605     HepMatrix d4MDA(4,5,0);
00606 
00607     double phi0 = m_ac[1];
00608     double cpa  = m_ac[2];
00609     double tnl  = m_ac[4];
00610 
00611     double cosf0phi = cos(phi0+phi);
00612     double sinf0phi = sin(phi0+phi);
00613 
00614     double rho;
00615     if(cpa != 0.)rho = 1./cpa;
00616     else rho = (DBL_MAX);
00617 
00618     double charge = 1.;
00619     if(cpa < 0.)charge = -1.;
00620 
00621     double E = sqrt(rho*rho*(1.+tnl*tnl)+mass*mass);
00622 
00623     d4MDA[0][1] = -fabs(rho)*cosf0phi;
00624     d4MDA[0][2] = charge*rho*rho*sinf0phi;
00625  
00626     d4MDA[1][1] = -fabs(rho)*sinf0phi;
00627     d4MDA[1][2] = -charge*rho*rho*cosf0phi;
00628 
00629     d4MDA[2][2] = -charge*rho*rho*tnl;
00630     d4MDA[2][4] = fabs(rho);
00631 
00632     if (cpa != 0.0 && E != 0.0) {
00633       d4MDA[3][2] = (-1.-tnl*tnl)/(cpa*cpa*cpa*E);
00634       d4MDA[3][4] = tnl/(cpa*cpa*E);
00635     } else {
00636       d4MDA[3][2] = (DBL_MAX);
00637       d4MDA[3][4] = (DBL_MAX);
00638     }
00639     return d4MDA;
00640 }

HepMatrix Helix::del4MXDelA double  phi,
double  mass
const
 

HepMatrix Helix::del4MXDelA double  phi,
double  mass
const
 

00644                                                {
00645     //
00646     //   Calculate Jacobian (@4mx/@a)
00647     //   Vector a  is helix parameters and phi is internal parameter.
00648     //   Vector 4xm is 4 momentum and position.
00649     //
00650 
00651     HepMatrix d4MXDA(7,5,0);
00652 
00653     const double & dr      = m_ac[0];
00654     const double & phi0    = m_ac[1];
00655     const double & cpa     = m_ac[2];
00656     const double & dz      = m_ac[3];
00657     const double & tnl     = m_ac[4];
00658 
00659     double cosf0phi = cos(phi0+phi);
00660     double sinf0phi = sin(phi0+phi);
00661 
00662     double rho;
00663     if(cpa != 0.)rho = 1./cpa;
00664     else rho = (DBL_MAX);
00665 
00666     double charge = 1.;
00667     if(cpa < 0.)charge = -1.;
00668 
00669     double E = sqrt(rho * rho * (1. + tnl * tnl) + mass * mass);
00670 
00671     d4MXDA[0][1] = - fabs(rho) * cosf0phi;
00672     d4MXDA[0][2] = charge * rho * rho * sinf0phi;
00673  
00674     d4MXDA[1][1] = - fabs(rho) * sinf0phi;
00675     d4MXDA[1][2] = - charge * rho * rho * cosf0phi;
00676 
00677     d4MXDA[2][2] = - charge * rho * rho * tnl;
00678     d4MXDA[2][4] = fabs(rho);
00679 
00680     if (cpa != 0.0 && E != 0.0) {
00681       d4MXDA[3][2] = (- 1. - tnl * tnl) / (cpa * cpa * cpa * E);
00682       d4MXDA[3][4] = tnl / (cpa * cpa * E);
00683     } else {
00684       d4MXDA[3][2] = (DBL_MAX);
00685       d4MXDA[3][4] = (DBL_MAX);
00686     }
00687     
00688     d4MXDA[4][0] = m_cp;
00689     d4MXDA[4][1] = - dr * m_sp + m_r * (- m_sp + sinf0phi);
00690     if (cpa != 0.0) {
00691       d4MXDA[4][2] = - (m_r / cpa) * (m_cp - cosf0phi);
00692     } else {
00693       d4MXDA[4][2] = (DBL_MAX);
00694     }
00695      
00696     d4MXDA[5][0] = m_sp;
00697     d4MXDA[5][1] = dr * m_cp + m_r * (m_cp - cosf0phi);
00698     if (cpa != 0.0) {
00699       d4MXDA[5][2] = - (m_r / cpa) * (m_sp - sinf0phi);
00700 
00701       d4MXDA[6][2] = (m_r / cpa) * tnl * phi;
00702     } else {
00703       d4MXDA[5][2] = (DBL_MAX);
00704 
00705       d4MXDA[6][2] = (DBL_MAX);
00706     }
00707 
00708     d4MXDA[6][3] = 1.;
00709     d4MXDA[6][4] = - m_r * phi;
00710 
00711     return d4MXDA;
00712 }

HepMatrix Helix::delApDelA const HepVector &  ap  )  const
 

HepMatrix Helix::delApDelA const HepVector &  ap  )  const
 

00439                                            {
00440     //
00441     //   Calculate Jacobian (@ap/@a)
00442     //   Vector ap is new helix parameters and a is old helix parameters. 
00443     //
00444 
00445     HepMatrix dApDA(5,5,0);
00446 
00447     const double & dr    = m_ac[0];
00448     const double & phi0  = m_ac[1];
00449     const double & cpa   = m_ac[2];
00450     const double & dz    = m_ac[3];
00451     const double & tnl   = m_ac[4];
00452 
00453     double drp   = ap[0];
00454     double phi0p = ap[1];
00455     double cpap  = ap[2];
00456     double dzp   = ap[3];
00457     double tnlp  = ap[4];
00458 
00459     double rdr   = m_r + dr;
00460     double rdrpr;
00461     if ((m_r + drp) != 0.0) {
00462       rdrpr = 1. / (m_r + drp);
00463     } else {
00464       rdrpr = (DBL_MAX);
00465     }
00466     // double csfd  = cos(phi0)*cos(phi0p) + sin(phi0)*sin(phi0p); 
00467     // double snfd  = cos(phi0)*sin(phi0p) - sin(phi0)*cos(phi0p); 
00468     double csfd  = cos(phi0p - phi0);
00469     double snfd  = sin(phi0p - phi0);
00470     double phid  = fmod(phi0p - phi0 + M_PI8, M_PI2);
00471     if (phid > M_PI) phid = phid - M_PI2;
00472 
00473     dApDA[0][0]  =  csfd;
00474     dApDA[0][1]  =  rdr*snfd;
00475     if(cpa!=0.0) {
00476       dApDA[0][2]  =  (m_r/cpa)*( 1.0 - csfd );
00477     } else {
00478       dApDA[0][2]  = (DBL_MAX);
00479     }
00480 
00481     dApDA[1][0]  = - rdrpr*snfd;
00482     dApDA[1][1]  = rdr*rdrpr*csfd;
00483     if(cpa!=0.0) {
00484       dApDA[1][2]  = (m_r/cpa)*rdrpr*snfd;
00485     } else {
00486       dApDA[1][2]  = (DBL_MAX);
00487     }
00488     
00489     dApDA[2][2]  = 1.0;
00490 
00491     dApDA[3][0]  = m_r*rdrpr*tnl*snfd;
00492     dApDA[3][1]  = m_r*tnl*(1.0 - rdr*rdrpr*csfd);
00493     if(cpa!=0.0) {
00494       dApDA[3][2]  = (m_r/cpa)*tnl*(phid - m_r*rdrpr*snfd);
00495     } else {
00496       dApDA[3][2]  = (DBL_MAX);
00497     }
00498     dApDA[3][3]  = 1.0;
00499     dApDA[3][4]  = - m_r*phid;
00500 
00501     dApDA[4][4] = 1.0;
00502  
00503     return dApDA;
00504 }

HepMatrix Helix::delMDelA double  phi  )  const
 

HepMatrix Helix::delMDelA double  phi  )  const
 

00561                                 {
00562     //
00563     //   Calculate Jacobian (@m/@a)
00564     //   Vector a is helix parameters and phi is internal parameter.
00565     //   Vector m is momentum.
00566     //
00567 
00568     HepMatrix dMDA(3,5,0);
00569 
00570     const double & phi0 = m_ac[1];
00571     const double & cpa  = m_ac[2];
00572     const double & tnl  = m_ac[4];
00573 
00574     double cosf0phi = cos(phi0+phi);
00575     double sinf0phi = sin(phi0+phi);
00576 
00577     double rho;
00578     if(cpa != 0.)rho = 1./cpa;
00579     else rho = (DBL_MAX);
00580 
00581     double charge = 1.;
00582     if(cpa < 0.)charge = -1.;
00583 
00584     dMDA[0][1] = -fabs(rho)*cosf0phi;
00585     dMDA[0][2] = charge*rho*rho*sinf0phi;
00586  
00587     dMDA[1][1] = -fabs(rho)*sinf0phi;
00588     dMDA[1][2] = -charge*rho*rho*cosf0phi;
00589 
00590     dMDA[2][2] = -charge*rho*rho*tnl;
00591     dMDA[2][4] = fabs(rho);
00592 
00593     return dMDA;
00594 }

HepMatrix Helix::delXDelA double  phi  )  const
 

HepMatrix Helix::delXDelA double  phi  )  const
 

00507                                 {
00508     //
00509     //   Calculate Jacobian (@x/@a)
00510     //   Vector a is helix parameters and phi is internal parameter
00511     //   which specifys the point to be calculated for Ex(phi).
00512     //
00513 
00514     HepMatrix dXDA(3,5,0);
00515 
00516     const double & dr      = m_ac[0];
00517     const double & phi0    = m_ac[1];
00518     const double & cpa     = m_ac[2];
00519     const double & dz      = m_ac[3];
00520     const double & tnl     = m_ac[4];
00521 
00522     double cosf0phi = cos(phi0 + phi);
00523     double sinf0phi = sin(phi0 + phi);
00524 
00525     dXDA[0][0]     = m_cp;
00526     dXDA[0][1]     = - dr * m_sp + m_r * (- m_sp + sinf0phi); 
00527     if(cpa!=0.0) {
00528       dXDA[0][2]     = - (m_r / cpa) * (m_cp - cosf0phi);
00529     } else {
00530       dXDA[0][2] = (DBL_MAX);
00531     }
00532     // dXDA[0][3]     = 0.0;
00533     // dXDA[0][4]     = 0.0;
00534  
00535     dXDA[1][0]     = m_sp;
00536     dXDA[1][1]     = dr * m_cp + m_r * (m_cp - cosf0phi);
00537     if(cpa!=0.0) {
00538       dXDA[1][2]     = - (m_r / cpa) * (m_sp - sinf0phi);
00539     } else {
00540       dXDA[1][2] = (DBL_MAX);
00541     }
00542     // dXDA[1][3]     = 0.0;
00543     // dXDA[1][4]     = 0.0;
00544 
00545     // dXDA[2][0]     = 0.0;
00546     // dXDA[2][1]     = 0.0;
00547     if(cpa!=0.0) {
00548       dXDA[2][2]     = (m_r / cpa) * tnl * phi;
00549     } else {
00550       dXDA[2][2] = (DBL_MAX);
00551     }
00552     dXDA[2][3]     = 1.0;
00553     dXDA[2][4]     = - m_r * phi;
00554 
00555     return dXDA;
00556 }

Hep3Vector Helix::direction double  dPhi = 0.  )  const
 

returns direction vector after rotating angle dPhi in phi direction.

Hep3Vector Helix::direction double  dPhi = 0.  )  const [inline]
 

returns direction vector after rotating angle dPhi in phi direction.

00216                                  {
00217     return momentum(phi).unit();
00218 }

double Helix::dr void   )  const
 

returns an element of parameters.

double Helix::dr void   )  const [inline]
 

returns an element of parameters.

00222                     {
00223     return m_ac[0];
00224 }

double Helix::dz void   )  const
 

double Helix::dz void   )  const [inline]
 

00240                     {
00241     return m_ac[3];
00242 }

const HepSymMatrix& Helix::Ea const HepSymMatrix &  newdA  ) 
 

sets helix paramters and error matrix.

const HepSymMatrix& Helix::Ea void   )  const
 

returns error matrix.

const HepSymMatrix & Helix::Ea const HepSymMatrix &  newdA  )  [inline]
 

sets helix paramters and error matrix.

00278                                 {
00279     return m_Ea = i;
00280 }

const HepSymMatrix & Helix::Ea void   )  const [inline]
 

returns error matrix.

00264                     {
00265     return m_Ea;
00266 }

void Helix::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 Helix::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.

00715                              {
00716     m_matrixValid = false;
00717     m_Ea *= 0.;
00718 }

double Helix::kappa void   )  const
 

double Helix::kappa void   )  const [inline]
 

00234                        {
00235     return m_ac[2];
00236 }

HepLorentzVector Helix::momentum double  dPhi,
double  mass,
HepPoint3D x,
HepSymMatrix &  Emx
const
 

returns 4momentum vector after rotating angle dPhi in phi direction.

HepLorentzVector Helix::momentum double  dPhi,
double  mass,
HepSymMatrix &  Em
const
 

returns 4momentum vector after rotating angle dPhi in phi direction.

HepLorentzVector Helix::momentum double  dPhi,
double  mass
const
 

returns 4momentum vector after rotating angle dPhi in phi direction.

Hep3Vector Helix::momentum double  dPhi,
HepSymMatrix &  Em
const
 

returns momentum vector after rotating angle dPhi in phi direction.

Hep3Vector Helix::momentum double  dPhi = 0.  )  const
 

returns momentum vector after rotating angle dPhi in phi direction.

HepLorentzVector Helix::momentum double  dPhi,
double  mass,
HepPoint3D x,
HepSymMatrix &  Emx
const
 

returns 4momentum vector after rotating angle dPhi in phi direction.

00279                                           {
00280   // 
00281   // Calculate momentum.
00282   //
00283   // Pt = | 1/kappa | (GeV/c)
00284   //
00285   // Px = -Pt * sin(phi0 + phi) 
00286   // Py =  Pt * cos(phi0 + phi)
00287   // Pz =  Pt * tan(lambda)
00288   //
00289   // E  = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
00290   
00291   double pt = fabs(m_pt);
00292   double px = - pt * sin(m_ac[1] + phi);
00293   double py =   pt * cos(m_ac[1] + phi);
00294   double pz =   pt * m_ac[4];
00295   double E  = sqrt(pt * pt * (1. + m_ac[4] * m_ac[4]) + mass * mass);
00296 
00297   x.setX(m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi)));
00298   x.setY(m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi)));
00299   x.setZ(m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi);
00300 
00301   if (m_matrixValid) Emx = m_Ea.similarity(del4MXDelA(phi,mass));
00302   else               Emx = m_Ea;
00303   
00304   return HepLorentzVector(px, py, pz, E);
00305 }

HepLorentzVector Helix::momentum double  dPhi,
double  mass,
HepSymMatrix &  Em
const
 

returns 4momentum vector after rotating angle dPhi in phi direction.

00251                                                                 {
00252     // 
00253     // Calculate momentum.
00254     //
00255     // Pt = | 1/kappa | (GeV/c)
00256     //
00257     // Px = -Pt * sin(phi0 + phi) 
00258     // Py =  Pt * cos(phi0 + phi)
00259     // Pz =  Pt * tan(lambda)
00260     //
00261     // E  = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
00262 
00263     double pt = fabs(m_pt);
00264     double px = - pt * sin(m_ac[1] + phi);
00265     double py =   pt * cos(m_ac[1] + phi);
00266     double pz =   pt * m_ac[4];
00267     double E  =   sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass);
00268 
00269     if (m_matrixValid) Em = m_Ea.similarity(del4MDelA(phi,mass));
00270     else               Em = m_Ea;
00271 
00272     return HepLorentzVector(px, py, pz, E);
00273 }

HepLorentzVector Helix::momentum double  dPhi,
double  mass
const
 

returns 4momentum vector after rotating angle dPhi in phi direction.

00228                                              {
00229     // 
00230     // Calculate momentum.
00231     //
00232     // Pt = | 1/kappa | (GeV/c)
00233     //
00234     // Px = -Pt * sin(phi0 + phi) 
00235     // Py =  Pt * cos(phi0 + phi)
00236     // Pz =  Pt * tan(lambda)
00237     //
00238     // E  = sqrt( 1/kappa/kappa * (1+tan(lambda)*tan(lambda)) + mass*mass )
00239 
00240     double pt = fabs(m_pt);
00241     double px = - pt * sin(m_ac[1] + phi);
00242     double py =   pt * cos(m_ac[1] + phi);
00243     double pz =   pt * m_ac[4];
00244     double E  =   sqrt(pt*pt*(1.+m_ac[4]*m_ac[4])+mass*mass);
00245 
00246     return HepLorentzVector(px, py, pz, E);
00247 }

Hep3Vector Helix::momentum double  dPhi,
HepSymMatrix &  Em
const
 

returns momentum vector after rotating angle dPhi in phi direction.

00205                                                    {
00206     // 
00207     // Calculate momentum.
00208     //
00209     // Pt = | 1/kappa | (GeV/c)
00210     //
00211     // Px = -Pt * sin(phi0 + phi) 
00212     // Py =  Pt * cos(phi0 + phi)
00213     // Pz =  Pt * tan(lambda)
00214     //
00215 
00216     double pt = fabs(m_pt);
00217     double px = - pt * sin(m_ac[1] + phi);
00218     double py =   pt * cos(m_ac[1] + phi);
00219     double pz =   pt * m_ac[4];
00220 
00221     if (m_matrixValid) Em = m_Ea.similarity(delMDelA(phi));
00222     else               Em = m_Ea;
00223 
00224     return Hep3Vector(px, py, pz);
00225 }

Hep3Vector Helix::momentum double  dPhi = 0.  )  const
 

returns momentum vector after rotating angle dPhi in phi direction.

00185                                 {
00186     // 
00187     // Calculate momentum.
00188     //
00189     // Pt = | 1/kappa | (GeV/c)
00190     //
00191     // Px = -Pt * sin(phi0 + phi) 
00192     // Py =  Pt * cos(phi0 + phi)
00193     // Pz =  Pt * tan(lambda)
00194     //
00195 
00196     double pt = fabs(m_pt);
00197     double px = - pt * sin(m_ac[1] + phi);
00198     double py =   pt * cos(m_ac[1] + phi);
00199     double pz =   pt * m_ac[4];
00200 
00201     return Hep3Vector(px, py, pz);
00202 }

Helix& Helix::operator= const Helix  ) 
 

Copy operator.

Helix & Helix::operator= const Helix  ) 
 

Copy operator.

00381                                   {
00382     if (this == & i) return * this;
00383 
00384     m_bField = i.m_bField;
00385     m_alpha = i.m_alpha;
00386     m_pivot = i.m_pivot;
00387     m_a = i.m_a;
00388     m_Ea = i.m_Ea;
00389     m_matrixValid = i.m_matrixValid;
00390 
00391     m_center = i.m_center;
00392     m_cp = i.m_cp;
00393     m_sp = i.m_sp;
00394     m_pt = i.m_pt;
00395     m_r  = i.m_r;
00396     m_ac[0] = i.m_ac[0];
00397     m_ac[1] = i.m_ac[1];
00398     m_ac[2] = i.m_ac[2];
00399     m_ac[3] = i.m_ac[3];
00400     m_ac[4] = i.m_ac[4];
00401 
00402     return * this;
00403 }

double Helix::phi0 void   )  const
 

double Helix::phi0 void   )  const [inline]
 

00228                       {
00229     return m_ac[1];
00230 }

const HepPoint3D& Helix::pivot const HepPoint3D newPivot  ) 
 

sets pivot position.

const HepPoint3D& Helix::pivot void   )  const
 

returns pivot position.

const HepPoint3D & Helix::pivot const HepPoint3D newPivot  ) 
 

sets pivot position.

00309                                         {
00310     const double & dr    = m_ac[0];
00311     const double & phi0  = m_ac[1];
00312     const double & kappa = m_ac[2];
00313     const double & dz    = m_ac[3];
00314     const double & tanl  = m_ac[4];
00315 
00316     double rdr = dr + m_r;
00317     double phi = fmod(phi0 + M_PI4, M_PI2);
00318     double csf0 = cos(phi);
00319     double snf0 = (1. - csf0) * (1. + csf0);
00320     snf0 = sqrt((snf0 > 0.) ? snf0 : 0.);
00321     if(phi > M_PI) snf0 = - snf0;
00322 
00323     double xc = m_pivot.x() + rdr * csf0;
00324     double yc = m_pivot.y() + rdr * snf0;
00325     double csf, snf;
00326     if(m_r != 0.0) {
00327       csf = (xc - newPivot.x()) / m_r;
00328       snf = (yc - newPivot.y()) / m_r;
00329       double anrm = sqrt(csf * csf + snf * snf);
00330       if(anrm != 0.0) {
00331         csf /= anrm;
00332         snf /= anrm;
00333         phi = atan2(snf, csf);
00334       } else {
00335         csf = 1.0;
00336         snf = 0.0;
00337         phi = 0.0;
00338       }
00339     } else {
00340       csf = 1.0;
00341       snf = 0.0;
00342       phi = 0.0;
00343     }
00344     double phid = fmod(phi - phi0 + M_PI8, M_PI2);
00345     if(phid > M_PI) phid = phid - M_PI2;
00346     double drp = (m_pivot.x() + dr * csf0 + m_r * (csf0 - csf) - newPivot.x())
00347         * csf
00348         + (m_pivot.y() + dr * snf0 + m_r * (snf0 - snf) - newPivot.y()) * snf;
00349     double dzp = m_pivot.z() + dz - m_r * tanl * phid - newPivot.z();
00350 
00351     HepVector ap(5);
00352     ap[0] = drp;
00353     ap[1] = fmod(phi + M_PI4, M_PI2);
00354     ap[2] = kappa;
00355     ap[3] = dzp;
00356     ap[4] = tanl;
00357 
00358     //    if (m_matrixValid) m_Ea.assign(delApDelA(ap) * m_Ea * delApDelA(ap).T());
00359     if (m_matrixValid) m_Ea = m_Ea.similarity(delApDelA(ap));
00360 
00361     m_a = ap;
00362     m_pivot = newPivot;
00363 
00364     //...Are these needed?...iw...
00365     updateCache();
00366     return m_pivot;
00367 }

const HepPoint3D & Helix::pivot void   )  const [inline]
 

returns pivot position.

00204                        {
00205     return m_pivot;
00206 }

double Helix::radius void   )  const
 

returns radious of helix.

double Helix::radius void   )  const [inline]
 

returns radious of helix.

00210                         {
00211     return m_r;
00212 }

void Helix::set const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea
 

sets helix pivot position, parameters, and error matrix.

void Helix::set const HepPoint3D pivot,
const HepVector &  a,
const HepSymMatrix &  Ea
 

sets helix pivot position, parameters, and error matrix.

00372                                     {
00373     m_pivot = pivot;
00374     m_a = a;
00375     m_Ea = Ea;
00376     m_matrixValid = true;
00377     updateCache();
00378 }

double Helix::sinPhi0 void   )  const
 

double Helix::sinPhi0 void   )  const [inline]
 

00299                          {
00300     return m_sp;
00301 }

double Helix::tanl void   )  const
 

double Helix::tanl void   )  const [inline]
 

00246                       {
00247     return m_ac[4];
00248 }

void Helix::updateCache void   )  [private]
 

void Helix::updateCache void   )  [private]
 

00406                        {
00407     //
00408     //   Calculate Helix center( xc, yc ).
00409     //   
00410     //   xc = x0 + (dr + (alpha / kappa)) * cos(phi0)  (cm)
00411     //   yc = y0 + (dr + (alpha / kappa)) * sin(phi0)  (cm)
00412     //
00413 
00414     m_ac[0] = m_a[0];
00415     m_ac[1] = m_a[1];
00416     m_ac[2] = m_a[2];
00417     m_ac[3] = m_a[3];
00418     m_ac[4] = m_a[4];
00419 
00420     m_cp = cos(m_ac[1]);
00421     m_sp = sin(m_ac[1]);
00422     if (m_ac[2] != 0.0) {
00423         m_pt = 1. / m_ac[2];
00424         m_r = m_alpha / m_ac[2];
00425     }
00426     else {
00427         m_pt = (DBL_MAX);
00428         m_r = (DBL_MAX);
00429     }
00430 
00431     double x = m_pivot.x() + (m_ac[0] + m_r) * m_cp;
00432     double y = m_pivot.y() + (m_ac[0] + m_r) * m_sp;
00433     m_center.setX(x);
00434     m_center.setY(y);
00435     m_center.setZ(0.);
00436 }

HepPoint3D Helix::x double  dPhi,
HepSymMatrix &  Ex
const
 

returns position and convariance matrix(Ex) after rotation.

double* Helix::x double  dPhi,
double  p[3]
const
 

HepPoint3D Helix::x double  dPhi = 0.  )  const
 

returns position after rotating angle dPhi in phi direction.

HepPoint3D Helix::x double  dPhi,
HepSymMatrix &  Ex
const
 

returns position and convariance matrix(Ex) after rotation.

00164                                             {
00165     double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi));
00166     double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi));
00167     double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
00168 
00169     //
00170     //   Calculate position error matrix.
00171     //   Ex(phi) = (@x/@a)(Ea)(@x/@a)^T, phi is deflection angle to specify the
00172     //   point to be calcualted.
00173     //
00174     // HepMatrix dXDA(3, 5, 0);
00175     // dXDA = delXDelA(phi);
00176     // Ex.assign(dXDA * m_Ea * dXDA.T());
00177 
00178     if (m_matrixValid) Ex = m_Ea.similarity(delXDelA(phi));
00179     else               Ex = m_Ea;
00180 
00181     return HepPoint3D(x, y, z);
00182 }

double * Helix::x double  dPhi,
double  p[3]
const
 

00147                                       {
00148     //
00149     // Calculate position (x,y,z) along helix.
00150     //   
00151     // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi))
00152     // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi))
00153     // z = z0 + dz             - (alpha / kappa) * tan(lambda) * phi
00154     //
00155 
00156     p[0] = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] + phi));
00157     p[1] = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] + phi));
00158     p[2] = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
00159 
00160     return p;
00161 }

HepPoint3D Helix::x double  dPhi = 0.  )  const
 

returns position after rotating angle dPhi in phi direction.

00130                          {
00131     //
00132     // Calculate position (x,y,z) along helix.
00133     //   
00134     // x = x0 + dr * cos(phi0) + (alpha / kappa) * (cos(phi0) - cos(phi0+phi))
00135     // y = y0 + dr * sin(phi0) + (alpha / kappa) * (sin(phi0) - sin(phi0+phi))
00136     // z = z0 + dz             - (alpha / kappa) * tan(lambda) * phi
00137     //
00138 
00139     double x = m_pivot.x() + m_ac[0] * m_cp + m_r * (m_cp - cos(m_ac[1] +phi));
00140     double y = m_pivot.y() + m_ac[0] * m_sp + m_r * (m_sp - sin(m_ac[1] +phi));
00141     double z = m_pivot.z() + m_ac[3] - m_r * m_ac[4] * phi;
00142 
00143     return HepPoint3D(x, y, z);
00144 }


Member Data Documentation

const double Helix::ConstantAlpha [static]
 

Constant alpha for uniform field.

HepVector Helix::m_a [private]
 

double Helix::m_ac [private]
 

double Helix::m_alpha [private]
 

double Helix::m_bField [private]
 

HepPoint3D Helix::m_center [private]
 

double Helix::m_cp [private]
 

HepSymMatrix Helix::m_Ea [private]
 

bool Helix::m_matrixValid [private]
 

HepPoint3D Helix::m_pivot [private]
 

IMagneticFieldSvc* Helix::m_pmgnIMF [private]
 

IMagneticFieldSvc* Helix::m_pmgnIMF [private]
 

double Helix::m_pt [private]
 

double Helix::m_r [private]
 

double Helix::m_sp [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:16:47 2011 for BOSS6.5.5 by  doxygen 1.3.9.1