#include <RecoEcal/EgammaCoreTools/interface/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().
00003 : 00004 etaLow_(etaLow),etaHigh_(etaHigh),phiLow_(phiLow),phiHigh_(phiHigh) 00005 { 00006 // put phi in range -pi to pi 00007 if(phiLow_ > Geom::pi()) phiLow_ -= Geom::twoPi(); 00008 if(phiLow_ < -Geom::pi()) phiLow_ += Geom::twoPi(); 00009 if(phiHigh_ > Geom::pi()) phiHigh_ -= Geom::twoPi(); 00010 if(phiHigh_ < -Geom::pi()) phiHigh_ += Geom::twoPi(); 00011 }
EcalEtaPhiRegion::~EcalEtaPhiRegion | ( | ) | [inline] |
double EcalEtaPhiRegion::etaHigh | ( | ) | const [inline] |
Definition at line 14 of file EcalEtaPhiRegion.h.
References etaHigh_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
00014 { return etaHigh_; }
double EcalEtaPhiRegion::etaLow | ( | ) | const [inline] |
Definition at line 13 of file EcalEtaPhiRegion.h.
References etaLow_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
00013 { 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().
00013 { 00014 00015 double phi = position.phi(); 00016 double phihightemp = phiHigh_; 00017 00018 if(phihightemp<phiLow_) phihightemp += Geom::twoPi(); 00019 00020 // put phi in range -pi to pi 00021 if(phi > Geom::pi()) phi -= Geom::twoPi(); 00022 if(phi < -Geom::pi()) phi += Geom::twoPi(); 00023 if(phi<phiLow_) phi += Geom::twoPi(); 00024 00025 00026 return (position.eta() > etaLow_ && position.eta() < etaHigh_ && 00027 phi > phiLow_ && phi < phihightemp); 00028 00029 }
double EcalEtaPhiRegion::phiHigh | ( | ) | const [inline] |
Definition at line 16 of file EcalEtaPhiRegion.h.
References phiHigh_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
00016 { return phiHigh_; }
double EcalEtaPhiRegion::phiLow | ( | ) | const [inline] |
Definition at line 15 of file EcalEtaPhiRegion.h.
References phiLow_.
Referenced by EcalElectronicsMapping::GetListofFEDs().
00015 { return phiLow_; }
double EcalEtaPhiRegion::etaHigh_ [private] |
double EcalEtaPhiRegion::etaLow_ [private] |
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().