Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:21

0001 /* Copyright 2008-2010, Technische Universitaet Muenchen,
0002    Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
0003 
0004    This file is part of GENFIT.
0005 
0006    GENFIT is free software: you can redistribute it and/or modify
0007    it under the terms of the GNU Lesser General Public License as published
0008    by the Free Software Foundation, either version 3 of the License, or
0009    (at your option) any later version.
0010 
0011    GENFIT is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014    GNU Lesser General Public License for more details.
0015 
0016    You should have received a copy of the GNU Lesser General Public License
0017    along with GENFIT.  If not, see <http://www.gnu.org/licenses/>.
0018 */
0019 /** @addtogroup genfit
0020  * @{
0021  */
0022 
0023 #ifndef genfit_AbsHMatrix_h
0024 #define genfit_AbsHMatrix_h
0025 
0026 #include <TObject.h>
0027 #include <TMatrixDSym.h>
0028 #include <TVectorD.h>
0029 
0030 
0031 namespace genfit {
0032 
0033 /**
0034  * @brief HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
0035  *
0036  */
0037 class AbsHMatrix : public TObject {
0038 
0039  public:
0040 
0041   AbsHMatrix() {;}
0042 
0043   virtual ~AbsHMatrix() {;}
0044 
0045   //! Get the actual matrix representation
0046   virtual const TMatrixD& getMatrix() const = 0;
0047 
0048   //! H*v
0049   virtual TVectorD Hv(const TVectorD& v) const {return getMatrix()*v;}
0050 
0051   //! M*H^t
0052   virtual TMatrixD MHt(const TMatrixDSym& M) const {return TMatrixD(M, TMatrixD::kMultTranspose, getMatrix());}
0053   virtual TMatrixD MHt(const TMatrixD& M) const {return TMatrixD(M, TMatrixD::kMultTranspose, getMatrix());}
0054 
0055   //! similarity: H*M*H^t
0056   virtual void HMHt(TMatrixDSym& M) const {M.Similarity(getMatrix());}
0057 
0058   virtual AbsHMatrix* clone() const = 0;
0059 
0060   bool operator==(const AbsHMatrix& other) const {return this->isEqual(other);}
0061   bool operator!=(const AbsHMatrix& other) const {return !(this->isEqual(other));}
0062   virtual bool isEqual(const AbsHMatrix& other) const = 0;
0063 
0064   virtual void Print(const Option_t* = "") const {;}
0065 
0066  protected:
0067   // protect from calling copy c'tor or assignment operator from outside the class. Use #clone() if you want a copy!
0068   AbsHMatrix(const AbsHMatrix& o) : TObject(o) {;}
0069   AbsHMatrix& operator=(const AbsHMatrix&);
0070 
0071  public:
0072   ClassDef(AbsHMatrix,1)
0073 
0074 };
0075 
0076 } /* End of namespace genfit */
0077 /** @} */
0078 
0079 #endif // genfit_AbsHMatrix_h