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

#include <Point.h>

Collaboration diagram for ForwardTracker::Point:

Public Member Functions

 Point ()
 
 Point (double, double, double)
 
double x () const
 
double y () const
 
double z () const
 
double perp2 () const
 
double mag2 () const
 
double mag () const
 
TransversePoint transverse () const
 
Pointoperator*= (double scalar)
 
Pointoperator+= (const Point &p)
 
Pointoperator-= (const Point &p)
 
Pointoperator+= (const TransversePoint &p)
 
Pointoperator-= (const TransversePoint &p)
 
double operator[] (unsigned int i) const
 
double & operator[] (unsigned int i)
 
void rotat (double angle, bool bendplane)
 
std::string str () const
 

Private Member Functions

void checkIndex (unsigned int i) const
 

Private Attributes

double m_x
 
double m_y
 
double m_z
 

Detailed Description

Definition at line 15 of file ForwardTracker/ForwardTracker/Point.h.

Constructor & Destructor Documentation

◆ Point() [1/2]

ForwardTracker::Point::Point ( )

Definition at line 9 of file ForwardTracker/src/Point.cxx.

9 : m_x(0), m_y(0), m_z(0) {}

◆ Point() [2/2]

ForwardTracker::Point::Point ( double  x,
double  y,
double  z 
)

Definition at line 10 of file ForwardTracker/src/Point.cxx.

10 : m_x(x), m_y(y), m_z(z) {}

Member Function Documentation

◆ checkIndex()

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

Definition at line 45 of file ForwardTracker/ForwardTracker/Point.h.

45 { if (i>2) throw std::range_error("Index of Point is out of range"); }

◆ mag()

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

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

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

◆ mag2()

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

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

26 { return m_x*m_x + m_y*m_y + m_z*m_z; }

◆ operator*=()

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

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

30 { m_x *= scalar; m_y *= scalar; m_z *= scalar; return *this; }

◆ operator+=() [1/2]

Point& ForwardTracker::Point::operator+= ( const Point p)
inline

Definition at line 31 of file ForwardTracker/ForwardTracker/Point.h.

31 { m_x += p.x(); m_y += p.y(); m_z += p.z(); return *this; }

◆ operator+=() [2/2]

Point& ForwardTracker::Point::operator+= ( const TransversePoint p)
inline

Definition at line 33 of file ForwardTracker/ForwardTracker/Point.h.

33 { m_x += p.x(); m_y += p.y(); return *this; }

◆ operator-=() [1/2]

Point& ForwardTracker::Point::operator-= ( const Point p)
inline

Definition at line 32 of file ForwardTracker/ForwardTracker/Point.h.

32 { m_x -= p.x(); m_y -= p.y(); m_z -= p.z(); return *this; }

◆ operator-=() [2/2]

Point& ForwardTracker::Point::operator-= ( const TransversePoint p)
inline

Definition at line 34 of file ForwardTracker/ForwardTracker/Point.h.

34 { m_x -= p.x(); m_y -= p.y(); return *this; }

◆ operator[]() [1/2]

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

Definition at line 37 of file ForwardTracker/ForwardTracker/Point.h.

37 { checkIndex(i); if (i == 0) return m_x; if (i == 1) return m_y; return m_z; }

◆ operator[]() [2/2]

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

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

36 { checkIndex(i); if (i == 0) return m_x; if (i == 1) return m_y; return m_z; }

◆ perp2()

double ForwardTracker::Point::perp2 ( ) const
inline

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

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

◆ rotat()

void ForwardTracker::Point::rotat ( double  angle,
bool  bendplane 
)

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

12  {
13 
14  double ds = (*this)[bendplane];
15  double dz = (*this)[2];
16 
17  (*this)[bendplane] = cos(angle)*ds - sin(angle)*dz;
18  (*this)[2] = sin(angle)*ds + cos(angle)*dz;
19  }

◆ str()

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

Definition at line 21 of file ForwardTracker/src/Point.cxx.

21  {
22 
23  std::ostringstream ost;
24 
25  ost << std::fixed
26  << std::setprecision(9) << "("
27  << std::setw(12) << m_x << ", "
28  << std::setw(12) << m_y << ", "
29  << std::setw(14) << m_z << ")";
30 
31  return ost.str();
32  }

◆ transverse()

TransversePoint ForwardTracker::Point::transverse ( ) const
inline

Definition at line 28 of file ForwardTracker/ForwardTracker/Point.h.

28 { return TransversePoint(m_x, m_y); }

◆ x()

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

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

22 { return m_x; }

◆ y()

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

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

23 { return m_y; }

◆ z()

double ForwardTracker::Point::z ( ) const
inline

Definition at line 24 of file ForwardTracker/ForwardTracker/Point.h.

24 { return m_z; }

Member Data Documentation

◆ m_x

double ForwardTracker::Point::m_x
private

Definition at line 47 of file ForwardTracker/ForwardTracker/Point.h.

◆ m_y

double ForwardTracker::Point::m_y
private

Definition at line 48 of file ForwardTracker/ForwardTracker/Point.h.

◆ m_z

double ForwardTracker::Point::m_z
private

Definition at line 49 of file ForwardTracker/ForwardTracker/Point.h.


The documentation for this class was generated from the following files:
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:258
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
ForwardTracker::Point::m_x
double m_x
Definition: ForwardTracker/ForwardTracker/Point.h:47
ForwardTracker::Point::y
double y() const
Definition: ForwardTracker/ForwardTracker/Point.h:23
ForwardTracker::Point::mag2
double mag2() const
Definition: ForwardTracker/ForwardTracker/Point.h:26
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
ForwardTracker::Point::m_y
double m_y
Definition: ForwardTracker/ForwardTracker/Point.h:48
ForwardTracker::Point::z
double z() const
Definition: ForwardTracker/ForwardTracker/Point.h:24
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ForwardTracker::Point::m_z
double m_z
Definition: ForwardTracker/ForwardTracker/Point.h:49
lumiFormat.i
int i
Definition: lumiFormat.py:85
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
ForwardTracker::Point::x
double x() const
Definition: ForwardTracker/ForwardTracker/Point.h:22
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
ForwardTracker::Point::checkIndex
void checkIndex(unsigned int i) const
Definition: ForwardTracker/ForwardTracker/Point.h:45