ATLAS Offline Software
CoordinateRange.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 /***************************************************************************
5  CoordinateRange.cxx - description
6  -------------------
7  begin : 26/02/2002
8  email : e.moyse@qmul.ac.uk
9 ***************************************************************************/
10 
12 
13 namespace LVL1 {
14 
15 CoordinateRange::CoordinateRange(double phiMin, double phiMax, double etaMin,
16  double etaMax)
17  : m_phiRange(phiMin, phiMax), m_etaRange(etaMin, etaMax) {
18  checkBounds();
19  setCentre();
20 }
21 
22 CoordinateRange::CoordinateRange()
23  : m_phiRange(0.0, 0.0), m_etaRange(0.0, 0.0) {}
24 
26 void CoordinateRange::setRanges(double phiMin, double phiMax, double etaMin,
27  double etaMax) {
28  m_phiRange.setRange(phiMin, phiMax);
30  checkBounds();
32  return;
33 }
34 
36 
37 Range CoordinateRange::etaRange() const { return m_etaRange; }
38 
41  return ((phiRange().contains(coord.phi())) &&
42  (etaRange().contains(coord.eta())));
43 }
44 
47  double phi = m_phiRange.centre();
48  double eta = m_etaRange.min() + ((m_etaRange.max() - m_etaRange.min()) / 2);
49 
50  Coordinate::setCoords(phi, eta);
51  return;
52 }
53 
54 } // namespace LVL1
LVL1::CoordinateRange::phiRange
PhiRange phiRange() const
Definition: CoordinateRange.cxx:40
LVL1::CoordinateRange::m_phiRange
PhiRange m_phiRange
Definition: CoordinateRange.h:57
LVL1::CoordinateRange::setCentre
void setCentre()
calculates the centre of the ranges and sets the phi,eta coords to that
Definition: CoordinateRange.cxx:51
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
LVL1::CoordinateRange::setRanges
void setRanges(double phiMin, double phiMax, double etaMin, double etaMax)
change coords of an existing CoordinateRange object
Definition: CoordinateRange.cxx:31
LVL1::Range::setRange
void setRange(double min, double max)
sets range
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:40
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
LVL1::CoordinateRange::contains
bool contains(Coordinate &coord) const
returns true if the coordinate falls inside the coordinate range
Definition: CoordinateRange.cxx:45
LVL1::Coordinate::checkBounds
void checkBounds()
Ensure coords are sensible this could be done more intelligently, but at least it's readable!
Definition: Coordinate.cxx:57
LVL1::PhiRange
Range class declaration.
Definition: PhiRange.h:22
LVL1::CoordinateRange::etaRange
Range etaRange() const
Definition: CoordinateRange.cxx:42
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
LVL1::CoordinateRange::CoordinateRange
CoordinateRange()
Definition: CoordinateRange.cxx:27
CoordinateRange.h
LVL1::Coordinate::setCoords
void setCoords(double phi, double eta)
change coords of an existing Coordinate object
Definition: Coordinate.cxx:36
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