Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoEcal
EgammaCoreTools
src
EcalEtaPhiRegion.cc
Go to the documentation of this file.
1
#include "
RecoEcal/EgammaCoreTools/interface/EcalEtaPhiRegion.h
"
2
3
EcalEtaPhiRegion::EcalEtaPhiRegion
(
double
etaLow,
double
etaHigh,
double
phiLow,
double
phiHigh):
4
etaLow_(etaLow),etaHigh_(etaHigh),phiLow_(phiLow),phiHigh_(phiHigh)
5
{
6
// put phi in range -pi to pi
7
if
(
phiLow_
>
Geom::pi
())
phiLow_
-=
Geom::twoPi
();
8
if
(
phiLow_
< -
Geom::pi
())
phiLow_
+=
Geom::twoPi
();
9
if
(
phiHigh_
>
Geom::pi
())
phiHigh_
-=
Geom::twoPi
();
10
if
(
phiHigh_
< -
Geom::pi
())
phiHigh_
+=
Geom::twoPi
();
11
}
12
13
bool
EcalEtaPhiRegion::inRegion
(
const
GlobalPoint
&
position
)
const
{
14
15
double
phi
= position.
phi
();
16
double
phihightemp =
phiHigh_
;
17
18
if
(phihightemp<
phiLow_
) phihightemp +=
Geom::twoPi
();
19
20
// put phi in range -pi to pi
21
if
(phi >
Geom::pi
()) phi -=
Geom::twoPi
();
22
if
(phi < -
Geom::pi
()) phi +=
Geom::twoPi
();
23
if
(phi<
phiLow_
) phi +=
Geom::twoPi
();
24
25
26
return
(position.
eta
() >
etaLow_
&& position.
eta
() <
etaHigh_
&&
27
phi >
phiLow_
&& phi < phihightemp);
28
29
}
EcalEtaPhiRegion::etaLow_
double etaLow_
Definition:
EcalEtaPhiRegion.h:22
PV3DBase::phi
Geom::Phi< T > phi() const
Definition:
PV3DBase.h:63
position
static int position[TOTALCHAMBERS][3]
Definition:
ReadPGInfo.cc:509
EcalEtaPhiRegion::etaHigh_
double etaHigh_
Definition:
EcalEtaPhiRegion.h:23
EcalEtaPhiRegion::inRegion
bool inRegion(const GlobalPoint &position) const
Definition:
EcalEtaPhiRegion.cc:13
EcalEtaPhiRegion::phiHigh_
double phiHigh_
Definition:
EcalEtaPhiRegion.h:25
PV3DBase::eta
T eta() const
Definition:
PV3DBase.h:70
Point3DBase< float, GlobalTag >
Geom::pi
double pi()
Definition:
Pi.h:31
Geom::twoPi
double twoPi()
Definition:
Pi.h:32
EcalEtaPhiRegion.h
EcalEtaPhiRegion::EcalEtaPhiRegion
EcalEtaPhiRegion(double etaLow, double etaHigh, double phiLow, double phiHigh)
Definition:
EcalEtaPhiRegion.cc:3
EcalEtaPhiRegion::phiLow_
double phiLow_
Definition:
EcalEtaPhiRegion.h:24
phi
Definition:
DDAxes.h:10
Generated for CMSSW Reference Manual by
1.8.5