CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoVertex/KinematicFitPrimitives/interface/PerigeeKinematicState.h

Go to the documentation of this file.
00001 #ifndef PerigeeKinematicState_H
00002 #define PerigeeKinematicState_H
00003 
00004 #include "RecoVertex/KinematicFitPrimitives/interface/KinematicState.h"
00005 #include "RecoVertex/KinematicFitPrimitives/interface/ExtendedPerigeeTrajectoryParameters.h"
00006 #include "RecoVertex/KinematicFitPrimitives/interface/ExtendedPerigeeTrajectoryError.h"
00007 
00021 class PerigeeKinematicState
00022 {
00023 public:
00024 
00025  PerigeeKinematicState()
00026  {
00027   vl = false;
00028   errorIsAvailable = false;
00029  }
00030 
00031  virtual ~PerigeeKinematicState(){}
00035  bool hasError() const
00036  {
00037   if(!(isValid()))throw VertexException("PerigeeKinematicState::error is requested for the invalid state");
00038   return errorIsAvailable;
00039  }
00040  
00041  bool isValid() const
00042  {return vl;}
00043 
00044  const KinematicState theState() const
00045  {
00046   if(!isValid()) throw VertexException("PerigeeKinematicState::initial state is requested for the invalid state");
00047   return inState;
00048  }
00049 
00053  const GlobalPoint referencePoint() const
00054  {
00055   if(!isValid()) throw VertexException("PerigeeKinematicState::point is requested for the invalid state");
00056   return point;
00057  }
00058 
00063  const ExtendedPerigeeTrajectoryError& perigeeError() const
00064  {
00065   if(!(isValid()))  throw VertexException("PerigeeKinematicState::requesting perigee error for invalid state");
00066   if(!(hasError())) throw VertexException("PerigeeKinematicState::requesting perigee error when none available");
00067   return cov;
00068  }
00069 
00073  const ExtendedPerigeeTrajectoryParameters & perigeeParameters() const
00074  {
00075   if(!(isValid()))  throw VertexException("PerigeeKinematicState::requesting perigee parameters for invalid state");
00076   return par;
00077  }
00078 
00079 private:
00080 
00081  friend class TransientTrackKinematicStateBuilder;
00082 
00083 
00084  PerigeeKinematicState(const KinematicState& state, const GlobalPoint& pt);
00085 /*
00086  AlgebraicMatrix jacobianKinematicToExPerigee(const KinematicState& state, 
00087                                               const GlobalPoint& pt)const;
00088  AlgebraicMatrix jacobianExPerigeeToKinematic(const ExtendedPerigeeTrajectoryParameters& state,
00089                                               const GlobalPoint& point)const;
00090 */                                            
00091  AlgebraicMatrix jacobianCurvilinear2Perigee(const FreeTrajectoryState& fts) const;
00092  
00093 private:
00094  GlobalPoint point;
00095  ExtendedPerigeeTrajectoryParameters par;
00096  ExtendedPerigeeTrajectoryError cov;
00097  KinematicState inState;
00098  bool errorIsAvailable;
00099  bool vl;
00100 
00101 };
00102 #endif