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

#include <TransversePoint.h>

Collaboration diagram for ForwardTracker::TransversePoint:

Public Member Functions

 TransversePoint ()
 
 TransversePoint (double, double)
 
double x () const
 
double y () const
 
double mag2 () const
 
double mag () const
 
TransversePointoperator*= (double scalar)
 
TransversePointoperator+= (const TransversePoint &tp)
 
TransversePointoperator-= (const TransversePoint &tp)
 
double operator[] (unsigned int i) const
 
double & operator[] (unsigned int i)
 
std::string str () const
 

Private Member Functions

void checkIndex (unsigned int i) const
 

Private Attributes

double m_x
 
double m_y
 

Detailed Description

Definition at line 13 of file ForwardTracker/ForwardTracker/TransversePoint.h.

Constructor & Destructor Documentation

◆ TransversePoint() [1/2]

ForwardTracker::TransversePoint::TransversePoint ( )

Definition at line 12 of file ForwardTracker/src/TransversePoint.cxx.

12 : m_x(0), m_y(0) {}

◆ TransversePoint() [2/2]

ForwardTracker::TransversePoint::TransversePoint ( double  x,
double  y 
)

Definition at line 13 of file ForwardTracker/src/TransversePoint.cxx.

13 : m_x(x), m_y(y) {}

Member Function Documentation

◆ checkIndex()

void ForwardTracker::TransversePoint::checkIndex ( unsigned int  i) const
inlineprivate

Definition at line 36 of file ForwardTracker/ForwardTracker/TransversePoint.h.

36 { if (i>1) throw std::range_error("Index of TransversePoint is out of range"); }

◆ mag()

double ForwardTracker::TransversePoint::mag ( ) const
inline

Definition at line 23 of file ForwardTracker/ForwardTracker/TransversePoint.h.

23 { return std::sqrt(mag2()); }

◆ mag2()

double ForwardTracker::TransversePoint::mag2 ( ) const
inline

Definition at line 22 of file ForwardTracker/ForwardTracker/TransversePoint.h.

22 { return m_x*m_x + m_y*m_y; }

◆ operator*=()

TransversePoint& ForwardTracker::TransversePoint::operator*= ( double  scalar)
inline

Definition at line 25 of file ForwardTracker/ForwardTracker/TransversePoint.h.

25 { m_x *= scalar; m_y *= scalar; return *this; }

◆ operator+=()

TransversePoint& ForwardTracker::TransversePoint::operator+= ( const TransversePoint tp)
inline

Definition at line 26 of file ForwardTracker/ForwardTracker/TransversePoint.h.

26 { m_x += tp.x(); m_y += tp.y(); return *this; }

◆ operator-=()

TransversePoint& ForwardTracker::TransversePoint::operator-= ( const TransversePoint tp)
inline

Definition at line 27 of file ForwardTracker/ForwardTracker/TransversePoint.h.

27 { m_x -= tp.x(); m_y -= tp.y(); return *this; }

◆ operator[]() [1/2]

double& ForwardTracker::TransversePoint::operator[] ( unsigned int  i)
inline

Definition at line 30 of file ForwardTracker/ForwardTracker/TransversePoint.h.

30 { checkIndex(i); if (i == 0) return m_x; return m_y; }

◆ operator[]() [2/2]

double ForwardTracker::TransversePoint::operator[] ( unsigned int  i) const
inline

Definition at line 29 of file ForwardTracker/ForwardTracker/TransversePoint.h.

29 { checkIndex(i); if (i == 0) return m_x; return m_y; }

◆ str()

std::string ForwardTracker::TransversePoint::str ( ) const

Definition at line 15 of file ForwardTracker/src/TransversePoint.cxx.

15  {
16 
17  std::ostringstream ost;
18 
19  ost << std::fixed
20  << std::setprecision(9) << "("
21  << std::setw(12) << m_x << ", "
22  << std::setw(12) << m_y << ")";
23 
24  return ost.str();
25  }

◆ x()

double ForwardTracker::TransversePoint::x ( ) const
inline

Definition at line 20 of file ForwardTracker/ForwardTracker/TransversePoint.h.

20 { return m_x; }

◆ y()

double ForwardTracker::TransversePoint::y ( ) const
inline

Definition at line 21 of file ForwardTracker/ForwardTracker/TransversePoint.h.

21 { return m_y; }

Member Data Documentation

◆ m_x

double ForwardTracker::TransversePoint::m_x
private

◆ m_y

double ForwardTracker::TransversePoint::m_y
private

The documentation for this class was generated from the following files:
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
ForwardTracker::TransversePoint::checkIndex
void checkIndex(unsigned int i) const
Definition: ForwardTracker/ForwardTracker/TransversePoint.h:36
ForwardTracker::TransversePoint::y
double y() const
Definition: ForwardTracker/ForwardTracker/TransversePoint.h:21
ForwardTracker::TransversePoint::m_x
double m_x
Definition: ForwardTracker/ForwardTracker/TransversePoint.h:38
ForwardTracker::TransversePoint::mag2
double mag2() const
Definition: ForwardTracker/ForwardTracker/TransversePoint.h:22
ParticleTest.tp
tp
Definition: ParticleTest.py:25
lumiFormat.i
int i
Definition: lumiFormat.py:85
ForwardTracker::TransversePoint::x
double x() const
Definition: ForwardTracker/ForwardTracker/TransversePoint.h:20
ForwardTracker::TransversePoint::m_y
double m_y
Definition: ForwardTracker/ForwardTracker/TransversePoint.h:39