![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "GaudiKernel/MsgStream.h"
25 std::vector<Amg::Vector3D> points(3);
26 std::vector<Amg::Vector3D>
errors(3);
57 std::vector<Amg::Vector3D>
errors(points.size());
91 double loc_x(0.0), loc_y(0.0);
129 return MTStraightLine(point_1, point_2 - point_1, null_vec, null_vec);
138 void CurvedLine::init(std::vector<Amg::Vector3D>& points, std::vector<Amg::Vector3D>& x_and_y_errors) {
143 if (points.size() < 3) {
145 log << MSG::ERROR <<
"Class CurvedLine, method init: Not enough points given, must be at least 3 points!" <<
endmsg;
155 std::vector<SamplePoint> sample_points(points.size());
163 for (
unsigned int k = 0;
k < points.size();
k++) {
164 sample_points[
k].set_x1(points[
k].
z());
165 sample_points[
k].set_x2(points[
k].
x());
166 sample_points[
k].set_error(x_and_y_errors[
k].
x());
168 fitter.set_number_of_coefficients(2);
169 fitter.fit_parameters(sample_points, 1, sample_points.size(), &legendre);
173 for (
unsigned int k = 0;
k < points.size();
k++) {
174 sample_points[
k].set_x1(points[
k].
z());
175 sample_points[
k].set_x2(points[
k].
y());
176 sample_points[
k].set_error(x_and_y_errors[
k].
y());
178 fitter.set_number_of_coefficients(3);
179 fitter.fit_parameters(sample_points, 1, sample_points.size(), &legendre);
const ShapeFitter * fitter
void init(std::vector< Amg::Vector3D > &points, std::vector< Amg::Vector3D > &x_and_y_errors)
singleton-like access to IMessageSvc via open function and helper
MTStraightLine getTangent(const double &loc_z) const
get the tangent to the line a the local z coordinate "loc_z"
const Legendre_polynomial * m_Legendre
static const Legendre_polynomial * get_Legendre_polynomial(void)
get a pointer to the Legendre polynomial
IMessageSvc * getMessageSvc(bool quiet=false)
Amg::Vector3D getPointOnLine(const double &loc_z) const
get the point on the line a the local z coordinate "loc_z"
void setChi2(double chi2)
Cache the chi2.
CurvedLine()
Default constructor: a straight line through (0,0,0) pointing in in the local x direction of the cham...
unsigned int numberOfTrackHits() const
MuonCalibSegment::MdtHitVec MdtHitVec
void setNumberOfTrackHits(unsigned int n_hits)
cache the number of track hits
double value(const int &order, const double &x) const
get the value of the Legendre polynomial of order m_order at x
const MdtHitVec & trackHits() const
double chi2(TH1 *h0, TH1 *h1)
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
unsigned int m_numTrkHits
Eigen::Matrix< double, 3, 1 > Vector3D
double chi2PerDegreesOfFreedom() const
Return chi2 / number of TrackHits - 3.
void setUsedHits(const MdtHitVec &hits)