src
DataFormats
Math
interface
RectangularEtaPhiRegion.h
Go to the documentation of this file.
1
#ifndef DataFormats_Math_RectangularEtaPhiRegion_h
2
#define DataFormats_Math_RectangularEtaPhiRegion_h
3
4
#include "
DataFormats/Math/interface/normalizedPhi.h
"
5
6
class
RectangularEtaPhiRegion
{
7
public
:
8
RectangularEtaPhiRegion
(
float
etaLow
,
float
etaHigh
,
float
phiLow
,
float
phiHigh
)
9
:
ceta
(0.5
f
* (
etaHigh
+
etaLow
)),
deta
(0.5
f
*
std
::
abs
(
etaHigh
-
etaLow
)) {
10
phiHigh
=
proxim
(
phiHigh
,
phiLow
);
11
constexpr
float
c1
= 2. *
M_PI
;
12
if
(
phiHigh
<
phiLow
)
13
phiHigh
+=
c1
;
14
dphi
= 0.5f * (
phiHigh
-
phiLow
);
15
cphi
=
phiLow
+
dphi
;
16
}
17
18
bool
inRegion
(
float
eta
,
float
phi
)
const
{
19
return
std::abs
(
eta
-
ceta
) <
deta
&&
std::abs
(
proxim
(
phi
,
cphi
) -
cphi
) <
dphi
;
20
}
21
22
auto
etaLow
()
const
{
return
ceta
-
deta
; }
23
auto
etaHigh
()
const
{
return
ceta
+
deta
; }
24
auto
phiLow
()
const
{
return
cphi
-
dphi
; }
25
auto
phiHigh
()
const
{
return
cphi
+
dphi
; }
26
27
private
:
28
float
ceta
;
29
float
deta
;
30
float
cphi
;
31
float
dphi
;
32
};
33
34
#endif
RectangularEtaPhiRegion::dphi
float dphi
Definition:
RectangularEtaPhiRegion.h:31
RectangularEtaPhiRegion::etaLow
auto etaLow() const
Definition:
RectangularEtaPhiRegion.h:22
RectangularEtaPhiRegion::etaHigh
auto etaHigh() const
Definition:
RectangularEtaPhiRegion.h:23
PVValHelper::eta
Definition:
PVValidationHelpers.h:70
std
Definition:
JetResolutionObject.h:76
ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr
if constexpr(n > 3)
Definition:
BrokenLine.h:165
DDAxes::phi
proxim
constexpr T proxim(T b, T a)
Definition:
normalizedPhi.h:14
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
RectangularEtaPhiRegion::ceta
float ceta
Definition:
RectangularEtaPhiRegion.h:28
RectangularEtaPhiRegion::inRegion
bool inRegion(float eta, float phi) const
Definition:
RectangularEtaPhiRegion.h:18
M_PI
#define M_PI
Definition:
BXVectorInputProducer.cc:50
alignmentValidation.c1
c1
do drawing
Definition:
alignmentValidation.py:1025
RectangularEtaPhiRegion::cphi
float cphi
Definition:
RectangularEtaPhiRegion.h:30
RectangularEtaPhiRegion::RectangularEtaPhiRegion
RectangularEtaPhiRegion(float etaLow, float etaHigh, float phiLow, float phiHigh)
Definition:
RectangularEtaPhiRegion.h:8
RectangularEtaPhiRegion::deta
float deta
Definition:
RectangularEtaPhiRegion.h:29
normalizedPhi.h
RectangularEtaPhiRegion::phiLow
auto phiLow() const
Definition:
RectangularEtaPhiRegion.h:24
RectangularEtaPhiRegion::phiHigh
auto phiHigh() const
Definition:
RectangularEtaPhiRegion.h:25
RectangularEtaPhiRegion
Definition:
RectangularEtaPhiRegion.h:6
Generated for CMSSW Reference Manual by
1.8.14