ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
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 More...
 
PhiRange phiRange () const
 
Range etaRange () const
 
bool contains (Coordinate &coord) const
 returns true if the coordinate falls inside the coordinate range More...
 
void setCoords (double phi, double eta)
 change coords of an existing Coordinate object More...
 
double eta () const
 return eta More...
 
double phi () const
 return phi More...
 

Protected Member Functions

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

Private Member Functions

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

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 36 of file CoordinateRange.h.

Constructor & Destructor Documentation

◆ CoordinateRange() [1/2]

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

Definition at line 20 of file CoordinateRange.cxx.

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

◆ CoordinateRange() [2/2]

LVL1::CoordinateRange::CoordinateRange ( )

Definition at line 27 of file CoordinateRange.cxx.

27  {
28  m_phiRange.setRange(phiMin, phiMax);

◆ ~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 57 of file Coordinate.cxx.

61  {

◆ contains()

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

returns true if the coordinate falls inside the coordinate range

Definition at line 45 of file CoordinateRange.cxx.

46  {
47  double phi = m_phiRange.centre();
48  double eta = m_etaRange.min() + ((m_etaRange.max() - m_etaRange.min()) / 2);

◆ eta()

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

return eta

Definition at line 45 of file Coordinate.cxx.

45  {
46  return m_phi;
47  }

◆ etaRange()

Range LVL1::CoordinateRange::etaRange ( ) const

Definition at line 42 of file CoordinateRange.cxx.

◆ phi()

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

return phi

Definition at line 50 of file Coordinate.cxx.

52  {

◆ phiRange()

PhiRange LVL1::CoordinateRange::phiRange ( ) const

Definition at line 40 of file CoordinateRange.cxx.

40 {

◆ setCentre()

void LVL1::CoordinateRange::setCentre ( )
private

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

Definition at line 51 of file CoordinateRange.cxx.

◆ setCoords()

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

change coords of an existing Coordinate object

Definition at line 36 of file Coordinate.cxx.

40  {
41  return m_eta;
42  }

◆ setRanges()

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

change coords of an existing CoordinateRange object

Definition at line 31 of file CoordinateRange.cxx.

35  { return m_phiRange; }
36 
37 Range CoordinateRange::etaRange() const { return m_etaRange; }
38 

Member Data Documentation

◆ m_eta

double LVL1::Coordinate::m_eta
privateinherited

◆ m_etaRange

Range LVL1::CoordinateRange::m_etaRange
private

Definition at line 58 of file CoordinateRange.h.

◆ m_phi

double LVL1::Coordinate::m_phi
privateinherited

◆ m_phiRange

PhiRange LVL1::CoordinateRange::m_phiRange
private

Definition at line 57 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:
LVL1::Coordinate::phi
double phi() const
return phi
Definition: Coordinate.cxx:50
LVL1::CoordinateRange::m_phiRange
PhiRange m_phiRange
Definition: CoordinateRange.h:57
LVL1::Range::min
double min() const
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:31
LVL1::PhiRange::centre
double centre() const
returns the centre of the two ranges.
Definition: PhiRange.cxx:98
LVL1::Range::max
double max() const
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:35
LVL1::Coordinate::m_eta
double m_eta
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:71
LVL1::CoordinateRange::etaRange
Range etaRange() const
Definition: CoordinateRange.cxx:42
LVL1::Coordinate::m_phi
double m_phi
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:70
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
LVL1::Coordinate::eta
double eta() const
return eta
Definition: Coordinate.cxx:45
LVL1::CoordinateRange::m_etaRange
Range m_etaRange
Definition: CoordinateRange.h:58
LVL1::PhiRange::setRange
void setRange(double min, double max)
sets range
Definition: PhiRange.cxx:44