ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TrkDriftCircleMath::TransformToLine Class Reference

#include <TransformToLine.h>

Collaboration diagram for TrkDriftCircleMath::TransformToLine:

Public Member Functions

 TransformToLine ()=default
 
 TransformToLine (const Line &line)
 
LocVec2D toLine (const LocVec2D &pos) const
 
double toLineX (const LocVec2D &pos) const
 only get one coordinate -> faster More...
 
double toLineY (const LocVec2D &pos) const
 
LocVec2D toLocal (const LocVec2D &pos) const
 
void set (const Line &line)
 
DriftCircle toLine (const DriftCircle &dc) const
 
DriftCircle toLocal (const DriftCircle &dc) const
 
const RotPhitoLineRotation () const
 rotate local position into line frame More...
 
const RotPhitoLocalRotation () const
 rotate position in line frame into local frame More...
 

Private Attributes

RotPhi m_toLineRot {0.}
 
RotPhi m_toLocalRot {0.}
 
LocVec2D m_shift {0., 0.}
 

Detailed Description

Definition at line 15 of file TransformToLine.h.

Constructor & Destructor Documentation

◆ TransformToLine() [1/2]

TrkDriftCircleMath::TransformToLine::TransformToLine ( )
default

◆ TransformToLine() [2/2]

TrkDriftCircleMath::TransformToLine::TransformToLine ( const Line line)
inline

Definition at line 18 of file TransformToLine.h.

18 : m_toLineRot(line.phi()), m_toLocalRot(-line.phi()), m_shift(line.x0(), line.y0()) {}

Member Function Documentation

◆ set()

void TrkDriftCircleMath::TransformToLine::set ( const Line line)
inline

Definition at line 28 of file TransformToLine.h.

28  {
29  m_toLineRot.set(line.phi());
30  m_toLocalRot.set(-line.phi());
31  m_shift.setX(line.x0());
32  m_shift.setY(line.y0());
33  }

◆ toLine() [1/2]

DriftCircle TrkDriftCircleMath::TransformToLine::toLine ( const DriftCircle dc) const
inline

Definition at line 35 of file TransformToLine.h.

35  {
36  return DriftCircle(toLine(dc.position()), dc.r(), dc.dr(), dc.driftState(), dc.id(), dc.rot(), dc.index());
37  }

◆ toLine() [2/2]

LocVec2D TrkDriftCircleMath::TransformToLine::toLine ( const LocVec2D pos) const
inline

Definition at line 20 of file TransformToLine.h.

20 { return m_toLineRot * pos - m_shift; }

◆ toLineRotation()

const RotPhi& TrkDriftCircleMath::TransformToLine::toLineRotation ( ) const
inline

rotate local position into line frame

Definition at line 43 of file TransformToLine.h.

43 { return m_toLineRot; }

◆ toLineX()

double TrkDriftCircleMath::TransformToLine::toLineX ( const LocVec2D pos) const
inline

only get one coordinate -> faster

Definition at line 23 of file TransformToLine.h.

23 { return m_toLineRot.xval(pos) - m_shift.x(); }

◆ toLineY()

double TrkDriftCircleMath::TransformToLine::toLineY ( const LocVec2D pos) const
inline

Definition at line 24 of file TransformToLine.h.

24 { return m_toLineRot.yval(pos) - m_shift.y(); }

◆ toLocal() [1/2]

DriftCircle TrkDriftCircleMath::TransformToLine::toLocal ( const DriftCircle dc) const
inline

Definition at line 38 of file TransformToLine.h.

38  {
39  return DriftCircle(toLocal(dc.position()), dc.r(), dc.dr(), dc.driftState(), dc.id(), dc.rot(), dc.index());
40  }

◆ toLocal() [2/2]

LocVec2D TrkDriftCircleMath::TransformToLine::toLocal ( const LocVec2D pos) const
inline

Definition at line 26 of file TransformToLine.h.

26 { return m_toLocalRot * (pos + m_shift); }

◆ toLocalRotation()

const RotPhi& TrkDriftCircleMath::TransformToLine::toLocalRotation ( ) const
inline

rotate position in line frame into local frame

Definition at line 46 of file TransformToLine.h.

46 { return m_toLocalRot; }

Member Data Documentation

◆ m_shift

LocVec2D TrkDriftCircleMath::TransformToLine::m_shift {0., 0.}
private

Definition at line 51 of file TransformToLine.h.

◆ m_toLineRot

RotPhi TrkDriftCircleMath::TransformToLine::m_toLineRot {0.}
private

Definition at line 49 of file TransformToLine.h.

◆ m_toLocalRot

RotPhi TrkDriftCircleMath::TransformToLine::m_toLocalRot {0.}
private

Definition at line 50 of file TransformToLine.h.


The documentation for this class was generated from the following file:
TrkDriftCircleMath::LocVec2D::setY
void setY(double y)
Set only y.
Definition: LocVec2D.h:44
checkFileSG.line
line
Definition: checkFileSG.py:75
TrkDriftCircleMath::TransformToLine::m_toLineRot
RotPhi m_toLineRot
Definition: TransformToLine.h:49
TrkDriftCircleMath::TransformToLine::m_shift
LocVec2D m_shift
Definition: TransformToLine.h:51
TrkDriftCircleMath::LocVec2D::x
double x() const
Returns the x coordinate of the vector.
Definition: LocVec2D.h:27
TrkDriftCircleMath::RotPhi::xval
double xval(const LocVec2D &lv) const
Definition: RotPhi.h:28
TrkDriftCircleMath::TransformToLine::m_toLocalRot
RotPhi m_toLocalRot
Definition: TransformToLine.h:50
TrkDriftCircleMath::LocVec2D::setX
void setX(double x)
Set only x.
Definition: LocVec2D.h:42
TrkDriftCircleMath::LocVec2D::y
double y() const
Returns the y coordinate of the vector.
Definition: LocVec2D.h:29
TrkDriftCircleMath::RotPhi::set
void set(double phi)
Definition: RotPhi.h:34
TrkDriftCircleMath::TransformToLine::toLocal
LocVec2D toLocal(const LocVec2D &pos) const
Definition: TransformToLine.h:26
TrkDriftCircleMath::TransformToLine::toLine
LocVec2D toLine(const LocVec2D &pos) const
Definition: TransformToLine.h:20
TrkDriftCircleMath::RotPhi::yval
double yval(const LocVec2D &lv) const
Definition: RotPhi.h:29
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18