GeneralBrokenLines  trunk_rev46
 All Classes Files Functions Variables Typedefs Pages
GblPoint.h
Go to the documentation of this file.
1 /*
2  * GblPoint.h
3  *
4  * Created on: Aug 18, 2011
5  * Author: kleinwrt
6  */
7 
8 #ifndef GBLPOINT_H_
9 #define GBLPOINT_H_
10 
11 #include<iostream>
12 #include<vector>
13 #include<math.h>
14 #include "TVectorD.h"
15 #include "TMatrixD.h"
16 #include "TMatrixDSym.h"
17 #include "TMatrixDSymEigen.h"
18 
19 #include "Math/SMatrix.h"
20 #include "Math/SVector.h"
21 typedef ROOT::Math::SMatrix<double, 2> SMatrix22;
22 typedef ROOT::Math::SMatrix<double, 2, 3> SMatrix23;
23 typedef ROOT::Math::SMatrix<double, 2, 5> SMatrix25;
24 typedef ROOT::Math::SMatrix<double, 2, 7> SMatrix27;
25 typedef ROOT::Math::SMatrix<double, 3, 2> SMatrix32;
26 typedef ROOT::Math::SMatrix<double, 3> SMatrix33;
27 typedef ROOT::Math::SMatrix<double, 5> SMatrix55;
28 typedef ROOT::Math::SVector<double, 2> SVector2;
29 typedef ROOT::Math::SVector<double, 5> SVector5;
30 
32 
43 class GblPoint {
44 public:
45  GblPoint(const TMatrixD &aJacobian);
46  GblPoint(const SMatrix55 &aJacobian);
47  virtual ~GblPoint();
48  void addMeasurement(const TMatrixD &aProjection, const TVectorD &aResiduals,
49  const TVectorD &aPrecision, double minPrecision = 0.);
50  void addMeasurement(const TMatrixD &aProjection, const TVectorD &aResiduals,
51  const TMatrixDSym &aPrecision, double minPrecision = 0.);
52  void addMeasurement(const TVectorD &aResiduals,
53  const TMatrixDSym &aPrecision, double minPrecision = 0.);
54  unsigned int hasMeasurement() const;
55  void getMeasurement(SMatrix55 &aProjection, SVector5 &aResiduals,
56  SVector5 &aPrecision) const;
57  void addScatterer(const TVectorD &aResiduals, const TVectorD &aPrecision);
58  bool hasScatterer() const;
59  void getScatterer(SVector2 &aResiduals, SVector2 &aPrecision) const;
60  void addLocals(const TMatrixD &aDerivatives);
61  unsigned int getNumLocals() const;
62  const TMatrixD& getLocalDerivatives() const;
63  void addGlobals(const std::vector<int> &aLabels,
64  const TMatrixD &aDerivatives);
65  unsigned int getNumGlobals() const;
66  std::vector<int> getGlobalLabels() const;
67  const TMatrixD& getGlobalDerivatives() const;
68  void setLabel(unsigned int aLabel);
69  unsigned int getLabel() const;
70  void setOffset(int anOffset);
71  int getOffset() const;
72  const SMatrix55& getP2pJacobian() const;
73  void addPrevJacobian(const SMatrix55 aJac);
74  void addNextJacobian(const SMatrix55 aJac);
75  void getDerivatives(int aDirection, SMatrix22 &matW, SMatrix22 &matWJ,
76  SVector2 &vecWd) const;
77 
78 private:
79  unsigned int theLabel;
80  int theOffset;
84  unsigned int measDim;
88  bool transFlag;
89  TMatrixD measTransformation;
90  bool scatFlag;
93  TMatrixD localDerivatives;
94  std::vector<int> globalLabels;
95  TMatrixD globalDerivatives;
96 };
97 
98 #endif /* GBLPOINT_H_ */