#include <EcalEtaPhiRegion.h>
Public Member Functions | |
EcalEtaPhiRegion (double etaLow, double etaHigh, double phiLow, double phiHigh) | |
double | etaHigh () const |
double | etaLow () const |
bool | inRegion (const GlobalPoint &position) const |
double | phiHigh () const |
double | phiLow () const |
~EcalEtaPhiRegion () | |
Private Attributes | |
double | etaHigh_ |
double | etaLow_ |
double | phiHigh_ |
double | phiLow_ |
Definition at line 6 of file EcalEtaPhiRegion.h.
EcalEtaPhiRegion::EcalEtaPhiRegion | ( | double | etaLow, |
double | etaHigh, | ||
double | phiLow, | ||
double | phiHigh | ||
) |
Definition at line 3 of file EcalEtaPhiRegion.cc.
References phiHigh_, phiLow_, Geom::pi(), and Geom::twoPi().
: etaLow_(etaLow),etaHigh_(etaHigh),phiLow_(phiLow),phiHigh_(phiHigh) { // put phi in range -pi to pi if(phiLow_ > Geom::pi()) phiLow_ -= Geom::twoPi(); if(phiLow_ < -Geom::pi()) phiLow_ += Geom::twoPi(); if(phiHigh_ > Geom::pi()) phiHigh_ -= Geom::twoPi(); if(phiHigh_ < -Geom::pi()) phiHigh_ += Geom::twoPi(); }
EcalEtaPhiRegion::~EcalEtaPhiRegion | ( | ) | [inline] |
Definition at line 11 of file EcalEtaPhiRegion.h.
{};
double EcalEtaPhiRegion::etaHigh | ( | ) | const [inline] |
Definition at line 14 of file EcalEtaPhiRegion.h.
References etaHigh_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
{ return etaHigh_; }
double EcalEtaPhiRegion::etaLow | ( | ) | const [inline] |
Definition at line 13 of file EcalEtaPhiRegion.h.
References etaLow_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
{ return etaLow_; }
bool EcalEtaPhiRegion::inRegion | ( | const GlobalPoint & | position | ) | const |
Definition at line 13 of file EcalEtaPhiRegion.cc.
References PV3DBase< T, PVType, FrameType >::eta(), etaHigh_, etaLow_, PV3DBase< T, PVType, FrameType >::phi(), phi, phiHigh_, phiLow_, Geom::pi(), and Geom::twoPi().
{ double phi = position.phi(); double phihightemp = phiHigh_; if(phihightemp<phiLow_) phihightemp += Geom::twoPi(); // put phi in range -pi to pi if(phi > Geom::pi()) phi -= Geom::twoPi(); if(phi < -Geom::pi()) phi += Geom::twoPi(); if(phi<phiLow_) phi += Geom::twoPi(); return (position.eta() > etaLow_ && position.eta() < etaHigh_ && phi > phiLow_ && phi < phihightemp); }
double EcalEtaPhiRegion::phiHigh | ( | ) | const [inline] |
Definition at line 16 of file EcalEtaPhiRegion.h.
References phiHigh_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
{ return phiHigh_; }
double EcalEtaPhiRegion::phiLow | ( | ) | const [inline] |
Definition at line 15 of file EcalEtaPhiRegion.h.
References phiLow_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
{ return phiLow_; }
double EcalEtaPhiRegion::etaHigh_ [private] |
Definition at line 23 of file EcalEtaPhiRegion.h.
Referenced by etaHigh(), and inRegion().
double EcalEtaPhiRegion::etaLow_ [private] |
Definition at line 22 of file EcalEtaPhiRegion.h.
Referenced by etaLow(), and inRegion().
double EcalEtaPhiRegion::phiHigh_ [private] |
Definition at line 25 of file EcalEtaPhiRegion.h.
Referenced by EcalEtaPhiRegion(), inRegion(), and phiHigh().
double EcalEtaPhiRegion::phiLow_ [private] |
Definition at line 24 of file EcalEtaPhiRegion.h.
Referenced by EcalEtaPhiRegion(), inRegion(), and phiLow().