ATLAS Offline Software
CurvedLine.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MuonCalib_CurvedLineH
5 #define MuonCalib_CurvedLineH
6 
7 //::::::::::::::::::::::
8 //:: CLASS CurvedLine ::
9 //::::::::::::::::::::::
10 
16 
17 //::::::::::::::::::
18 //:: HEADER FILES ::
19 //::::::::::::::::::
20 
21 #include <vector>
22 
28 
29 namespace MuonCalib {
30 
31  class CurvedLine {
32  public:
35 
36  // Constructors //
37  CurvedLine();
40 
41  CurvedLine(std::vector<Amg::Vector3D> &points);
46 
47  CurvedLine(std::vector<Amg::Vector3D> &points, std::vector<Amg::Vector3D> &x_and_y_errors);
53 
54  // Methods //
55  // get-methods //
56  Amg::Vector3D getPointOnLine(const double &loc_z) const;
59 
60  MTStraightLine getTangent(const double &loc_z) const;
63 
65  void setChi2(double chi2);
66  double chi2() const;
67 
69  void setNumberOfTrackHits(unsigned int n_hits);
70  unsigned int numberOfTrackHits() const;
72  double chi2PerDegreesOfFreedom() const;
73 
74  void setUsedHits(const MdtHitVec &hits);
75  const MdtHitVec &trackHits() const;
76 
77  private:
78  // parameters of the curved line //
79  const Legendre_polynomial *m_Legendre = nullptr; // pointer to the Legendre polynomial
80  // describing the curved line
81  Amg::VectorX m_coeff_xz; // coefficients of the straight line in the local
82  // xz plane
83  Amg::VectorX m_coeff_yz; // coefficients of the curved line in the local
84  // yz plane
85 
86  double m_chi2{-1};
87  unsigned int m_numTrkHits{0};
89 
90  // private methods //
91  void init(std::vector<Amg::Vector3D> &points, std::vector<Amg::Vector3D> &x_and_y_errors);
92  // initialization routine
93  };
94 
95 } // namespace MuonCalib
96 
97 #endif
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:32
MuonCalib::CurvedLine::init
void init(std::vector< Amg::Vector3D > &points, std::vector< Amg::Vector3D > &x_and_y_errors)
Definition: CurvedLine.cxx:138
MuonCalibSegment.h
MuonCalib::CurvedLine::m_used_hits
MdtHitVec m_used_hits
Definition: CurvedLine.h:88
MuonCalib::CurvedLine::getTangent
MTStraightLine getTangent(const double &loc_z) const
get the tangent to the line a the local z coordinate "loc_z"
Definition: CurvedLine.cxx:114
MTStraightLine.h
MuonCalib::CurvedLine
Definition: CurvedLine.h:31
MuonCalib::MuonCalibSegment::MdtHitVec
std::vector< MdtHitPtr > MdtHitVec
Definition: MuonCalibSegment.h:45
MuonCalib::CurvedLine::m_Legendre
const Legendre_polynomial * m_Legendre
Definition: CurvedLine.h:79
MuonCalib::CurvedLine::getPointOnLine
Amg::Vector3D getPointOnLine(const double &loc_z) const
get the point on the line a the local z coordinate "loc_z"
Definition: CurvedLine.cxx:86
MuonCalib::CurvedLine::setChi2
void setChi2(double chi2)
Cache the chi2.
Definition: CurvedLine.cxx:190
GeoPrimitives.h
MuonCalib::CurvedLine::CurvedLine
CurvedLine()
Default constructor: a straight line through (0,0,0) pointing in in the local x direction of the cham...
Definition: CurvedLine.cxx:20
MuonCalib::CurvedLine::numberOfTrackHits
unsigned int numberOfTrackHits() const
Definition: CurvedLine.cxx:193
MuonCalib::CurvedLine::MdtHitVec
MuonCalibSegment::MdtHitVec MdtHitVec
Definition: CurvedLine.h:33
MuonCalib::CurvedLine::MdtHitPtr
MuonCalibSegment::MdtHitPtr MdtHitPtr
Definition: CurvedLine.h:34
MuonCalib::CurvedLine::setNumberOfTrackHits
void setNumberOfTrackHits(unsigned int n_hits)
cache the number of track hits
Definition: CurvedLine.cxx:192
MuonCalib::CurvedLine::m_coeff_xz
Amg::VectorX m_coeff_xz
Definition: CurvedLine.h:81
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
MuonCalib::CurvedLine::trackHits
const MdtHitVec & trackHits() const
Definition: CurvedLine.cxx:198
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::CurvedLine::chi2
double chi2() const
Definition: CurvedLine.cxx:191
MuonCalib::CurvedLine::m_numTrkHits
unsigned int m_numTrkHits
Definition: CurvedLine.h:87
EventPrimitives.h
MuonCalib::CurvedLine::m_chi2
double m_chi2
Definition: CurvedLine.h:86
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonCalib::CurvedLine::chi2PerDegreesOfFreedom
double chi2PerDegreesOfFreedom() const
Return chi2 / number of TrackHits - 3.
Definition: CurvedLine.cxx:195
MuonCalib::CurvedLine::setUsedHits
void setUsedHits(const MdtHitVec &hits)
Definition: CurvedLine.cxx:197
MuonCalib::MTStraightLine
Definition: MTStraightLine.h:16
Legendre_polynomial.h
MuonCalib::CurvedLine::m_coeff_yz
Amg::VectorX m_coeff_yz
Definition: CurvedLine.h:83
MuonCalib::MuonCalibSegment::MdtHitPtr
std::shared_ptr< MdtCalibHitBase > MdtHitPtr
typedef for a collection of MdtCalibHitBase s
Definition: MuonCalibSegment.h:44
MuonCalib::Legendre_polynomial
Definition: Legendre_polynomial.h:45