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 
27 
28 namespace MuonCalib {
29 
30  class CurvedLine {
31  public:
34 
35  // Constructors //
36  CurvedLine();
39 
40  CurvedLine(std::vector<Amg::Vector3D> &points);
45 
46  CurvedLine(std::vector<Amg::Vector3D> &points, std::vector<Amg::Vector3D> &x_and_y_errors);
52 
53  // Methods //
54  // get-methods //
55  Amg::Vector3D getPointOnLine(const double loc_z) const;
58 
59  MTStraightLine getTangent(const double loc_z) const;
62 
64  void setChi2(double chi2);
65  double chi2() const;
66 
68  void setNumberOfTrackHits(unsigned int n_hits);
69  unsigned int numberOfTrackHits() const;
71  double chi2PerDegreesOfFreedom() const;
72 
73  void setUsedHits(const MdtHitVec &hits);
74  const MdtHitVec &trackHits() const;
75 
76  private:
77  Amg::VectorX m_coeff_xz; // coefficients of the straight line in the local
78  // xz plane
79  Amg::VectorX m_coeff_yz; // coefficients of the curved line in the local
80  // yz plane
81 
82  double m_chi2{-1};
83  unsigned int m_numTrkHits{0};
85 
86  // private methods //
87  void init(std::vector<Amg::Vector3D> &points, std::vector<Amg::Vector3D> &x_and_y_errors);
88  // initialization routine
89  };
90 
91 } // namespace MuonCalib
92 
93 #endif
Amg::VectorX
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Definition: EventPrimitives.h:30
MuonCalib::CurvedLine::init
void init(std::vector< Amg::Vector3D > &points, std::vector< Amg::Vector3D > &x_and_y_errors)
Definition: CurvedLine.cxx:136
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MuonCalibSegment.h
MuonCalib::CurvedLine::m_used_hits
MdtHitVec m_used_hits
Definition: CurvedLine.h:84
MTStraightLine.h
MuonCalib::CurvedLine
Definition: CurvedLine.h:30
MuonCalib::MuonCalibSegment::MdtHitVec
std::vector< MdtHitPtr > MdtHitVec
Definition: MuonCalibSegment.h:45
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:112
MuonCalib::CurvedLine::setChi2
void setChi2(double chi2)
Cache the chi2.
Definition: CurvedLine.cxx:181
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:184
MuonCalib::CurvedLine::MdtHitVec
MuonCalibSegment::MdtHitVec MdtHitVec
Definition: CurvedLine.h:32
MuonCalib::CurvedLine::MdtHitPtr
MuonCalibSegment::MdtHitPtr MdtHitPtr
Definition: CurvedLine.h:33
MuonCalib::CurvedLine::setNumberOfTrackHits
void setNumberOfTrackHits(unsigned int n_hits)
cache the number of track hits
Definition: CurvedLine.cxx:183
MuonCalib::CurvedLine::m_coeff_xz
Amg::VectorX m_coeff_xz
Definition: CurvedLine.h:77
MuonCalib::CurvedLine::trackHits
const MdtHitVec & trackHits() const
Definition: CurvedLine.cxx:189
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:182
MuonCalib::CurvedLine::m_numTrkHits
unsigned int m_numTrkHits
Definition: CurvedLine.h:83
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:80
EventPrimitives.h
MuonCalib::CurvedLine::m_chi2
double m_chi2
Definition: CurvedLine.h:82
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:186
MuonCalib::CurvedLine::setUsedHits
void setUsedHits(const MdtHitVec &hits)
Definition: CurvedLine.cxx:188
MuonCalib::MTStraightLine
Definition: MTStraightLine.h:16
jobOptions.points
points
Definition: jobOptions.GenevaPy8_Zmumu.py:97
MuonCalib::CurvedLine::m_coeff_yz
Amg::VectorX m_coeff_yz
Definition: CurvedLine.h:79
MuonCalib::MuonCalibSegment::MdtHitPtr
std::shared_ptr< MdtCalibHitBase > MdtHitPtr
typedef for a collection of MdtCalibHitBase s
Definition: MuonCalibSegment.h:44