test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
RecoEcal
EgammaCoreTools
interface
EcalEtaPhiRegion.h
Go to the documentation of this file.
1
#ifndef RecoEcal_EgammaCoreTools_EcalEtaPhiRegion_h
2
#define RecoEcal_EgammaCoreTools_EcalEtaPhiRegion_h
3
4
#include "
DataFormats/Math/interface/normalizedPhi.h
"
5
6
class
EcalEtaPhiRegion
7
{
8
public
:
9
10
EcalEtaPhiRegion
(
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
EcalEtaPhiRegion::phiLow
auto phiLow() const
Definition:
EcalEtaPhiRegion.h:27
EcalEtaPhiRegion::cphi
float cphi
Definition:
EcalEtaPhiRegion.h:34
alignmentValidation.c1
tuple c1
do drawing
Definition:
alignmentValidation.py:1023
normalizedPhi.h
EcalEtaPhiRegion::inRegion
bool inRegion(float eta, float phi) const
Definition:
EcalEtaPhiRegion.h:20
EcalEtaPhiRegion::etaHigh
auto etaHigh() const
Definition:
EcalEtaPhiRegion.h:26
constexpr
#define constexpr
DDAxes::phi
EcalEtaPhiRegion
Definition:
EcalEtaPhiRegion.h:6
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
EcalEtaPhiRegion::ceta
float ceta
Definition:
EcalEtaPhiRegion.h:32
EcalEtaPhiRegion::phiHigh
auto phiHigh() const
Definition:
EcalEtaPhiRegion.h:28
eta
Definition:
HIMultiTrackSelector.h:42
M_PI
#define M_PI
Definition:
BXVectorInputProducer.cc:51
EcalEtaPhiRegion::EcalEtaPhiRegion
EcalEtaPhiRegion(float etaLow, float etaHigh, float phiLow, float phiHigh)
Definition:
EcalEtaPhiRegion.h:10
EcalEtaPhiRegion::deta
float deta
Definition:
EcalEtaPhiRegion.h:33
proxim
T proxim(T b, T a)
Definition:
normalizedPhi.h:13
EcalEtaPhiRegion::dphi
float dphi
Definition:
EcalEtaPhiRegion.h:35
EcalEtaPhiRegion::etaLow
auto etaLow() const
Definition:
EcalEtaPhiRegion.h:25
Generated for CMSSW Reference Manual by
1.8.5