Main Page
Namespaces
Classes
Package Documentation
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
{
8
public
:
9
10
RectangularEtaPhiRegion
(
float
etaLow
,
float
etaHigh
,
float
phiLow
,
float
phiHigh
) :
11
ceta
(0.5
f
*(etaHigh+etaLow)),
deta
(0.5
f
*
std
::
abs
(etaHigh-etaLow))
12
{
13
phiHigh =
proxim
(phiHigh,phiLow);
14
constexpr
float
c1
= 2.*
M_PI
;
15
if
(phiHigh<phiLow) phiHigh+=
c1
;
16
dphi
= 0.5f*(phiHigh-
phiLow
);
17
cphi
= phiLow+
dphi
;
18
}
19
20
bool
inRegion
(
float
eta
,
float
phi
)
const
{
21
return
std::abs
(eta-
ceta
)<
deta
&&
22
std::abs
(
proxim
(phi,
cphi
)-
cphi
)<
dphi
;
23
}
24
25
auto
etaLow
()
const
{
return
ceta
-
deta
; }
26
auto
etaHigh
()
const
{
return
ceta
+
deta
; }
27
auto
phiLow
()
const
{
return
cphi
-
dphi
; }
28
auto
phiHigh
()
const
{
return
cphi
+
dphi
; }
29
30
private
:
31
32
float
ceta
;
33
float
deta
;
34
float
cphi
;
35
float
dphi
;
36
37
};
38
39
#endif
RectangularEtaPhiRegion::dphi
float dphi
Definition:
RectangularEtaPhiRegion.h:35
RectangularEtaPhiRegion::etaHigh
auto etaHigh() const
Definition:
RectangularEtaPhiRegion.h:26
RectangularEtaPhiRegion::etaLow
auto etaLow() const
Definition:
RectangularEtaPhiRegion.h:25
PVValHelper::eta
Definition:
PVValidationHelpers.h:65
std
Definition:
JetResolutionObject.h:80
DDAxes::phi
proxim
constexpr T proxim(T b, T a)
Definition:
normalizedPhi.h:14
RectangularEtaPhiRegion::phiHigh
auto phiHigh() const
Definition:
RectangularEtaPhiRegion.h:28
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:32
M_PI
#define M_PI
Definition:
BXVectorInputProducer.cc:51
alignmentValidation.c1
c1
do drawing
Definition:
alignmentValidation.py:1025
RectangularEtaPhiRegion::cphi
float cphi
Definition:
RectangularEtaPhiRegion.h:34
RectangularEtaPhiRegion::phiLow
auto phiLow() const
Definition:
RectangularEtaPhiRegion.h:27
RectangularEtaPhiRegion::RectangularEtaPhiRegion
RectangularEtaPhiRegion(float etaLow, float etaHigh, float phiLow, float phiHigh)
Definition:
RectangularEtaPhiRegion.h:10
RectangularEtaPhiRegion::deta
float deta
Definition:
RectangularEtaPhiRegion.h:33
normalizedPhi.h
RectangularEtaPhiRegion::inRegion
bool inRegion(float eta, float phi) const
Definition:
RectangularEtaPhiRegion.h:20
constexpr
#define constexpr
Definition:
GCC11Compatibility.h:35
RectangularEtaPhiRegion
Definition:
RectangularEtaPhiRegion.h:6
Generated for CMSSW Reference Manual by
1.8.11