ATLAS Offline Software
Loading...
Searching...
No Matches
TrkDriftCircleMath::Line Class Reference

#include <Line.h>

Collaboration diagram for TrkDriftCircleMath::Line:

Public Member Functions

 Line (const LocVec2D &pos, const LocVec2D &dir)
 Constructors starting from the global parameters.
 Line (const LocVec2D &pos, double phi)
 Line (LocVec2D &&pos, const LocVec2D &dir)
 Line (LocVec2D &&pos, double phi)
 Line (double x0, double y0, double phi)
 ~Line ()=default
void set (const LocVec2D &pos, const LocVec2D &dir)
 set methods to reduce copying of data
void set (const LocVec2D &pos, double phi)
void set (double x0, double y0, double phi)
void updateLocalParameters ()
void updateGlobalParameters ()
double phi () const
double x0 () const
double y0 () const
const LocVec2D & position () const
const LocVec2D & direction () const

Private Attributes

double m_phi {0}
LocVec2D m_pos {0., 0.}
LocVec2D m_dir {0., 0.}
LocVec2D m_loc_pos {0., 0.}

Detailed Description

Definition at line 17 of file Line.h.

Constructor & Destructor Documentation

◆ Line() [1/5]

TrkDriftCircleMath::Line::Line ( const LocVec2D & pos,
const LocVec2D & dir )
inline

Constructors starting from the global parameters.

Definition at line 22 of file Line.h.

22: Line{pos, std::atan2(dir.y(), dir.x())} {}
Line(const LocVec2D &pos, const LocVec2D &dir)
Constructors starting from the global parameters.
Definition Line.h:22

◆ Line() [2/5]

TrkDriftCircleMath::Line::Line ( const LocVec2D & pos,
double phi )
inline

Definition at line 24 of file Line.h.

◆ Line() [3/5]

TrkDriftCircleMath::Line::Line ( LocVec2D && pos,
const LocVec2D & dir )
inline

Definition at line 26 of file Line.h.

26: Line{pos, std::atan2(dir.y(), dir.x())} {}

◆ Line() [4/5]

TrkDriftCircleMath::Line::Line ( LocVec2D && pos,
double phi )
inline

Definition at line 28 of file Line.h.

◆ Line() [5/5]

TrkDriftCircleMath::Line::Line ( double x0,
double y0,
double phi )
inline

Definition at line 30 of file Line.h.

double x0() const
Definition Line.h:63
void updateGlobalParameters()
Definition Line.h:55
double y0() const
Definition Line.h:64

◆ ~Line()

TrkDriftCircleMath::Line::~Line ( )
default

Member Function Documentation

◆ direction()

const LocVec2D & TrkDriftCircleMath::Line::direction ( ) const
inline

Definition at line 66 of file Line.h.

66{ return m_dir; }

◆ phi()

double TrkDriftCircleMath::Line::phi ( ) const
inline

Definition at line 62 of file Line.h.

62{ return m_phi; }

◆ position()

const LocVec2D & TrkDriftCircleMath::Line::position ( ) const
inline

Definition at line 65 of file Line.h.

65{ return m_pos; }

◆ set() [1/3]

void TrkDriftCircleMath::Line::set ( const LocVec2D & pos,
const LocVec2D & dir )
inline

set methods to reduce copying of data

Definition at line 35 of file Line.h.

35{ set(pos, std::atan2(dir.y(), dir.x())); }
void set(const LocVec2D &pos, const LocVec2D &dir)
set methods to reduce copying of data
Definition Line.h:35

◆ set() [2/3]

void TrkDriftCircleMath::Line::set ( const LocVec2D & pos,
double phi )
inline

Definition at line 37 of file Line.h.

37 {
38 m_phi = phi;
39 m_pos = pos;
41 }

◆ set() [3/3]

void TrkDriftCircleMath::Line::set ( double x0,
double y0,
double phi )
inline

Definition at line 43 of file Line.h.

43 {
44 m_phi = phi;
45 m_loc_pos.set(x0, y0);
47 }

◆ updateGlobalParameters()

void TrkDriftCircleMath::Line::updateGlobalParameters ( )
inline

Use symmetry cos(x) = cos(-x) & sin(x) = -sin(-x)

Definition at line 55 of file Line.h.

55 {
56 RotPhi rot{-m_phi};
57 m_pos = rot * m_loc_pos;
59 m_dir.set(rot.cosphi(), -rot.sinphi());
60 }

◆ updateLocalParameters()

void TrkDriftCircleMath::Line::updateLocalParameters ( )
inline

Definition at line 49 of file Line.h.

49 {
50 RotPhi rot(m_phi);
51 m_dir.set(rot.cosphi(), rot.sinphi());
52 m_loc_pos = (rot * m_pos);
53 }

◆ x0()

double TrkDriftCircleMath::Line::x0 ( ) const
inline

Definition at line 63 of file Line.h.

63{ return m_loc_pos.x(); }

◆ y0()

double TrkDriftCircleMath::Line::y0 ( ) const
inline

Definition at line 64 of file Line.h.

64{ return m_loc_pos.y(); }

Member Data Documentation

◆ m_dir

LocVec2D TrkDriftCircleMath::Line::m_dir {0., 0.}
private

Definition at line 71 of file Line.h.

71{0., 0.};

◆ m_loc_pos

LocVec2D TrkDriftCircleMath::Line::m_loc_pos {0., 0.}
private

Definition at line 72 of file Line.h.

72{0., 0.};

◆ m_phi

double TrkDriftCircleMath::Line::m_phi {0}
private

Definition at line 69 of file Line.h.

69{0};

◆ m_pos

LocVec2D TrkDriftCircleMath::Line::m_pos {0., 0.}
private

Definition at line 70 of file Line.h.

70{0., 0.};

The documentation for this class was generated from the following file: