PandaRoot
AbsHMatrix.h
Go to the documentation of this file.
1 /* Copyright 2008-2010, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
23 #ifndef genfit_AbsHMatrix_h
24 #define genfit_AbsHMatrix_h
25 
26 #include <TObject.h>
27 #include <TMatrixDSym.h>
28 #include <TVectorD.h>
29 
30 namespace genfit {
31 
36 class AbsHMatrix : public TObject {
37 
38  public:
39  AbsHMatrix() { ; }
40 
41  virtual ~AbsHMatrix() { ; }
42 
44  virtual const TMatrixD &getMatrix() const = 0;
45 
47  virtual TVectorD Hv(const TVectorD &v) const { return getMatrix() * v; }
48 
50  virtual TMatrixD MHt(const TMatrixDSym &M) const { return TMatrixD(M, TMatrixD::kMultTranspose, getMatrix()); }
51  virtual TMatrixD MHt(const TMatrixD &M) const { return TMatrixD(M, TMatrixD::kMultTranspose, getMatrix()); }
52 
54  virtual void HMHt(TMatrixDSym &M) const { M.Similarity(getMatrix()); }
55 
56  virtual AbsHMatrix *clone() const = 0;
57 
58  bool operator==(const AbsHMatrix &other) const { return this->isEqual(other); }
59  bool operator!=(const AbsHMatrix &other) const { return !(this->isEqual(other)); }
60  virtual bool isEqual(const AbsHMatrix &other) const = 0;
61 
62  virtual void Print(const Option_t * = "") const { ; }
63 
64  protected:
65  // protect from calling copy c'tor or assignment operator from outside the class. Use #clone() if you want a copy!
66  AbsHMatrix(const AbsHMatrix &o) : TObject(o) { ; }
68 
69  public:
70  ClassDef(AbsHMatrix, 1)
71 };
72 
73 } /* End of namespace genfit */
76 #endif // genfit_AbsHMatrix_h
bool operator==(const AbsHMatrix &other) const
Definition: AbsHMatrix.h:58
AbsHMatrix(const AbsHMatrix &o)
Definition: AbsHMatrix.h:66
AbsHMatrix & operator=(const AbsHMatrix &)
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Definition: AbsHMatrix.h:36
__m128 v
Definition: P4_F32vec4.h:3
bool operator!=(const AbsHMatrix &other) const
Definition: AbsHMatrix.h:59
virtual void Print(const Option_t *="") const
Definition: AbsHMatrix.h:62
virtual TVectorD Hv(const TVectorD &v) const
H*v.
Definition: AbsHMatrix.h:47
virtual TMatrixD MHt(const TMatrixD &M) const
Definition: AbsHMatrix.h:51
virtual const TMatrixD & getMatrix() const =0
Get the actual matrix representation.
virtual bool isEqual(const AbsHMatrix &other) const =0
virtual ~AbsHMatrix()
Definition: AbsHMatrix.h:41
virtual void HMHt(TMatrixDSym &M) const
similarity: H*M*H^t
Definition: AbsHMatrix.h:54
virtual TMatrixD MHt(const TMatrixDSym &M) const
M*H^t.
Definition: AbsHMatrix.h:50
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
virtual AbsHMatrix * clone() const =0
Matrix inversion tools.
Definition: AbsBField.h:28