ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1Interfaces
src
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
11
#include "
TrigT1Interfaces/CoordinateRange.h
"
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);
29
m_etaRange
.setRange(etaMin, etaMax);
30
checkBounds
();
31
setCentre
();
32
return
;
33
}
34
35
PhiRange
CoordinateRange::phiRange
()
const
{
return
m_phiRange
; }
36
37
Range
CoordinateRange::etaRange
()
const
{
return
m_etaRange
; }
38
40
bool
CoordinateRange::contains
(
Coordinate
&
coord
)
const
{
41
return
((
phiRange
().
contains
(
coord
.phi())) &&
42
(
etaRange
().
contains
(
coord
.eta())));
43
}
44
46
void
LVL1::CoordinateRange::setCentre
() {
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
CoordinateRange.h
coord
double coord
Type of coordination system.
Definition
JetVoronoiDiagramHelpers.h:43
LVL1::CoordinateRange::m_etaRange
Range m_etaRange
Definition
CoordinateRange.h:48
LVL1::CoordinateRange::etaRange
Range etaRange() const
Definition
CoordinateRange.cxx:37
LVL1::CoordinateRange::m_phiRange
PhiRange m_phiRange
Definition
CoordinateRange.h:47
LVL1::CoordinateRange::setRanges
void setRanges(double phiMin, double phiMax, double etaMin, double etaMax)
change coords of an existing CoordinateRange object
Definition
CoordinateRange.cxx:26
LVL1::CoordinateRange::setCentre
void setCentre()
calculates the centre of the ranges and sets the phi,eta coords to that
Definition
CoordinateRange.cxx:46
LVL1::CoordinateRange::phiRange
PhiRange phiRange() const
Definition
CoordinateRange.cxx:35
LVL1::CoordinateRange::contains
bool contains(Coordinate &coord) const
returns true if the coordinate falls inside the coordinate range
Definition
CoordinateRange.cxx:40
LVL1::CoordinateRange::CoordinateRange
CoordinateRange()
Definition
CoordinateRange.cxx:22
LVL1::Coordinate::Coordinate
Coordinate(double phi, double eta)
Definition
Coordinate.cxx:19
LVL1::Coordinate::checkBounds
void checkBounds()
Ensure coords are sensible this could be done more intelligently, but at least it's readable!
Definition
Coordinate.cxx:52
LVL1::Coordinate::setCoords
void setCoords(double phi, double eta)
change coords of an existing Coordinate object
Definition
Coordinate.cxx:31
LVL1::Coordinate::phi
double phi() const
return phi
Definition
Coordinate.cxx:45
LVL1::Coordinate::eta
double eta() const
return eta
Definition
Coordinate.cxx:40
LVL1::PhiRange
Range class declaration.
Definition
PhiRange.h:17
LVL1::Range
Range class declaration.
Definition
Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Range.h:17
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
Generated on
for ATLAS Offline Software by
1.17.0