00001 #ifndef PerigeeTrajectoryParameters_H 00002 #define PerigeeTrajectoryParameters_H 00003 00012 #include "DataFormats/TrajectoryState/interface/TrackCharge.h" 00013 #include "DataFormats/Math/interface/Vector.h" 00014 #include "DataFormats/Math/interface/AlgebraicROOTObjects.h" 00015 00016 class PerigeeTrajectoryParameters 00017 { 00018 00019 public: 00020 00021 PerigeeTrajectoryParameters() {} 00022 00023 00024 00025 explicit PerigeeTrajectoryParameters(const AlgebraicVector5 &aVector, bool charged = true): 00026 theVector(aVector) { 00027 if ( charged ) 00028 theCharge = theVector[0]>0 ? -1 : 1; 00029 else 00030 theCharge = 0; 00031 } 00032 00033 PerigeeTrajectoryParameters(double aCurv, double aTheta, double aPhi, 00034 double aTip, double aLip, bool charged = true) { 00035 theVector[0] = aCurv; 00036 theVector[1] = aTheta; 00037 theVector[2] = aPhi; 00038 theVector[3] = aTip; 00039 theVector[4] = aLip; 00040 00041 if ( charged ) 00042 theCharge = aCurv>0 ? -1 : 1; 00043 else 00044 theCharge = 0; 00045 } 00046 00051 TrackCharge charge() const {return theCharge;} 00052 00057 double transverseCurvature() const {return ((charge()!=0)?theVector[0]:0.);} 00058 00063 double theta() const {return theVector[1];} 00064 00069 double phi() const {return theVector[2];} 00070 00075 double transverseImpactParameter() const {return theVector[3];} 00076 00081 double longitudinalImpactParameter() const {return theVector[4];} 00082 00089 const AlgebraicVector5 & vector() const { return theVector;} 00090 00091 00092 private: 00093 AlgebraicVector5 theVector; 00094 TrackCharge theCharge; 00095 }; 00096 #endif