ATLAS Offline Software
Loading...
Searching...
No Matches
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
13namespace LVL1 {
14
15CoordinateRange::CoordinateRange(double phiMin, double phiMax, double etaMin,
16 double etaMax)
17 : m_phiRange(phiMin, phiMax), m_etaRange(etaMin, etaMax) {
19 setCentre();
20}
21
24
26void CoordinateRange::setRanges(double phiMin, double phiMax, double etaMin,
27 double etaMax) {
28 m_phiRange.setRange(phiMin, phiMax);
29 m_etaRange.setRange(etaMin, etaMax);
31 setCentre();
32 return;
33}
34
36
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
51 return;
52}
53
54} // namespace LVL1
double coord
Type of coordination system.
void setRanges(double phiMin, double phiMax, double etaMin, double etaMax)
change coords of an existing CoordinateRange object
void setCentre()
calculates the centre of the ranges and sets the phi,eta coords to that
PhiRange phiRange() const
bool contains(Coordinate &coord) const
returns true if the coordinate falls inside the coordinate range
Coordinate(double phi, double eta)
void checkBounds()
Ensure coords are sensible this could be done more intelligently, but at least it's readable!
void setCoords(double phi, double eta)
change coords of an existing Coordinate object
double phi() const
return phi
double eta() const
return eta
Range class declaration.
Definition PhiRange.h:17
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...