Back to home page

sPhenix code displayed by LXR

 
 

    


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

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_KalmanFittedStateOnPlane_h
0024 #define genfit_KalmanFittedStateOnPlane_h
0025 
0026 #include "MeasuredStateOnPlane.h"
0027 
0028 
0029 namespace genfit {
0030 
0031 
0032 /**
0033  *  @brief #MeasuredStateOnPlane with additional info produced by a Kalman filter or DAF.
0034  */
0035 class KalmanFittedStateOnPlane : public MeasuredStateOnPlane {
0036 
0037  public:
0038 
0039   KalmanFittedStateOnPlane();
0040   KalmanFittedStateOnPlane(const KalmanFittedStateOnPlane&) = default;
0041   KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, double chiSquareIncrement, double ndf);
0042   KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, const TVectorD& auxInfo, double chiSquareIncrement, double ndf);
0043   KalmanFittedStateOnPlane(const MeasuredStateOnPlane& state, double chiSquareIncrement, double ndf);
0044 
0045   KalmanFittedStateOnPlane& operator=(KalmanFittedStateOnPlane other);
0046   void swap(KalmanFittedStateOnPlane& other); // nothrow
0047 
0048   virtual ~KalmanFittedStateOnPlane() {}
0049 
0050   double getChiSquareIncrement() const {return chiSquareIncrement_;}
0051   double getNdf() const {return ndf_;}
0052 
0053   void setChiSquareIncrement(double chiSquareIncrement) {chiSquareIncrement_ = chiSquareIncrement;}
0054   void setNdf(double ndf) {ndf_ = ndf;}
0055 
0056 
0057  protected:
0058 
0059   double chiSquareIncrement_;
0060   
0061   //! Degrees of freedom. Needs to be a double because of DAF.
0062   double ndf_;
0063 
0064 
0065  public:
0066 
0067   ClassDef(KalmanFittedStateOnPlane,1)
0068 
0069 };
0070 
0071 
0072 inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane() :
0073   MeasuredStateOnPlane(), chiSquareIncrement_(0), ndf_(0)
0074 {
0075   ;
0076 }
0077 
0078 inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, double chiSquareIncrement, double ndf) :
0079   MeasuredStateOnPlane(state, cov, plane, rep), chiSquareIncrement_(chiSquareIncrement), ndf_(ndf)
0080 {
0081   ;
0082 }
0083 
0084 inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, const TVectorD& auxInfo, double chiSquareIncrement, double ndf) :
0085   MeasuredStateOnPlane(state, cov, plane, rep, auxInfo), chiSquareIncrement_(chiSquareIncrement), ndf_(ndf)
0086 {
0087   ;
0088 }
0089 
0090 inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane(const MeasuredStateOnPlane& state, double chiSquareIncrement, double ndf) :
0091   MeasuredStateOnPlane(state), chiSquareIncrement_(chiSquareIncrement), ndf_(ndf)
0092 {
0093   ;
0094 }
0095 
0096 inline KalmanFittedStateOnPlane& KalmanFittedStateOnPlane::operator=(KalmanFittedStateOnPlane other) {
0097   swap(other);
0098   return *this;
0099 }
0100 
0101 inline void KalmanFittedStateOnPlane::swap(KalmanFittedStateOnPlane& other) {
0102   MeasuredStateOnPlane::swap(other);
0103   std::swap(this->chiSquareIncrement_, other.chiSquareIncrement_);
0104   std::swap(this->ndf_, other.ndf_);
0105 }
0106 
0107 } /* End of namespace genfit */
0108 /** @} */
0109 
0110 #endif // genfit_KalmanFittedStateOnPlane_h