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

CoordinateRange class declaration. More...

#include <CoordinateRange.h>

Inheritance diagram for LVL1::CoordinateRange:
Collaboration diagram for LVL1::CoordinateRange:

Public Member Functions

 CoordinateRange (double phiMin, double phiMax, double etaMin, double etaMax)
 CoordinateRange ()
virtual ~CoordinateRange ()=default
void setRanges (double phiMin, double phiMax, double etaMin, double etaMax)
 change coords of an existing CoordinateRange object
PhiRange phiRange () const
Range etaRange () const
bool contains (Coordinate &coord) const
 returns true if the coordinate falls inside the coordinate range
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 Member Functions

void setCentre ()
 calculates the centre of the ranges and sets the phi,eta coords to that

Private Attributes

PhiRange m_phiRange
Range m_etaRange
double m_phi
double m_eta

Static Private Attributes

static const double m_twoPi = M_PI * 2.0

Detailed Description

CoordinateRange class declaration.

Class defining a "window" in eta–phi space.

Revision
734527
Date
2016-04-07 13:43:47 +0200 (Thu, 07 Apr 2016)

Definition at line 31 of file CoordinateRange.h.

Constructor & Destructor Documentation

◆ CoordinateRange() [1/2]

LVL1::CoordinateRange::CoordinateRange ( double phiMin,
double phiMax,
double etaMin,
double etaMax )

Definition at line 15 of file CoordinateRange.cxx.

17 : m_phiRange(phiMin, phiMax), m_etaRange(etaMin, etaMax) {
19 setCentre();
20}
void setCentre()
calculates the centre of the ranges and sets the phi,eta coords to that
void checkBounds()
Ensure coords are sensible this could be done more intelligently, but at least it's readable!

◆ CoordinateRange() [2/2]

LVL1::CoordinateRange::CoordinateRange ( )

Definition at line 22 of file CoordinateRange.cxx.

23 : m_phiRange(0.0, 0.0), m_etaRange(0.0, 0.0) {}

◆ ~CoordinateRange()

virtual LVL1::CoordinateRange::~CoordinateRange ( )
virtualdefault

Member Function Documentation

◆ checkBounds()

void LVL1::Coordinate::checkBounds ( )
protectedinherited

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.

◆ contains()

bool LVL1::CoordinateRange::contains ( Coordinate & coord) const

returns true if the coordinate falls inside the coordinate range

Definition at line 40 of file CoordinateRange.cxx.

40 {
41 return ((phiRange().contains(coord.phi())) &&
42 (etaRange().contains(coord.eta())));
43}
double coord
Type of coordination system.
PhiRange phiRange() const
bool contains(Coordinate &coord) const
returns true if the coordinate falls inside the coordinate range

◆ eta()

double LVL1::Coordinate::eta ( ) const
inherited

return eta

Definition at line 40 of file Coordinate.cxx.

◆ etaRange()

Range LVL1::CoordinateRange::etaRange ( ) const

Definition at line 37 of file CoordinateRange.cxx.

37{ return m_etaRange; }

◆ phi()

double LVL1::Coordinate::phi ( ) const
inherited

return phi

Definition at line 45 of file Coordinate.cxx.

45 {
46 return m_phi;
47 }

◆ phiRange()

PhiRange LVL1::CoordinateRange::phiRange ( ) const

Definition at line 35 of file CoordinateRange.cxx.

35{ return m_phiRange; }

◆ setCentre()

void LVL1::CoordinateRange::setCentre ( )
private

calculates the centre of the ranges and sets the phi,eta coords to that

Definition at line 46 of file CoordinateRange.cxx.

46 {
47 double phi = m_phiRange.centre();
48 double eta = m_etaRange.min() + ((m_etaRange.max() - m_etaRange.min()) / 2);
49
51 return;
52}
void setCoords(double phi, double eta)
change coords of an existing Coordinate object
double phi() const
return phi
double eta() const
return eta

◆ setCoords()

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

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 }

◆ setRanges()

void LVL1::CoordinateRange::setRanges ( double phiMin,
double phiMax,
double etaMin,
double etaMax )

change coords of an existing CoordinateRange object

Definition at line 26 of file CoordinateRange.cxx.

27 {
28 m_phiRange.setRange(phiMin, phiMax);
29 m_etaRange.setRange(etaMin, etaMax);
31 setCentre();
32 return;
33}

Member Data Documentation

◆ m_eta

double LVL1::Coordinate::m_eta
privateinherited

◆ m_etaRange

Range LVL1::CoordinateRange::m_etaRange
private

Definition at line 48 of file CoordinateRange.h.

◆ m_phi

double LVL1::Coordinate::m_phi
privateinherited

◆ m_phiRange

PhiRange LVL1::CoordinateRange::m_phiRange
private

Definition at line 47 of file CoordinateRange.h.

◆ m_twoPi

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

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