ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::Coordinate Class Reference

Coordinate class declaration. More...

#include <Coordinate.h>

Inheritance diagram for LVL1::Coordinate:
Collaboration diagram for LVL1::Coordinate:

Public Member Functions

 Coordinate (double phi, double eta)
 Coordinate ()
virtual ~Coordinate ()=default
void setCoords (double phi, double eta)
 change coords of an existing Coordinate object
double eta () const
 return eta
double phi () const
 return phi

Protected Member Functions

void checkBounds ()
 Ensure coords are sensible this could be done more intelligently, but at least it's readable!

Private Attributes

double m_phi
double m_eta

Static Private Attributes

static const double m_twoPi = M_PI * 2.0

Friends

std::ostream & operator<< (std::ostream &theStream, const Coordinate &theCoord)
 overload << operator so coordinate can be easily displayed... i.e.
MsgStream & operator<< (MsgStream &theStream, const Coordinate &theCoord)

Detailed Description

Coordinate class declaration.

Simple class defining an eta–phi coordinate in the detector.

Revision
782811
Date
2016-11-07 18:20:40 +0100 (Mon, 07 Nov 2016)

Definition at line 45 of file TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h.

Constructor & Destructor Documentation

◆ Coordinate() [1/2]

LVL1::Coordinate::Coordinate ( double phi,
double eta )

Definition at line 19 of file Coordinate.cxx.

20 : m_phi( phi ), m_eta( eta ) {
21
23 }
void checkBounds()
Ensure coords are sensible this could be done more intelligently, but at least it's readable!
double phi() const
return phi
double eta() const
return eta

◆ Coordinate() [2/2]

LVL1::Coordinate::Coordinate ( )

Definition at line 25 of file Coordinate.cxx.

26 : m_phi( 0.0 ), m_eta( 0.0 ) {
27
28 }

◆ ~Coordinate()

virtual LVL1::Coordinate::~Coordinate ( )
virtualdefault

Member Function Documentation

◆ checkBounds()

void LVL1::Coordinate::checkBounds ( )
protected

Ensure coords are sensible this could be done more intelligently, but at least it's readable!

Todo
Tidy up and finish

Definition at line 52 of file Coordinate.cxx.

52 {
53 if ( m_phi < 0 ) m_phi += m_twoPi;
54 if ( m_phi > m_twoPi ) m_phi -= m_twoPi;
55 return;
56 }

◆ eta()

double LVL1::Coordinate::eta ( ) const

return eta

Definition at line 40 of file Coordinate.cxx.

40 {
41 return m_eta;
42 }

◆ phi()

double LVL1::Coordinate::phi ( ) const

return phi

Definition at line 45 of file Coordinate.cxx.

45 {
46 return m_phi;
47 }

◆ setCoords()

void LVL1::Coordinate::setCoords ( double phi,
double eta )

change coords of an existing Coordinate object

Definition at line 31 of file Coordinate.cxx.

31 {
32
33 m_phi = phi; m_eta = eta;
35 return;
36
37 }

◆ operator<< [1/2]

MsgStream & operator<< ( MsgStream & theStream,
const Coordinate & theCoord )
friend

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream & theStream,
const Coordinate & theCoord )
friend

overload << operator so coordinate can be easily displayed... i.e.

cout << coord

Member Data Documentation

◆ m_eta

double LVL1::Coordinate::m_eta
private

◆ m_phi

double LVL1::Coordinate::m_phi
private

◆ m_twoPi

const double LVL1::Coordinate::m_twoPi = M_PI * 2.0
staticprivate

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