CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CollinearFitAtTM.h
Go to the documentation of this file.
1 #ifndef CollinearFitAtTM2_h_
2 #define CollinearFitAtTM2_h_
3 
8 
9 // #include "Workspace/TrajectoryMeasurementFits/interface/RandomVector.h"
10 
19 public:
22 
24  CollinearFitAtTM2 (const AlgebraicVector5& fwdParameters,
25  const AlgebraicSymMatrix55& fwdCovariance,
26  const AlgebraicVector5& bwdParameters,
27  const AlgebraicSymMatrix55& bwdCovariance,
28  const LocalPoint& hitPosition,
29  const LocalError& hitErrors);
30 
31  typedef ROOT::Math::SVector<double,6> ResultVector;
32  typedef ROOT::Math::SMatrix<double,6,6,ROOT::Math::MatRepSym<double,6> > ResultMatrix;
34  bool valid () const {return valid_;}
36  double chi2 () const {return chi2_;}
38  int ndof () const {return ndof_;}
40  const ResultVector& parameters () const {return parameters_;}
42  const ResultMatrix& covariance () const {return covariance_;}
44  Measurement1D deltaP () const;
45 
46 private:
48  void initJacobian ();
50  bool fit (const AlgebraicVector5& fwdParameters,
51  const AlgebraicSymMatrix55& fwdCovariance,
52  const AlgebraicVector5& bwdParameters,
53  const AlgebraicSymMatrix55& bwdCovariance,
54  const LocalPoint& hitPosition, const LocalError& hitErrors);
55 
56 private:
57  ROOT::Math::SMatrix<double,12,6> jacobian_;
58  ROOT::Math::SVector<double,12> measurements_;
59  ROOT::Math::SMatrix<double,12,12,ROOT::Math::MatRepSym<double,12> > weightMatrix_;
60  ROOT::Math::SVector<double,6> projectedMeasurements_;
61 // RandomVector randomGenerator;
62 
63  bool valid_;
66  double chi2_;
67  int ndof_;
68 };
69 
70 #endif
ROOT::Math::SVector< double, 6 > ResultVector
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > ResultMatrix
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
CollinearFitAtTM2(const TrajectoryMeasurement &tm)
bool fit(const AlgebraicVector5 &fwdParameters, const AlgebraicSymMatrix55 &fwdCovariance, const AlgebraicVector5 &bwdParameters, const AlgebraicSymMatrix55 &bwdCovariance, const LocalPoint &hitPosition, const LocalError &hitErrors)
Perform the fit. Return value &quot;true&quot; for success.
ResultVector parameters_
const ResultMatrix & covariance() const
covariance matrix of fitted parameters
Measurement1D deltaP() const
estimated deltaP (out-in) from fit parameters
int ndof() const
degrees of freedom
double chi2() const
chi2
ResultMatrix covariance_
ROOT::Math::SMatrix< double, 12, 12, ROOT::Math::MatRepSym< double, 12 > > weightMatrix_
ROOT::Math::SVector< double, 5 > AlgebraicVector5
ROOT::Math::SVector< double, 6 > projectedMeasurements_
bool valid() const
status of the fit
void initJacobian()
initialise the jacobian
ROOT::Math::SMatrix< double, 12, 6 > jacobian_
ROOT::Math::SVector< double, 12 > measurements_
const ResultVector & parameters() const
vector of fitted parameters