File indexing completed on 2024-04-06 12:27:35
0001 #ifndef RecoParticleFlow_PFTracking_CollinearFitAtTM_h_
0002 #define RecoParticleFlow_PFTracking_CollinearFitAtTM_h_
0003
0004 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
0005 #include "DataFormats/Math/interface/Vector.h"
0006 #include "DataFormats/Math/interface/Error.h"
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 class CollinearFitAtTM {
0018 public:
0019
0020 enum { ParQpIn = 0, ParQpOut, ParDxDz, ParDyDz, ParX, ParY };
0021
0022 CollinearFitAtTM();
0023
0024 typedef ROOT::Math::SVector<double, 6> ResultVector;
0025 typedef ROOT::Math::SMatrix<double, 6, 6, ROOT::Math::MatRepSym<double, 6> > ResultMatrix;
0026
0027 bool fit(const TrajectoryMeasurement& tm, ResultVector& parameters, ResultMatrix& covariance, double& chi2);
0028
0029 bool fit(const AlgebraicVector5& fwdParameters,
0030 const AlgebraicSymMatrix55& fwdCovariance,
0031 const AlgebraicVector5& bwdParameters,
0032 const AlgebraicSymMatrix55& bwdCovariance,
0033 const LocalPoint& hitPosition,
0034 const LocalError& hitErrors,
0035 ResultVector& parameters,
0036 ResultMatrix& covariance,
0037 double& chi2);
0038
0039 private:
0040 ROOT::Math::SMatrix<double, 12, 6> jacobian_;
0041 ROOT::Math::SVector<double, 12> measurements_;
0042 ROOT::Math::SMatrix<double, 12, 12, ROOT::Math::MatRepSym<double, 12> > weightMatrix_;
0043 ROOT::Math::SVector<double, 6> projectedMeasurements_;
0044
0045 };
0046
0047 #endif