CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/TrackingTools/TrajectoryParametrization/interface/CurvilinearTrajectoryParameters.h

Go to the documentation of this file.
00001 #ifndef _TRACKER_CURVILINEARTRAJECTORYPARAMETERS_H_
00002 #define _TRACKER_CURVILINEARTRAJECTORYPARAMETERS_H_
00003 
00004 
00005 #include "DataFormats/TrajectoryState/interface/TrackCharge.h"
00006 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h"
00007 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00008 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00009 
00010 #include <cmath>
00011 
00012 
00013 
00028 class CurvilinearTrajectoryParameters {
00029  public:
00030   
00032   
00033   CurvilinearTrajectoryParameters() {}
00034   
00035 
00042   CurvilinearTrajectoryParameters(const AlgebraicVector5& v, bool charged = true) :
00043   theQbp(charged ? v[0] : 0), thelambda(v[1]), thephi(v[2]), thexT(v[3]), theyT(v[4]) {}
00044 
00056   CurvilinearTrajectoryParameters(double aQbp, double alambda, double aphi, double axT, double ayT, bool charged = true) :
00057     theQbp(charged ? aQbp : 0), thelambda(alambda), thephi(aphi), thexT(axT), theyT(ayT) {}
00058   
00059   
00063   CurvilinearTrajectoryParameters(const GlobalPoint& aX,const GlobalVector& aP,TrackCharge aCharge);
00064 
00066   TrackCharge charge() const { return (0==Qbp()) ? 0 : ( Qbp()>0 ? 1 : -1) ;}
00067 
00069   double signedInverseMomentum() const {
00070     return  Qbp();
00071   }
00072   
00073   
00078   AlgebraicVector5 vector() const {
00079     return AlgebraicVector5(theQbp,
00080                             thelambda,
00081                             thephi,
00082                             thexT,
00083                             theyT);
00084   }
00085     
00086 
00087   double Qbp() const {    return theQbp;  }
00088   double lambda() const {   return thelambda;  }
00089   double phi() const {    return thephi;  }
00090   double xT() const {   return thexT;  }
00091   double yT() const {    return theyT;  }
00092 
00093   bool updateP(double dP);
00094 
00095  private:
00096   double theQbp;
00097   double thelambda;
00098   double thephi;
00099   double thexT;
00100   double theyT;
00101 
00102 };
00103 
00104 
00105 #endif