forked from sPHENIX-Collaboration/GenFit
/
KalmanFittedStateOnPlane.h
109 lines (76 loc) · 3.61 KB
/
KalmanFittedStateOnPlane.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/* Copyright 2008-2010, Technische Universitaet Muenchen,
Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
This file is part of GENFIT.
GENFIT is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GENFIT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
*/
/** @addtogroup genfit
* @{
*/
#ifndef genfit_KalmanFittedStateOnPlane_h
#define genfit_KalmanFittedStateOnPlane_h
#include "MeasuredStateOnPlane.h"
namespace genfit {
/**
* @brief #MeasuredStateOnPlane with additional info produced by a Kalman filter or DAF.
*/
class KalmanFittedStateOnPlane : public MeasuredStateOnPlane {
public:
KalmanFittedStateOnPlane();
KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, double chiSquareIncrement, double ndf);
KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, const TVectorD& auxInfo, double chiSquareIncrement, double ndf);
KalmanFittedStateOnPlane(const MeasuredStateOnPlane& state, double chiSquareIncrement, double ndf);
KalmanFittedStateOnPlane& operator=(KalmanFittedStateOnPlane other);
void swap(KalmanFittedStateOnPlane& other); // nothrow
virtual ~KalmanFittedStateOnPlane() {}
double getChiSquareIncrement() const {return chiSquareIncrement_;}
double getNdf() const {return ndf_;}
void setChiSquareIncrement(double chiSquareIncrement) {chiSquareIncrement_ = chiSquareIncrement;}
void setNdf(double ndf) {ndf_ = ndf;}
protected:
double chiSquareIncrement_;
//! Degrees of freedom. Needs to be a double because of DAF.
double ndf_;
public:
ClassDef(KalmanFittedStateOnPlane,1)
};
inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane() :
MeasuredStateOnPlane(), chiSquareIncrement_(0), ndf_(0)
{
;
}
inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, double chiSquareIncrement, double ndf) :
MeasuredStateOnPlane(state, cov, plane, rep), chiSquareIncrement_(chiSquareIncrement), ndf_(ndf)
{
;
}
inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane(const TVectorD& state, const TMatrixDSym& cov, const SharedPlanePtr& plane, const AbsTrackRep* rep, const TVectorD& auxInfo, double chiSquareIncrement, double ndf) :
MeasuredStateOnPlane(state, cov, plane, rep, auxInfo), chiSquareIncrement_(chiSquareIncrement), ndf_(ndf)
{
;
}
inline KalmanFittedStateOnPlane::KalmanFittedStateOnPlane(const MeasuredStateOnPlane& state, double chiSquareIncrement, double ndf) :
MeasuredStateOnPlane(state), chiSquareIncrement_(chiSquareIncrement), ndf_(ndf)
{
;
}
inline KalmanFittedStateOnPlane& KalmanFittedStateOnPlane::operator=(KalmanFittedStateOnPlane other) {
swap(other);
return *this;
}
inline void KalmanFittedStateOnPlane::swap(KalmanFittedStateOnPlane& other) {
MeasuredStateOnPlane::swap(other);
std::swap(this->chiSquareIncrement_, other.chiSquareIncrement_);
std::swap(this->ndf_, other.ndf_);
}
} /* End of namespace genfit */
/** @} */
#endif // genfit_KalmanFittedStateOnPlane_h