CMS 3D CMS Logo

CurvilinearTrajectoryParameters Class Reference

Class providing access to a set of relevant parameters of a trajectory in a Curvilinear frame. More...

#include <TrackingTools/TrajectoryParametrization/interface/CurvilinearTrajectoryParameters.h>

List of all members.

Public Member Functions

TrackCharge charge () const
 access to the charge
 CurvilinearTrajectoryParameters (const GlobalPoint &aX, const GlobalVector &aP, TrackCharge aCharge)
 Constructor from a global vector, global point and track charge.
 CurvilinearTrajectoryParameters (double aQbp, double alambda, double aphi, double axT, double ayT, bool charged=true)
 Constructor from vector of parameters Expects a vector of parameters as defined above.
 CurvilinearTrajectoryParameters (const AlgebraicVector5 &v, bool charged=true)
 Constructor from vector of parameters Expects a vector of parameters as defined above.
 CurvilinearTrajectoryParameters ()
 default constructor
double lambda () const
double phi () const
double Qbp () const
double signedInverseMomentum () const
 access to the Signed Inverse momentum q/p (zero for neutrals)
bool updateP (double dP)
AlgebraicVector5 vector () const
 Vector of parameters with signed inverse momentum.
double xT () const
double yT () const

Private Attributes

TrackCharge theCharge
double thelambda
double thephi
double theQbp
double thexT
double theyT


Detailed Description

Class providing access to a set of relevant parameters of a trajectory in a Curvilinear frame.

The set consists of the following paramters: \ q/p: charged particles: charge(plus or minus one) divided by magnitude of momentum neutral particles: inverse magnitude of momentum lambda: the helix dip angle (pi/2 minus theta(polar angle)), defined in the global frame phi: the angle of inclination with the global x-axis in the transverse (global xy) plane xT: transverse position in the global xy plane and it points left when looking into the direction of the track yT: transverse position that forms a right-handed frame with xT and zT

Note that the frame is tangent to the track at the point of definition, with Z_T parallel to the track

Definition at line 29 of file CurvilinearTrajectoryParameters.h.


Constructor & Destructor Documentation

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters (  )  [inline]

default constructor

Definition at line 34 of file CurvilinearTrajectoryParameters.h.

00034 {}

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters ( const AlgebraicVector5 v,
bool  charged = true 
)

Constructor from vector of parameters Expects a vector of parameters as defined above.

For charged particles he charge will be determined by\ the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected.

Definition at line 4 of file CurvilinearTrajectoryParameters.cc.

References theCharge, thelambda, thephi, theQbp, thexT, and theyT.

00004                                                                                                         {
00005   theQbp    = v[0];
00006   thelambda = v[1];
00007   thephi    = v[2];
00008   thexT     = v[3];
00009   theyT     = v[4];
00010   
00011   if ( charged )
00012     theCharge = theQbp>0 ? 1 : -1;
00013   else
00014     theCharge = 0;
00015   
00016 }

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters ( double  aQbp,
double  alambda,
double  aphi,
double  axT,
double  ayT,
bool  charged = true 
)

Constructor from vector of parameters Expects a vector of parameters as defined above.

For charged particles the charge will be determined by the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected.Constructor from individual curvilinear parameters Expects parameters as defined above.

Definition at line 19 of file CurvilinearTrajectoryParameters.cc.

References theCharge, and theQbp.

00019                                                                                                                                               : theQbp(aQbp), thelambda(alambda), thephi(aphi), thexT(axT), theyT(ayT) {
00020     
00021     if ( charged ) {
00022       theQbp = aQbp;
00023       theCharge = theQbp>0 ? 1 : -1;
00024     }
00025     else {
00026       theQbp = aQbp;
00027       theCharge = 0;
00028     }
00029 }

CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters ( const GlobalPoint aX,
const GlobalVector aP,
TrackCharge  aCharge 
)

Constructor from a global vector, global point and track charge.

Definition at line 32 of file CurvilinearTrajectoryParameters.cc.

References PV3DBase< T, PVType, FrameType >::mag(), funct::sqrt(), theCharge, thelambda, thephi, theQbp, thexT, theyT, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

00033 {
00034   if(aCharge==0) 
00035     theQbp = 1./aP.mag();
00036   else
00037     theQbp=aCharge/aP.mag();
00038 
00039   double pT2= aP.x()*aP.x()+aP.y()*aP.y();
00040   double pT =sqrt(pT2);
00041   thelambda= atan(aP.z()/pT);
00042   thephi=atan2(aP.y(),aP.x());
00043   thexT= (-aP.y()*aX.x()+ aP.x()*aX.y()) / pT;
00044   theyT= (-aX.x()*aP.x()*aP.z() - aX.y()*aP.z()*aP.y() + aX.z()*(pT2))  / (aP.mag()*pT);
00045   theCharge=aCharge;
00046 }


Member Function Documentation

TrackCharge CurvilinearTrajectoryParameters::charge ( void   )  const [inline]

access to the charge

Definition at line 65 of file CurvilinearTrajectoryParameters.h.

References theCharge.

Referenced by signedInverseMomentum().

00065 {return theCharge;}

double CurvilinearTrajectoryParameters::lambda (  )  const [inline]

Definition at line 81 of file CurvilinearTrajectoryParameters.h.

References thelambda.

00081 {   return thelambda;  }

double CurvilinearTrajectoryParameters::phi ( void   )  const [inline]

Definition at line 82 of file CurvilinearTrajectoryParameters.h.

References thephi.

00082 {    return thephi;  }

double CurvilinearTrajectoryParameters::Qbp (  )  const [inline]

Definition at line 80 of file CurvilinearTrajectoryParameters.h.

References theQbp.

00080 {    return theQbp;  }

double CurvilinearTrajectoryParameters::signedInverseMomentum (  )  const [inline]

access to the Signed Inverse momentum q/p (zero for neutrals)

Definition at line 68 of file CurvilinearTrajectoryParameters.h.

References charge(), and theQbp.

Referenced by vector().

00068                                        {
00069     return charge()==0 ? 0. : theQbp;
00070   }

bool CurvilinearTrajectoryParameters::updateP ( double  dP  ) 

Definition at line 61 of file CurvilinearTrajectoryParameters.cc.

References p, and theQbp.

00061                                                        {
00062   //FIXME. something is very likely to be missing here
00063   double p = 1./fabs(theQbp);
00064   if ((p += dP) <= 0.) return false;
00065   double newQbp = theQbp > 0. ? 1./p : -1./p;
00066   theQbp = newQbp;
00067   return true;
00068 }

AlgebraicVector5 CurvilinearTrajectoryParameters::vector (  )  const

Vector of parameters with signed inverse momentum.

Vector of parameters as defined above, with the first element q/p.

Definition at line 51 of file CurvilinearTrajectoryParameters.cc.

References signedInverseMomentum(), thelambda, thephi, thexT, and theyT.

00051                                                                {
00052   return AlgebraicVector5(signedInverseMomentum(),
00053                           thelambda,
00054                           thephi,
00055                           thexT,
00056                           theyT);
00057 }

double CurvilinearTrajectoryParameters::xT (  )  const [inline]

Definition at line 83 of file CurvilinearTrajectoryParameters.h.

References thexT.

00083 {   return thexT;  }

double CurvilinearTrajectoryParameters::yT (  )  const [inline]

Definition at line 84 of file CurvilinearTrajectoryParameters.h.

References theyT.

00084 {    return theyT;  }


Member Data Documentation

TrackCharge CurvilinearTrajectoryParameters::theCharge [private]

Definition at line 95 of file CurvilinearTrajectoryParameters.h.

Referenced by charge(), and CurvilinearTrajectoryParameters().

double CurvilinearTrajectoryParameters::thelambda [private]

Definition at line 90 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), lambda(), and vector().

double CurvilinearTrajectoryParameters::thephi [private]

Definition at line 91 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), phi(), and vector().

double CurvilinearTrajectoryParameters::theQbp [private]

Definition at line 89 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), Qbp(), signedInverseMomentum(), and updateP().

double CurvilinearTrajectoryParameters::thexT [private]

Definition at line 92 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), vector(), and xT().

double CurvilinearTrajectoryParameters::theyT [private]

Definition at line 93 of file CurvilinearTrajectoryParameters.h.

Referenced by CurvilinearTrajectoryParameters(), vector(), and yT().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:35 2009 for CMSSW by  doxygen 1.5.4