ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODCaloRings
xAODCaloRings
tools
AtlasGeoPoint.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id: AtlasGeoPoint.h 689815 2015-08-17 15:39:55Z wsfreund $
6
#ifndef XAODCALORINGS_UTILS_ATLASGEOPOINT_H
7
#define XAODCALORINGS_UTILS_ATLASGEOPOINT_H
8
9
#include <limits>
10
15
class
AtlasGeoPoint
{
16
17
public
:
18
19
AtlasGeoPoint
():
20
m_eta
(
std
::numeric_limits<float>::
max
()),
21
m_phi
(
std
::numeric_limits<float>::
max
())
22
{;}
23
24
AtlasGeoPoint
(
const
float
eta
,
const
float
phi
):
25
m_eta
(
eta
),
26
m_phi
(
phi
)
27
{;}
28
29
~AtlasGeoPoint
() =
default
;
30
AtlasGeoPoint
(
const
AtlasGeoPoint
&p) =
default
;
31
AtlasGeoPoint
&
operator=
(
const
AtlasGeoPoint
&p) =
default
;
32
33
static
const
float
PHI_MIN
;
34
static
const
float
PHI_MAX
;
35
// static constexpr float PHI_MIN = CaloPhiRange::phi_min(); <- not constexpr
36
// static constexpr float PHI_MAX = CaloPhiRange::phi_max(); <- not constexpr
37
static
constexpr
float
ETA_MIN
= -5;
38
static
constexpr
float
ETA_MAX
= 5;
39
40
// Check if AtlasGeoPoint is within bounds
41
bool
isValid
()
const
;
42
43
// Get point eta
44
float
eta
()
const
;
45
// Get point phi
46
float
phi
()
const
;
47
48
// Set point eta
49
void
setEta
(
const
float
eta
);
50
// Set point phi
51
void
setPhi
(
const
float
phi
);
52
53
private
:
54
55
// Eta
56
float
m_eta
;
57
// Phi
58
float
m_phi
;
59
60
};
61
62
//==============================================================================
63
inline
64
bool
AtlasGeoPoint::isValid
()
const
65
{
66
return
m_eta
>=
ETA_MIN
67
&&
m_eta
<=
ETA_MAX
68
&&
m_phi
>=
PHI_MIN
69
&&
m_phi
<=
PHI_MAX
;
70
}
71
72
//==============================================================================
73
inline
74
float
AtlasGeoPoint::eta
()
const
75
{
76
return
m_eta
;
77
}
78
79
//==============================================================================
80
inline
81
float
AtlasGeoPoint::phi
()
const
82
{
83
return
m_phi
;
84
}
85
86
//==============================================================================
87
inline
88
void
AtlasGeoPoint::setEta
(
const
float
eta
)
89
{
90
m_eta
=
eta
;
91
}
92
93
//==============================================================================
94
inline
95
void
AtlasGeoPoint::setPhi
(
const
float
phi
)
96
{
97
m_phi
=
phi
;
98
}
99
100
101
#endif
// XAODCALORINGS_UTILS_ATLASGEOPOINT_H
max
#define max(a, b)
Definition
cfImp.cxx:41
AtlasGeoPoint::m_phi
float m_phi
Definition
AtlasGeoPoint.h:58
AtlasGeoPoint::PHI_MAX
static const float PHI_MAX
Definition
AtlasGeoPoint.h:34
AtlasGeoPoint::m_eta
float m_eta
Definition
AtlasGeoPoint.h:56
AtlasGeoPoint::~AtlasGeoPoint
~AtlasGeoPoint()=default
AtlasGeoPoint::setEta
void setEta(const float eta)
Definition
AtlasGeoPoint.h:88
AtlasGeoPoint::eta
float eta() const
Definition
AtlasGeoPoint.h:74
AtlasGeoPoint::isValid
bool isValid() const
Definition
AtlasGeoPoint.h:64
AtlasGeoPoint::AtlasGeoPoint
AtlasGeoPoint(const AtlasGeoPoint &p)=default
AtlasGeoPoint::PHI_MIN
static const float PHI_MIN
Definition
AtlasGeoPoint.h:33
AtlasGeoPoint::AtlasGeoPoint
AtlasGeoPoint()
Definition
AtlasGeoPoint.h:19
AtlasGeoPoint::setPhi
void setPhi(const float phi)
Definition
AtlasGeoPoint.h:95
AtlasGeoPoint::AtlasGeoPoint
AtlasGeoPoint(const float eta, const float phi)
Definition
AtlasGeoPoint.h:24
AtlasGeoPoint::operator=
AtlasGeoPoint & operator=(const AtlasGeoPoint &p)=default
AtlasGeoPoint::phi
float phi() const
Definition
AtlasGeoPoint.h:81
AtlasGeoPoint::ETA_MIN
static constexpr float ETA_MIN
Definition
AtlasGeoPoint.h:37
AtlasGeoPoint::ETA_MAX
static constexpr float ETA_MAX
Definition
AtlasGeoPoint.h:38
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0