00001 #ifndef CollinearFitAtTM_h_
00002 #define CollinearFitAtTM_h_
00003
00004 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
00005 #include "DataFormats/Math/interface/Vector.h"
00006 #include "DataFormats/Math/interface/Error.h"
00007
00008
00009
00017 class CollinearFitAtTM {
00018 public:
00020 enum { ParQpIn=0, ParQpOut, ParDxDz, ParDyDz, ParX, ParY };
00021
00022 CollinearFitAtTM ();
00023
00024 typedef ROOT::Math::SVector<double,6> ResultVector;
00025 typedef ROOT::Math::SMatrix<double,6,6,ROOT::Math::MatRepSym<double,6> > ResultMatrix;
00027 bool fit (const TrajectoryMeasurement& tm,
00028 ResultVector& parameters,
00029 ResultMatrix& covariance,
00030 double& chi2);
00032 bool fit (const AlgebraicVector5& fwdParameters,
00033 const AlgebraicSymMatrix55& fwdCovariance,
00034 const AlgebraicVector5& bwdParameters,
00035 const AlgebraicSymMatrix55& bwdCovariance,
00036 const LocalPoint& hitPosition, const LocalError& hitErrors,
00037 ResultVector& parameters,
00038 ResultMatrix& covariance,
00039 double& chi2);
00040 private:
00041 ROOT::Math::SMatrix<double,12,6> jacobian_;
00042 ROOT::Math::SVector<double,12> measurements_;
00043 ROOT::Math::SMatrix<double,12,12,ROOT::Math::MatRepSym<double,12> > weightMatrix_;
00044 ROOT::Math::SVector<double,6> projectedMeasurements_;
00045
00046 };
00047
00048 #endif