#include <CurvedLine.h>
Definition at line 30 of file CurvedLine.h.
◆ MdtHitPtr
◆ MdtHitVec
◆ CurvedLine() [1/3]
| CurvedLine::CurvedLine |
( |
| ) |
|
Default constructor: a straight line through (0,0,0) pointing in in the local x direction of the chambers is created.
Definition at line 20 of file CurvedLine.cxx.
20 {
22
24
25 std::vector<Amg::Vector3D> points(3);
26 std::vector<Amg::Vector3D>
errors(3);
27
29
31
38
40
42
44}
void init(std::vector< Amg::Vector3D > &points, std::vector< Amg::Vector3D > &x_and_y_errors)
Eigen::Matrix< double, 3, 1 > Vector3D
◆ CurvedLine() [2/3]
Constructor.
- Parameters
-
| points | A straight line in the xz and a parabolic line in the yz plane is fitter through the given points. All points get equal weight. |
Definition at line 52 of file CurvedLine.cxx.
◆ CurvedLine() [3/3]
Constructor.
- Parameters
-
| points | A straight line in the xz and a parabolic line in the yz plane is fitter through the given points. |
| x_and_y_errors | Errors of the x and y coordinates of the given points |
Definition at line 72 of file CurvedLine.cxx.
72{
init(points, x_and_y_errors); }
◆ chi2()
| double CurvedLine::chi2 |
( |
| ) |
const |
◆ chi2PerDegreesOfFreedom()
| double CurvedLine::chi2PerDegreesOfFreedom |
( |
| ) |
const |
Return chi2 / number of TrackHits - 3.
Definition at line 186 of file CurvedLine.cxx.
unsigned int m_numTrkHits
◆ getPointOnLine()
| Amg::Vector3D CurvedLine::getPointOnLine |
( |
const double | loc_z | ) |
const |
get the point on the line a the local z coordinate "loc_z"
Definition at line 80 of file CurvedLine.cxx.
80 {
82
84
85 double loc_x{0.0}, loc_y{0.0};
86
88
90
93 }
94
97 }
98
100
102
104}
◆ getTangent()
get the tangent to the line a the local z coordinate "loc_z"
Definition at line 112 of file CurvedLine.cxx.
112 {
114
116
119
121
122
124
126
127 return MTStraightLine(point_1, point_2 - point_1, null_vec, null_vec);
128}
Amg::Vector3D getPointOnLine(const double loc_z) const
get the point on the line a the local z coordinate "loc_z"
◆ init()
Definition at line 136 of file CurvedLine.cxx.
136 {
138
140
141 if (points.size() < 3) {
143 log << MSG::ERROR <<
"Class CurvedLine, method init: Not enough points given, must be at least 3 points!" <<
endmsg;
144 }
145
147
149
150 BaseFunctionFitter
fitter;
151 LegendrePolynomial legendre;
152
153 std::vector<SamplePoint> sample_points(points.size());
154
155
157
159
160
161 for (
unsigned int k = 0;
k < points.size();
k++) {
162 sample_points[
k].set_x1(points[k].
z());
163 sample_points[
k].set_x2(points[k].
x());
164 sample_points[
k].set_error(x_and_y_errors[k].
x());
165 }
166 fitter.set_number_of_coefficients(2);
167 fitter.fit_parameters(sample_points, 1, sample_points.size(), legendre);
169
170
171 for (
unsigned int k = 0;
k < points.size();
k++) {
172 sample_points[
k].set_x1(points[k].
z());
173 sample_points[
k].set_x2(points[k].
y());
174 sample_points[
k].set_error(x_and_y_errors[k].
y());
175 }
176 fitter.set_number_of_coefficients(3);
177 fitter.fit_parameters(sample_points, 1, sample_points.size(), legendre);
179
180}
IMessageSvc * getMessageSvc(bool quiet=false)
const ShapeFitter * fitter
◆ numberOfTrackHits()
| unsigned int CurvedLine::numberOfTrackHits |
( |
| ) |
const |
◆ setChi2()
| void CurvedLine::setChi2 |
( |
double | chi2 | ) |
|
◆ setNumberOfTrackHits()
| void CurvedLine::setNumberOfTrackHits |
( |
unsigned int | n_hits | ) |
|
◆ setUsedHits()
| void CurvedLine::setUsedHits |
( |
const MdtHitVec & | hits | ) |
|
◆ trackHits()
◆ m_chi2
| double MuonCalib::CurvedLine::m_chi2 {-1} |
|
private |
◆ m_coeff_xz
◆ m_coeff_yz
◆ m_numTrkHits
| unsigned int MuonCalib::CurvedLine::m_numTrkHits {0} |
|
private |
◆ m_used_hits
The documentation for this class was generated from the following files: