CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/RecoVertex/VertexPrimitives/interface/LinearizedTrackState.h

Go to the documentation of this file.
00001 #ifndef LinearizedTrackState_H
00002 #define LinearizedTrackState_H
00003 
00004 //#include "CommonReco/CommonVertex/interface/ImpactPointMeasurement.h"
00005 
00006 //#include "TrackingTools/TrajectoryState/interface/ProxyBase.h"
00007 #include "DataFormats/GeometrySurface/interface/ReferenceCounted.h"
00008 #include "TrackingTools/TrajectoryState/interface/CopyUsingClone.h"
00009 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00010 #include "DataFormats/TrajectoryState/interface/TrackCharge.h"
00011 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00012 #include "Math/SMatrix.h"
00013 
00014 #include "RecoVertex/VertexPrimitives/interface/RefittedTrackState.h"
00015 #include <vector>
00016 
00035 template <unsigned int N>
00036 class LinearizedTrackState : public ReferenceCounted {
00037 
00038 public:
00039 
00040   typedef ROOT::Math::SVector<double,N> AlgebraicVectorN;
00041   typedef ROOT::Math::SVector<double,N-2> AlgebraicVectorM;
00042   typedef ROOT::Math::SMatrix<double,N,3,ROOT::Math::MatRepStd<double,N,3> > AlgebraicMatrixN3;
00043   typedef ROOT::Math::SMatrix<double,N,N-2,ROOT::Math::MatRepStd<double,N,N-2> > AlgebraicMatrixNM;
00044   typedef ROOT::Math::SMatrix<double,N-2,3,ROOT::Math::MatRepStd<double,N-2,3> > AlgebraicMatrixM3;
00045   typedef ROOT::Math::SMatrix<double,N,N,ROOT::Math::MatRepSym<double,N> > AlgebraicSymMatrixNN;
00046   typedef ROOT::Math::SMatrix<double,N-2,N-2,ROOT::Math::MatRepSym<double,N-2> > AlgebraicSymMatrixMM;
00047   typedef ROOT::Math::SMatrix<double,N+1,N+1,ROOT::Math::MatRepSym<double,N+1> > AlgebraicSymMatrixOO;
00048 
00049   typedef ReferenceCountingPointer<RefittedTrackState<N> > RefCountedRefittedTrackState;
00050 
00051   virtual ~LinearizedTrackState(){}
00052 
00057   virtual  ReferenceCountingPointer<LinearizedTrackState<N> > stateWithNewLinearizationPoint
00058     (const GlobalPoint & newLP) const = 0;
00059 
00062   virtual const GlobalPoint & linearizationPoint() const = 0;
00063 
00067   virtual const AlgebraicVectorN & constantTerm() const = 0;
00068 
00072   virtual const AlgebraicMatrixN3 & positionJacobian() const = 0;
00073 
00077   virtual const AlgebraicMatrixNM & momentumJacobian() const = 0;
00078 
00081   virtual const AlgebraicVectorN & parametersFromExpansion() const = 0;
00082 
00086   virtual AlgebraicVectorN predictedStateParameters() const = 0;
00087 
00091   virtual AlgebraicVectorM predictedStateMomentumParameters() const = 0;
00092 
00097   virtual AlgebraicSymMatrixNN predictedStateWeight(int & error) const = 0;
00098 
00102   virtual AlgebraicSymMatrixMM predictedStateMomentumError() const = 0;
00103 
00107   virtual AlgebraicSymMatrixNN predictedStateError() const = 0;
00108 
00109   virtual bool hasError() const = 0;
00110 
00111   virtual TrackCharge charge() const = 0;
00112 
00115 //   virtual ImpactPointMeasurement impactPointMeasurement() const = 0;
00116 
00117   virtual bool operator ==(LinearizedTrackState<N> & other) const = 0;
00118 
00122   virtual RefCountedRefittedTrackState createRefittedTrackState(
00123         const GlobalPoint & vertexPosition,
00124         const AlgebraicVectorM & vectorParameters,
00125         const AlgebraicSymMatrixOO & covarianceMatrix) const = 0;
00126 
00130   virtual AlgebraicVectorN refittedParamFromEquation(
00131         const RefCountedRefittedTrackState & theRefittedState) const = 0;
00132 
00133   virtual inline void checkParameters(AlgebraicVectorN & parameters) const
00134         {}
00135 
00136   virtual double weightInMixture() const = 0;
00137 
00138   virtual std::vector< ReferenceCountingPointer<LinearizedTrackState<N> > > components()
00139                                                                 const = 0;
00140 
00141   virtual reco::TransientTrack track() const = 0;
00142 
00143   virtual bool isValid() const { return true; }
00144 };
00145 
00146 #endif